Skip to content

Commit 8faacef

Browse files
committed
More logging statements
1 parent 7d7cfb1 commit 8faacef

File tree

1 file changed

+20
-2
lines changed

1 file changed

+20
-2
lines changed

atomate/qchem/firetasks/parse_outputs.py

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,12 +198,14 @@ def run_task(self, fw_spec):
198198
shutil.rmtree(os.path.join(calc_dir, "scratch"))
199199

200200
# Check for additional keys to set based on the fw_spec
201+
logger.info("Updating fw_spec_field")
201202
if self.get("fw_spec_field"):
202203
task_doc.update(
203204
{self.get("fw_spec_field"): fw_spec.get(self.get("fw_spec_field"))}
204205
)
205206

206207
# Update fw_spec with final/optimized structure
208+
logger.info("Updating charges in spec")
207209
update_spec = {}
208210
if task_doc.get("output").get("optimized_molecule"):
209211
update_spec["prev_calc_molecule"] = task_doc["output"]["optimized_molecule"]
@@ -214,13 +216,15 @@ def run_task(self, fw_spec):
214216
update_spec["prev_calc_esp"] = task_doc["output"]["ESP"]
215217

216218
# get the database connection
219+
logger.info("Get database connection")
217220
db_file = env_chk(self.get("db_file"), fw_spec)
218221

219222
# db insertion or taskdoc dump
220223
if not db_file:
221224
with open(os.path.join(calc_dir, "task.json"), "w") as f:
222225
f.write(json.dumps(task_doc, default=DATETIME_HANDLER))
223226
else:
227+
logger.info("Connecting to QChemCalcDb")
224228
mmdb = QChemCalcDb.from_db_file(db_file, admin=True)
225229
t_id = mmdb.insert(task_doc)
226230
logger.info(f"Finished parsing with task_id: {t_id}")
@@ -308,12 +312,26 @@ def run_task(self, fw_spec):
308312
task_doc_clean["orig"]["molecule"]["spin_multiplicity"] = 1
309313
task_doc_clean["output"]["initial_molecule"]["charge"] = 1
310314
task_doc_clean["output"]["initial_molecule"]["spin_multiplicity"] = 1
311-
task_doc_clean["output"]["initial_molecule"]["sites"] = [{'name': 'H', 'species': [{'element': 'H', 'occu': 1}], 'xyz': [0.0, 0.0, 0.0], 'properties': {}}]
315+
task_doc_clean["output"]["initial_molecule"]["sites"] = [
316+
{
317+
"name": "H",
318+
"species": [{"element": "H", "occu": 1}],
319+
"xyz": [0.0, 0.0, 0.0],
320+
"properties": {},
321+
}
322+
]
312323
task_doc_clean["output"]["mulliken"] = [+1.000000]
313324
task_doc_clean["output"]["resp"] = [+1.000000]
314325
task_doc_clean["output"]["optimized_molecule"]["charge"] = 1
315326
task_doc_clean["output"]["optimized_molecule"]["spin_multiplicity"] = 1
316-
task_doc_clean["output"]["optimized_molecule"]["sites"] = [{'name': 'H', 'species': [{'element': 'H', 'occu': 1}], 'xyz': [0.0, 0.0, 0.0], 'properties': {}}]
327+
task_doc_clean["output"]["optimized_molecule"]["sites"] = [
328+
{
329+
"name": "H",
330+
"species": [{"element": "H", "occu": 1}],
331+
"xyz": [0.0, 0.0, 0.0],
332+
"properties": {},
333+
}
334+
]
317335
task_doc_clean["output"]["final_energy"] = (
318336
task_doc_2["output"]["final_energy"] - task_doc_1["output"]["final_energy"]
319337
)

0 commit comments

Comments
 (0)