Skip to content

Reproduce: post

Tongqi Wen edited this page Jun 19, 2020 · 5 revisions

The post process of reproduce can be also divided into two types VASP to LAMMPS and LAMMPS to VASP. We will go to every task directory in vasp_lmp_path (vasp_lmp_task) and determine whether it belongs to VASP to LAMMPS or LAMMPS to VASP according to the existence of OUTCAR and log.lammps. The path of VASP results, vasp energies, lammps energies, and energy difference would be output in result.out in txt format. The number of frames in an initial VASP or LAMMPS task directory and the reproduce energy error would be written in json format in result.json. The energy difference for the last frame in initial OUTCAR or log.lammps is always zero to remove the effect of the energy shift between VASP and LAMMPS.

VASP to LAMMPS

Every OUTCAR in vasp_lmp_task corresponds to several tasks in the lammps directory. We will first put the energies in OUTCAR into a list. Then We will look for the corresponding task ids and get the energies from lammps output file log.lammps. For the energy error to be written in json format, the first frame in OUTCAR is always ignored in case the electronic step is not converged. When the results are output, the total frame number in VASP and LAMMPS format would be checked if they are equal to each other or not, if not, an error would occur "lammps tasks reproduced not equal to vasp".

LAMMPS to VASP

Now the thing is every dump.relax in vasp_lmp_task corresponds to several tasks in the VASP directory. The rest process is very similar to above except that all the frames in dump.relax were used to calculate the energy error.

Output file format

Here we give the example of the output file of result.json and result.out.

result.json

{
    "vasp/confs/mp-100/eos_00/task.000000": { "nframes": 10, "error": 0.008},
    "vasp/confs/mp-100/eos_00/task.000001": { "nframes": 12, "error": 0.006},
    ...
    "vasp/confs/mp-100/eos_00/task.000039": { "nframes": 15, "error": 0.004}
}

result.out

conf.dir: deepmd/confs/mp-100/eos_reprod
Reproduce: Reproduce: Initial_path DFT_E(eV/atom)  LMP_E(eV/atom)  Difference(eV/atom)
vasp/confs/mp-100/eos_00/task.000000  -4.268   -4.261    0.007
vasp/confs/mp-100/eos_00/task.000000  -4.262   -4.270   -0.008
......
vasp/confs/mp-100/eos_00/task.000000  -4.338   -4.329    0.009
vasp/confs/mp-100/eos_00/task.000001  -4.426   -4.436   -0.010
......
vasp/confs/mp-100/eos_00/task.000039  -4.203   -4.193    0.010
Clone this wiki locally