README last updated: Jan 8 2020
Overview: Compare optimized geometries and energies from various force fields with respect to a QM reference.
This repository comprises code to extract molecule datasets from QCArchive, run energy minimizations with various force fields, and analyze the resulting geometries and energies with respect to QM reference data from QCArchive.
- Python (numpy, matplotlib, seaborn)
- OpenEye
- RDKit (solely for TFD calculations)
- OpenMM
- OpenForceField
- QCFractal, QCPortal
conda create -n parsley python=3.6 matplotlib numpy seaborn
conda activate parsley
conda install -c openeye -c conda-forge -c omnia rdkit openeye-toolkits qcfractal qcportal openforcefield cmiles openmm
Directories in this repo:
01_setup
: Extract molecules from QCArchive, convert to OpenEye mols, and standardize conformers and titles.02_calc
03_analysis
examples
: See this directory for example results and plots.
File descriptions:
directory | file | description |
---|---|---|
01_setup |
extract_qcarchive_dataset.ipynb |
write out molecules from a QCArchive database which have completed QM calculations |
01_setup |
combine_conformers.ipynb |
of the molecules from extract_qcarchive_dataset.ipynb , combine conformers that are labeled as different molecules |
02_calc |
minimize_ffs.py |
... |
03_analysis |
cat_mols.py |
OpenEye script, modified to ... |
- Write out from a QCArchive database which have completed QM calculations, using
extract_qcarchive_dataset.ipynb
. - Reorganize up the molecule set for conformers which are labeled as different molecules:
- Group all the same conformers together since they are separated by intervening molecules, using
combine_conformers.ipynb
. - Of the full set, write out the good molecules that don't need conformer reorganization, using
molextract.py
from OEChem. - Combine the results of steps 2.1 and 2.2:
cat whole_02_good.sdf whole_03_redosort.sdf > whole_04_combine.sdf
- Read in the whole set with proper conformers, and rename titles for numeric order, using
combine_conformers.ipynb
. - (opt) Write out associated SMILES:
awk '/SMILES/{getline; print}' whole_05_renew.sdf > whole_05_renew.smi
- (opt) Generate molecular structures in PDF format, using
mols2pdf.py
.
- Group all the same conformers together since they are separated by intervening molecules, using
- Break up the full set into smaller chunks for managable computations, using
molchunk.py
. - Run the minimizations, using
minimize_ffs.py
. - Remove the molecules that were unable to minimize (e.g., due to missing parameters) from all files, using
cat_mols.py
. - Cat all the constituent files back together, using
cat
orcat_mols.py
. - Analyze with
match_minima.py
andcompare_ffs.py
.- (opt) If some conformers (not full molecules) are outliers, can remove using
get_by_tag.py
- (opt) If some conformers (not full molecules) are outliers, can remove using
The OEChem scripts referred to above are located here.
molextract.py
molchunk.py
-- VTL modified to useOEAbsCanonicalConfTest
- Victoria Lim
- David Mobley (advising)
- Lee-Ping Wang (discussions)
- Jeffrey Wagner (code review)
- Daniel Smith (code review)
See more science-focused issues in the Github issue tracker.
- Format code with YAPF/Black
- Use logging module instead of print statements
- Look into automatically serializable representations (e.g., Pydantic) instead of pickle
- Use type hints for functions
- Allow user to pass in dict for plotting parameters (i.e., talk or paper font sizes)
- Generate plots with Plotly