Skip to main content

A thin wrapper library for Psi4 and RDKit

Project description

Psikit: a thin wrapper library for Psi4 and RDKit

Inspired from the entry:Calculate HOMO and LUMO with Psi4

Install RDKit and Psi4 from Conda

conda install -c psi4 psi4
conda install -c rdkit rdkit
conda install -c psi4 resp # optional

Install Psikit from Github

Psikit is under development. Recent version of Psikit can install from github.

pip install git+https://github.com/Mishima-syk/psikit

Install Psikit with pip

Psikit is under development. But current version of Psikit can install from pypi or conda.

pip install psikit
conda install -c iwatobipen psikit

Usage

Single point calcuration

from psikit import Psikit
pk = Psikit()
pk.read_from_smiles("c1ccccc1")
print("SCF Energy: ", pk.energy())
print("HOMO: ", pk.HOMO)
print("LUMO: ", pk.LUMO)
x, y, z, total = pk.dipolemoment
print("SCF Total Dipole Moment: {}".format(total))
# SCF Energy:  -230.712279648862
# HOMO:  -0.32848562009092513
# LUMO:  0.1456515222506689
# SCF Total Dipole Moment: 3.292464934070545e-05

Structure optimization

pk = Psikit()
pk.read_from_smiles("c1ccccc1")
print("Optimized SCF Energy: ", pk.optimize())
# Optimizer: Optimization complete!
# Optimized SCF Energy:  -230.71352354223438

Calculate RESP Charge

# REF http://ambermd.org/tutorials/advanced/tutorial1/files/resp_paper_jacs.pdf
pk = Psikit()
pk.read_from_smiles("CC(=O)O")
pk.optimize()
# Optimizer: Optimization complete!
# -227.82180859253418
pk.calc_resp_charges()
# array([-0.32506898,  0.83672649, -0.61924915, -0.66135715,  0.10450057,
#    0.10478188,  0.10780051,  0.45186584])

for atom in pk.mol.GetAtoms(): 
    print(atom.GetSymbol(), "ESP:{}\tRESP:{}".format(atom.GetProp("EP"), atom.GetProp("RESP"))) 

# C ESP:-0.49662019588648315	RESP:-0.3250689814483399
# C ESP:0.91473263536048643		RESP:0.83672648554100837
# O ESP:-0.63823808477114718	RESP:-0.61924915363703359
# O ESP:-0.6763331997116846		RESP:-0.66135714989354499
# H ESP:0.14625849864628995		RESP:0.10450056830656008
# H ESP:0.14578513969681847		RESP:0.10478187811883517
# H ESP:0.1530843954112609		RESP:0.1078005104750676
# H ESP:0.45133081125445906		RESP:0.45186584253744722

### Compute Mulliken charges and Lowdin charges

pk = Psikit()
pk.read_from_smiles("CC(=O)O")
pk.optimize() # or pk.energy()

pk.calc_mulliken_charges()
# array([-0.42203029,  0.72794785, -0.55419051, -0.59333358,  0.16369722,
#    0.1636994 ,  0.15462075,  0.35958916])

pk.calc_lowdin_charges()
#array([-0.30006577,  0.33900448, -0.35983788, -0.28463832,  0.12439944,
#    0.12810672,  0.11935266,  0.23367866])

Jupyter notebook

License

Code released under the BSD license.

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

Psikit-0.1.5.tar.gz (6.0 kB view details)

Uploaded Source

Built Distribution

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

Psikit-0.1.5-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

File details

Details for the file Psikit-0.1.5.tar.gz.

File metadata

  • Download URL: Psikit-0.1.5.tar.gz
  • Upload date:
  • Size: 6.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.28.1 CPython/3.6.8

File hashes

Hashes for Psikit-0.1.5.tar.gz
Algorithm Hash digest
SHA256 ef041a1878bde5ffdb0e6c385acb52bb5c40544e56ad307d7fd318225ae554cb
MD5 895c493b0b58a950fb761c557c5c77e7
BLAKE2b-256 b359e8e52f48595f012c47c4acc17ab2a81d213c7efb85f5bd3ba53fb80e5a95

See more details on using hashes here.

File details

Details for the file Psikit-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: Psikit-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 6.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.28.1 CPython/3.6.8

File hashes

Hashes for Psikit-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 c5195c37eb4bee3aa9c6c2c61344e032eac20df032f777a1081ca21fe815ed31
MD5 209c6cf8243136577a1a90d594968a41
BLAKE2b-256 cec85d100d1e8fd6a5d56a14c07daab4291ac32f19f3ea5408adbeba30ad2461

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