pub struct MdinFile {
pub title: String,
pub cntrl: HashMap<String, String>,
pub ewald: HashMap<String, String>,
}Expand description
AMBER MD input (mdin) file representation.
Stores key-value pairs from the &cntrl (and optionally &ewald, &pb,
etc.) namelists as plain strings.
Fields§
§title: StringTitle comment line.
cntrl: HashMap<String, String>Parsed key/value entries from &cntrl.
ewald: HashMap<String, String>Parsed key/value entries from &ewald (empty if absent).
Implementations§
Source§impl MdinFile
impl MdinFile
Sourcepub fn cntrl_int(&self, key: &str, default: i64) -> i64
pub fn cntrl_int(&self, key: &str, default: i64) -> i64
Look up a &cntrl integer parameter with a default fallback.
Sourcepub fn cntrl_float(&self, key: &str, default: f64) -> f64
pub fn cntrl_float(&self, key: &str, default: f64) -> f64
Look up a &cntrl float parameter with a default fallback.
Sourcepub fn write<W: Write>(&self, writer: &mut W) -> Result<(), AmberIoError>
pub fn write<W: Write>(&self, writer: &mut W) -> Result<(), AmberIoError>
Write the mdin file to any Write sink.
Sourcepub fn read<R: Read>(reader: R) -> Result<Self, AmberIoError>
pub fn read<R: Read>(reader: R) -> Result<Self, AmberIoError>
Parse an AMBER mdin file.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MdinFile
impl RefUnwindSafe for MdinFile
impl Send for MdinFile
impl Sync for MdinFile
impl Unpin for MdinFile
impl UnsafeUnpin for MdinFile
impl UnwindSafe for MdinFile
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.