analyze_slab - Trebonius91/utils4VASP GitHub Wiki

This program evaluates MD trajectories of surface slabs, either liquid systems or mixed liquid/solid systems.

Both VASP format XDATCAR files (the usual case) and xyz files originating from a periodic calculation (usually LAMMPS) can be processed.

To start the program, simply type the name and a list of possible commands appears.

  • -lammps A xyz file named dump.xyz will be read in instead of the default XDATCAR. The program still assumes a periodic system. The dimensions of the unit cell (so far only orthogonal) need to be read in from the separate file box_dims.dat, where the axis lengths in Angstrom must be written in a single line (x,y and z)
  • -write_traj In addition to the analysis, all trajectory frames are written to the file trajectory.xyz. Only useful if a XDATCAR file is read in and you want to visualize the dynamics.
  • -track_atoms=[list of numbers] The time-dependent x-,y- and z-coordinates of the chosen atoms during the dynamics (indices in the trajectory file, beginning from 1) are written in plot files, one file for each atom. The files are called track_atom[number].dat. Example: -track_atoms=2,28,107 would produce three files, track_atom2.dat, track_atom28.dat and track_atom107.dat. Each line contains the step number (or time, if the timestep keyword is given, see below) and the x-, y- and z-coordinates of the respective atom.
  • -timestep=[value] The MD time step in femtosecond between two frames of the trajectory. This can be identical to the time step of the MD simulation or it is a multiple of it, if only every N'th frame was written during the dynamics (ML_OUTBLOCK command in VASP).
  • -dens_bins=[number] By default, element density profiles are calculated along the z coordinate (one profile for each element in the system). The density profiles are written to file dens_elems.dat. This parameter varies the number of bins along the z-axis, for which the density is calculated. Default is 501.
  • -rdf Activates the calculation of radial distribution function (RDF) calculation. For all element combinations in the system (for elements A,B and C, the combinations AA, AB, AC, BB, BC, CC will be calculated), RDF profiles are generated and stored to file rdf.dat. Each element combination RDF is stored into one column.
  • -rdf_bins=[number] Number of bins along the atom-atom distance, for which RDF values are calculated. Default is 201.
  • -rdf_cutoff=[value] The maximum distance (in Angstroms) for which the RDF is calculated. It always starts from 0 Angstroms, up to the given value. Default is 8 Angstroms.
  • -frame_first=[number] If you want to remove an equilibration period from the beginning of a MD simulation, you can give a number of frames, which shall be skipped for all evaluations. The given number signals the first frame to be used. If a value of 100 is given, the first 99 frames are skipped. Default is 1 (no skipping).
  • -z_shift=[value] If the slab is located at the edge of the unit cell in z-direction, the density profile and other properties might be split at the border of the unit cell. To avoid this, the slab can be shifted by the given value for all evaluations such that it is fully located into the unit cell, without any periodic continuations. Values between 0.0 and 1.0 in direct coordinates must be given. Default is 0.0 (no shift).
  • -cls_element=[element] If a template for a core level shift (CLS) calculation with the atoms of the chosen elements at several different z-values (near the surface or rather into the bulk etc), give the symbol of the element here, for example -cls_element=Pt. After evaluation of the trajectory, a folder core_levels is generated, with subfolders named round1 to roundN, where N is the total number of CLS rounds, see below. In each of these subfolders, a POSCAR file named POSCAR_slice1 to POSCAR_sliceM (where M is the number of CLS slices, see below) is written which can be used as POSCAR file for an upfollowing CLS (or any other type) of VASP calculations.
  • -cls_slices=[number] For the CLS element calculations, the number of slices along the z-axis, from which a structure with at least one atom of the respective element shall be picked. In practice, the first frame fulfilling the condition of an atom of the chosen atom in the frame is picked. If no frame with an atom in the respective area is found in the whole trajectory, no folder is generated for this frame. The default number is 100.
  • -cls_rounds=[number] As explained above, the first frame with an element in the respective slice is chosen as example screenshot for the respective slice. In order to get a better averaging over the whole simulation time, the trajectory can be subdivided into a number of parts, for each part the same analysis is repeated (first frame with an atom in the slice etc.). The default value is 1.
  • -tension The surface tension of the whole surface slab is calculated, averaged over the whole trajectory. The calculated value is printed on the shell after the calculation.
  • -diffusion The three-dimensional self-diffusion coefficients of all elements present in the slab are calculated from the trajectory. The calculation is done via the mean-square displacement (MSD) calculation and averaged over all atoms of the respective element.
  • -diff_2d If diffusions of atoms on a surface or near a surface of a surface slab shall be calculated, where no relevant movements along the z-axis are possible, set this option. Then, the diffusion coefficient formula is adapted to represent a two-dimensional system explicitly.