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).

Installation

You can now install directly from PyPI (via pip or your manager of choice, e.g., uv):

pip install pymultiwfn

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")

# Single analysis

result = analysis.run(Menu.HIRSHFELD_CHARGE)
charges = result.parse_charges()

 # Multiple analyses in one session

menus = [Menu.HIRSHFELD_CHARGE, Menu.MAYER_BOND_ORDER]
result = analysis.run_multiple(menus)

# All charges

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

# Everything

all_results = analysis.run_all()

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.

#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

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.

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.2.tar.gz (48.8 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.2-py3-none-any.whl (53.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pymultiwfn-0.5.2.tar.gz
  • Upload date:
  • Size: 48.8 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.2.tar.gz
Algorithm Hash digest
SHA256 46fbd936e4d4073681f83fbbb0f82bed88f0c508fa643523a3a5e069b9e1e982
MD5 7c172a8bb9f1592fae76f7c4d2342eec
BLAKE2b-256 500a568bd699f6f633d6eb0402f80da781482566400765257701f67c7c2d4446

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pymultiwfn-0.5.2-py3-none-any.whl
  • Upload date:
  • Size: 53.7 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 40c4a809ee808944727f4294ddbb215c3f2b2f821d50b186e6e1d626f6a7efa1
MD5 10c7c3703b5f6d403238bacacfe3fab7
BLAKE2b-256 0f9671b16f2798a04fd39a3d02f2c97821d857dd348dfc7761efa8259195ce46

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