==> supercell.py script constructs a bcc/fcc supercell for high-entropy alloys.
This repository contains a set of Python scripts for analyzing High Entropy Alloys using VASP output files. The scripts can extract lattice parameters, energy, and volume from each directory in a given parent directory. Additionally, it can scan the CONTCAR file, compute the volume and lattice parameters, and print the volume difference upon structure minimization. The extracted data can be used to analyze the Elastic Constants and make decisions on adjusting ENCUT or KPOINTS to minimize Pulay stress, as indicated in the VASP manual.
**USAGE** : Just run the Main_file.py it will call all the modules
The code has been given in one script (**Extract_elastic_energy_VASP.py**) and in modules.
The module form is much easier to handle than one long complex code.
~/dir/ -->
dir1
dir2
dir3
POSCAR
OUTCAR
Python Main_file.py
For VASP structural minimization, the following tags should be used: IBRION = 2; ISIF = 3; EDIFF = 10**-8. VASP implements both the stress method (First derivative approach) and the Energy-strain method for Elastic Constants calculation. The Energy-strain method involves applying Lagrangian strains to the cell and calculating the resulting energy for various deformations. Polynomial fitting is then performed, and the second derivative is calculated at equilibrium volume.
An exercise to print Cij matrix in a Pythonic way: 2D array is created as a List of Lists unlike C++ where you define by C[i][j]
def print_Cij_Matrix():
Bij = []
C = "C"
for i in range(0,6):
Bij.append([])
for j in range(0,6):
Bij[i].append((C + str(i) + str(j)))
l = np.matrix(Bij)
print (l)
ref: exciting ref: materialsproject
Parsing Hessian matrix from a file
Script to parse Hessian Matrix from a file
USAGE: To parse the VASP vasprun.xml input file to extract the Hessian Matrix Output file has already been defined in the code (hessian.dat).
CAUTION: Use at your own risk (NOTEVEN IMPLIED GUARANTEED, WHATSOEVER), the code has been tested but the user in the end will have to verify the ouput.
Xpath is a useful tool for directly accessing the element in a Node
-> CHECK this website for lxml introduccion: https://lxml.de/tutorial.html & -> https://github.com/lxml/lxml
NB: The Matrix is obtained from VASP, vasprun.xml file. It contains the hessian matrix that can be edited with the appropriate script.
The complication that arises by parsing the data from the file is the trailing empty lines and tabs that need to be deleted before it can be read. In the case of a simple file format, there is no need for it. But if the file contains irregular data entry such as empty lines with commas and spaces then it needs to be formatted.
In my case, I have only leading empty lines and spaces and in between columns there are white spaces of different sizes.
Convert exciting(LMTO) input file to VASP input file (DFT code)
๐ข๐ป๐ฒ ๐ณ๐ถ๐ฒ๐น๐ฑ ๐ผ๐ณ ๐๐ผ๐ฟ๐ธ ๐ถ๐ป ๐๐ต๐ถ๐ฐ๐ต ๐๐ต๐ฒ๐ฟ๐ฒ ๐ต๐ฎ๐ ๐ฏ๐ฒ๐ฒ๐ป ๐๐ผ๐ผ ๐บ๐๐ฐ๐ต ๐๐ฝ๐ฒ๐ฐ๐๐น๐ฎ๐๐ถ๐ผ๐ป ๐ถ๐ ๐ฐ๐ผ๐๐บ๐ผ๐น๐ผ๐ด๐. ๐ง๐ต๐ฒ๐ฟ๐ฒ ๐ฎ๐ฟ๐ฒ ๐๐ฒ๐ฟ๐ ๐ณ๐ฒ๐ ๐ต๐ฎ๐ฟ๐ฑ ๐ณ๐ฎ๐ฐ๐๐ ๐๐ผ ๐ด๐ผ ๐ผ๐ป, ๐ฏ๐๐ ๐๐ต๐ฒ๐ผ๐ฟ๐ฒ๐๐ถ๐ฐ๐ฎ๐น ๐๐ผ๐ฟ๐ธ๐ฒ๐ฟ๐ ๐ต๐ฎ๐๐ฒ ๐ฏ๐ฒ๐ฒ๐ป ๐ฏ๐๐๐ ๐ฐ๐ผ๐ป๐๐๐ฟ๐๐ฐ๐๐ถ๐ป๐ด ๐๐ฎ๐ฟ๐ถ๐ผ๐๐ ๐บ๐ผ๐ฑ๐ฒ๐น๐ ๐ณ๐ผ๐ฟ ๐๐ต๐ฒ ๐จ๐ป๐ถ๐๐ฒ๐ฟ๐๐ฒ, ๐ฏ๐ฎ๐๐ฒ๐ฑ ๐ผ๐ป ๐ฎ๐ป๐ ๐ฎ๐๐๐๐บ๐ฝ๐๐ถ๐ผ๐ป๐ ๐๐ต๐ฎ๐ ๐๐ต๐ฒ๐ ๐ณ๐ฎ๐ป๐ฐ๐. ๐ง๐ต๐ฒ๐๐ฒ ๐บ๐ผ๐ฑ๐ฒ๐น๐ ๐ฎ๐ฟ๐ฒ ๐ฝ๐ฟ๐ผ๐ฏ๐ฎ๐ฏ๐น๐ ๐ฎ๐น๐น ๐๐ฟ๐ผ๐ป๐ด. ๐๐ ๐ถ๐ ๐๐๐๐ฎ๐น๐น๐ ๐ฎ๐๐๐๐บ๐ฒ๐ฑ ๐๐ต๐ฎ๐ ๐๐ต๐ฒ ๐น๐ฎ๐๐ ๐ผ๐ณ ๐ป๐ฎ๐๐๐ฟ๐ฒ ๐ต๐ฎ๐๐ฒ ๐ฎ๐น๐๐ฎ๐๐ ๐ฏ๐ฒ๐ฒ๐ป ๐๐ต๐ฒ ๐๐ฎ๐บ๐ฒ ๐ฎ๐ ๐๐ต๐ฒ๐ ๐ฎ๐ฟ๐ฒ ๐ป๐ผ๐. ๐ง๐ต๐ฒ๐ฟ๐ฒ ๐ถ๐ ๐ป๐ผ ๐ท๐๐๐๐ถ๐ณ๐ถ๐ฐ๐ฎ๐๐ถ๐ผ๐ป ๐ณ๐ผ๐ฟ ๐๐ต๐ถ๐. ๐ง๐ต๐ฒ ๐น๐ฎ๐๐ ๐บ๐ฎ๐ ๐ฏ๐ฒ ๐ฐ๐ต๐ฎ๐ป๐ด๐ถ๐ป๐ด, ๐ฎ๐ป๐ฑ ๐ถ๐ป ๐ฝ๐ฎ๐ฟ๐๐ถ๐ฐ๐๐น๐ฎ๐ฟ, ๐พ๐๐ฎ๐ป๐๐ถ๐๐ถ๐ฒ๐ ๐๐ต๐ฎ๐ ๐ฎ๐ฟ๐ฒ ๐ฐ๐ผ๐ป๐๐ถ๐ฑ๐ฒ๐ฟ๐ฒ๐ฑ ๐๐ผ ๐ฏ๐ฒ ๐ฐ๐ผ๐ป๐๐๐ฎ๐ป๐๐ ๐ผ๐ณ ๐ป๐ฎ๐๐๐ฟ๐ฒ ๐บ๐ฎ๐ ๐ฏ๐ฒ ๐๐ฎ๐ฟ๐๐ถ๐ป๐ด ๐๐ถ๐๐ต ๐ฐ๐ผ๐๐บ๐ผ๐น๐ผ๐ด๐ถ๐ฐ๐ฎ๐น ๐๐ถ๐บ๐ฒ. ๐ฆ๐๐ฐ๐ต ๐๐ฎ๐ฟ๐ถ๐ฎ๐๐ถ๐ผ๐ป๐ ๐๐ผ๐๐น๐ฑ ๐ฐ๐ผ๐บ๐ฝ๐น๐ฒ๐๐ฒ๐น๐ ๐๐ฝ๐๐ฒ๐ ๐๐ต๐ฒ ๐บ๐ผ๐ฑ๐ฒ๐น ๐บ๐ฎ๐ธ๐ฒ๐ฟ๐." ๐๐ถ๐ฟ๐ฎ๐ฐ, ๐ฃ๐ฎ๐๐น. ๐ข๐ป ๐บ๐ฒ๐๐ต๐ผ๐ฑ๐ ๐ถ๐ป ๐๐ต๐ฒ๐ผ๐ฟ๐ฒ๐๐ถ๐ฐ๐ฎ๐น ๐ฝ๐ต๐๐๐ถ๐ฐ๐. (๐ง๐ฟ๐ถ๐ฒ๐๐๐ฒ. ๐๐๐ป๐ฒ ๐ญ๐ต๐ฒ๐ด .)