ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
Verlet Class Reference

the md methods based on the velocity-Verlet equation More...

#include <verlet.h>

Inheritance diagram for Verlet:
Collaboration diagram for Verlet:

Public Member Functions

 Verlet (const MD_para &mdp_in, const bool cal_stress_in, const bool init_vel, const int my_rank_in, MDCell &mdcell_in)
 ~Verlet ()
Public Member Functions inherited from MD_base
 MD_base (const MD_para &mdp_in, const bool cal_stress_in, const bool init_vel, const int my_rank_in, MDCell &mdcell_in)
 construct the integrator from the values it actually uses
virtual ~MD_base ()
double get_md_dt () const
 the time increment in a.u., converted from mdp.md_dt

Private Member Functions

void setup (ModuleESolver::ESolver *p_esolver, const std::string &global_readin_dir, DomainDecomposition &decomp)
 init before running md, calculate energy, force, and stress of the initial configuration.
void first_half (std::ofstream &ofs)
 the first half of equation of motion, update velocities and positions
void second_half ()
 the second half of equation of motion, update velocities
void restart (const std::string &global_readin_dir)
 restart MD when md_restart is true
void print_md (std::ofstream &ofs, const bool &cal_stress)
 output MD information such as energy, temperature, and pressure
void write_restart (const std::string &global_out_dir)
 write the information into files used for MD restarting
void apply_thermostat ()
 apply specifical thermostats according to the input para
void thermalize (const int &nraise, const double &current_temp, const double &target_temp)
 rescale atomic velocities
void apply_csvr (const double &current_temp, const double &target_temp)
 apply CSVR thermostat

Additional Inherited Members

Public Attributes inherited from MD_base
bool stop
 MD stop or not.
double t_current
 current temperature
int step_
 the MD step finished in current calculation
int step_rst_
 the MD step finished in previous calculations
std::int64_t frozen_freedom_
 the fixed freedom of the system
ModuleBase::matrix virial
 virial for this lattice
ModuleBase::matrix stress
 stress for this lattice
double potential = 0.0
 potential energy
double kinetic
 kinetic energy
Protected Member Functions inherited from MD_base
virtual void update_pos ()
 perform one step update of pos due to atomic velocity
virtual void update_vel ()
 perform half-step update of vel due to atomic force
Protected Attributes inherited from MD_base
const MD_para & mdp
 input parameters used in md
MDCell & mdcell
 mdcell information
double energy_ = 0.0
 total energy of the system
bool cal_stress
 whether calculate stress
int my_rank
 MPI rank of the processor.
double md_dt
 Time increment (hbar/E_hartree).
double md_tfirst
 Temperature (in Hartree, 1 Hartree ~ 3E5 K).
double md_tlast
 Target temperature.

Detailed Description

the md methods based on the velocity-Verlet equation

Constructor & Destructor Documentation

◆ Verlet()

Verlet::Verlet ( const MD_para & mdp_in,
const bool cal_stress_in,
const bool init_vel,
const int my_rank_in,
MDCell & mdcell_in )
Here is the call graph for this function:

◆ ~Verlet()

Verlet::~Verlet ( )

Member Function Documentation

◆ apply_csvr()

void Verlet::apply_csvr ( const double & current_temp,
const double & target_temp )
private

apply CSVR thermostat

Parameters
current_tempthe current temperature
target_tempthe target temperature
Here is the call graph for this function:
Here is the caller graph for this function:

◆ apply_thermostat()

void Verlet::apply_thermostat ( void )
private

apply specifical thermostats according to the input para

Here is the call graph for this function:
Here is the caller graph for this function:

◆ first_half()

void Verlet::first_half ( std::ofstream & ofs)
privatevirtual

the first half of equation of motion, update velocities and positions

Parameters
ofsdetermine the output files

Reimplemented from MD_base.

Here is the call graph for this function:

◆ print_md()

void Verlet::print_md ( std::ofstream & ofs,
const bool & cal_stress )
privatevirtual

output MD information such as energy, temperature, and pressure

Parameters
ofsdetermine the output files
cal_stresswhether calculate and output stress

Reimplemented from MD_base.

Here is the call graph for this function:

◆ restart()

void Verlet::restart ( const std::string & global_readin_dir)
privatevirtual

restart MD when md_restart is true

Public counterpart of write_restart(): setup() calls it internally when md_restart is set, and a caller that has just written a restart file may read it back through here.

Parameters
global_readin_dirdirectory of files for reading

Reimplemented from MD_base.

Here is the call graph for this function:

◆ second_half()

void Verlet::second_half ( void )
privatevirtual

the second half of equation of motion, update velocities

Reimplemented from MD_base.

Here is the call graph for this function:

◆ setup()

void Verlet::setup ( ModuleESolver::ESolver * p_esolver,
const std::string & global_readin_dir,
DomainDecomposition & decomp )
privatevirtual

init before running md, calculate energy, force, and stress of the initial configuration.

Parameters
p_esolverthe energy solver used in md
global_readin_dirdirectory of files for reading

Reimplemented from MD_base.

Here is the call graph for this function:

◆ thermalize()

void Verlet::thermalize ( const int & nraise,
const double & current_temp,
const double & target_temp )
private

rescale atomic velocities

Parameters
nraisea parameter related to thermostats
current_tempthe current temperature
target_tempthe target temperature
Here is the caller graph for this function:

◆ write_restart()

void Verlet::write_restart ( const std::string & global_out_dir)
privatevirtual

write the information into files used for MD restarting

Parameters
global_out_dirdirectory of output files

Reimplemented from MD_base.

Here is the call graph for this function:

The documentation for this class was generated from the following files: