Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion scripts/core/hydrogen_bond_propensity/ReadMe.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Included in the report:

## Requirements

- ```matplotlib, docxtpl```
- ```matplotlib, docform```

- hydrogen_bond_propensity_report.docx
## Licensing Requirements
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@

with warnings.catch_warnings():
warnings.simplefilter("ignore", category=DeprecationWarning)
import docxtpl
import docform
from docx.shared import Cm
except ImportError:
error_message = """
The python-docx-template templating engine needed by this script could not
be found. Please run "{} -m pip install docxtpl"
be found. Please run "{} -m pip install docform"
to try to fix the issue.\nYou may need administrator's rights to do this.
""".format(sys.executable)
raise ImportError(error_message)
Expand Down Expand Up @@ -199,7 +199,7 @@ def fg_diagram(mol, directory, con):

def add_picture_subdoc(picture_location, docx_template, cm=7):
# This function adds a picture to the .docx file
return docxtpl.InlineImage(
return docform.InlineImage(
docx_template, image_descriptor=picture_location, width=Cm(cm))


Expand Down Expand Up @@ -347,7 +347,7 @@ def hbp_landscape(groups, observed_groups, crystal, directory, work_directory, d
def main(structure, directory, csdrefcode, min_donor_coordination, min_acceptor_coordination, fg_count, noopen=False):
# This looks for the .docx template that is used to generate the report from
if os.path.isfile(TEMPLATE_FILE):
docx_template = docxtpl.DocxTemplate(TEMPLATE_FILE)
docx_template = docform.DocxTemplate(TEMPLATE_FILE)
else:
print('Error! {} not found!'.format(TEMPLATE_FILENAME))
quit()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Summary report includes:

## Requirements

- docxtpl
- docform
- multi_component_hydrogen_bond_propensity_report.docx
- multi_component_pair_hbp_report.docx

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@

with warnings.catch_warnings():
warnings.simplefilter("ignore", category=DeprecationWarning)
import docxtpl
import docform
from docx.shared import Cm
except ImportError:
error_message = """
The python-docx-template templating engine needed by this script could not
be found. Please run "{} -m pip install docxtpl"
be found. Please run "{} -m pip install docform"
to try to fix the issue.\nYou may need administrator's rights to do this.
""".format(sys.executable)
raise ImportError(error_message)
Expand Down Expand Up @@ -162,7 +162,7 @@ def make_mc_chart(dictionary, directory, mol):

def add_picture_subdoc(picture_location, docx_template, wd=7):
# This function adds a picture to the .docx file
return docxtpl.InlineImage(
return docform.InlineImage(
docx_template, image_descriptor=picture_location, width=Cm(wd))


Expand Down Expand Up @@ -272,7 +272,7 @@ def pair_output(identifier, propensities, donors, acceptors, coordination_scores

# This looks for the .docx template that is used to generate the report from
if os.path.isfile(PAIR_TEMPLATE_FILE):
docx_template = docxtpl.DocxTemplate(PAIR_TEMPLATE_FILE)
docx_template = docform.DocxTemplate(PAIR_TEMPLATE_FILE)
else:
print('Error! {} not found!'.format(PAIR_TEMPLATE_FILENAME))
quit()
Expand Down Expand Up @@ -308,7 +308,7 @@ def make_mc_report(identifier, results, directory, diagram_file, chart_file):

# This looks for the .docx template that is used to generate the report from
if os.path.isfile(TEMPLATE_FILE):
docx_template = docxtpl.DocxTemplate(TEMPLATE_FILE)
docx_template = docform.DocxTemplate(TEMPLATE_FILE)
else:
print('Error! {} not found!'.format(TEMPLATE_FILENAME))
quit()
Expand Down