Coder Social home page Coder Social logo

ppqm's Introduction

Psi Phi Package

Do you need rdkit? Do you need quantum chemistry? We got you bro.

Examples

Assume all codesnippets below are using RDKit molecule objs

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

Optimize using XTB

from ppqm import XtbCalculator
xc = XtbCalculator()
molecule2 = xc.optimize(molecule, return_copy=True)

Example of using GAMESS calculator and using specific options. As you notice, GAMESS needs a lot of settings to work with.

from ppqm import GamessCalculator

# Let's set the complicated GAMESS settings
gamess_options = {
    "scr": "/tmp/node/scr/space/slurm/id",
    "cmd": "/opt/gamess/rungms",
    "gamess_scr": "~/scr",
    "gamess_userscr": "~/userscr",
}
gc = GamessCalculator(**gamess_options)

# Now that we have gamess setup, we can then the GAMESS options we all know
# and love. Knowing exactly what keywords to set in GAMESS, you'll have to
# read the manual
calculation_option = {
    "runtyp": "optimize",
    "statpt": {
        "opttol": 0.005,
        "nstep": 300,
        "projct": False,
    }
}

# We then use the options to get properties for the molecule.
# The return will be a list of dictionaries, per conformer in the molobj.
results = gc.calculate(molecule, calculation_option)

for properties in results:
    print(properties)

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.

ppqm's People

Contributors

charnley avatar koerstz avatar andersx 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.