Skip to main content

Utilities for running QM calculations with RDKit

Project description

Psi Phi Package

Do you need RDKit? Do you need quantum chemistry? We got you. This package is a simple bridge between RDKit and quantum chemistry (QC) packages that lack Python interfaces.

Current version has calculator wrappers for

  • GAMESS
  • Gaussian
  • MNDO
  • MOPAC
  • Orca
  • xTB

Example

Assume all codesnippets below are using RDKit molecule objs.

molecule = Chem.MolFromSmiles("O")
Chem.AddHydrogens(molecule)
AllChem.UFFOptimizeMolecule(molecule)

The simple usage is to make an instance of a QC software. For example, using the popular package xTB, you can define the amount of cores to allocate and the exact path to the executable.

from ppqm import XtbCalculator

xtb = XtbCalculator(cmd="xtb", cores=4)

The format for running calculations are based on Python dictionaries, which are translated into the right format. So for example running a GFN2 optimization in water, the input would be

# Define the calculation
optimize_options = {
    "gfn": 2,
    "alpb": "h2o",
    "opt": None,
}

# Run the calculation
results = xtb.calculate(molecule, optimize_options)

# Results is a List of Dict properties
for i, propeties in enumerate(results):
    print(f"Conformer {i} properties: {properties}")

For more documentation by example, checkout the notebooks/ directory.

Contributions

Fork, branch and use pre-commit.

Other code bases

"is this the first python wrapper for quantum chemistry?" No, check the others and find the one right for your project. Know one, not on the list? Add it. In alphabetic order.

Future work

  • Separation of concern. The ppqm package should adapt to using cclib or similar to collect quantum output.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ppqm-0.1.0.tar.gz (55.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ppqm-0.1.0-py3-none-any.whl (66.9 kB view details)

Uploaded Python 3

File details

Details for the file ppqm-0.1.0.tar.gz.

File metadata

  • Download URL: ppqm-0.1.0.tar.gz
  • Upload date:
  • Size: 55.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for ppqm-0.1.0.tar.gz
Algorithm Hash digest
SHA256 2dc1af04c77de4d62b10e8f3036e0f389284b1ba783dab822cc3b952ddf9b896
MD5 8d12abab961cb4af0701104b0eaa963d
BLAKE2b-256 0b826b75326376662309d76725b4f503ac1d7fafbebdd9e0d81125a519eb85ec

See more details on using hashes here.

File details

Details for the file ppqm-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: ppqm-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 66.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for ppqm-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 caee4e8550724d27b2338044cedcfa2312c88bd1e7d506b2d680fd4a7d73a220
MD5 2828bb11ab7f7e69a01ce240452a5c79
BLAKE2b-256 1cb231428fc30ab0d933e348a4536ee5a52ccd36550bd28c9dfac69054c74c36

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page