pub struct FrcmodFile {
pub title: String,
pub bonds: Vec<FrcmodBond>,
pub angles: Vec<FrcmodAngle>,
pub dihedrals: Vec<FrcmodDihedral>,
pub nonbonded: Vec<FrcmodNonbonded>,
}Expand description
Parsed AMBER FRCMOD (force field modification) file.
Fields§
§title: StringTitle/comment line.
bonds: Vec<FrcmodBond>Modified bond parameters.
angles: Vec<FrcmodAngle>Modified angle parameters.
dihedrals: Vec<FrcmodDihedral>Modified dihedral parameters.
nonbonded: Vec<FrcmodNonbonded>Modified non-bonded (LJ) parameters.
Implementations§
Source§impl FrcmodFile
impl FrcmodFile
Sourcepub fn from_str(s: &str) -> Result<Self, String>
pub fn from_str(s: &str) -> Result<Self, String>
Parse an AMBER FRCMOD file from a string.
Sections are:
MASS– atom masses (skipped here)BOND– bond parametersANGL– angle parametersDIHE– dihedral parametersIMPR– improper dihedral parametersNONB– non-bonded (LJ) parameters
Sourcepub fn n_dihedrals(&self) -> usize
pub fn n_dihedrals(&self) -> usize
Number of dihedral entries.
Sourcepub fn n_nonbonded(&self) -> usize
pub fn n_nonbonded(&self) -> usize
Number of nonbonded entries.
Sourcepub fn get_bond(&self, types: &str) -> Option<&FrcmodBond>
pub fn get_bond(&self, types: &str) -> Option<&FrcmodBond>
Look up a bond by atom type pair string (e.g., “CT-HC”).
Sourcepub fn get_nonbonded(&self, atom_type: &str) -> Option<&FrcmodNonbonded>
pub fn get_nonbonded(&self, atom_type: &str) -> Option<&FrcmodNonbonded>
Look up nonbonded parameters by atom type.
Trait Implementations§
Source§impl Clone for FrcmodFile
impl Clone for FrcmodFile
Source§fn clone(&self) -> FrcmodFile
fn clone(&self) -> FrcmodFile
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FrcmodFile
impl Debug for FrcmodFile
Source§impl Default for FrcmodFile
impl Default for FrcmodFile
Source§fn default() -> FrcmodFile
fn default() -> FrcmodFile
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for FrcmodFile
impl RefUnwindSafe for FrcmodFile
impl Send for FrcmodFile
impl Sync for FrcmodFile
impl Unpin for FrcmodFile
impl UnsafeUnpin for FrcmodFile
impl UnwindSafe for FrcmodFile
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.