Giter Site home page Giter Site logo

ppqm_fortran's Introduction

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.

Notes on Jupyter usage

Example notebooks uses nglview to visualize the molecules in notebooks

# install nglview
conda install nglview -c conda-forge
# install plugin for jupyter lab
jupyter labextension install nglview-js-widgets

Please note, if you are using Jupyter Lab (not notebook) there are som additional notes to consider

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.

ppqm_fortran's People

Contributors

charnley avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.