Skip to main content

MolOP (Molecule OPerator)

中文 | English

PyPI Python Typing: Typed Status Wheel Downloads CI Docs License Last commit Issues Stars Forks

MolOP is a Python 3.10+ library and command-line tool for computational chemistry files. It selects a registered reader from file content and maps different quantum-chemistry programs and structure formats into common batch, file, frame, and scientific-result containers. Downstream processing does not need a separate extraction path for every program.

Installation

pip install molop

Verify the installation:

python -c "import molop; print(molop.__version__)"
molop --help

molop --help should list the parse command.

Verification output shape
<version>
Usage: molop [OPTIONS] COMMAND [ARGS]...
...
  parse       Parse files into a FileBatchModelDisk state, then run...

Read different quantum-chemistry files through one model

This workflow uses the Gaussian 16 example and ORCA 6 example as two representative inputs. Save both files in the current directory, then run:

from molop import AutoParser

batch = AutoParser(["mn_complex_sp.log", "water_mp2.out"], n_jobs=1)
print(type(batch).__name__, len(batch))

for parsed_file in batch:
    frame = parsed_file[-1]
    energy = frame.energies.total_energy.m_as("hartree")
    print(parsed_file.detected_format_id, frame.qm_software, frame.method, energy)
Output
FileBatchModelDisk 2
g16log Gaussian DFT -2182.472195
orcaout ORCA MP2 -74.999374598107

Both samples enter one FileBatchModelDisk and expose results through the same public fields. New readers follow the same container contract. Missing fields remain None; MolOP does not synthesize scientific results that the source did not provide.

Common tasks

Export a batch CSV

from molop import AutoParser

batch = AutoParser("water_mp2.out", n_jobs=1)
summary = batch.to_summary_df(
    frame=-1,
    brief=False,
    flatten_columns=True,
)
summary.to_csv("summary.csv", index=False)
print(summary.shape)

For the bundled water_mp2.out example, the complete table has one row and 23 columns. Replace the input with a path or glob for a batch:

Output
(1, 23)

The result is summary.csv with one row per successfully parsed file and unit-bearing columns such as Energy.total_energy.hartree. Notebook 02 renders the complete DataFrame from this call without selecting a temporary subset of columns.

Filter and export structures

molop -q parse "water_mp2.out" --n-jobs 1 \
  filter-state --state normal \
  format-transform --format xyz --output-dir structures

The command creates:

Created files
structures/water_mp2.xyz

Replace water_mp2.out with a path or glob for your own batch.

Supported scope

  • QM outputs: Gaussian log/fchk, ORCA output, and xTB output.
  • QM inputs: Gaussian and ORCA input reading and canonical writing.
  • Structure formats: XYZ, SDF/MOL, SMILES, and a CML writer.
  • Common results: structures, energies, thermochemistry, vibrations, orbitals, atomic populations, dipole/polarizability, NMR, and calculation status, depending on the format and printed source content.

See the format overview for exact reader/writer status and field boundaries.

MolOP does not run quantum chemistry calculations and is not a dedicated molecular viewer or molecular dynamics engine.

Documentation

Development

git clone https://github.com/gentle1999/MolOP.git
cd MolOP
uv sync
make check

See the documentation site's Developer section for implementation contracts and quality gates.

Citation and license

If MolOP helps your research, please cite:

MolOP (Molecule OPerator), https://github.com/gentle1999/MolOP

This project is licensed under the MIT License.

Metadata

Release files for molop 0.2.3

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

Source distribution (sdist)

Source distribution for molop 0.2.3
File Size Uploaded
molop-0.2.3.tar.gz 269.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for molop 0.2.3
File Interpreter ABI Platform
molop-0.2.3-py3-none-any.whl Python 3 none any Details

Total release size: 608.4 kB

Release files / molop-0.2.3.tar.gz

Download URL molop-0.2.3.tar.gz
Size 269.8 kB
Tags Source
SHA-256 checksum
How to use checksums
f35aa8ae127fbd09a2edb6e97f01810b9a8529defcd5a7f0d4d2f4cbfa8bb9ac
BLAKE2b-256 checksum
How to use checksums
a27fdf839da92ccb9fdfaf93b01a6de7ba92b252a1b218829931d58c5a54ff67
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 7, 2026.

Transparency log

Release files / molop-0.2.3-py3-none-any.whl

Download URL molop-0.2.3-py3-none-any.whl
Size 338.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6c83335ca72934205491ef9a94b2c271849bf8a6e97b84a2d43cf5258c31bb53
BLAKE2b-256 checksum
How to use checksums
fb4aa60b32b2d7aed638f51a58c6afa7aef44742622d16119de6ee62b7793e6b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 7, 2026.

Transparency log

Release history Release notifications | RSS feed

0.2.20

2 release files

0.2.19

2 release files

0.2.18

2 release files

0.2.17

2 release files

0.2.12

2 release files

0.2.11

2 release files

0.2.10

2 release files

0.2.9

2 release files

0.2.8

2 release files

0.2.7

2 release files

0.2.6

2 release files

0.2.5

2 release files

0.2.4

2 release files

This release

0.2.3 This release

2 release files

0.2.2

2 release files

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