Changelog¶
Release notes for MolPy, newest first. MolPy and molrs share one version line
and release as a pair — every entry lists the molcrafts-molrs version it
requires. Tagged releases and installable artifacts live on
GitHub Releases.
0.9.2 — 2026-07-23¶
Requires molcrafts-molrs==0.9.2.
Fixed¶
- Cloudflare Pages / Zensical docs build. Preload
molrsfor mkdocstrings somolpy.Frame/molpy.Blockre-export aliases resolve; document top-level symbols asmolpy.Framewhile user code keepsimport molpy as mp. - Frame/Block import path uses
molrs.frameso static analysis can resolve the pure-Python rich layer without a broken alias chain.
Unreleased¶
Added¶
- Compile-first polymer assembly and deferred finalization. The selector's
complete binding set is compiled into rooted local product motifs before the
assembled graph is edited. Distinct motifs are typed once and cache scalar
per-atom patches only; one batch reaction then builds the product.
Finalization.ATOMS,TOPOLOGY(default), andBONDEDsplit atom write-back, topology generation, andForceFieldParamsassignment so large MD systems can defer the latter two stages until export. - Carbon nanotube topology builder.
CarbonTubeBuilder.build(n, m, ...)covers zigzag, armchair, and general chiral tubes, open or axially periodic. Exact integer lattice quotienting closes seams without distance-guessed bonds; immutable compiled geometry/connectivity is cached internally. molpy.coreis now a Python surface over molrs, not a second kernel.Frame/Block, entity refs,Element, and force-field primitives preserve molrs object identity; graph, Box, Region, trajectory, selector, and unit conveniences are native subclasses or Python call-shape sugar. Element/unit truth, PBC geometry, alignment/replication, and CL&Pol scaleLJ all execute in Rust, with an architecture manifest and AST gate guarding that ownership.- Polymer topology assembly helpers on
PolymerBuilder:build_linear,build_sequence,build_ring,build_starformat CGSmiles and call the sole entrybuild(cgsmiles). Supporting types:SiteMap(site labels + leaving-H charge fold),Replicas(grid / linear multi-chain worlds), andlinear_cgsmiles/ring_cgsmiles/star_cgsmilesformatters. - User-guide section Polymer Topologies with
eleven pages paired 1:1 to
examples/topology/01_*.py…11_*.py(linear, block, ring, star, comb, telechelic, exhaustive/random gel, end-linked, dual network, prepolymer + agent). Smoke withpython examples/topology/run_all.py.
BREAKING¶
frame.simboxis renamed toframe.box(paired with molrs). The cell attribute is once againframe.box(molrs.Box | None). There is nosimboxalias or shim — assign and readframe.boxonly. C / CXX / WASM entry points follow the same rename (molrs_frame_set_box,frame_set_box, …). On-disk MolStore layout still uses the historicalsimbox/group name.- Public storage types live on the molpy facade again.
from molpy import Frame, Block, Element, MetaValueis the supported path; they are identity re-exports of the molrs types (molpy.Frame is molrs.Frame).molpy.coredoes not re-export them, and there is still nomolpy.core.frame/molpy.core.elementmodule. User code must not import molrs directly. -
Amber polymer construction now uses MolPy chemistry directly.
AmberPolymerBuilder(library, reaction, ...)andAmberTools.build_polymer(..., reaction=...)require amolpy.Reactionoverfields.SITE. The privateportlanguage,reaction_preset, and one-hydrogen leaving-group guess are removed; the backend translates the shared compiled residue product into prepgen/tleap inputs. -
Pint and the runtime CL&Pol fragment file are removed.
UnitSystemuses molrs' native unit registry; only the nativeljcompatibility context is accepted. Custom scaleLJ data must be supplied asFragmentScalingvalues instead of a parameter-file path. TypeBucketandmolpy.core.utilsare removed. They belonged to the old detached Python entity model; graph collections now come from molrs live handle views, and CSV input isBlock.from_csv.- The typifier package has one contract:
TypifierisMolGraph -> MolGraph.typify()is concrete — copy,match(), write the annotations back — andmatch()is the single abstract method. Typifiers are generic over the graph, so anAtomistictypifier and aCoarseGrainone share the same pipeline. Removed:ForceFieldTypifier,RegionTypifier,TypeScope,typify_region,retype_region,relaxed(),atomtype_matches,skip_atom_typingand the four otherskip_*_typingflags, and the publicPairTypifier. Deleted modules:typifier/{base(old),bond,angle,dihedral,pair,mmff,atomistic,scope}.py— six of them were dead code that shadowed live names (TypifierBase,PairTypifierandatomtype_matcheswere each defined twice in the package). molpy.typifier.ForceFieldParamsreplacesAtomistic.assign_bonded_types. Assigning parameters to a graph whose types are already known is not a typifier; it is the second half of one. The old method lived incore(a force-field judgment in the data-model layer), matched force-field types by splitting their names on"-"— no wildcards, no atom classes, no overlay layers — and left a term it could not match silently unlabelled.ForceFieldParams(ff).assign(graph)returns a new graph, matches by specificity, and raises on an unparameterised term unlessstrict=False.GraphAssembler(reaction, typifier=..., reach=N)—reachis now a required argument alongside a typifier, andAmberToolsTypifier(amber)no longer takes one.TypeScopedissolved intoAffectedRegion.around(graph, touched, reach=N), the only place that derives the write-back radius (max(reach, 2)) and the extraction radius (interior_reach + reach) from the one number they share.
A defence moved from the type system to the test suite. graph-assembler-01
established that the radius is decided by the typifier and is "never a
setting", because a wrong reach silently mistypes — measured, reach
one too small mistyped 22 of 46 written-back atoms of a PEO junction. With
reach supplied to the assembler, nothing rejects a wrong value at
construction; it is caught by the oracle test (region typing == whole-graph
typing) instead. Note that AmberToolsTypifier(amber, reach=2) already took
reach from the user; this only moves where it is passed.
Fixed¶
- Hydrogen perception preserves angles, dihedrals and impropers. The old
complete_valence()facade copied atoms and bonds only. It has been removed; cut sites now callPerceive.find_hydrogensdirectly, which returns a non-mutating graph with every existing relation kind preserved. - A region typed from a raw slice could not be typed at all. Because the
extracted ball is
interior_reach + reachwide, an interior atom's receptive field reaches exactly to the boundary atoms, and a raw cut leaves those with unfilled valences — radicals, to a SMARTS matcher. Only the AmberTools path completed them. Measured on p-xylene with OPLS-AA atreach = 2, 12 of 19 raw slices are rejected outright by the typifier (a truncated aromatic carbon types as something no bonded term covers); PEO and methyl acrylate happen to survive a raw cut.RegionTypes.ofnow completes every region before typing it — every region is a cut, so there is no condition to get wrong. A typifier itself never guesses whether its graph is a fragment: truncation is a fact about provenance, not something readable off a graph's valences. -
An unparameterised bonded term was written back as
None.RegionTypes._capture_linksrecorded terms whose type was undecided, andapply_tothen erased whatever the parent's term already carried. Undecided terms are now skipped. -
molpy.reacteris removed. Reaction semantics live inmolpy.Reaction(a re-export of the molrs SMIRKS engine); chemistry lives in the reaction SMARTS itself.Reacter,ReactionResult,TopologyDetector, the 14 anchor/leaving selectors,BondReactReacterandReactionPresetsare gone. molpy.builder.crosslinkis removed.Crosslinker,DeterministicCrosslinkerandRandomCrosslinkerheld a selector and forwardedapplytoassemble. Crosslinking is nowGraphAssembler(rxn).assemble(melt, RandomSelector(...)). Thecrosslink_gel()/write_lammps()recipes are documentation, not library.PolymerBuilderis rebuilt on the assembly kernel:PolymerBuilder(MonomerLibrary({...}), reaction, typifier=..., placer=...).build(cgsmiles).build_sequence,PolymerBuildResult,Connectorand theconnector=/reacter=dual constructor are gone. A repeat unit is a molecule withfields.SITEmarked on the atoms that may react — there is no port system and no</>direction.molpy.core.AffectedRegionmoved tomolpy.typifier.affected_region. It is not a data-model type: it is the ball a graph edit disturbed, and its radius is decided by the typifier'sTypeScope.molpy.core.region_radiusis removed along with the_FLOOR = 4fallback and the threecontext_radiusdeclarations. A typifier declares aTypeScope(reach);AmberToolsTypifiernow requiresreach=.-
BondReactTemplatemoved frommolpy.reacter.bond_reacttomolpy.io.data.lammps_bond_react(it is an IO artifact). The publicwrite_bond_react_map/write_lammps_bond_react_systemare unchanged. -
Region retyping wrote wrong atom types. The extraction radius and the write-back radius were conflated into one
radius; correctness requiredreach <= 1, which no real typifier satisfies. Measured against whole-graph typing,AmberToolsTypifier's default mistyped 22 of 46 written-back atoms of a PEO junction. The guard that should have caught it was gated on astrictflag read through a two-levelgetattr(..., False), so for any typifier without anatom_typifierattribute it never fired. - Malformed reaction SMIRKS silently paired the wrong sites.
_find_componentreturned component0when a forming-bond map number appeared in no reactant pattern; it now raises. - Polymer assembly was
O(N^2)in chain length from four independent sources.
Added¶
molpy.Reaction,molpy.SmartsPattern,molpy.NeighborQuery,molpy.Graph,molpy.perceive_aromaticity,molpy.find_rings— re-exports, so user code never imports molrs.molpy.core.fields.SITE;Entitysubscripting accepts aFieldSpec.molpy.builder.assembly:GraphAssembler,Selector,TopologySelector,ProximitySelector(Exhaustive/Spacing/ExplicitPair/Random),MonomerLibrary,PolymerBuilder,Placer/ResiduePlacer.
0.7.0 - 2026-07-08¶
Requires molcrafts-molrs == 0.7.0 (molpy and molrs release as a pair).
Breaking¶
- OPLS-AA and MMFF typifiers moved to molrs.
molpy.typifiernow re-exportsOPLSAATypifierandMMFFTypifierfrommolrs.typifier; the molpy-side typifier internals (adapter,graph,matcher,layered_engine,dependency_analyzer) are removed. Construct viaOPLSAATypifier(source, strict=…)and call.typify(mol)(returns a typedmolrs.Atomistic; use.to_frame()for tabular access). The oldOplsTypifier(ff, strict_typing=…)constructor is gone.
Added¶
- CL&P ionic-liquid typifier (
molpy.typifier.ClpTypifier) — now functional, implemented as an OPLS-AA overlay (molrs SMARTS assigns CL&P atom types fromclp.xml; molpy assigns parameters). Matches the CL&P reference charges/σ/ε. - Offline network crosslinking over the molrs SMARTS/SMIRKS engine.
- Distance-based
SoftPotential+ force-field-free relax inmolpy.optimize. - Region-scoped typing with a hash-keyed
RetypeCache— only the subgraph affected by a graph edit (AffectedRegion) is re-typed, keyed by the molrs isomorphism-invariant structural graph hash.
Changed¶
- Covalent radii merged into
Element;SoftPotentialreads radii viaElement.
0.6.0 - 2026-07-03¶
Requires molcrafts-molrs == 0.6.0.
Breaking¶
molpy.computeselection API now reads atom-tuple selections (pairs / triplets / orientation axes) from the frame's core topology blocks (bonds/angles/dihedrals/orientations); thegroupsargument is removed.Molpackremoved — use thePackmolwrapper directly.LammpsSystemremoved — usemolpy.io.write_lammps_system(...).
Added¶
- Deterministic copolymer sequence generators (
AlternatingSequenceGenerator,BlockSequenceGenerator). AmberToolsfacade owning the GAFF2/AM1-BCC workflow (parameterize,parameterize_ion,build_polymer).SmilesReader— OOP SMILES → 3DAtomisticreader.
Fixed¶
- O(N²) blow-ups in packing and LAMMPS writing (string columns hoisted to numpy once); LAMMPS force-field writer de-duplicates coefficients by type name.
Changed¶
- Pin
molcrafts-molrs==0.6.0; docs config migratedmkdocs.yml→zensical.toml.
0.5.1 - 2026-07-01¶
Requires molcrafts-molrs == 0.5.1 (molpy and molrs now release as a pair).
Added¶
- analysis-parity compute operators in
molpy.compute: angular/dihedral/ distance and combined distribution functions, the spatial distribution function, the Van Hove correlationG(r, t), Legendre reorientational correlations, hydrogen-bond detection, radical Voronoi tessellation with domain/void/charge analysis, and vibrational spectra (VDOS, IR, Raman, VCD, ROA, resonance Raman). molpy.version.check_molrs_version()— run onimport molpy; import fails when the exact pairedmolcrafts-molrsversion is missing or does not match.
Changed¶
- Documentation now builds with Zensical; user-guide notebooks are pre-rendered to Markdown. The compute section documents every operator with textbook-style guides and a full API reference.
0.5.0 - 2026-06-21¶
Requires molcrafts-molrs == 0.1.5.
Removed¶
- SMARTS GAFF typifier removed.
molpy.typifier.GaffTypifier(and the internal_GaffAtomTypifier), thetypifier/gaff.pymodule, and the bundleddata/forcefield/gaff.xmlare gone. GAFF atom types and AM1-BCC charges now come exclusively from AmberTools (antechamber/prepgen) through the unchanged AmberTools wrapper; the 41 generic SMARTS-matcher tests are kept.
Fixed¶
- tip3p water
theta0is now expressed in radians, matching molrs's angles-internal-radians convention.
Added¶
- PEO polymer-electrolyte workflow examples.
0.4.2 - 2026-06-18¶
Additive release — no API renames or breaking changes.
Requires molcrafts-molrs == 0.1.4.
Added¶
- GROMACS TRR / XTC and DCD trajectory readers (
read_trr_trajectory,read_xtc_trajectory,read_dcd_trajectory) and TRR / XTC writers (write_trr,write_xtc) — thin delegations to the molrs backend.
0.4.1 - 2026-06-14¶
Maintenance release on top of 0.4.0. Requires molcrafts-molrs == 0.1.2.
Removed¶
molpy.legacyis gone. The pure-NumPyMSD/DisplacementCorrelationoperators (and themolpy.legacysubmodule) were removed. Use the molrs-backed trunk inmolpy.computeinstead —molpy.compute.MSDandmolpy.compute.MCDCompute.
Fixed¶
- AMBER prmtop reader. Atom-connectivity index columns
(
atomi/atomj/atomk/atoml/idon bonds/angles/dihedrals and the atomid) are now emitted as unsigneduint32to match molrs'sUIntindex columns (get_uint); mask/sentinel columns that use-1stay signed.
Internal¶
- Pinned
molcrafts-molrs == 0.1.2(was0.1.1); kept the CI install comment in sync. - Collapsed the three near-identical PDB-writer required-field tests into a single parametrized test.
0.4.0 - 2026-06-11¶
This release lands the molrs Rust backend as the foundation of Frame /
Block / Box / compute, and a five-stage builder/reacter overhaul
(dead-code consolidation, fix bond/react serialization moved into the io layer,
REACTER template scientific-correctness fixes, a consolidated public API with
executable docs, and a behavior-preserving build-loop performance pass).
A follow-up consolidation wave completes the molrs sink: topology perception,
trajectory storage, the force-field/potential model, and box/region geometry
now all execute in the Rust backend, a fail-fast sweep removes every known
silent-failure path, and a new CL&P ionic-liquid force field plus the
foundations of the CL&Pol polarizable stack land in the typifier/builder
layer.
Requires molcrafts-molrs == 0.1.0.
Builder / Reacter¶
BondReactTemplate.write()/write_map()were removed.BondReactTemplateis now a pure data object; all fix bond/react serialization lives in the io layer. Write a complete reactive system (data + ff + templates, with type IDs unified across all files) withmp.io.write_lammps_bond_react_system(workdir, frame, ff, templates=...); write just the.mapfile withmp.io.write_bond_react_map(template, stem). The single-templatewrite()path produced template-local type IDs that were inconsistent with the system data file and has no replacement.- Importing a molpy subpackage no longer eagerly loads the rest.
Top-level submodules (
molpy.io,molpy.engine,molpy.adapter, …) are now lazy (PEP 562):import molpy.reacterinitializes onlycore(andpotential).mp.io.…attribute access andimport molpy.iobehave as before.molpy.builder/reacter/pack/computeare reachable as lazy top-level attributes (mp.builder.…). - Builder/reacter terminology and API consolidation.
polymer()/polymer_system()are the documented one-call entry points;PolymerBuilder+Connectorremain the step-by-step API. Agent-only Tool classes moved tomolpy.builder.polymer.tools(out of the user__all__);ReactionPresets/ReactionPresetSpecare now public extension points.ReactionPresetSpec.site_selector_*→anchor_selector_*;molpy.reacter.find_port_atom→find_port. No deprecation shims (experimental stage); see the repo-rootCHANGELOG.md. - REACTER template correctness.
BondReactReacterpost templates now carry impropers (sp2 planarity terms survivefix bond/react),InitiatorIDsare deterministic and validated (exactly 2, never on the template boundary), edge atoms are checked for identical pre/post type and charge, total charge is checked for conservation (CHARGE_CONSERVATION_TOL = 1e-6e), andrun()no longer mutates caller-ownedleft/rightstructures. - molrs is now an exact required dependency.
molcrafts-molrs==0.7.0is in the coredependencies; missing package metadata or any version mismatch is an import error.FrameandBlockare owned only by molrs. Molpy'sBoxremains geometry sugar over the native box, and compute operators execute in Rust. There is no pure-Python fallback. - The RDKit-backed compute node was removed.
molpy.compute.rdkit(Generate3D/OptimizeGeometryoverRDKitAdapter) is gone.molpy.compute.Generate3Dis now the molrs-backed trunk operator, taking anAtomisticgraph and returning a fresh 3D structure. The RDKit adapter (molpy.adapter.rdkit) is retained as an optional external backend;rdkitremains an optional extra, not a required dependency. Frame/Blockare imported directly from molrs. Molpy's former top-level,molpy.core, andmolpy.core.framecompatibility exports were deleted; usefrom molrs import Frame, Block. The Python-side object-column overflow (_objects) is gone: columns are numpy-only (float / int / bool / str). Assigning an object /None/ ragged column now raisesmolrs.BlockDtypeErrorat write time instead of being silently stored on the Python side.frame.simboxis the only cell attribute and returnsmolrs.Box;frame.boxis deleted. Exact-dtype metadata usesframe.meta+molrs.MetaValue; untypedframe.metadatais deleted. No aliases or compatibility shims remain.
Typifiers & Force Fields¶
- One public typifier class per force field. The dual atom-only/atomistic
hierarchy collapsed into a single full-pipeline class per force field:
OplsTypifierandGaffTypifier(atom → pair → bond → angle → dihedral). The orchestrator base was renamedForceFieldAtomisticTypifier→ForceFieldTypifier; per-FF atom typifiers are now private (_OplsAtomTypifier/_GaffAtomTypifier); theOpls{Bond,Angle,Dihedral}Typifierclasses and theGaffTypifier = GaffAtomisticTypifieralias were removed. Behavior is unchanged. - New CL&P ionic-liquid force field.
ClpTypifier(OplsTypifier)types ionic liquids through the full pipeline from a new built-inclp.xml(imidazolium cation + BF4 / PF6 / NTf2 / dca anions), generated from the authoritative paduagroup CL&Pil.ffwith exact charges/LJ and hand-authored SMARTS for ring-position discrimination (CR/CW/NA). It is read through the existing OPLS reader;oplsaa.xmlis untouched.[C4C1im]+sums to +1, each anion to −1. - CL&Pol polarizable-force-field foundations.
VirtualSite/DrudeParticle/MasslessSiteare new data-onlyAtomsubclasses carrying a persistentvsitemarker (identity lives in the field, so it survives the molrs store;Atom.is_virtualreads it). TheVirtualSiteBuilderABC (copy → select → build sites → redistribute, no input mutation) ships withDrudeBuilder(the CL&Pol polarizer, driven by the bundledalpha.ffpolarizability data) andTip4pBuilder(rigid M-site). - CL&Pol scaleLJ SAPT epsilon scaling.
molpy.core.ops.scale_ljscales cross-fragment LJ epsilon by the SAPT-derived factor k_ij (matching paduagroup/clandpol scaleLJ), deep-copying theForceFieldand touching only inter-fragment pair epsilon — sigma and charges are unchanged. Fragment data ships asclpol_fragments.ff;FragmentScaling,compute_k_ij, andload_fragment_scaling_dataare public. - Interim pure-Python Thole and Tang–Toennies damping evaluators were
developed and validated against paduagroup/clandpol and LAMMPS
pair_thole/pair_coul_ttduring this cycle, but were superseded by the force-field collapse onto molrs before release — they are not part of the 0.4.0 surface and will return as molrs-native kernels.
molrs Consolidation¶
- The force-field model now lives entirely in molrs;
molpy.potentialis a facade.molpy.core.forcefieldis a thin re-export of the native molrsForceField/ Style / Type hierarchy (plus theAtomisticForcefieldalias and named specialized Style classes). The parallel Python kernels and energy math underpotential/were deleted;molpy.potential[.bond|.angle|…]re-exports the molrs-backed Style classes andPotentialsso users never import molrs. Energy/forces are evaluated viaff.to_potentials(frame).calc_energy(frame)/.calc_forces(frame);optimize.ForceFieldPotentialwraps this (the per-kernelpotential_wrappersare gone). I/O formatters now dispatch by style/kernel name (no per-kernelTypeclasses), anddef_typeparameters are keyword-only. - Topology perception runs on the molrs graph kernel; the parallel igraph
engine is deleted.
get_topoangle/dihedral perception delegates tomolrs.Atomistic.generate_topology;get_topo_neighbors/get_topo_distancesandextract_subgraphuse the molrs BFS (topo_distances) and adjacency kernels.core/topology.pyand the publicmolpy.Topology/molpy.core.Topologyexports were removed —get_toponow always returns anAtomistic(no flags = plain copy), fixing a latent bug where the no-flags path could leak a raw graph object. igraph remains only inside the SMARTS typifier. Relation enumeration uses the authoritative molrsrelation_ids()— the Python-side_rel_handlesshadow and its handle-range probing heuristic are gone. Trajectoryis now amolrs.Trajectorysubclass. The eager container, lazy reading, and LAMMPS/XYZ trajectory parsing all live in molrs (read_lammps_trajectory/read_xyz_trajectory); molpy's duplicate readers and the mmap-index infrastructure were deleted. molpy keeps the split extensions (SplitStrategy/TrajectorySplitter), topology/slice/map conveniences, the XYZ writer, and the HDF5 path.TimeIntervalStrategyreads the native.timearray; exact-dtype snapshot metadata usesframe.meta.Computeis a plain class.__init__takes configuration,__call__takes inputs,dump()persists. The single-input_computehook, the molexpexecute()/input_key/output_keyshim, and theCompute[InT, OutT]generic were removed, along with 17 dead_computestubs across the molrs-backed operator wrappers.- Box and region geometry delegate to the Rust kernels.
Box.make_fractional/make_absolute/isinforward to the inherited molrsto_frac/to_cart/isin;volume, lengths/tilts, wrapping, and minimum-image differences use the molrs properties andBox.wrap/Box.delta.SphereRegionandBoxRegion/Cubepoint-membership tests run onmolrs.Sphere.contains/molrs.Cuboid.contains— molpy keeps only the boolean-algebra /MaskPredicatelayer. The Python-side_is_freeflag is gone: free-box state derives from molrscell_defined, so a non-periodic bounding box (from_bounds) now correctly reports a real cell with volume/lengths.Atomistic.scaleandalignusemolrs.scale/molrs.rotate(the per-atom Rodrigues loop is gone). Ortho + triclinic parity with the previous NumPy paths was verified before each sink. - Canonical field registry comes from
molrs.fields.molpy.core.fieldsno longer defines a parallelFieldSpec/FieldFormatterset — it re-exports the single canonical registry (molpy.core.fields.CHARGEismolrs.fields.CHARGE), keeping only the FF-specificForceFieldFormatteron top. This resolves the drifted triple-duplicated registry.
Fail-Fast¶
- Selectors raise on missing columns.
AtomIndexSelector/ElementSelector/CoordinateRangeSelector/DistanceSelectornow raiseKeyErrornaming the missing column instead of silently matching zero atoms on a typo'd field. ForceField.to_potentials()no longer silently drops styles. Legitimately-empty styles (no types) are skipped explicitly; any real failure (unknown kernel, a type missing required params) propagates.- Typifier inputs are validated. A SMARTS pattern that fails to parse now
raises instead of being warned and dropped (which silently un-typed that atom
type); an invalid element symbol or atomic number raises
ValueErrorinstead of degrading to a match-anything wildcard (*stays reserved for the explicit no-element/no-number case). - The LAMMPS data reader keeps force-field coefficients.
read_lammps_datareturnsLammpsDataResult; coefficient sections live onresult.forcefield, whileresult.frameremains pure Frame state. Writers acceptforcefield=andtype_labels=explicitly. Malformed coefficient lines raiseValueErrorinstead of being swallowed. - The dead
molpy.oppackage (unused geometry helpers) was deleted.
Added¶
molpy.compute.NeighborList— linked-cell neighbor search (molrs backend).molpy.compute.RDF— radial distribution function over one or more frames.molpy.Boxinheritsmolrs.Box, so a molpy box is accepted by any molrs API with no conversion.- molrs analyses exposed as molpy operators:
MSD,Cluster,ClusterCenters,CenterOfMass,GyrationTensor,InertiaTensor,RadiusOfGyration,Pca,KMeans. molpy.typifier.ClpTypifier+ built-inclp.xml— CL&P ionic-liquid force field (imidazolium + BF4/PF6/NTf2/dca) on top of the OPLS pipeline.VirtualSite/DrudeParticle/MasslessSiteatoms,Atom.is_virtual, andVirtualSiteBuilder/DrudeBuilder/Tip4pBuilder(CL&Pol Drude polarizer + TIP4P M-site), with bundledalpha.ffpolarizability data.molpy.core.ops.scale_lj(+FragmentScaling,compute_k_ij,load_fragment_scaling_data,clpol_fragments.ff) — CL&Pol SAPT cross-fragment LJ epsilon scaling.UnitSystem.register_preset(name, base_units, *, overwrite=False)— register custom LAMMPS-style unit presets usable viapreset(); the preset table is no longer a closed dict.
Changed¶
compute.mcdandcompute.pmsdnow compute minimum-image displacements via molrsBox.delta(minimum_image=True); public signatures are unchanged.
Migration¶
- Replace
pip install "molcrafts-molpy[molrs]"withpip install molcrafts-molpy. - If you imported
from molpy.compute.rdkit import Generate3D, switch tofrom molpy.compute import Generate3D(molrs-backed,Atomistic -> Atomistic) or, for the RDKit adapter flow,from molpy.adapter import Generate3D. - Build
Blockcolumns from numpy-representable data: replacenp.array([...], dtype=object)string columns with nativenp.array([...])(numpy infers aUdtype). Sparse per-entity attributes can no longer beNone-filled into a column — use a typed default or omit the column.Atomistic.to_frame()/CoarseGrain.to_frame()now drop columns that cannot be numpy-represented (e.g. a CG bead's raggedatomsmapping) rather than emitting object arrays. molpy.Topology/molpy.core.Topologyno longer exist;get_topo()always returns anAtomistic. For k-hop graph queries useget_topo_neighbors/get_topo_distances(molrs BFS backed).- Typifiers: replace
OplsAtomTypifier/GaffAtomTypifier/Opls{Bond,Angle,Dihedral}Typifier/GaffAtomisticTypifierwithOplsTypifier/GaffTypifier; a custom orchestrator should subclassForceFieldTypifier(renamed fromForceFieldAtomisticTypifier). - Potentials: the Python kernel classes under
molpy.potentialare gone — import the molrs-backed Style classes from the same paths and evaluate viaff.to_potentials(frame).calc_energy(frame). Parameter names follow molrs (k, notk0); look up styles withff.get_style(category, name);def_typeparameters are keyword-only. Computesubclasses: configuration goes to__init__, data to__call__. Theexecute()/input_key/output_keymolexp shim and the_computehook were removed.- Code that relied on selectors returning an empty mask for a missing column,
on unparseable SMARTS being skipped, or on
to_potentials()ignoring broken styles must now handle the raisedKeyError/ValueError(or fix the input — these were silent-failure bugs).
See the molrs backend developer guide for details.