|
ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
|
base class of md More...
#include <md_base.h>
Public Member Functions | |
| 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 () |
| virtual 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. | |
| virtual void | first_half (std::ofstream &ofs) |
| the first half of equation of motion, update velocities and positions | |
| virtual void | second_half () |
| the second half of equation of motion, update velocities | |
| virtual void | print_md (std::ofstream &ofs, const bool &cal_stress) |
| output MD information such as energy, temperature, and pressure | |
| virtual void | write_restart (const std::string &global_out_dir) |
| write the information into files used for MD restarting | |
| virtual void | restart (const std::string &global_readin_dir) |
| restart MD when md_restart is true | |
| double | get_md_dt () const |
| the time increment in a.u., converted from mdp.md_dt | |
Public Attributes | |
| 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 | |
| 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 | |
| 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. | |
base class of md
This class implements the velocity-Verlet method. The system is assumed to be isolated in the sense that it cannot exchange energy or particles with its environment, so that the energy of the system does not change with time.
| 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
| mdp_in | the md input parameters; the reference is kept, so it must outlive the integrator |
| cal_stress_in | whether stress is calculated |
| init_vel | whether initial velocities are read from STRU |
| my_rank_in | MPI rank of the processor; only consulted in serial builds, where MDCell cannot supply it |
| mdcell_in | mdcell information |
convert to a.u. unit
|
virtual |
|
virtual |
the first half of equation of motion, update velocities and positions
| ofs | determine the output files |
Reimplemented in FIRE, Langevin, MSST, Nose_Hoover, and Verlet.
|
inline |
the time increment in a.u., converted from mdp.md_dt
|
virtual |
output MD information such as energy, temperature, and pressure
| ofs | determine the output files |
| cal_stress | whether calculate and output stress |
Reimplemented in FIRE, Langevin, MSST, Nose_Hoover, and Verlet.
|
virtual |
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.
| global_readin_dir | directory of files for reading |
Reimplemented in FIRE, Langevin, MSST, Nose_Hoover, and Verlet.
|
virtual |
the second half of equation of motion, update velocities
Reimplemented in FIRE, Langevin, MSST, Nose_Hoover, and Verlet.
|
virtual |
init before running md, calculate energy, force, and stress of the initial configuration.
| p_esolver | the energy solver used in md |
| global_readin_dir | directory of files for reading |
Reimplemented in FIRE, Langevin, MSST, Nose_Hoover, and Verlet.
|
protectedvirtual |
perform one step update of pos due to atomic velocity
|
protectedvirtual |
perform half-step update of vel due to atomic force
| force | atomic forces |
|
virtual |
write the information into files used for MD restarting
| global_out_dir | directory of output files |
Reimplemented in FIRE, Langevin, MSST, Nose_Hoover, and Verlet.
|
protected |
whether calculate stress
|
protected |
total energy of the system
| std::int64_t MD_base::frozen_freedom_ |
the fixed freedom of the system
| double MD_base::kinetic |
kinetic energy
|
protected |
Time increment (hbar/E_hartree).
|
protected |
Temperature (in Hartree, 1 Hartree ~ 3E5 K).
|
protected |
Target temperature.
|
protected |
mdcell information
|
protected |
input parameters used in md
|
protected |
MPI rank of the processor.
| double MD_base::potential = 0.0 |
potential energy
| int MD_base::step_ |
the MD step finished in current calculation
| int MD_base::step_rst_ |
the MD step finished in previous calculations
| bool MD_base::stop |
MD stop or not.
| ModuleBase::matrix MD_base::stress |
stress for this lattice
| double MD_base::t_current |
current temperature
| ModuleBase::matrix MD_base::virial |
virial for this lattice