Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

ChargeFW for Python

ChargeFW calculates empirical partial atomic charges through Python bindings to its native C++ calculation engine. It provides bundled methods and parameter sets, deterministic applicability and execution planning, source-ordered result mapping, molecular-file input, result JSON, MOL2 and mmCIF 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.11 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

The full documentation is at chargefw.readthedocs.io:

  • 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 3.0.0a1

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 3.0.0a1
File Size Uploaded Provenance Actions
chargefw-3.0.0a1.tar.gz 2.4 MB Without provenance Details for chargefw-3.0.0a1.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for chargefw 3.0.0a1
File Actions
chargefw-3.0.0a1-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.14 CPython 3.14 Linux glibc 2.28+ x86-64, Linux glibc 2.27+ x86-64 Details for chargefw-3.0.0a1-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
chargefw-3.0.0a1-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-3.0.0a1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
chargefw-3.0.0a1-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-3.0.0a1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
chargefw-3.0.0a1-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-3.0.0a1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Total release size: 11.6 MB

Release files / chargefw-3.0.0a1.tar.gz

Download URL chargefw-3.0.0a1.tar.gz
Size 2.4 MB
Tags Source
SHA-256 checksum
How to use checksums
f6feabdae3adeb30b07e2991dac2a5169820e99174f444d93889c19dead6e6fe
BLAKE2b-256 checksum
How to use checksums
be6ed24d12b3102ebbfd371df19033f22cf1b27a0b0f722558ba7c3800bffd5a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

Release files / chargefw-3.0.0a1-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL chargefw-3.0.0a1-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 2.3 MB
Tags CPython 3.14 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
3748f8c899e238c276388aaa226982307a39451878d21999a7921ef781261a04
BLAKE2b-256 checksum
How to use checksums
7276138f8def11dea48520efbe220627b3e3c9eac101f0544578f50d93a027b2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

Release files / chargefw-3.0.0a1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL chargefw-3.0.0a1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 2.3 MB
Tags CPython 3.13 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
2a87119dcda5adeb6887a714adaad29f7c5f9fa243ba327c3fd18487794334cb
BLAKE2b-256 checksum
How to use checksums
58c889498e082e6f22f64c49b5ed15fe2b9fc8a5c14a20f6872904e270a1e2b4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

Release files / chargefw-3.0.0a1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL chargefw-3.0.0a1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 2.3 MB
Tags CPython 3.12 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
27365c960dcc608527f76a2c31e66df32fa3b80b91f0ad281c097bc3c661b4b7
BLAKE2b-256 checksum
How to use checksums
748323e19b98c5901cb5fd48ba32648113071a7b972abc783563cf58a05ed116
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

Release files / chargefw-3.0.0a1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL chargefw-3.0.0a1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 2.3 MB
Tags CPython 3.11 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
ff0f5fd41646d4421eef2a677fbe0f55dbd8669209297608bad64406d82e82a6
BLAKE2b-256 checksum
How to use checksums
a0619ea4d750c646ef605f594e7cccd7012469652980f77a102cb7ecf550a238
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

Security for chargefw 3.0.0a1

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