Skip to content

analyze_poscar.py

Julien Steffen edited this page Apr 10, 2025 · 2 revisions

This script analyzes a structure given in a POSCAR file and can generate suitable POTCAR´ and 'KPOINTS files for it. In the following, the possible options are explained:

  • -gen_kpoints Generates a KPOINTS file for the system, based on the unit cell shape of the POSCAR. Further, surface slabs or isolated systems are recognized automatically, the number of k-points in the respective directions are set to 1 if the vacuum is larger than 7 Angstrom.
  • -k_density=[value] The density of sampling in recriprocal space. The larger the given value, the lower the number of k-points will be (higher distance between sampled points). The default value is 0.04. A value of 0.02 thus will double the number of k-points per dimension for a given `POSCAR´ file.
  • -gen_potcar A POTCAR file for the given POSCAR file will be generated. It is assume that the potcar folder that contains the POTCAR files from VASP for all elements is directly placed in the home folder.
  • -potcar_path=[path] Change the default location of the VASP potcar folder for all elements to the given path. If you do not want to give this keyword every time, you can also directly change the path in the script (line 48 in analyze_poscar.py).
  • -density Calculates the average density (in g/cm^3) of the periodic structure in the POSCAR file.
  • -atoms=a,b,c Give a list of atom indices for which some analysis will be made (currently only the measurement of plane angles, see below). Example: atoms=3,6,7,18,35.
  • -plane_angle=[coord_plane] Activates the measurement of the orientation of a plane defined by a collection of atoms (-atoms command) and one of the coordinate planes. Possible are xy, xz or yz. If more than three atoms are given, the plane will be fitted through them to achieve a minimal average distance of the atoms to the plane. Example: -plane_angle=xy.
Clone this wiki locally