I am performing an NEB calculation with VASP and VTST. I would like to visualize the atoms along the path and to calculate their displacements. When I have a single relaxation's XDATCAR, I can unwrap the trajectories using ASE and get the displacements:
steps = read(xdatcar, ':', format='vasp-xdatcar')
start = steps.get_positions(wrap=False)
disp = [atoms.get_positions(wrap=False)-start for atoms in steps]
However, this is not working for multiple images along the NEB path when I replace
steps with an array containing the POSCAR for each image. The atoms near the boundary jump back and forth between images which makes the visualization messy and the displacement calculation does not work. I know that I can do this in other tools such as OVITO, but I would prefer to use ASE or something that interfaces with it because I am using
ase.visualize.view for the trajectories.