1313multi_component_hydrogen_bond_propensity_report.py
1414 - Performs a multi-component HBP calculation for a given library of co-formers
1515"""
16+
1617import matplotlib
1718matplotlib .use ('TkAgg' )
1819import 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):
112113def 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
118119def propensity_calc (crystal , directory ):
0 commit comments