pub struct MdConfig {Show 19 fields
pub integrator: Integrator,
pub zero_com_drift: bool,
pub temp_target: f32,
pub pressure_target: f32,
pub tau_pressure: f32,
pub hydrogen_constraint: HydrogenConstraint,
pub snapshot_handlers: SnapshotHandlers,
pub sim_box: SimBoxInit,
pub solvent: Solvent,
pub max_init_relaxation_iters: Option<usize>,
pub neighbor_skin: f32,
pub overrides: MdOverrides,
pub water_template_path: Option<String>,
pub skip_water_pbc_filter: bool,
pub spme_mesh_spacing: f32,
pub spme_alpha: f32,
pub coulomb_cutoff: f32,
pub lj_cutoff: f32,
pub energy_minimization_tolerance: f32,
}Expand description
This is the primary way of configurating an MD run. It’s passed at init, along with the molecule list and FF params.
Fields§
§integrator: IntegratorDefaults to Velocity Verlet.
zero_com_drift: boolIf enabled, zero the drift in center of mass of the system.
temp_target: f32Kelvin. Defaults to 310 K.
pressure_target: f32Bar (Pa/100). Defaults to 1 bar.
tau_pressure: f32ps. Defaults to 5; this is what GROMACS uses.
hydrogen_constraint: HydrogenConstraintAllows constraining Hydrogens to be rigid with their bonded atom, using SHAKE and RATTLE algorithms. This allows for higher time steps.
snapshot_handlers: SnapshotHandlers§sim_box: SimBoxInit§solvent: Solvent§max_init_relaxation_iters: Option<usize>Prior to the first integrator step, we attempt to relax energy in the system. Use no more than this many iterations to do so. Higher can produce better results, but is slower. If None, don’t relax.
neighbor_skin: f32Distance threshold, in Å, used to determine when we rebuild neighbor lists. 2-4Å are common values. Higher values rebuild less often, and have more computationally-intense rebuilds. Rebuild the list if an atom moved > skin/2.
overrides: MdOverrides§water_template_path: Option<String>Optional path to a pre-equilibrated water template file.
When set, this template is used instead of the built-in 60 Å template.
A box-specific template (e.g. 30 Å) is required for accurate initial pressures,
because the built-in template is cut from a larger equilibrated cell and lacks
the long-range Coulomb correlations appropriate for the target PBC cell size.
Generate one with the generate_water_init_template test (marked #[ignore]).
skip_water_pbc_filter: boolSkip the PBC-boundary proximity check (2.8 Å cross-boundary O-O filter) when placing water molecules. Use this only when generating a pre-equilibrated template at the correct density: the ~88 boundary molecules that the filter would otherwise reject are needed to reach 1 g/cm³, and the MD equilibration run will push them to their natural distances.
spme_mesh_spacing: f32SPME mesh spacing in Å. Smaller = higher-resolution reciprocal mesh, more accurate
but slower. 1.0 Å is a good default; equivalent to GROMACS fourierspacing = 0.1 nm.
spme_alpha: f32A bigger α means more damping, and a smaller real-space contribution. (Cheaper real), but larger reciprocal load. Common rule for α: erfc(α r_c) ≲ 10⁻⁴…10⁻⁵ Å^-1. 0.35 is good for cutoff of 10–12 Å.
coulomb_cutoff: f32The distance at which we cut off short-range (Direct) Coulomb operations, and transtion to SPME reciprical forces. Å
lj_cutoff: f32A hard distance cutoff for VDW forces. Å
energy_minimization_tolerance: f32Simliar to GROMACS’ emtol. kcal mol⁻¹ Å⁻¹
Implementations§
Source§impl MdConfig
impl MdConfig
Sourcepub fn to_gromacs(&self, n_steps: usize, dt: f32) -> MdpParams
pub fn to_gromacs(&self, n_steps: usize, dt: f32) -> MdpParams
Creates a similar config for use with GROMACS. Attempts to replicate this library’s settings where we don’t have an applicable MdConfig field.
Not From trait: This lib depends on bio_files, but not the other way around.
Sourcepub fn save_mdp(&self, path: &Path, n_steps: usize, dt: f32) -> Result<()>
pub fn save_mdp(&self, path: &Path, n_steps: usize, dt: f32) -> Result<()>
Convenience function to save in Gromacs’ .mdp format.
pub fn load_from_mdp(path: &Path) -> Result<Self>
Trait Implementations§
impl StructuralPartialEq for MdConfig
Auto Trait Implementations§
impl Freeze for MdConfig
impl RefUnwindSafe for MdConfig
impl Send for MdConfig
impl Sync for MdConfig
impl Unpin for MdConfig
impl UnsafeUnpin for MdConfig
impl UnwindSafe for MdConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
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>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
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
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.