I am using VASP to calculate material properties. I want to know how to extract the lattice parameters from my cells automatically with a script. I know about the method with VESTA (described here How to extract lattice constants a and c from relaxed hexagonal structure using VASP?), but doing this manually for every composition takes way too much time.
Since I am familiar with
bash from running my calculations I would like to use a
bash-script that calculates a, b, c, α, β, and γ from the relaxed CONTCAR file that I can loop over my directories. Is this possible to do in
bash or do I need to resort to
python or something similar?
as requested, an example would be this CONTCAR file. Since there are 64 individual atoms and the the relevant lines are 2-5 in all cases, I am omitting the lines at the bottom. This is a supercell, which means the lattice parameters are multiplied, but the script should not need to address that.
2x2x2 supercell ternary nitride 1.00000000000000 8.3651760123584129 0.0104817210801190 -0.0093895223039569 0.0104823789019837 8.3504089378499629 -0.0085602185310777 -0.0093916727121912 -0.0085617113679278 8.3470735253222390 Al Ti N 16 16 32 Direct 0.0003223292397248 0.9972239351012413 0.0011915008883630 0.4991700057920037 0.9984995833496634 0.5000934141482651 ...
A preferred output for this cell would then be
8.36519 8.35042 8.34708 90.1176 90.1289 89.8562
for a, b, c, α, β, and γ. Separation by tabs, commas, or semicolons would also be acceptable.