Skip to content

Commit c9c36bc

Browse files
authored
Merge pull request #764 from YuLiu98/md_input_para
Refactor : refactor md input parameters
2 parents dca93ce + 7b60cd8 commit c9c36bc

File tree

39 files changed

+343
-350
lines changed

39 files changed

+343
-350
lines changed

doc/examples/md.md

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -33,24 +33,22 @@ basis_type lcao
3333
mixing_beta 0.4
3434
charge_extrap second-order
3535
36-
md_mdtype 1 //choose ensemble
36+
md_type 1 //choose ensemble
3737
md_dt 1 //time step
3838
md_tfirst 700 //the first target temperature
39-
md_rstmd 0 //whether restart md
40-
md_qmass 1 //mass of themostat
41-
md_dumpfred 10 //The period to dump MD information for monitoring and restarting MD
39+
md_restart 0 //whether restart md
40+
md_dumpfreq 10 //The period to dump MD information
4241
```
4342

4443
These MD parameters means that ABACUS will use NVT ensemble with Nosé-hoover themostat; the time step is 1fs, and target temperature is 700K; start renew without restart file, set the mass of themostat as 1g/mol, and calculate the MSD and diffusion coefficent from first step.
4544

4645
Note: *Please turn off symmetry when do MD simulation.*
4746

48-
- md_mdtype : 0, NVE; 1, NVT; 2, velocity scaling
47+
- md_type : -1, FIRE; 0, NVE; 1, NHC; 2, LGV; 3, ADS; 4, MSST
4948
- md_dt : time step in md simulation (fs)
50-
- md_tfirst : target temperature in md simulation(K), you should set parameter md_tlast and md_fixtemperature when you want to change temperature during md simulation.
51-
- md_rstmd : 0, no need of restart ; 1, restart with restart file, you must repalce STRU file with STRU_MD before you run the restart task.
52-
- md_qmass : mass of thermostat, set by experience, if you don’t know how to set, set it to 0 will have a number autosetted by ABACUS
53-
- md_dumpfred : frequency for output consequence of md simulation
49+
- md_tfirst : target temperature in md simulation(K), you should set parameter md_tlast when you want to change temperature during md simulation.
50+
- md_restart : 0, no need of restart ; 1, restart with restart file, you must repalce STRU file with STRU_MD before you run the restart task.
51+
- md_dumpfreq : frequency for output consequence of md simulation
5452

5553
The STRU file is:
5654
```
@@ -149,9 +147,9 @@ Gamma
149147
```
150148

151149
Run the program, and see results in the output directory. The following files are about MD:
152-
- md_pos_$num.cif optimized structure in direct coordinate
153-
- MD_RESTART output the information of md for restart
154-
- STRU_MD if you want to restart md, you must replace the STRU with this file.
150+
- STRU_MD_$num: optimized structures in direct coordinate
151+
- Restart_md.dat: output the information of md for restart
152+
- If you want to restart md, you must replace the STRU with STRU_MD_$num.
155153

156154
MD information can be found in file running_md.log or in file MD_OUT
157155

doc/examples/tddft.md

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -25,20 +25,12 @@ out_charge 1
2525
gamma_only 0
2626
nstep 2000
2727
dr2 1.0e-6
28-
md_mdtype 0
28+
md_type 0
2929
md_dt 0.01
3030
md_tfirst 30
31-
md_mdoutpath mdtest
32-
md_rstmd 0
33-
md_fixtemperature 20000
34-
md_nresn 3
35-
md_nyosh 3
36-
md_qmass 0
31+
md_restart 0
3732
md_tlast 30
38-
md_dumpfred 1
39-
md_domsd 0
40-
md_domsdatom 0
41-
md_outputstressperiod 0
33+
md_dumpfreq 1
4234
tddft 1
4335
set_vel 1
4436
ocp 1

doc/input-main.md

Lines changed: 29 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343

4444
- [Molecular dynamics](#molecular-dynamics)
4545

46-
[md_type](#md-type) | [md_potential](#md-potential) | [md_rstmd](#md-rstmd) | [md_dt](#md_dt) | [md_t](#md-t) | [md_qmass](#md-qmass) | [md_dumpfred](#md-dumpfred) | [md_rstfred](#md-rstfred) | [md_tfreq](#md-tfreq) | [MNHC](#mnhc) | [rcut_lj](#rcut_lj) | [epsilon_lj](#epsilon_lj) | [sigma_lj](#sigma_lj) | [direction](#direction) | [velocity](#velocity) | [viscosity](#viscosity) | [tscale](#tscale) | [damp](#damp)
46+
[md_type](#md-type) | [md_ensolver](#md-ensolver) | [md_restart](#md-restart) | [md_dt](#md-dt) | [md_t](#md-t) | [md_dumpfreq](#md-dumpfreq) | [md_restartfreq](#md-restartfreq) | [md_tfreq](#md-tfreq) | [md_mnhc](#md-mnhc) | [lj_rcut](#lj-rcut) | [lj_epsilon](#lj-epsilon) | [lj_sigma](#lj-sigma) | [msst_direction](#msst-direction) | [msst_vel](#msst-vel) | [msst_vis](#msst-vis) | [msst_tscale](#msst-tscale) | [msst_qmass](#msst-qmass) | [md_damp](#md-damp)
4747

4848
- [DFT+U correction](#DFT_U-correction)
4949

@@ -1113,61 +1113,56 @@ This part of variables are used to control the molecular dynamics calculations.
11131113
- *Description*: control the ensemble to run md.
11141114
- -1: FIRE method to relax;
11151115
- 0: NVE ensemble;
1116-
- 1: NVT ensemble with Anderson thermostat;
1117-
- 2: NVT ensemble with Nose Hoover Chain;
1118-
- 3: NVT ensemble with Langevin method;
1116+
- 1: NVT ensemble with Nose Hoover Chain;
1117+
- 2: NVT ensemble with Langevin method;
1118+
- 3: NVT ensemble with Anderson thermostat;
11191119
- 4: MSST method;
1120-
- *Default*: 2
1120+
- *Default*: 1
11211121
11221122
[back to top](#input-file)
11231123
1124-
- md_potential<a id="md-potential"></a>
1124+
- md_ensolver<a id="md-ensolver"></a>
11251125
- *Type*: String
1126-
- *Description*: choose the potential type.
1126+
- *Description*: choose the energy solver for MD.
11271127
- FP: First-Principles MD;
11281128
- LJ: Leonard Jones potential;
11291129
- DP: DeeP potential;
11301130
- *Default*: FP
11311131
11321132
[back to top](#input-file)
11331133
1134-
- md_rstmd<a id="md-rstmd"></a>
1134+
- md_restart<a id="md-restart"></a>
11351135
- *Type*: Boolean
11361136
- *Description*: to control whether restart md.
11371137
- 0: When set to 0, ABACUS will calculate md normolly.
11381138
- 1: When set to 1, ABACUS will calculate md from last step in your test before.
11391139
- *Default*: 0
11401140
11411141
[back to top](#input-file)
1142-
- md_dt<a id="md_dt"></a>
1142+
- md_dt<a id="md-dt"></a>
11431143
- *Type*: Double
11441144
- *Description*: This is the time step(fs) used in md simulation .
11451145
- *Default*: 1
11461146
11471147
[back to top](#input-file)
11481148
- md_tfirst & md_tlast<a id="md-t"></a>
11491149
- *Type*: Double
1150-
- *Description*: This is the temperature used in md simulation, md_tlast’s default value is md_tfirst. If md_tlast is setted and be different from the md_tfirst, ABACUS will automatically generate a linear temperature gradient file named ”ChangeTemp.dat”, you can also set this file according to your needs instead.
1150+
- *Description*: This is the temperature (K) used in md simulation, md_tlast’s default value is md_tfirst. If md_tlast is set to be different from md_tfirst, ABACUS will automatically change the temperature from md_tfirst to md_tlast.
11511151
- *Default*: No default
11521152
11531153
[back to top](#input-file)
1154-
- md_qmass<a id="md-qmass"></a>
1155-
- *Type*: Double
1156-
- *Description*: Inertia of extended system variable. Used only when md_type is 4, you should set a number which is larger than 0. Note that Qmass of NHC is set by md_tfreq.
1157-
- *Default*: No default
11581154
1159-
[back to top](#input-file)
1160-
- md_dumpfred<a id="md-dumpfred"></a>
1155+
- md_dumpfreq<a id="md-dumpfreq"></a>
11611156
- *Type*: Integer
11621157
- *Description*:This is the frequence to dump md information.
11631158
- *Default*: 1
11641159
11651160
[back to top](#input-file)
11661161
1167-
- md_rstfred<a id="md-rstfred"></a>
1162+
- md_restartfreq<a id="md-restartfreq"></a>
11681163
- *Type*: Integer
11691164
- *Description*:This is the frequence to output restart information.
1170-
- *Default*: 1
1165+
- *Default*: 5
11711166
11721167
[back to top](#input-file)
11731168
@@ -1180,63 +1175,70 @@ This part of variables are used to control the molecular dynamics calculations.
11801175
11811176
[back to top](#input-file)
11821177
1183-
- MNHC<a id="mnhc"></a>
1178+
- md_mnhc<a id="md-mnhc"></a>
11841179
- *Type*: Integer
11851180
- *Description*: Number of Nose-Hoover chains.
11861181
- *Default*: 4
11871182
11881183
[back to top](#input-file)
11891184
1190-
- rcut_lj<a id="rcut_lj"></a>
1185+
- lj_rcut<a id="lj-rcut"></a>
11911186
- *Type*: Real
11921187
- *Description*: Cut-off radius for Leonard Jones potential (angstrom).
11931188
- *Default*: 8.5 (for He)
11941189
11951190
[back to top](#input-file)
11961191
1197-
- epsilon_lj<a id="epsilon_lj"></a>
1192+
- lj_epsilon<a id="lj-epsilon"></a>
11981193
- *Type*: Real
11991194
- *Description*: The value of epsilon for Leonard Jones potential (eV).
12001195
- *Default*: 0.01032 (for He)
12011196
12021197
[back to top](#input-file)
12031198
1204-
- sigma_lj<a id="sigma_lj"></a>
1199+
- lj_sigma<a id="lj-sigma"></a>
12051200
- *Type*: Real
12061201
- *Description*: The value of sigma for Leonard Jones potential (angstrom).
12071202
- *Default*: 3.405 (for He)
12081203
12091204
[back to top](#input-file)
12101205
1211-
- direction<a id="direction"></a>
1206+
- msst_direction<a id="msst-direction"></a>
12121207
- *Type*: Integer
12131208
- *Description*: the direction of shock wave for MSST.
12141209
- *Default*: 2 (z direction)
12151210
12161211
[back to top](#input-file)
12171212
1218-
- velocity<a id="velocity"></a>
1213+
- msst_vel<a id="msst-vel"></a>
12191214
- *Type*: Real
12201215
- *Description*: the velocity of shock wave (\AA/fs) for MSST.
12211216
- *Default*: 0
12221217
12231218
[back to top](#input-file)
12241219
1225-
- viscosity<a id="viscosity"></a>
1220+
- msst_vis<a id="msst-vis"></a>
12261221
- *Type*: Real
12271222
- *Description*: artificial viscosity (mass/length/time) for MSST.
12281223
- *Default*: 0
12291224
12301225
[back to top](#input-file)
12311226
1232-
- tscale<a id="tscale"></a>
1227+
- msst_tscale<a id="msst-tscale"></a>
12331228
- *Type*: Real
12341229
- *Description*: reduction in initial temperature (0~1) used to compress volume in MSST.
12351230
- *Default*: 0
12361231
12371232
[back to top](#input-file)
12381233
1239-
- damp<a id="damp"></a>
1234+
- msst_qmass<a id="msst-qmass"></a>
1235+
- *Type*: Double
1236+
- *Description*: Inertia of extended system variable. Used only when md_type is 4, you should set a number which is larger than 0. Note that Qmass of NHC is set by md_tfreq.
1237+
- *Default*: No default
1238+
1239+
[back to top](#input-file)
1240+
1241+
- md_damp<a id="md-damp"></a>
12401242
- *Type*: Real
12411243
- *Description*: damping parameter (fs) used to add force in Langevin method.
12421244
- *Default*: 1

examples/03a_Sn64_lcao_md/INPUT

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ basis_type lcao
2626
mixing_beta 0.4
2727
charge_extrap second-order
2828

29-
md_mdtype 1
29+
md_type 1
3030
md_dt 1
3131
md_tfirst 1373
32-
md_rstmd 0
32+
md_restart 0

0 commit comments

Comments
 (0)