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.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 molop 0.2.2
File Size Uploaded
molop-0.2.2.tar.gz 266.3 kB Details

Built distribution (wheel)

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

Total release size: 600.3 kB

Release files / molop-0.2.2.tar.gz

Download URL molop-0.2.2.tar.gz
Size 266.3 kB
Tags Source
SHA-256 checksum
How to use checksums
0f39e5c622a4655f91cec8d92169a729577e01889815f890e295bd272b3e22fa
BLAKE2b-256 checksum
How to use checksums
cfb990334987bcb86105f15233050b46a78143194ef5d5a2c6d08b5f807a6752
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.2-py3-none-any.whl

Download URL molop-0.2.2-py3-none-any.whl
Size 334.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6f2d37b14ec71206b7de970d6d525b3a625b997d22e6ec51ae92f72652c0ad43
BLAKE2b-256 checksum
How to use checksums
6a5c80c58fac05c972287e918e01ab603b3ed038f8b99584e8a7224e2f18245b
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

0.2.3

2 release files

This release

0.2.2 This release

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