Hello,
When I do AIMD (NVT, nose-hoover thermostat) in VASP, I frequently notice that atoms can go outside my simulation box and are not wrapped back. The particles can diffuse quite far from the box. I have uploaded one final snapshot from one trajectory as you will see below. This is especially common when I use MLFF. As far as I understand, VASP follows PBC and wraps atoms back at each step, can you please give some suggestions on what could have gone wrong here or whether I misunderstood something?
In addition, I would like to ask for your suggestions for unwrapping the trajectory in case I am interested in analyzing properties like MSD. There is not much information available on the forum regarding this. There are already codes available on Github to unwrap and convert XDATCAR to other formats, but some may seem too old or I can't be sure whether I can trust these codes. Does VASP offer codes to do this?
Thanks a lot for your help in advance.
Best regards,
Xiliang
AIMD XDATCAR wrap and unwrap problems
Moderators: Global Moderator, Moderator
-
- Newbie
- Posts: 37
- Joined: Thu May 19, 2022 8:44 am
AIMD XDATCAR wrap and unwrap problems
You do not have the required permissions to view the files attached to this post.
-
- Global Moderator
- Posts: 542
- Joined: Fri Nov 08, 2019 7:18 am
Re: AIMD XDATCAR wrap and unwrap problems
Projecting back to the first cell only happens in relaxations and MD simulations using MDALGO=0. For any MDALGO>0, the atoms propagate freely. The former behavior is kept for backwards compatibility. The latter is more convenient to evaluate displacements e.g. for diffusion and is therefore used in the modern MD simulations.
Regarding analyzing the properties of the trajectory: If you compile VASP with HDF5 support, you can read the trajectory from python using py4vasp.
If you have an orthorhombic unit cell, you can also export the structure to mdtraj (https://www.mdtraj.org/) which provides a lot of analysis functionality
Of course, you can also implement the calculation of the distance calculations manually.
Regarding analyzing the properties of the trajectory: If you compile VASP with HDF5 support, you can read the trajectory from python using py4vasp.
Code: Select all
from py4vasp import Calculation
calc = Calculation.from_path("path where the vaspout.h5 file is")
calc.structure[:].read()
Code: Select all
calc.structure[:].to_mdtraj()
Martin Schlipf
VASP developer
-
- Newbie
- Posts: 37
- Joined: Thu May 19, 2022 8:44 am
Re: AIMD XDATCAR wrap and unwrap problems
Great, that's clear to me. Thanks a lot for your answer.