Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolving Issues #929 and #930 #932

Merged
merged 61 commits into from
Feb 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
f91ceb5
Adding qc_tasks and calculation.py
rdguha1995 Aug 11, 2023
72ee7dc
big_commit for implementing the drone fucntionality of atomate(qchem)…
rdguha1995 Aug 18, 2023
f7272fc
Merge branch 'materialsproject:main' into main
rdguha1995 Aug 18, 2023
a721e22
ran pre-commit locally and some minor changes
rdguha1995 Aug 23, 2023
65cae25
Merge branch 'main' of github.com:rdguha1995/emmet
rdguha1995 Aug 23, 2023
64d923f
writing_unit_tests_for_sp_and_opt
rdguha1995 Oct 6, 2023
d294b32
ran pre-commit on test files
rdguha1995 Oct 6, 2023
97b31aa
corrected Union type error
rdguha1995 Oct 6, 2023
c664c4d
added numpy custom validators
rdguha1995 Oct 6, 2023
ade17a3
Merge remote-tracking branch 'upstream/main'
rdguha1995 Oct 6, 2023
df0a857
datetime import problem
rdguha1995 Oct 6, 2023
c18ab41
allowing arbitrary types
rdguha1995 Oct 6, 2023
96e84ff
further tests
rdguha1995 Oct 6, 2023
4548d7c
further tests
rdguha1995 Oct 6, 2023
5246bf0
change in io file convention
rdguha1995 Oct 7, 2023
fc7c3aa
Merge remote-tracking branch 'upstream/main'
rdguha1995 Oct 11, 2023
e29c98a
checking qcinput
rdguha1995 Oct 11, 2023
7d7ee29
checking qcinput
rdguha1995 Oct 11, 2023
e6cc06c
Incorporating all the pydantic 2 changes
rdguha1995 Oct 11, 2023
126bf5a
changes in lot, task_type, calc_type
rdguha1995 Oct 11, 2023
a899b1d
removing circular dependency
rdguha1995 Oct 12, 2023
3cf7691
calc_doc issue
rdguha1995 Oct 12, 2023
829f774
Make more fields optional in accordance with pydantic 2
rdguha1995 Oct 13, 2023
0c6bfbf
Corrected the Input Doc problems
rdguha1995 Oct 13, 2023
3306de5
CalcInput smx attribute issue
rdguha1995 Oct 13, 2023
5535e14
correcting input to qcinput and qcoutput
rdguha1995 Oct 13, 2023
11862f0
changes in the Optimization test doc for inputs
rdguha1995 Oct 13, 2023
1b9742d
molecule -> initial_molecule
rdguha1995 Oct 13, 2023
715a47b
changes to the sp valid task_schema
rdguha1995 Oct 13, 2023
28011d0
test_output breakdowns
rdguha1995 Oct 13, 2023
d9c79d4
test_output breakdowns OutputDoc
rdguha1995 Oct 13, 2023
a194c45
test_output breakdowns OutputDoc
rdguha1995 Oct 14, 2023
bbf9f45
test_output breakdowns OutputDoc
rdguha1995 Oct 14, 2023
626b184
test_output breakdowns OutputDoc
rdguha1995 Oct 14, 2023
4a7d529
test_output breakdowns OutputDoc
rdguha1995 Oct 14, 2023
fe7bfc4
test_output breakdowns OutputDoc
rdguha1995 Oct 14, 2023
9d1f87c
Changes to the TaskDoc
rdguha1995 Oct 19, 2023
98fa420
Changes to the TaskDoc np.array
rdguha1995 Oct 19, 2023
334068b
Changes to the conftest
rdguha1995 Oct 19, 2023
7c12f3e
Changes to the conftest arrays
rdguha1995 Oct 19, 2023
76944ba
Changes to the conftest arrays
rdguha1995 Oct 19, 2023
b4bf19b
Changes to test code
rdguha1995 Oct 19, 2023
b70ce6c
Changes to test code
rdguha1995 Oct 19, 2023
01173ea
Changes to test code
rdguha1995 Oct 19, 2023
9791d37
Changes to test code
rdguha1995 Oct 19, 2023
6a64691
Changes to test code
rdguha1995 Oct 19, 2023
65793d0
Changes to test code
rdguha1995 Oct 19, 2023
60ce203
Changes to test code
rdguha1995 Oct 19, 2023
828d5b0
Changes to test code
rdguha1995 Oct 19, 2023
b26b6fa
Changes to test code
rdguha1995 Oct 19, 2023
5c71bab
Changes to test code
rdguha1995 Oct 19, 2023
8640186
Merge branch 'materialsproject:main' into main
rdguha1995 Dec 11, 2023
3dee8d2
fixing bug where solvent field was being accessed as a dict
rdguha1995 Dec 13, 2023
4759da9
forgot pre-commit
rdguha1995 Dec 13, 2023
1028eab
Changed the default args for initial_molecule and optimized_molecule …
rdguha1995 Dec 13, 2023
e68bd20
deleted the superfluous FW files
rdguha1995 Dec 14, 2023
da6656f
making the TaskDoc.from_directory functionality for generalized to ha…
rdguha1995 Dec 21, 2023
ce1e962
Merge branch 'main' into main
rdguha1995 Jan 9, 2024
60aacd3
resolved the bugs with enthalpy, entropy and parsing frequencies
rdguha1995 Feb 6, 2024
8f92dcb
Merge branch 'main' into main
rdguha1995 Feb 6, 2024
c9cc045
Merge remote-tracking branch 'upstream/main'
rdguha1995 Feb 6, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 17 additions & 7 deletions emmet-core/emmet/core/qc_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,14 @@ class OutputDoc(BaseModel):
None, description="Natural Bonding Orbital (NBO) output"
)

