Skip to content

API Reference

All public symbols are documented on the package pages listed below. Docstrings are auto-generated from source annotations; signatures include type hints throughout. The tables on this page provide a task-oriented index for locating the appropriate symbol and package without prior knowledge of MolPy's internal organization.

Index of Operations and Symbols

Operation Primary symbols Package
Construct a molecule from atoms and bonds Atomistic, def_atom, def_bond Core
Store tabular molecular data Block, Frame Core
Define a periodic simulation cell Box Core
Represent a time-ordered frame sequence Trajectory Core
Query bond-graph relations (angles, paths, rings) Topology Core
Define and query force field parameters AtomisticForcefield, Style, Type Core
Parse SMILES / BigSMILES / SMARTS / CGSmiles parse_molecule, parse_monomer, parse_smarts, parse_cgsmiles Parser
Execute a chemical reaction (bond formation / removal) Reacter, find_port, select_neighbor Reacter
Generate fix bond/react pre/post topology templates TemplateReacter Reacter
Assemble polymer chains from CGSmiles PolymerBuilder, Connector, Placer Builder
Pack molecules into a periodic simulation box Molpack, InsideBoxConstraint Pack
Assign force field atom types via SMARTS matching OplsAtomisticTypifier, GaffTypifier Typifier
Evaluate bond, angle, and pair potentials BondHarmonic, LJ126 Potential
Read and write molecular files (PDB, LAMMPS, GRO, …) read_pdb, write_lammps_data, read_xml_forcefield I/O
Convert between MolPy and RDKit / OpenBabel objects RDKitAdapter, OpenBabelAdapter Adapter
Invoke external CLI tools (antechamber, tleap) Wrapper, AntechamberWrapper Wrapper
Execute packaged multi-step preparation workflows PrepareMonomer, polymer, generate_3d Tool
Compute mean-squared displacement and correlations MSD, DisplacementCorrelation Tool
Generate LAMMPS or CP2K input decks LAMMPSEngine, CP2KEngine Engine

Package Responsibilities

Package Responsibility
Core Foundational data structures: Atomistic, Frame, Block, Box, Trajectory, Topology, ForceField
Parser Grammar-based notation parsing: SMILES, SMARTS, BigSMILES, CGSmiles, G-BigSMILES
Reacter Chemical reaction framework: site and leaving-group selectors, bond formers, reactive MD templates
Builder Polymer system construction: builders, port connectors, geometric placers
Pack Spatial packing of molecular ensembles via the Packmol executable
Typifier SMARTS-based atom typing for OPLS-AA and GAFF force fields
Potential Numerical potential kernels for bonds, angles, dihedrals, and non-bonded interactions
I/O Format-specific readers and writers for molecular data, force fields, and trajectories
Adapter In-memory representation bridges to RDKit and OpenBabel
Wrapper Subprocess interfaces for AmberTools command-line executables
Tool High-level multi-step preparation workflows and analysis operators
Engine Simulation engine abstractions for LAMMPS and CP2K
Optimization Potential wrappers for geometry optimization workflows