Skip to content

Commit 116f36c

Browse files
committed
Added a file to note every failure that happened during the running of multi_component_hydrogen_bond_propensity_report.py
1 parent 18eb3f3 commit 116f36c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

scripts/multi_component_hydrogen_bond_propensity/multi_component_hydrogen_bond_propensity_report.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -334,6 +334,7 @@ def main(structure, work_directory, library, csdrefcode):
334334
coformer_files = glob.glob(os.path.join(library, '*.mol2'))
335335
tempdir = tempfile.mkdtemp()
336336
mc_dictionary = {}
337+
failures = []
337338

338339
# for each coformer in the library, make a pair file for the api/coformer and run a HBP calculation
339340
for i, f in enumerate(coformer_files):
@@ -359,6 +360,11 @@ def main(structure, work_directory, library, csdrefcode):
359360
diagram_file = make_diagram(api_molecule, work_directory)
360361
chart_file = make_mc_chart(mc_hbp_screen, directory, api_molecule)
361362
make_mc_report(structure, mc_hbp_screen, work_directory, diagram_file, chart_file)
363+
with open("failures.txt", 'w') as file:
364+
# Iterate through the array
365+
for element in failures:
366+
# Write each element to the file followed by a newline character
367+
file.write(element + '\n')
362368

363369

364370
if __name__ == '__main__':

0 commit comments

Comments
 (0)