Here is a script to be used to run multiple Hydrogen Bond Propensity calculations on a single API with multiple potential coformers. It is capable of being run on a database entry or a structural file such as a .cif or a .mol2

Run it from the command line like so: "python mchbp_report.py HXACAN -c coformer_library". For example, this will perform multiple HBP calculations for paracetamol (CSD Refcode HXACAN) and all potential coformers that are contained within a folder called "coformer_library". These coformers should be a set of .mol2 files. If no library is specified then the Mercury coformer library will be used as by default. Run it from the command line with the '-h' flag to show all options.

This script will produce a .docx format report, and requires the download of the mchbp_report_template.docx  and mcpair_output_template.docx to run. These template files contain formatting for the reports produced by this script.

The mchbp_report_template.docx required for the mchbp_report.py script.

The mcpair_output_template.docx required for the mchbp_report.py script.

Here's an updated version of the script that provides better feedback. Use it in the same way as described above, and make sure you have the relevant template files as well.

This is the latest version of the multi-component HBP script. The latest update provides a Multi-component hydrogen bond propensity chart based on Co-former rank and the Multiple-Component Score. The templates have been also updated, you can download them from the posts bellow.

The mcpair_output_template.docx required for the mchbp_report.py script.

The mcpair_output_template.docx required for the mchbp_report.py script.

Thanks for these great scripts. FYI, in order to get them to work on Linux, I had to change the backslash to a forward slash in the glob.glob statement on line 308 as follows:

From:

 coformer_files = glob.glob(r'%s\*.mol2' % library)
To:
 coformer_files = glob.glob(r'%s/*.mol2' % library)

 

It might be better to do this with os.path.join so that the script is cross platform:

    coformer_files = glob.glob((os.path.join(library, "*.mol2")))

You must be signed in to post in this forum.