Writing a fix to apply the Andersen thermostat
Here is a list of changes made to the source code directory:
- These are the new files that have been created:
fix_temp_andersen.cpp
andfix_temp_andersen.h
- These are the existing files that have been modified:
fix_temp_berendsen.cpp
andfix_temp_berendsen.h
. - These are the methods that have been modified: constructor, and
end_of_step()
- These are the input parameters:
andFreq
,seedMB
,sigmaMB
- These are the other quantities introduced:
random
,me
- LAMMPS syntax:
fix FIX_NAME GROUP temp/andersen FREQUENCY SEED SIGMA
(we'll review this syntax later in this section)
In this section, we will write a fix to apply the Andersen thermostat that adjusts the temperature of particles by assigning random velocities to them at specified intervals.
Theory – Andersen thermostat
Based on the concept of velocity and momentum adjustments upon stochastic collisions in an atomistic system, the Andersen thermostat...