frequencies: Optional[Union[Dict[str, Any], List]] = Field(
None,
description="The list of calculated frequencies if job type is freq (units: cm^-1)",
)

frequency_modes: Optional[Union[List, str]] = Field(
None,
description="The list of calculated frequency mode vectors if job type is freq (units: cm^-1)",
description="The list of calculated frequency mode vectors if job type is freq",
)

@classmethod
Expand Down Expand Up @@ -112,6 +117,7 @@ def from_qchem_calc_doc(cls, calc_doc: Calculation) -> "OutputDoc":
resp=calc_doc.output.resp,
nbo=calc_doc.output.nbo_data,
frequencies=calc_doc.output.frequencies,
frequency_modes=calc_doc.output.frequency_modes,
)


Expand Down Expand Up @@ -588,7 +594,9 @@ def _find_qchem_files(
)
in_task_name = in_task_name or "mol.qin"
if in_task_name == "orig":
task_files[in_task_name] = {"orig_input_file": file}
task_files[in_task_name] = {"orig_input_file": file.name}
elif in_task_name == "last":
continue
elif in_task_name == "mol.qin" or in_task_name == "mol.in":
if in_task_name == "mol.qin":
out_file = (
Expand All @@ -603,19 +611,21 @@ def _find_qchem_files(
else path / "mol.out"
)
task_files["standard"] = {
"qcinput_file": file,
"qcoutput_file": out_file,
"qcinput_file": file.name,
"qcoutput_file": out_file.name,
}
# This block will exist only if calcs were run through atomate
else:
try:
task_files[in_task_name] = {
"qcinput_file": file,
"qcoutput_file": Path("mol.qout." + in_task_name + ".gz"),
"qcinput_file": file.name,
"qcoutput_file": Path(
"mol.qout." + in_task_name + ".gz"
).name,
}
except FileNotFoundError:
task_files[in_task_name] = {
"qcinput_file": file,
"qcinput_file": file.name,
"qcoutput_file": "No qout files exist for this in file",
}

Expand Down
46 changes: 35 additions & 11 deletions emmet-core/emmet/core/qchem/calculation.py
Original file line number Diff line number Diff line change
Expand Up @@ -274,8 +274,8 @@ def from_qcoutput(cls, qcoutput: QCOutput) -> "CalculationOutput":
frequencies=qcoutput.data.get("frequencies", {}),
frequency_modes=qcoutput.data.get("frequency_mode_vectors", []),
final_energy=qcoutput.data.get("final_energy", None),
enthalpy=qcoutput.data.get("enthalpy", None),
entropy=qcoutput.data.get("entropy", None),
enthalpy=qcoutput.data.get("total_enthalpy", None),
entropy=qcoutput.data.get("total_entropy", None),
scan_energies=qcoutput.data.get("scan_energies", {}),
scan_geometries=qcoutput.data.get("optimized_geometries", {}),
scan_molecules=qcoutput.data.get("molecules_from_optimized_geometries", {}),
Expand Down Expand Up @@ -448,29 +448,53 @@ def _find_qchem_files(
path = Path(path)
task_files = OrderedDict()

in_file_pattern = re.compile(r"^(?P<in_task_name>mol\.qin(?:\..+)?)\.gz$")
in_file_pattern = re.compile(r"^(?P<in_task_name>mol\.(qin|in)(?:\..+)?)(\.gz)?$")

for file in path.iterdir():
if file.is_file():
in_match = in_file_pattern.match(file.name)

# This block is for generalizing outputs coming from both atomate and manual qchem calculations
if in_match:
in_task_name = in_match.group("in_task_name").replace("mol.qin.", "")
in_task_name = re.sub(
r"(\.gz|gz)$",
"",
in_match.group("in_task_name").replace("mol.qin.", ""),
)
in_task_name = in_task_name or "mol.qin"
if in_task_name == "orig":
task_files[in_task_name] = {"orig_input_file": file}
elif in_task_name == "mol.qin":
task_files[in_task_name] = {"orig_input_file": file.name}
elif in_task_name == "last":
continue
elif in_task_name == "mol.qin" or in_task_name == "mol.in":
if in_task_name == "mol.qin":
out_file = (
path / "mol.qout.gz"
if (path / "mol.qout.gz").exists()
else path / "mol.qout"
)
else:
out_file = (
path / "mol.out.gz"
if (path / "mol.out.gz").exists()
else path / "mol.out"
)
task_files["standard"] = {
"qcinput_file": file,
"qcoutput_file": Path("mol.qout.gz"),
"qcinput_file": file.name,
"qcoutput_file": out_file.name,
}
# This block will exist only if calcs were run through atomate
else:
try:
task_files[in_task_name] = {
"qcinput_file": file,
"qcoutput_file": Path("mol.qout." + in_task_name + ".gz"),
"qcinput_file": file.name,
"qcoutput_file": Path(
"mol.qout." + in_task_name + ".gz"
).name,
}
except FileNotFoundError:
task_files[in_task_name] = {
"qcinput_file": file,
"qcinput_file": file.name,
"qcoutput_file": "No qout files exist for this in file",
}

Expand Down
Loading