Skip to content

Commit a985cc6

Browse files
committed
Fixed small bugs from previous version NO_JIRA
1 parent 32909b1 commit a985cc6

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

scripts/multi_component_hydrogen_bond_propensity/multi_component_hydrogen_bond_propensity_report.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
multi_component_hydrogen_bond_propensity_report.py
1414
- Performs a multi-component HBP calculation for a given library of co-formers
1515
"""
16+
1617
import matplotlib
1718
matplotlib.use('TkAgg')
1819
import matplotlib.pyplot as plt
@@ -100,9 +101,9 @@ def make_mc_chart(dictionary, directory, mol):
100101
plt.xlabel('Co-Former Rank', fontweight='bold', fontsize='12')
101102
plt.ylabel('Multi-Component Score', fontweight='bold', fontsize='12')
102103
plt.title('MCHBP screening results', fontweight='bold', fontsize='12')
103-
ax.axhspan(0.025, ymax + 0.1, facecolor='lightgreen', alpha=1.5)
104-
ax.axhspan(-0.025, ymin - 0.1, facecolor='lightpink', alpha=1.5)
105-
ax.axhspan(0.025, -0.025, facecolor='grey', alpha=1.5)
104+
ax.axhspan(0.025, ymax + 0.1, facecolor='lightgreen', alpha=0.5)
105+
ax.axhspan(-0.025, ymin - 0.1, facecolor='lightpink', alpha=0.5)
106+
ax.axhspan(0.025, -0.025, facecolor='grey', alpha=0.5)
106107
plt.ylim(ymin - 0.025, ymax + 0.025)
107108
fname = str(os.path.join(directory, '%s_MC_HBP_plot.png' % mol.identifier))
108109
plt.savefig(fname, format='png', dpi=600)
@@ -112,7 +113,7 @@ def make_mc_chart(dictionary, directory, mol):
112113
def add_picture_subdoc(picture_location, docx_template, wd=7):
113114
# This function adds a picture to the .docx file
114115
return docxtpl.InlineImage(
115-
docx_template, image_descriptor=picture_location, width=Cm(cm))
116+
docx_template, image_descriptor=picture_location, width=Cm(wd))
116117

117118

118119
def propensity_calc(crystal, directory):

0 commit comments

Comments
 (0)