Skip to main content

pwfn is a single-page library to parse .wfn file

Project description

pwfn

pwfn is a tiny library for parsing AIMPAC format .wfn files from quantum chemistry programs and Molden2Aim into a Python data structure. This can be used to do ML on electronic wavefunctions.

This library does not do anything besides parsing! It is basically a single page pyparsing grammar. You'll need to do your own data processing from its outputs.

Usage

pwfn consists of a single string parser pwfn.loads(s),

import pwfn

with open("benzene.wfn", "r") as f:
    wavefunction = pwfn.loads(f.read())

This returns a Wavefunction container with the extracted data in its attributes. All quantities are in Hartree units (unchanged from the .wfn format).

Installation

pwfn is available from pip,

pip install pwfn

It depends on the excellent pyparsing library as well as numpy.

Notes

If you want a similarly minimalist library to parse formatted checkpoint files, consider my other library fchic. If you are looking for a full feature solution for wavefunction data analysis, consider using the excellent Multiwfn program or orbkit.

License

pwfn is free software provided under the MIT 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

pwfn-0.1.1.tar.gz (5.5 kB view hashes)

Uploaded Source

Built Distribution

pwfn-0.1.1-py3-none-any.whl (5.8 kB view hashes)

Uploaded Python 3

Supported by

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