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.

Render trajectories and transition-state candidates

Parsed multi-frame files can be rendered as GIF or animated SVG, and calculation files with one imaginary mode can export geometry-based pre- and post-TS candidates:

from molop import AutoParser

trajectory = AutoParser("trajectory.log", n_jobs=1)[0]
ts_frame = next(frame for frame in trajectory if frame.is_TS)
trajectory.draw_animation(file_path="trajectory.gif")
pre_path, post_path = ts_frame.save_pre_post_ts("ts-endpoints", format="sdf")

See the transition-state analysis tutorial for frame selection, vibration animation, batch export, and the non-optimized endpoint boundary.

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.
  • Visualization: trajectory and vibration GIF/SVG animations, plus geometry-based transition-state endpoint candidates.

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

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.21
File Size Uploaded Provenance
molop-0.2.21.tar.gz 348.9 kB With provenance Details

Built distribution (wheel)

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

Total release size: 785.8 kB

Release files / molop-0.2.21.tar.gz

Download URL molop-0.2.21.tar.gz
Size 348.9 kB
Tags Source
SHA-256 checksum
How to use checksums
3d7bf43f3db952878cdc46f1b8baac59b84642ecb851512e9a828fdae225e650
BLAKE2b-256 checksum
How to use checksums
27df3ed9253a2d9185f4c864a068c306f015df0163393caf6ada9b2793d09630
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 Oct 20, 2026.

Transparency log

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

Download URL molop-0.2.21-py3-none-any.whl
Size 436.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b496783cdd41c68fec6dea9946d75e133d2e1c1668a8b3be9a7059ac30fce435
BLAKE2b-256 checksum
How to use checksums
93aa0f2940f8b1f0dadc455c316dedf0d6115d22c9bc09daae546fa010f01efc
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 Oct 20, 2026.

Transparency log

Security for molop 0.2.21

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.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for molop-0.2.21.tar.gz

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 Oct 20, 2026.

Transparency log

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.

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