pub fn run(&mut self, system: &mut System, nsteps: usize) {
        match self.propagator.temperature_strategy() {
            TemperatureStrategy::External(temperature) => {
                system.simulated_temperature(Some(temperature))
            }
            TemperatureStrategy::Velocities => system.simulated_temperature(None),
            TemperatureStrategy::None => {}
        }

        system.simulated_degrees_of_freedom = self.propagator.degrees_of_freedom(system);
        match system.simulated_degrees_of_freedom {
            DegreesOfFreedom::Molecules => info!("All molecules are treated as rigid bodies"),
            DegreesOfFreedom::Particles => info!("All particles are allowed to move in this simulation"),
            DegreesOfFreedom::Frozen(n) => info!("{} degrees of freedom are frozen", n),
        }

        system.check();
        self.setup(system);
        for i in 0..nsteps {
            self.propagator.propagate(system);
            system.step += 1;
            for output in &mut self.outputs {
                output.write(system);
            }

            if i % 10_000 == 0 {
                sanity_check(system);
            }
        }
        self.finish(system);
    }
/// Run the simulation on System for `nsteps` steps.
Run the simulation on System for `nsteps` steps.
Run the simulation on System for ` nsteps ` steps .
pub fn run(&mut self, system: &mut System, nsteps: usize) {
        match self.propagator.temperature_strategy() {
            TemperatureStrategy::External(temperature) => {
                system.simulated_temperature(Some(temperature))
            }
            TemperatureStrategy::Velocities => system.simulated_temperature(None),
            TemperatureStrategy::None => {}
        }
        system.simulated_degrees_of_freedom = self.propagator.degrees_of_freedom(system);
        match system.simulated_degrees_of_freedom {
            DegreesOfFreedom::Molecules => info!("All molecules are treated as rigid bodies"),
            DegreesOfFreedom::Particles => info!("All particles are allowed to move in this simulation"),
            DegreesOfFreedom::Frozen(n) => info!("{} degrees of freedom are frozen", n),
        }
        system.check();
        self.setup(system);
        for i in 0..nsteps {
            self.propagator.propagate(system);
            system.step += 1;
            for output in &mut self.outputs {
                output.write(system);
            }
            if i % 10_000 == 0 {
                sanity_check(system);
            }
        }
        self.finish(system);
    }
pub fn run ( & mut self , system : & mut System , nsteps : usize ) { match self . propagator . temperature_strategy ( ) { TemperatureStrategy :: External ( temperature ) => { system . simulated_temperature ( Some ( temperature ) ) } TemperatureStrategy :: Velocities => system . simulated_temperature ( None ) , TemperatureStrategy :: None => { } } system . simulated_degrees_of_freedom = self . propagator . degrees_of_freedom ( system ) ; match system . simulated_degrees_of_freedom { DegreesOfFreedom :: Molecules => info ! ( " " ) , DegreesOfFreedom :: Particles => info ! ( " " ) , DegreesOfFreedom :: Frozen ( n ) => info ! ( " " n ) , } system . check ( ) ; self . setup ( system ) ; for i in 0 .. nsteps { self . propagator . propagate ( system ) ; system . step += 1 ; for output in & mut self . outputs { output . write ( system ) ; } if i % 10_000 == 0 { sanity_check ( system ) ; } } self . finish ( system ) ; }
Run the simulation on System for `nsteps` steps.
Run the simulation on System for ` nsteps ` steps .
&mut self
system
&mut System
nsteps
usize