Simple bridge between RDKit and quantum chemistry (QC) packages.
pip install ppqmAll examples assume an RDKit molecule object with hydrogens and a 3D conformer:
from rdkit import Chem
from rdkit.Chem import AllChem
molecule = Chem.MolFromSmiles("O")
molecule = Chem.AddHs(molecule)
AllChem.EmbedMolecule(molecule)
AllChem.UFFOptimizeMolecule(molecule)Create a calculator instance. Here using xTB with 4 cores:
from ppqm import XtbCalculator
xtb = XtbCalculator(cmd="xtb", cores=4)Calculation options are plain dicts, translated into the right input format. To run a GFN2 optimization in water:
optimize_options = {
"gfn": 2,
"alpb": "h2o",
"opt": None,
}
results = xtb.calculate(molecule, optimize_options)
for i, properties in enumerate(results):
print(f"Conformer {i} properties: {properties}")More examples in the notebooks/ directory.
- GAMESS
- Gaussian
- MNDO
- MOPAC
- Orca
- xTB
The interface might be too niche, but there are other cool molecular interfaces to explore;
- Would really love to seperate the parsers out and use
cclibinstead.
Fork, branch, and use pre-commit.
MIT — see LICENSE.