pub struct NoseHooverThermostat {
pub target_temperature: f64,
pub thermostat_mass: f64,
pub xi: f64,
pub eta: f64,
pub n_dof: usize,
}Expand description
Nosé-Hoover chain thermostat state for the NVT ensemble.
The NH thermostat couples a fictitious degree of freedom ξ (the “bath”)
to the kinetic energy. This implementation uses a simplified single-chain
version.
Fields§
§target_temperature: f64Target temperature T*.
thermostat_mass: f64Thermostat mass Q (related to relaxation time τ as Q = N_f * kB * T * τ²).
xi: f64Thermostat momentum ξ (conjugate to fictitious coordinate).
eta: f64Thermostat “position” η (not needed for velocity-Verlet but tracked).
n_dof: usizeNumber of degrees of freedom (3N for monatomic system).
Implementations§
Source§impl NoseHooverThermostat
impl NoseHooverThermostat
Sourcepub fn new(target_temperature: f64, n_atoms: usize, tau: f64) -> Self
pub fn new(target_temperature: f64, n_atoms: usize, tau: f64) -> Self
Create a new Nosé-Hoover thermostat.
n_atoms is the number of atoms; tau is the relaxation time.
Sourcepub fn half_step_xi(&mut self, kinetic_energy: f64, dt: f64) -> f64
pub fn half_step_xi(&mut self, kinetic_energy: f64, dt: f64) -> f64
Half-step update of thermostat momentum ξ from the kinetic energy.
Returns the scaling factor to apply to velocities.
Sourcepub fn full_step_eta(&mut self, dt: f64)
pub fn full_step_eta(&mut self, dt: f64)
Full-step update of η (Nosé-Hoover extended coordinate).
Trait Implementations§
Source§impl Clone for NoseHooverThermostat
impl Clone for NoseHooverThermostat
Source§fn clone(&self) -> NoseHooverThermostat
fn clone(&self) -> NoseHooverThermostat
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for NoseHooverThermostat
impl Debug for NoseHooverThermostat
Source§impl<'de> Deserialize<'de> for NoseHooverThermostat
impl<'de> Deserialize<'de> for NoseHooverThermostat
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for NoseHooverThermostat
impl RefUnwindSafe for NoseHooverThermostat
impl Send for NoseHooverThermostat
impl Sync for NoseHooverThermostat
impl Unpin for NoseHooverThermostat
impl UnsafeUnpin for NoseHooverThermostat
impl UnwindSafe for NoseHooverThermostat
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<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.