ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
langevin.h
Go to the documentation of this file.
1#ifndef LANGEVIN_H
2#define LANGEVIN_H
3
4#include "md_base.h"
5
6#include <vector>
7
16class Langevin : public MD_base
17{
18 public:
20 const MD_para &mdp_in,
21 const bool cal_stress_in,
22 const bool init_vel,
23 const int my_rank_in,
24 MDCell &mdcell_in);
25
26 private:
27 void setup(ModuleESolver::ESolver *p_esolver, const std::string &global_readin_dir, DomainDecomposition &decomp);
28
29 void first_half(std::ofstream &ofs);
30
31 void second_half();
32
33 void print_md(std::ofstream &ofs, const bool &cal_stress);
34
35 void write_restart(const std::string &global_out_dir);
36
37 void restart(const std::string &global_readin_dir);
38
43 void post_force();
44
45 std::vector<ModuleBase::Vector3<double>> total_force;
46 double md_damp;
47};
48
49#endif
Domain decomposition for distributed and single-domain neighbor input.
Definition dom_decomp.h:32
void second_half()
the second half of equation of motion, update velocities
Definition langevin.cpp:59
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.
Definition langevin.cpp:23
std::vector< ModuleBase::Vector3< double > > total_force
total force = true force + Langevin fictitious_force
Definition langevin.h:45
void restart(const std::string &global_readin_dir)
restart MD when md_restart is true
Definition langevin.cpp:93
Langevin(const MD_para &mdp_in, const bool cal_stress_in, const bool init_vel, const int my_rank_in, MDCell &mdcell_in)
Definition langevin.cpp:7
void first_half(std::ofstream &ofs)
the first half of equation of motion, update velocities and positions
Definition langevin.cpp:37
double md_damp
damping factor
Definition langevin.h:46
void print_md(std::ofstream &ofs, const bool &cal_stress)
output MD information such as energy, temperature, and pressure
Definition langevin.cpp:81
void post_force()
calculate fictitious forces
Definition langevin.cpp:99
void write_restart(const std::string &global_out_dir)
write the information into files used for MD restarting
Definition langevin.cpp:87
Definition mdcell.h:29
bool cal_stress
whether calculate stress
Definition md_base.h:117
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
Definition md_base.cpp:13
Definition esolver.h:13
input parameters used in md
Definition md_parameter.h:12