1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
//! Readers that parse *external* force-field formats into a molrs
//! [`ForceField`](crate::ff::forcefield::ForceField).
//!
//! These differ from [`crate::ff::forcefield::xml`], which reads molrs's own native
//! schema. A reader here owns the translation from a foreign format — element
//! and attribute names, **and unit normalization** — into molrs units
//! (Å, kcal/mol, radians, e). The resulting `ForceField` is pure molrs units;
//! there is no downstream unit fixup.
//!
//! Concrete readers: [`OplsXmlReader`](opls::OplsXmlReader) (OPLS-AA / GROMACS
//! XML, nm/kJ-mol, Ryckaert–Bellemans torsions) and
//! [`LammpsFfReader`](lammps::LammpsFfReader) (a LAMMPS `*.ff` include, AMBER/GAFF
//! flavour). Further formats (AMBER prmtop) land as additional implementors of
//! [`ForceFieldReader`].
use crateForceField;
/// Parse a force-field definition from an external format into a molrs
/// [`ForceField`], normalized to molrs units (Å, kcal/mol, radians, e).
///
/// Implementors own format-specific element/attribute mapping and unit
/// conversion. Reading is **total**: a malformed document or a missing required
/// attribute is an `Err`, never a silently-skipped parameter that would later
/// read as zero.