Skip to content

API Reference

Auto-generated reference for every public symbol, with typed signatures throughout. Start from the tables below: find your task, get the symbol and its package.

Public surface: one path per name

Write import molpy as mp and reach every name through mp. Each name has exactly one public path — there is no molpy.core.Atomistic, molpy.parser or molpy.optimize spelling. Two layers own the names:

Layer What it means Names
Re-exported from the native core (molrs) Identity re-export: mp.Atomistic is molrs.Atomistic. Behaviour and docs come from the native core; molpy adds nothing. Graphs and views: Atomistic, CoarseGrain, Atom, Bond, Angle, Dihedral, Improper, VirtualSite, DrudeParticle, MasslessSite, Bead, CGBond, NodeRef, RelationRef, Refs, Port, Graph, Topology, Trace, ExtractedSubgraph · Data: Frame, Block, FrameMeta, MetaDocument, MetaValue, Element, keys, schema · Force field: ForceField, Style / Type and their Atom/Bond/Angle/Dihedral/Improper/Pair subclasses, PotentialCompiler, Potentials, FragmentScaling, BccModel, GasteigerModel, MullikenModel · Notation and perception: SmilesIR, CGSmilesIR, SmilesError, SmartsPattern, SmartsMatch, Perceive, RingInfo, Reaction, Coarsener, SubgraphMatcher · Assembly: Assembler, GrowthPlacer, SitePlacer, AxisOrienter · Shapes: Cuboid, Sphere, Parallelepiped, HalfSpace · Units: Unit, Quantity, UnitRegistry, UnitPreset, UnitsError · Neighbours: NeighborQuery, NeighborList, Neighbors, VerletSkin · Optimisation and conformer reports: LBFGS, OptReport, ConformerReport, ConformerStageReport · Namespaces mp.md, mp.op
molpy's own Defined in molpy; sub marks a subclass of a native type that adds molpy behaviour. Box (sub), Trajectory (sub), TrajectorySplitter and its strategies, Region, BoxRegion / SphereRegion / Cube / AndRegion / OrRegion / NotRegion (sub), the selectors, UnitSystem (sub), Conformer (sub), Config, Script, fields, FrameCollection
Subpackage namespaces molpy code plus the native names that belong to that subsystem, exported there and nowhere else. mp.io (readers / writers), mp.builder (planning, crystals, nanostructures, PackingTemplate), mp.compute (every analysis, e.g. mp.compute.RDF, mp.compute.signal), mp.typifier (e.g. mp.typifier.OPLSAATypifier), mp.engine, mp.adapter, mp.data, and molpy.wrapper (imported explicitly)

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
Perceive angles/dihedrals in place; bond-graph distances; molecule ids of a frame generate_topology, topo_distances, Topology.from_frame Core
Define and query force field parameters ForceField, Style, Type Core
Parse SMILES / SMARTS mp.io.read_smiles, SmilesIR, SmartsPattern Parser
Perceive hydrogens / aromaticity / rings Perceive, RingInfo Core
Apply a reaction SMARTS to a graph (bond formation / removal) Reaction Parser
Generate fix bond/react pre/post topology templates BondReactTemplate, write_bond_react_map IO
Assemble units along a site graph (chains, rings, stars, combs, backmapping) Assembler, GrowthPlacer, SitePlacer, AxisOrienter, CGSmilesIR Builder
Pack molecules into a simulation box molpack.GenCanPack, Target, molrs regions as restraints Pack
Generate 3D conformers from a molecular graph Conformer Conformer
Assign force field types (OPLS-AA, MMFF94, GAFF via AmberTools) OPLSAATypifier, MMFF94Typifier, AtdTypifier, AntechamberTypifier, TLeapTypifier Typifier
Evaluate bond, angle, and pair potentials PotentialCompiler, Potentials Potential
Read and write molecular files (PDB, LAMMPS, GRO, …) read_pdb, write_lammps_data, read_xml_forcefield I/O
Store a frame, trajectory or force field as a *.mrec record write_mrec, read_mrec_trajectory, read_mrec_forcefield I/O
Bridge to a third-party library (in-memory) Adapter, RDKitAdapter (optional example) Adapter
Invoke external CLI tools (antechamber, tleap) Wrapper, AntechamberWrapper Wrapper
Plan polydisperse polymer systems SystemPlanner, PolydisperseChainGenerator, SchulzZimmPolydisperse Builder
Compute mean-squared displacement, correlations, RDF, clustering MSD, Onsager, RDF Compute
Locate bundled data files and built-in force fields get_forcefield_path, get_path Data
Generate LAMMPS, CP2K, or OpenMM input decks LAMMPSEngine, CP2KEngine, OpenMMEngine Engine

Package Responsibilities

Package Responsibility
Core Foundational data structures: Atomistic, Frame, Block, Box, Trajectory, NodeRef/RelationRef, Region, UnitSystem, ForceField
Parser SMILES / SMARTS / CGsmiles types at the root (mp.SmilesIR, mp.SmartsPattern, mp.CGSmilesIR)
Builder System construction: site-graph assembly and placers, polydisperse planning, nanostructures, crystals, virtual sites
Pack Spatial packing via molpack (molcrafts-molpack)
Conformer 3D conformer generation from molecular graphs
Typifier Force-field typing: OPLS-AA and MMFF94 (native), GAFF / GAFF2 through AmberTools
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 Optional in-memory bridge to RDKit (worked example)
Wrapper Subprocess interfaces for AmberTools command-line executables
Engine Simulation engine abstractions for LAMMPS, CP2K, OpenMM
Optimization Native L-BFGS minimizer at the root (mp.LBFGS, mp.OptReport)
Compute Trajectory analysis: MSD, Onsager, transport, dielectric, RDF, clustering, …
Data Locators for bundled data files and built-in force fields