Description:
The current ImproperDihedral implementation generates only 1 inversion term per sp²/resonant center, but the DREIDING paper (Mayo et al., J. Phys. Chem. 1990) explicitly requires 3 terms—one for each neighbor acting as the axis atom. The root cause is that ImproperDihedral::new() sorts all three peripheral atoms into a canonical tuple, collapsing distinct axis choices into a single hash entry. This silently undercounts inversion contributions and violates the paper's rotational invariance requirement. We will redesign the topology type into a clear Inversion struct with explicit axis_atom and plane_atoms fields, emit three instances per valid center, and align terminology with the paper (Torsion/Inversion instead of ProperDihedral/ImproperDihedral).
Tasks:
Description:
The current
ImproperDihedralimplementation generates only 1 inversion term per sp²/resonant center, but the DREIDING paper (Mayo et al., J. Phys. Chem. 1990) explicitly requires 3 terms—one for each neighbor acting as the axis atom. The root cause is thatImproperDihedral::new()sorts all three peripheral atoms into a canonical tuple, collapsing distinct axis choices into a single hash entry. This silently undercounts inversion contributions and violates the paper's rotational invariance requirement. We will redesign the topology type into a clearInversionstruct with explicitaxis_atomandplane_atomsfields, emit three instances per valid center, and align terminology with the paper (Torsion/Inversioninstead ofProperDihedral/ImproperDihedral).Tasks:
Core Types (
src/core/topology.rs)ImproperDihedralwithInversion: fieldscenter_atom,axis_atom,plane_atoms: (usize, usize)(sorted pair only).ProperDihedral→Torsion; updateMolecularTopologyfields accordingly.Builder (
src/builder/mod.rs)build_impropers()→build_inversions()to emit 3 inversions per sp²/resonant degree-3 center.build_propers()→build_torsions(); update call sites.API & Docs
src/lib.rsre-exports and doctests to use new type names.docs/04_topology_builder.mdanddocs/ARCHITECTURE.mdwith new semantics and paper citation.Validation
cargo testandcargo clippy; verify benzene produces 18 inversions.