modify_xdatcar - Trebonius91/utils4VASP GitHub Wiki
This program modifies XDATCAR trajectory files, either for visualization or following evaluations. Similar to the modify_poscar.py script ((see wiki page)[https://github.com/Trebonius91/utils4VASP/wiki/modify_poscar.py]), the unitcell of the XDATCAR file can be shifted or multiplied. Further, certain frames or parts of the trajectory can be picked and written out, and the trajectory can be converted into the xyz file format.
Start the program in a folder where the XDATCAR file of interest is located and give one or several of the following keywords:
-shift=a,b,cShift all frames of theXDATCARfile along the given vector along the a,b and c unit cell axis. The values must be given in direct coordinates, for example:shift=0.1,0.1,0.3.-multiply=a,b,cMultiply the unit cells of all frames in the file by the given integer values, for example:multiply=2,2,1enlarges a surface slab along the a and b axes twice but keeps the size along the z-axis.-read_freq=[number]If the size of anXDATCARfile shall be scaled down, you can write just every Nth frame to the new file. For example:-read_freq=10only each 10th frame is written to the output.-pick_frame=[number]Pick one frame in theXDATCARfile and print it to a filePOSCAR_pickin the usualPOSCARfile format. The counting starts from 1, giving 1 would just print out the very first frame in theXDATCARfile. Example:-pick_frame=129.print_xyzPrint out the whole content of theXDATCARfile with the modifications ordered by the previous commands into an xyz file namedxdat_mod.xyz.print_last=[number]Print only the last N frames to the output file, for example in order to skip the equilibration phase of a calculated trajectory.
After executing, a file named XDATCAR mod is written. If -print_xyz has been ordered, a file named xdat_mod.xyz is written as well. If the -pick_frame command is given, only POSCAR_pick is written but no trajectory file.