Skip to content

Commit 4e2c2d9

Browse files
committed
Fixed something I perceive as a bug: the chart file that looks to be outside the for loop for coformers is being generated inside a coformer's folder. Changed its location to work_directory variable. I also removed a debug print that I forgot in there in the previous pull request.
1 parent 4909fc2 commit 4e2c2d9

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

scripts/multi_component_hydrogen_bond_propensity/multi_component_hydrogen_bond_propensity_report.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,6 @@ def main(structure, work_directory, failure_directory, library, csdrefcode):
358358
tdata = get_mc_scores(propensities, crystal.identifier)
359359
json.dump(tdata, file)
360360
mc_dictionary[coformer_name] = get_mc_scores(propensities, crystal.identifier)
361-
print(get_mc_scores(propensities, crystal.identifier))
362361
except RuntimeError:
363362
print("Propensity calculation failure for %s!" % coformer_name)
364363
mc_dictionary[coformer_name] = ["N/A", "N/A", "N/A", "N/A", "N/A", crystal.identifier]
@@ -367,7 +366,7 @@ def main(structure, work_directory, failure_directory, library, csdrefcode):
367366
# Make sense of the outputs of all the calculations
368367
mc_hbp_screen = sorted(mc_dictionary.items(), key=lambda e: 0 if e[1][0] == 'N/A' else e[1][0], reverse=True)
369368
diagram_file = make_diagram(api_molecule, work_directory)
370-
chart_file = make_mc_chart(mc_hbp_screen, directory, api_molecule)
369+
chart_file = make_mc_chart(mc_hbp_screen, work_directory, api_molecule)
371370
make_mc_report(structure, mc_hbp_screen, work_directory, diagram_file, chart_file)
372371
if failure_directory is not None:
373372
with open(os.path.join(failure_directory, 'failures.txt'), 'w', encoding='utf-8', newline='') as file:

0 commit comments

Comments
 (0)