Skip to content

Commit 5f7cd08

Browse files
authored
Refactor: update md_type, md_thermostat, md_pmode (#2206)
* Refactor: update md_type, md_thermostat, md_pmode * Test: update md unit tests * Test: update new md tests
1 parent 090030a commit 5f7cd08

File tree

75 files changed

+260
-276
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+260
-276
lines changed

docs/advanced/input_files/input-main.md

Lines changed: 26 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1834,29 +1834,30 @@ These variables are used to control the molecular dynamics calculations.
18341834

18351835
### md_type
18361836

1837-
- **Type**: Integer
1838-
- **Description**: control the algorithm to integrate the equation of motion for md. When `md_type` is set to 0, `md_thermostat` is used to specify the thermostat based on the velocity Verlet algorithm.
1837+
- **Type**: String
1838+
- **Description**: control the algorithm to integrate the equation of motion for md.
18391839

1840-
- -1: FIRE method to relax;
1841-
- 0: velocity Verlet algorithm (default: NVE ensemble);
1842-
- 1: Nose-Hoover style non-Hamiltonian equations of motion;
1843-
- 2: NVT ensemble with Langevin method;
1844-
- 4: MSST method;
1840+
- fire: FIRE method.
1841+
- nve: NVE ensemble with velocity Verlet algorithm.
1842+
- nvt: NVT ensemble, see [md_thermostat](#md_thermostat) in detail.
1843+
- npt: Nose-Hoover style NPT ensemble, see [md_pmode](#md_pmode) in detail.
1844+
- langevin: NVT ensemble with Langevin thermostat.
1845+
- msst: MSST method.
18451846

1846-
> Note: when md_type is set to 1, md_tfreq is required to stabilize temperature. It is an empirical parameter whose value is system-dependent, ranging from 1/(40\*md_dt) to 1/(100\*md_dt). An improper choice of its value might lead to failure of job.
1847-
- **Default**: 1
1847+
- **Default**: nvt
18481848

18491849
### md_thermostat
18501850

18511851
- **Type**: String
1852-
- **Description**: specify the thermostat based on the velocity Verlet algorithm (useful when `md_type` is set to 0).
1852+
- **Description**: specify the temperature control method used in NVT ensemble.
18531853

1854-
- nve: NVE ensemble.
1855-
- anderson: NVT ensemble with Anderson thermostat, see the parameter `md_nraise`.
1856-
- berendsen: NVT ensemble with Berendsen thermostat, see the parameter `md_nraise`.
1857-
- rescaling: NVT ensemble with velocity Rescaling method 1, see the parameter `md_tolerance`.
1858-
- rescale_v: NVT ensemble with velocity Rescaling method 2, see the parameter `md_nraise`.
1859-
- **Default**: NVE
1854+
- nhc: Nose-Hoover chain, see [md_tfreq](#md_tfreq) and [md_tchain](#md_tchain) in detail.
1855+
- anderson: Anderson thermostat, see [md_nraise](#md_nraise) in detail.
1856+
- berendsen: Berendsen thermostat, see the parameter [md_nraise](#md_nraise) in detail.
1857+
- rescaling: velocity Rescaling method 1, see the parameter [md_tolerance](#md_tolerance) in detail.
1858+
- rescale_v: velocity Rescaling method 2, see the parameter [md_nraise](#md_nraise) in detail.
1859+
1860+
- **Default**: nhc
18601861

18611862
### md_nstep
18621863

@@ -1918,14 +1919,15 @@ These variables are used to control the molecular dynamics calculations.
19181919

19191920
- **Type**: Real
19201921
- **Description**:
1921-
Construct a reference cell bigger than the initial cell. Only used in variable-cell MD, if [md_prec_level](#md_prec_level) is set to 1. The reference cell has to be large enough so that the lattice vectors of the fluctuating cell do not exceed the reference lattice vectors during MD. Typically, 1.02 ~ 1.10 is sufficient. However, the cell fluctuations depend on the specific system and thermodynamic conditions. So users must test for a proper choice. This parameters should be used in conjunction with q2sigma, qcutz, and ecfixed.
1922+
Construct a reference cell bigger than the initial cell. Only used in isotropic NPT ensemble currently, if [md_prec_level](#md_prec_level) is set to 1. The reference cell has to be large enough so that the lattice vectors of the fluctuating cell do not exceed the reference lattice vectors during MD. Typically, 1.02 ~ 1.10 is sufficient. However, the cell fluctuations depend on the specific system and thermodynamic conditions. So users must test for a proper choice. This parameters should be used in conjunction with q2sigma, qcutz, and ecfixed.
19221923
- **Default**: 1.0
19231924

19241925
### md_tfreq
19251926

19261927
- **Type**: Real
19271928
- **Description**: control the frequency of the temperature oscillations during the simulation. If it is too large, the temperature will fluctuate violently; if it is too small, the temperature will take a very long time to equilibrate with the atomic system.
19281929
- **Default**: 1/40/md_dt
1930+
> Note: It is an empirical parameter whose value is system-dependent, ranging from 1/(40\*md_dt) to 1/(100\*md_dt). An improper choice of its value might lead to failure of job.
19291931
19301932
### md_tchain
19311933

@@ -1936,12 +1938,12 @@ These variables are used to control the molecular dynamics calculations.
19361938
### md_pmode
19371939

19381940
- **Type**: String
1939-
- **Description**: specify the NVT or NPT ensemble based on the Nose-Hoover style non-Hamiltonian equations of motion.
1940-
- none: NVT ensemble.
1941-
- iso: NPT ensemble with isotropic cetl fluctuations.
1942-
- aniso: NPT ensemble with anisotropic cetl fluctuations.
1943-
- tri: NPT ensemble with non-orthogonal (triclinic) simulation box.
1944-
- **Default**: none
1941+
- **Description**: specify the cell fluctuation mode in NPT ensemble based on the Nose-Hoover style non-Hamiltonian equations of motion.
1942+
- iso: isotropic cell fluctuations.
1943+
- aniso: anisotropic cell fluctuations.
1944+
- tri: non-orthogonal (triclinic) simulation box.
1945+
- **Default**: iso
1946+
- **Relavent**: [md_tfreq](#md_tfreq), [md_tchain](#md_tchain), [md_pcouple](#md_pcouple), [md_pfreq](#md_pfreq), and [md_pchain](#md_pchain).
19451947

19461948
### md_pcouple
19471949

@@ -2041,7 +2043,7 @@ These variables are used to control the molecular dynamics calculations.
20412043
### msst_qmass
20422044

20432045
- **Type**: Real
2044-
- **Description**: Inertia of extended system variable. Used only when md_type is 4, you should set a number that is larger than 0. Note that Qmass of NHC is set by md_tfreq.
2046+
- **Description**: Inertia of extended system variable. Used only when md_type is msst, you should set a number that is larger than 0. Note that Qmass of NHC is set by md_tfreq.
20452047
- **Default**: No default
20462048

20472049
### md_damp

docs/advanced/md.md

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -4,26 +4,26 @@ Molecular dynamics (MD) is a computer simulation method for analyzing the physic
44

55
By setting `calculation` to be `md`, ABACUS currently provides several different MD evolution methods, which is specified by keyword `md_type` in the `INPUT` file:
66

7-
- -1: FIRE method
8-
- 0: velocity Verlet algorithm (default: NVE ensemble)
9-
- 1: Nose-Hoover style non-Hamiltonian equations of motion
10-
- 2: NVT ensemble with Langevin thermostat
11-
- 4: MSST method
12-
13-
When `md_type` is set to 0, `md_thermostat` is used to specify the thermostat based on the velocity Verlet algorithm.
14-
15-
- nve: NVE ensemble
16-
- anderson: NVT ensemble with Anderson thermostat
17-
- berendsen: NVT ensemble with Berendsen thermostat
18-
- rescaling: NVT ensemble with velocity Rescaling method 1
19-
- rescale_v: NVT ensemble with velocity Rescaling method 2
20-
21-
When `md_type` is set to 1, `md_pmode` is used to specify the NVT or NPT ensemble based on the Nose-Hoover style non-Hamiltonian equations of motion.
22-
23-
- none: NVT ensemble
24-
- iso: NPT ensemble with isotropic cetl fluctuations
25-
- aniso: NPT ensemble with anisotropic cetl fluctuations
26-
- tri: NPT ensemble with non-orthogonal (triclinic) simulation box
7+
- fire: FIRE method
8+
- nve: NVE ensemble with velocity Verlet algorithm
9+
- nvt: NVT ensemble
10+
- npt: Nose-Hoover style NPT ensemble
11+
- langevin: NVT ensemble with Langevin thermostat
12+
- msst: MSST method
13+
14+
When `md_type` is set to nvt, `md_thermostat` is used to specify the temperature control method used in NVT ensemble.
15+
16+
- nhc: Nose-Hoover chain
17+
- anderson: Anderson thermostat
18+
- berendsen: Berendsen thermostat
19+
- rescaling: velocity Rescaling method 1
20+
- rescale_v: velocity Rescaling method 2
21+
22+
When `md_type` is set to npt, `md_pmode` is used to specify the cell fluctuation mode in NPT ensemble based on the Nose-Hoover style non-Hamiltonian equations of motion.
23+
24+
- iso: isotropic cell fluctuations
25+
- aniso: anisotropic cell fluctuations
26+
- tri: non-orthogonal (triclinic) simulation box
2727

2828
Furthermore, ABACUS also provides a [list of keywords](./input_files/input-main.md#molecular-dynamics) to control relevant parmeters used in MD simulations.
2929

examples/hefei-namd/INPUT

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ INPUT_PARAMETERS
2222
mixing_type pulay
2323
mixing_beta 0.7
2424

25-
md_type 0
25+
md_type nve
2626
md_restart 0
2727
md_tfirst 10
2828
init_vel 1

examples/md/lcao_gammaonly_Sn64/INPUT_0

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ mixing_beta 0.3
2828
chg_extrap second-order
2929

3030
#Parameters (6.MD)
31-
md_type 0
31+
md_type nve
3232
md_nstep 10
3333
md_dt 1
3434
md_tfirst 300

examples/md/lcao_gammaonly_Sn64/INPUT_1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ mixing_beta 0.3
2828
chg_extrap second-order
2929

3030
#Parameters (6.MD)
31-
md_type 1
31+
md_type nvt
3232
md_nstep 10
3333
md_dt 1
3434
md_tfirst 300

examples/md/lcao_gammaonly_Sn64/INPUT_2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ mixing_beta 0.3
2828
chg_extrap second-order
2929

3030
#Parameters (6.MD)
31-
md_type 2
31+
md_type langevin
3232
md_nstep 10
3333
md_dt 1
3434
md_tfirst 300

examples/md/lcao_gammaonly_Sn64/INPUT_3

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ mixing_beta 0.3
2828
chg_extrap second-order
2929

3030
#Parameters (6.MD)
31-
md_type 0
31+
md_type nvt
3232
md_thermostat anderson
3333
md_nraise 40
3434
md_nstep 10

examples/md/lcao_gammaonly_Sn64/INPUT_4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ mixing_beta 0.3
2828
chg_extrap second-order
2929

3030
#Parameters (6.MD)
31-
md_type 4
31+
md_type msst
3232
md_nstep 10
3333
md_dt 1
3434
md_tfirst 300

examples/md/lcao_gammaonly_Sn64/INPUT_5

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ mixing_beta 0.3
2828
chg_extrap second-order
2929

3030
#Parameters (6.MD)
31-
md_type 0
31+
md_type nvt
3232
md_thermostat berendsen
3333
md_nraise 40
3434
md_nstep 10

examples/md/lcao_gammaonly_Sn64/INPUT_6

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ mixing_beta 0.3
2828
chg_extrap second-order
2929

3030
#Parameters (6.MD)
31-
md_type 0
31+
md_type nvt
3232
md_thermostat rescaling
3333
md_tolerance 10
3434
md_nstep 10

0 commit comments

Comments
 (0)