manage_neb.py - Trebonius91/utils4VASP GitHub Wiki
This scripts manages nudged elastic band (NEB) calculations with VASP. It can setup them from given initial and final structures, restart them if the wall time limit has reached, or evaluate them, i.e., check if convergence is reached or how far the calculation is away from convergence. For a general overview of NEB calculations, check the NEB wiki page.
Setup
For the setup of a NEB calculation, the POSCAR
files of initial and final structure need to be located in one folder. Both need to be optimized geometries, the names of the files are arbitrary.
Now recall the script:
manage_neb.py -min1=POSCAR_id1 -min2=POSCAR_id2 -nframe=[number]
Here, POSCAR_id1
and POSCAR_id2
are arbitrary names of the POSCAR
files of initial and final structure. -nframe
gives the number of NEB frames (or images) between the structures (excluding them!), for example 16 or 32.
After execution, a list of folders with names 00
to N+1
is generated, where N is the given number of frames, in the case of 32 frames, the first folder would be called 00
, the last one would be called 33
. In the first and last folders, the fixed initial and final structures are placed, only in the 32 folders between, the actual calculations take place.
As noted in the NEB wiki page, the other VASP input files need to be placed in the main folder before starting the calculation.
Restart
If the wall time of your calculation cluster has expired before the NEB calculation has converged, this command simply copies all CONTCAR
files of the NEB frames to POSCAR
files. Then, you can start the calculation as usual and the NEB optimization will proceed from the last stage. For this, type the command while staying in the main folder:
manage_neb.py -restart
Evaluation
At any point before, during or after the NEB calculation, its current status can be checked with this mode. Type the command while staying in the main folder:
manage_neb.py -eval
The initial NEB frames (in the POSCAR
files) are written to the file neb_frames_init.xyz
for visualization.
The current/final NEB frames (in the CONTCAR
files) are written to the file neb_frames_act.xyz
, the current/final NEB energies (in eV) and the energy change in the last iteration per frame are written to neb_energies.dat
.
Further, for each calculated frame, the total energy (sum of all NEB frames), the average force per degree of freedom per image and the maximum force acting on any degree of freedom of any of the images are written to the command line (only for activated degrees of freedom having a T
flag in the POSCAR
file). Especially the last column is relevant for convergence and can be compared to the EDIFFG
command in the INCAR
file. Convergence will be signaled for the NEB calculation if the maximum force is below the value given in EDIFFG
.