7
$\begingroup$

Same question, rephrased:

What is the procedure to take snapshots at fixed intervals while running an AIMD or DFT Simulation in VASP?

OR

Which parameter in the INCAR file do I modify to achieve periodic snapshots(in JPG/PNG) of atomic positions?

$\endgroup$
8
$\begingroup$

There is no way to do this directly in VASP, but you can achieve this goal using the Atomic Simulation Environment (ASE). With your OUTCAR available, do the following:

from ase.io import read, write
images = read('OUTCAR',index=':') # Read in every iteration
interval = 5 # Save .png every N steps
for i, image in enumerate(images):
     if i+1 % interval == 0:
          write('image_'+str(i)+'.png',image) # Write out imamge
$\endgroup$
6
$\begingroup$

In can be done easily using python or bash script. You have to keep looking for changes in OSZICAR. Whenever OSZICAR prints 'F' i.e. end of electronic self consistent loop, copy your CONTCAR to other file. There is simple tool in linux system inotify-hookable which will watch over change in CONTCAR file.


    inotify-hookable -f CONTCAR -c "cp CONTCAR CONTCAR.new"
    echo "== $(date) : executed, continuing to monitor..."

use sudo apt-get install inotify-hookable to install in ubuntu or use source code.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.