Closed gabkrenzer closed 3 years ago
Hi Gabriel,
Thank you for your feedback. VASP XDATCAR file is parsed by this function:
in principle NBOCK is supported by reading the step number after = sign in Direct configuration line (XDATCAR)
I did some tests with different NBLOCK and it seems to work fine for me. The number that is displayed in Time step is:
timestep times NBLOCK (therefore the timestep per block).
I think the problem occurs because you concatenated several XDATCAR files without changing the step numbers. Dynaphopy relays in those numbers to be sequential.
Hi Abel,
Thank for your quick reply. I will look into the concatenation and will let you know!
Gabriel
Hi Abel,
I have looked into this a bit more and you were right, the steps numbers in my concatenated XDATCAR were not sequential. I wrote a little code using the Xdatcar class of pymatgen to do the concatenation, however, even though the step numbers are now sequential, they are written in steps of 1, instead of steps of 50 as my original NBLOCK was set. There is no option in pymatgen to play with the step number, so I wondered whether DynaPhoPy would recognise it, and still work the same if I feed it my new file and the timestep per block, so -ts 0.002*50, as you mentioned the timestep that DynaPhoPy reads from a file is timestep times NBLOCK.
Gabriel
Hi Gabriel,
Yes, I think that if you multiply your timestep by NBLOCK it will work just fine.
Hi Abel,
Great, that's all sorted then! Thank you so much for your help!
Gabriel
No problem! I will close this issue then.
Hello,
I want to use DynaPhoPy to analyse three 100ps runs generated with the following
INCAR
on VASP: The issue is that I don't think DynaPhoPy reads myXDATCAR
knowing thatNBLOCK = 50
and therefore interprets it as a regularXDATCAR
with about 1,000 MD steps, while there are actually about 50,000 steps. I say about because I havecat
together 7 runs due to walltime limits and there might be a few steps missing here and there.Another point that raised concern is that even when I set my timestep to a particular value, so in this case
-ts 0.002
, DynaPhoPy states another value - see screenshot of the interactive interface after entering the commanddynaphopy input_file 300_XDATCAR -ts 0.002 -i
: This may be due to myNBLOCK
setting again because I tried setting various timestep using -ts on a short simulation withNBLOCK = 1
and DynaPhoPy worked fine - see screenshot of the interactive interface after entering the commanddynaphopy input_file XDATCAR -ts 0.00005 -i
when the timestep actually used was 1fs:Looking at the source code, there is only one mention of
NBLOCK
but in theunittest
and it looks like that you assume it is 1 since in the linetime = np.array([i*time_step for i in range(trajectory.shape[0])], dtype=float)
you assume that the total simulation time is timestep*number_of_steps.Kind Regards,
Gabriel