Skip to main content

ChargeFW for Python

ChargeFW calculates empirical partial atomic charges through Python bindings to its native C++ calculation engine. It provides 22 charge methods, bundled parameter sets, deterministic applicability and execution planning, source-ordered result mapping, molecular-file input and output, and optional Gemmi and RDKit integration.

ChargeFW expects prepared molecular graphs with formal charges and any coordinates required by the selected method. It does not parse SMILES, add hydrogens, choose protonation states, perceive arbitrary bonds, or generate coordinates.

Installation

ChargeFW requires Python 3.10 or newer:

pip install chargefw

Install an optional toolkit integration when converting existing toolkit objects:

pip install "chargefw[gemmi]"
pip install "chargefw[rdkit]"

The base package can read PDB and mmCIF text through its compiled Gemmi dependency without installing the Gemmi Python package.

Python usage

From a molecular file

import chargefw

molecules = chargefw.io.read("molecule.sdf", format="sdf")
result = chargefw.calculate(
    molecules,
    method="qeq",
    parameter_set="QEq_original",
    execution="full",
)
print(result.assignments[0].values)

For reproducible scientific work, select both the method and its parameter set when the method uses one. Automatic selection is deterministic, but catalog priority is not a recommendation that a model or parameterization is scientifically preferable for a particular molecule.

From arrays

import chargefw

molecule = chargefw.Molecule(
    atomic_numbers=[8, 1, 1],
    formal_charges=[0, 0, 0],
    bonds=[[0, 1, 1], [0, 2, 1]],
    coordinates=[
        [0.0, 0.0, 0.0],
        [0.96, 0.0, 0.0],
        [-0.24, 0.93, 0.0],
    ],
    name="water",
)

result = chargefw.calculate(
    molecule,
    method="qeq",
    parameter_set="QEq_original",
    execution="full",
)
print(result.assignments[0].values)

Write a complete result record with chargefw.io.write():

chargefw.io.write("charges.json", result, format="result-json")

Documentation

  • Python API - read molecules, calculate charges, and inspect methods and results.
  • Python recipes - run complete SDF, Gemmi, RDKit, and parameter-set workflows.
  • Molecular formats - check supported input, output, parsing, and mapping semantics.
  • Project design - understand the architecture and scientific scope.
  • Source repository - browse the source and report issues.

ChargeFW is distributed under the MIT license.

Metadata

Release files for chargefw 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for chargefw 0.1.2
File Size Uploaded Provenance Actions
chargefw-0.1.2.tar.gz 2.3 MB Without provenance Details for chargefw-0.1.2.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for chargefw 0.1.2
File Actions
chargefw-0.1.2-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.14 CPython 3.14 Linux glibc 2.27+ x86-64, Linux glibc 2.28+ x86-64 Details for chargefw-0.1.2-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
chargefw-0.1.2-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.28+ x86-64, Linux glibc 2.27+ x86-64 Details for chargefw-0.1.2-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
chargefw-0.1.2-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.27+ x86-64, Linux glibc 2.28+ x86-64 Details for chargefw-0.1.2-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
chargefw-0.1.2-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.27+ x86-64, Linux glibc 2.28+ x86-64 Details for chargefw-0.1.2-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
chargefw-0.1.2-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.27+ x86-64, Linux glibc 2.28+ x86-64 Details for chargefw-0.1.2-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Total release size: 14.6 MB

Release files / chargefw-0.1.2.tar.gz

Download URL chargefw-0.1.2.tar.gz
Size 2.3 MB
Tags Source
SHA-256 checksum
How to use checksums
ac9a79bf3b7796de3728ff082266c6d426cb8df026774d197a0f178eed14fb6b
BLAKE2b-256 checksum
How to use checksums
978b14db64988899c6be62bf874d7ed44e2c2fc19302c63a2fa334e50f90825e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.7

Release files / chargefw-0.1.2-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL chargefw-0.1.2-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 2.5 MB
Tags CPython 3.14 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
fc78abf92a94dcc273dfb42150f2011ac58189a566a18fb4f14c66e212e518ea
BLAKE2b-256 checksum
How to use checksums
7cc6833925b6acfbc62eff575ede61830384d864485dda889bd7d3a06d7838b7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.7

Release files / chargefw-0.1.2-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL chargefw-0.1.2-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 2.5 MB
Tags CPython 3.13 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
b5a77b9e2dfcc8f6da73aeb83bddf7e63c3f89c24a728ca18a47bc90bab0426e
BLAKE2b-256 checksum
How to use checksums
349edd6e1f189f816cfe3f692c9e689bfb7a26a76d9680b4b110a27caa6efd49
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.7

Release files / chargefw-0.1.2-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL chargefw-0.1.2-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 2.5 MB
Tags CPython 3.12 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
20a166a7577d7a5afabaa4c7b70eb2409f400a5ff056615cca920e1e4ea19adb
BLAKE2b-256 checksum
How to use checksums
63179919257b93cfbba8eca3a211eada000ae1f5917251bbced1664ad4c5f067
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.7

Release files / chargefw-0.1.2-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL chargefw-0.1.2-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 2.5 MB
Tags CPython 3.11 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
266a0fcb159cf2557ac9d0981df3a22b497434b7f40da6518475695f60e45133
BLAKE2b-256 checksum
How to use checksums
4c00f47cb5aa01cd6bac342416bbc8a9675b43de12d1a01cdfbbd81ce3f09503
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.7

Release files / chargefw-0.1.2-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL chargefw-0.1.2-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 2.5 MB
Tags CPython 3.10 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
221efb01dae5e84d0c64c8d295cfd71d722f3f30e18826abd425903e81fbd0f4
BLAKE2b-256 checksum
How to use checksums
0d76f36785545dcd5a126903d9364c4aa6437aa319e8f6f3b12c7a7fc17b456c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.7

Security for chargefw 0.1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page