Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

optimize autotest document based on #891 #923

Merged
merged 18 commits into from
Sep 2, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ Equation of State (EOS) here calculates the energies of the most stable structur
}
```

`vol_start` is the starting volume per atom in Å^3/atom, `vol_step` is the increasing step of volume, and the biggest volume is smaller than `vol_end`. In the above example, 40 tasks would be generated as `task.000000` to `task.000020` with from 0.9 to 1.1 times the volume of equilibrium structure (Å^3/atom as the unit), respectively.
`vol_start` is the starting relative volume per atom in Å^3/atom, `vol_step` is the increasing step of the ratio of relative volume, and the biggest volume is smaller than `vol_end` times the volume of equilibrium structure.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about this:

vol_start is the starting volume relative to the equilibrium structure, vol_step is the volume increment step relative to the equilibrium structure, and the biggest relative volume is smaller than vol_end.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

97 changes: 1 addition & 96 deletions doc/autotest/property/properties/EOS-make.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,99 +14,4 @@ scale = (vol_current / vol_equi) ** (1. / 3.)

`vol_current` is the corresponding volume per atom of the current task and `vol_equi` is the volume per atom of the equilibrium configuration. Then the `poscar_scale` function in `dpgen.auto_test.lib.vasp` module would help to generate `POSCAR` file with `vol_current` in `confs/mp-*/eos_00/task.[0-9]*[0-9]`.

**Step 5.** According to the task type, the input file including `INCAR`, `POTCAR` or `conf.lmp`, `in.lammps` would be written in every `confs/mp-*/eos_00/task.[0-9]*[0-9]`.

For EOS calculations by VASP, if `change_box` is `True`, `ISIF` in VASP would be 4, else `ISIF` would be 2. The default value of `change_box` is `True`. For further information of the use of `ISIF` in VASP, we refer users to [ISIF command](https://www.vasp.at/wiki/index.php/ISIF).

For EOS calculations by LAMMPS, when `change_box` is `True`, an example of `in.lammps` for AlMg is given as below and the `scale` parameter in line 5 is calculated by the equation above.

```txt
clear
variable GPa2bar equal 1e4
variable B0 equal 70
variable bp equal 0
variable xx equal scale
variable yeta equal 1.5*(${bp}-1)
variable Px0 equal 3*${B0}*(1-${xx})/${xx}^2*exp(${yeta}*(1-${xx}))
variable Px equal ${Px0}*${GPa2bar}
units metal
dimension 3
boundary p p p
atom_style atomic
box tilt large
read_data conf.lmp
mass 1 1
mass 2 1
neigh_modify every 1 delay 0 check no
pair_style deepmd frozen_model.pb
pair_coeff
compute mype all pe
thermo 100
thermo_style custom step pe pxx pyy pzz pxy pxz pyz lx ly lz vol c_mype
dump 1 all custom 100 dump.relax id type xs ys zs fx fy fz
min_style cg
fix 1 all box/relax iso ${Px}
minimize 0 1.000000e-10 5000 500000
fix 1 all box/relax aniso ${Px}
minimize 0 1.000000e-10 5000 500000
variable N equal count(all)
variable V equal vol
variable E equal "c_mype"
variable Pxx equal pxx
variable Pyy equal pyy
variable Pzz equal pzz
variable Pxy equal pxy
variable Pxz equal pxz
variable Pyz equal pyz
variable Epa equal ${E}/${N}
variable Vpa equal ${V}/${N}
print "All done"
print "Total number of atoms = ${N}"
print "Relax at Press = ${Px} Bar"
print "Final energy per atoms = ${Epa} eV"
print "Final volume per atoms = ${Vpa} A^3"
print "Final Stress (xx yy zz xy xz yz) = ${Pxx} ${Pyy} ${Pzz} ${Pxy} ${Pxz} ${Pyz}"
```

when `change_box` is `False`, an example of `in.lammps` for AlMg is given as:
```txt
clear
units metal
dimension 3
boundary p p p
atom_style atomic
box tilt large
read_data conf.lmp
mass 1 1
mass 2 1
neigh_modify every 1 delay 0 check no
pair_style deepmd frozen_model.pb
pair_coeff
compute mype all pe
thermo 100
thermo_style custom step pe pxx pyy pzz pxy pxz pyz lx ly lz vol c_mype
dump 1 all custom 100 dump.relax id type xs ys zs fx fy fz
min_style cg
minimize 0 1.000000e-10 5000 500000
variable N equal count(all)
variable V equal vol
variable E equal "c_mype"
variable tmplx equal lx
variable tmply equal ly
variable Pxx equal pxx
variable Pyy equal pyy
variable Pzz equal pzz
variable Pxy equal pxy
variable Pxz equal pxz
variable Pyz equal pyz
variable Epa equal ${E}/${N}
variable Vpa equal ${V}/${N}
variable AA equal (${tmplx}*${tmply})
print "All done"
print "Total number of atoms = ${N}"
print "Final energy per atoms = ${Epa}"
print "Final volume per atoms = ${Vpa}"
print "Final Base area = ${AA}"
print "Final Stress (xx yy zz xy xz yz) = ${Pxx} ${Pyy} ${Pzz} ${Pxy} ${Pxz} ${Pyz}"
```

**Step 5.** According to the task type, the input file including `INCAR`, `POTCAR` or `conf.lmp`, `in.lammps` would be written in every `confs/mp-*/eos_00/task.[0-9]*[0-9]`.