Skip to content

Reproduce: make

Tongqi Wen edited this page Jun 18, 2020 · 9 revisions

First, the package would check if the vasp_lmp_path exists or not. If not, an error "please do VASP or LAMMPS calcualtions first" would be printed out. Then, the VASP and LAMMPS task numbers which are to be reproduced are counted and if the task numbers are 0, an error "Please do VASP or LAMMPS calculations first" would occur. According to whether OUTCAR or log.lammps exists in the original task directory, we can divide the process of generating input configuration into two types: 1. VASP to LAMMPS, 2. LAMMPS to VASP. We take the input example in the previous section to explain these two processes.

VASP to LAMMPS

Step 1. Here we start from the vasp/confs/mp-*/eos_00/task.000000 directory, all the energy values in the OUTCAR file are appended in an energies list. Then deepmd/confs/mp-*/eos_reprod/XDATCAR would link to vasp/confs/mp-*/eos_00/task.000000/XDATCAR.

Step 2. If the total frame number in XDATCAR is larger than the length of energies list, the last frames in XDATCAR whose number is equal to the length of energies list would be used. So let's suppose now we have n frames with configuration and the corresponding energy.

Step 3. For n frames, the task directory in deepmd/confs/mp-*/eos_reprod would be built based on the task id up to now. If there are already old input files including INCAR, POTCAR, POSCAR.orig, POSCAR, conf.lmp, and in.lammps in the task directory, they will be deleted to avoid redundancy. The corresponding frame would also be written to the new POSCAR file.

Step 4. When vasp/confs/mp-*/eos_00/task.000000 is finished, we will then repeat the above steps to vasp/confs/mp-*/eos_00/task.000001,...,vasp/confs/mp-*/eos_00/task.[0-9]*[0-9] in sequence.

LAMMPS to VASP

Step 1. Check if dump.relax file exists, if not, an error would occur "the LAMMPS calculations should output the snapshots as dump.relax". Then for dump.relax file, we can get the energy for every configuration and put them sequentially in an energies list.

Step 2. The rest is similar to that in VASP to LAMMPS. We build the task directory based on the current task id, remove old input files, and then transfer the configuration in dump file to POSCAR one by one by dpdata.

Clone this wiki locally