Skip to main content

Python interface and automation toolkit for Multiwfn

Project description

pyMultiwfn

A Python wrapper for automating Multiwfn batch calculations. This project is currently in progress and is regularly maintained. Information in the README might be inaccurate.

All functions from the newest update are implemented with descriptive comments(multiwfn 3.8, 07/01/2026).

Development

Make sure you have uv installed on your system. Then any uv command should create a fully functional local environment:

git clone git@github.com:szczypinski-group/pyMultiwfn.git
cd pyMultiwfn
uv sync
uvx pre-commit install

Loading Files

Appropriate file types can be loaded in the package using the load() function.

import pymultiwfn
mol = pymultiwfn.load("molecule.wfn")

Running calculations

Calculations can be run in a number of different ways: 1. running the calculations individually by calling the desired function relating to a specific Multiwfn input 2. creating a custom menu, composed of the desired calculations to be run 3. Running calculation suites(all charges, all topologies, etc...) 4. Running all the avaialble calculations integrated in the package

from pymultiwfn import Analysis, Menu
analysis = Analysis("molecule.wfn")
1. Single analysis
result = analysis.run(Menu.HIRSHFELD_CHARGE)
charges = result.parse_charges()

2. Multiple analyses in one session
menus = [Menu.HIRSHFELD_CHARGE, Menu.MAYER_BOND_ORDER]
result = analysis.run_multiple(menus)

3. All charges
results = analysis.run_charges()
hirshfeld = results["hirshfeld_charge"].parse_charges()

4. Everything
all_results = analysis.run_all()

Linting

Default linting settings and formatting settings (using ruff) have been created within pyproject.toml and will be applied if the optional dependencies have been installed.

Contributing

We actively welcome contributions from the community. If you do decide to contribute please follow these rules: 1. Please ensure that any contributions pass unit testing before creating a pull request. 1.1 Please create unit tests in the appropriate testing file. 1.2 For each function created, please write both a positive and negative unit test and any relevant edge cases. 2. Please commit regularly. 3. Ensure your contribution passes linting for easier code maintenance and consistency. 4. Do not change the current architecture unless absolutely necessary. If you have any reccomendations for changes, please contact me at the email below.

Code standards

  1. Use explicit imports wherever possible.
  2. For class and function definition/calls, split arguments into multiple lines.
  3. Always call functions with keyword arguments.

Contact

If you have any question or inquiries, please email me here: ypkh17@durham.ac.uk If you do send an email, please start the subject line with "pymultiwfn:"

Referencing

If you are using this package, please reference the original Multiwfn package:

  1. Tian Lu, J. Chem. Phys., 161, 082503 (2024) DOI: 10.1063/5.0216272

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

pymultiwfn-0.5.1.tar.gz (48.3 kB view details)

Uploaded Source

Built Distribution

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

pymultiwfn-0.5.1-py3-none-any.whl (53.3 kB view details)

Uploaded Python 3

File details

Details for the file pymultiwfn-0.5.1.tar.gz.

File metadata

  • Download URL: pymultiwfn-0.5.1.tar.gz
  • Upload date:
  • Size: 48.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for pymultiwfn-0.5.1.tar.gz
Algorithm Hash digest
SHA256 f2fabf550de3f3e8580d79bb4584c9c30802839807814400fecaeacfcbcda7b8
MD5 c0d9c33bea36f7f13f0ad7324f4aad03
BLAKE2b-256 b8127632ca06fe9c69a1d4fbb2bde1daa0c487af3d6cc749adc86dd6e038b521

See more details on using hashes here.

File details

Details for the file pymultiwfn-0.5.1-py3-none-any.whl.

File metadata

  • Download URL: pymultiwfn-0.5.1-py3-none-any.whl
  • Upload date:
  • Size: 53.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for pymultiwfn-0.5.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3f2593db4aef7d43de8e7f0e60af9f34af37ae1dde4dc5ff4de7a5d47775f9cd
MD5 4e2e8a4c0993340ec7ba98ae8d1f1113
BLAKE2b-256 bbc871d2775286a6553648a37d39cb331eabe2aaa6f5ef5a356c39d98a8c3f81

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