Skip to content

Commit becdd0f

Browse files
authored
Merge pull request brucefan1983#1418 from duanzaixu/gitpr
Update deform syntax
2 parents a9eb094 + 16255d2 commit becdd0f

File tree

1 file changed

+29
-2
lines changed

1 file changed

+29
-2
lines changed

doc/gpumd/input_parameters/deform.rst

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ This keyword is used to deform the simulation box, which can be used to do tensi
1010
Syntax
1111
------
1212

13-
The :attr:`deform` keyword requires 4 parameters::
13+
The :attr:`deform` keyword supports two forms.
14+
15+
**4-parameter form** ::
1416

1517
deform <A_per_step> <deform_x> <deform_y> <deform_z>
1618

@@ -20,11 +22,22 @@ This gives a strain rate of :math:`10^{8}` s :math:`^{-1}` if the time step is 1
2022
The second parameter :attr:`deform_x` can be 0 or 1, where 0 means do not deform the :math:`x` direction and 1 means deform the :math:`x` direction.
2123
The last two parameters have similar meanings for the :math:`y` and :math:`z` directions.
2224

25+
In this form, the same deformation rate is applied to all directions that are flagged as deformed.
26+
27+
**6-parameter form** ::
28+
29+
deform <A_per_step_x> <A_per_step_y> <A_per_step_z> <deform_x> <deform_y> <deform_z>
30+
31+
Here, :attr:`A_per_step_x`, :attr:`A_per_step_y`, :attr:`A_per_step_z` specify the increment (or decrement) of the box length in the x, y, and z directions per simulation step, respectively. The unit is Ångstrom/step. For example, if the box length in the x-direction is initially 100 Å and :attr:`A_per_step_x` is set to :math:`10^{-5}` Å/step, then after :math:`10^{6}` steps, the box length will change by 10%. With a time step of 1 fs, this corresponds to a strain rate of :math:`10^{8}` s :math:`^{-1}`. Use :attr:`deform_x`, :attr:`deform_y`, :attr:`deform_z` to enable or disable deformation in each direction. A value of `1` enables deformation, while `0` disables it. For a direction where deformation is disabled, the box length remains constant throughout the simulation.
32+
33+
This form allows independent deformation rates in the x, y, and z directions.
2334

2435
Example
2536
-------
2637

27-
For uniaxial tensile test, one can first equilibrate the system and then deform the box::
38+
For uniaxial tensile test, one can first equilibrate the system and then deform the box.
39+
40+
**Using the 4-parameter form**::
2841

2942
# equilibration stage
3043
ensemble npt_scr 300 300 100 0 0 0 100 100 100 1000
@@ -35,6 +48,19 @@ For uniaxial tensile test, one can first equilibrate the system and then deform
3548
deform 0.00001 1 0 0
3649
run 1000000
3750

51+
**Using the 6-parameter form**::
52+
53+
# equilibration stage
54+
ensemble npt_scr 300 300 100 0 0 0 100 100 100 1000
55+
run 1000000
56+
57+
# production stage
58+
ensemble npt_scr 300 300 100 0 0 0 100 100 100 1000
59+
deform 0.00001 0 0 1 0 0
60+
run 1000000
61+
62+
Both examples achieve the same deformation (x-direction stretched at 0.00001 Å/step).
63+
3864
Caveats
3965
-------
4066
* Currently, one must use the NPT ensemble when using this keyword.
@@ -43,3 +69,4 @@ Caveats
4369
one can set the elastic constant for that direction to be larger than 2000 GPa.
4470
* In the equilibration stage, it is also recommended to use the NPT ensemble to obtain the zero strain state before applying the deformation.
4571
* One must control the three pressure components independently when using this keyword.
72+
* The 6-parameter form is more flexible and is recommended for new input files.

0 commit comments

Comments
 (0)