Skip to main content

Package for performing Piris Natural Orbital Functionals (PNOF)

Project description

PyNOF

Citation DOI

Formally read as Python-Natural-Orbital-Functionals, PyNOF is based on the original DoNOF software written in Fortran by Prof. Mario Piris, but it takes advantage of the Python capabilities such as optimizers, vectorization via numpy and gpu compatibility via cupy.

Installation

We recommend to perform the installation inside an Anaconda enviroment:

conda create -y -n pynof
conda activate pynof

PyNOF uses Psi4 for integrals, so it is necessary to install it first:

conda install -y psi4 -c conda-forge/label/libint_dev -c conda-forge

then, you can simply install PyNOF using pip

pip install pynof

[Optional] Integrals transformations can benefit from a GPU. If available, just install cupy

conda install -y -c conda-forge cupy

Example

A pynof input has the following parts:

  • Import pynof
  • A declaration of the molecule geometry
  • A parameter object
  • The calculation instruction
import pynof

mol = pynof.molecule("""
0 1
  O  0.0000   0.000   0.116
  H  0.0000   0.749  -0.453
  H  0.0000  -0.749  -0.453
""")

p = pynof.param(mol,"cc-pvdz")
p.autozeros()

p.ipnof=8

p.RI = True
#p.gpu = True

E,C,gamma,fmiug0 = pynof.compute_energy(mol,p,hfidr=True)

If everything worked, the job may be executed by

python -u test_energy.py

Note. The first run may be slightly slow due to jit precompilation.

For development

First, clone PyNOF from github and change to the project directory

git clone https://github.com/felipelewyee/PyNOF.git
cd PyNOF

In the PyNOF folder, execute the following code

conda create -y -n pynof
conda activate pynof
conda install -y psi4 -c conda-forge/label/libint_dev -c conda-forge
conda install -y -c conda-forge cupy # Optional
pip install build
python -m build && cd dist && pip install pynof*.whl && cd ..

Authors

The PyNOF code has been built by Juan Felipe Huan Lew Yee, Lizeth Franco Nolasco and Iván Alejandro Rivera under supervision of Jorge Martín del Campo Ramírez and Mario Piris.

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

pynof-1.4.tar.gz (118.5 kB view details)

Uploaded Source

Built Distribution

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

pynof-1.4-py3-none-any.whl (50.9 kB view details)

Uploaded Python 3

File details

Details for the file pynof-1.4.tar.gz.

File metadata

  • Download URL: pynof-1.4.tar.gz
  • Upload date:
  • Size: 118.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for pynof-1.4.tar.gz
Algorithm Hash digest
SHA256 979fd3fc3f7d70f92397b1aa503b93d786794c6556261fa786f75ae62a1e106a
MD5 7b354b2f5dc88e61a3439eb619d57094
BLAKE2b-256 6d643cc7dd8ab77ceea1bd66ce65abcdfb7342a282a1b98638b06446bc490e09

See more details on using hashes here.

File details

Details for the file pynof-1.4-py3-none-any.whl.

File metadata

  • Download URL: pynof-1.4-py3-none-any.whl
  • Upload date:
  • Size: 50.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for pynof-1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 7352c95ddfbf6bb6cc98896bc6dd517635f01c428a2c7c2f2248af2eccfc7a53
MD5 3ba368c80b1ca0c211fd1deea8fee8f3
BLAKE2b-256 69267e4465d5f4c46021fde96e24b5f6ed04403cc812a6f7f17e9b7339e74f05

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