How to Ensure VASP Will Detect Expected Symmetry in POSCAR Input

Oftentimes, we would like VASP to detect and honor a material system’s symmetry (natural or otherwise). However, assuming you modeled the system well-enough, if there is a relatively significant amount of ‘noise’ in the atom positions specified in POSCAR, VASP might not capture the expected symmetry. The lack of symmetry-identification can have unintended negative consequences (e.g. in the context of symmetry-based optimizations using ISIF, phonon calculations, symmetry operator eigenvalues, etc). In this post, I will share some tricks I figured out after some digging around (i.e., intense troubleshooting):

STEP 0: First, to find out the symmetry identified by VASP in a calculation, simply run:

grep -e symmetry OUTCAR

The above will search the OUTCAR file for the word ‘symmetry’. VASP determines this information early into the calculation (usually within a few minutes). Therefore you needn’t run the entire calculation if you just want this information. Also note that you can find information on all detected symmetry groups in the OUTCAR file under the text “Space group operators:” (at least in VASP version 5.4.4). You may use software such as irvsp to convert this information into a more-readable/informative format (that translates this information into descriptions like “120-degree rotation…” etc).


STEP 1: Use the literature and/or physical reasoning to identify the symmetry operators expected of the material system. A good idea is to start with the expected space group. The following tools may be helpful: Crystallographic Space Group Diagrams and Tables; EPINET; and of course, the bilbao crystallographic server.

NOTE: In this post, Danny Rehn provides a nice strategy re: relaxing coordinates symmetry-consciously, which I am quoting below without having done any personal testing:

Generally, there are two different cases:
A) The desired symmetry of the cell is known, but the atomic positions and/or lattice constants are not known. In this case, you want to enforce symmetry of the starting structure in the POSCAR file. You should use: IBRION = 2, ISYM = 2. The choice of ISIF also needs to be specified. To relax atom positions only (lattice constants fixed), choose ISIF = 2. For relaxation of the lattice constants, choose either ISIF = 3 (cell volume can vary) or ISIF = 4 (cell volume remains fixed).
B) The symmetry of the initial structure is not known to be correct. In this case, use IBRION = 2, ISYM = 0 (I.e., turn off symmetry). Usually you want ISIF = 3 for this case.


You can cheat and try to make VASP detect the expected symmetry without changing the atomic coordinates in POSCAR. You can increase SYMPREC to a higher order of magnitude, so that atom locations become fuzzier, thereby enabling VASP to ‘see’ the symmetry. This is quite similar to how you find your own artwork more beautiful the more alcohol you put into your system. You start seeing things.
Be warned, however, that this hack could have devastating unintended consequences, because the default value of 10^{-5} lies at the threshold between meaningfulness and garbagefulness. It is recommend that atomic coordinates must be specified to at least 7 significant digits. Please see this section of the official documentation for more information.


STEP 2: There are several software packages that allow one to symmetrize coordinates in POSCAR files. The VASP documentation suggests spglib or pymatgen (neither of which I tried). Others in my research group suggested Materials Studio. I tried the latter. Not only does it cost to use, but its user interface is geared towards… ahem… ‘experts’. Meaning that it could involve spending considerable time figuring out which buttons to press (even if you have the necessary physics knowledge).

In this post, I will achieve the desired outcome using phonopy, which is Python-based, and quite lovely due to its relative ease of use (assuming you are comfortable with the command line terminal and Python).

Simply install phonopy, use the terminal to navigate to a directory containing your POSCAR file (make sure you have a backup of the original!). Then, run the following:

phonopy --symmetry --tolerance 0.00001 -c POSCAR

The program will symmetrize coordinates in the ‘POSCAR’ file up to a threshold of 0.00001=10^{-5}, which is the above-mentioned default value of SYMPREC. The program will also write to the terminal the detected space group number. If this number is not consistent with what you expect in STEP 1, play around with the tolerance until the program detects what you expect (try …, 0.0001, 0.001, 0.1). Reminder: please make sure your expectations are physically justified!

Your symmetrized atomic coordinates will be written to the files PPOSCAR (primitive unit cell) and BPOSCAR (conventional unit cell). Now you can simply run your VASP calculation after replacing your original POSCAR with the generated PPOSCAR! A few minutes after your job starts running, please make sure VASP detects the expected symmetry as in STEP 0 above (you needn’t cancel the job unless you are dissatisfied). Also, be warned that “Selective dynamics” (and potentially other optional tags) in your POSCAR file might not be reflected in the symmetrized file phonopy generates. So, you might have to post-modify your new POSCAR file appropriately!

I hope you are happy.

Leave a Comment