Skip to content

xml_qe_advvv

esta.qeBag.xml_qe_advvv

read_qe_xml(filename, index=-1, lband_struct=False)

Parse data-file-schema.xml or another *xml file of qe version 6.4.1, 6.2, 7.0

Parameters:

filename: str xml file containing crystal str and electronic str. information of calculations carrired out by qe code

Returns:
 array: unit cell in bohr, 
 array: atomic positions in bohr,
 character: atomic symbols
 array: forces .. 
 ... many other parameters present in the xml file ..

..note:: with scipy version 1.1.0 bohr radius= 5.2917721067e-11 m ; less accurate fac = cf.bohr2ang =0.529177210669 --< -- less accuaret and as a result atoms pos and cell param are wrong after 6 dec # places In scipy version 1.4.1 bohr radiun = 5.29177210903e-11 m; is same as given in nist data ; https://physics.nist.gov/cgi-bin/cuu/Value?bohrrada0 Numerical value 5.291 772 109 03 x 10-11 m fac = 0.529177210903 # does not work fac = np.array( 0.529177210903 , dtype=np.float128)

qe 6.2 and 6.4.1 uses 
REAL(DP), PARAMETER :: &
    BOHR_RADIUS_SI   = 0.52917720859E-10_DP ! m

author: 'skumar' email: 'sonukumar.physics@gmail.com'

get_poscar(infile, lcartesian=True, lendposcar=None)

write poscar file from xml file of qe

Parameters:

infile: string infile (data-file-schema.xml) lcartesian: logical wheter output coord in cartesian format lendposcar: logical (optional) whether only last pt data in the POSCAR format

Return:
poscar file (many or just the last pt in rlx path or so.)

get_all_xyz_in_a_file(infile)

all xyz in a file from xml path data

get_xyzs(infile)

write xyz_all file from xml file of qe

Parameters:

infile: string name of the xml file such as data-file-schema.xml

Returns:

xyzs file with many xyz strs

get_xyzs_(infile, l_last_str=None)

write xyz data file from xml file of qe: all xyz data or only last xyz data

Parameters:

infile: string name of the xml file such as data-file-schema.xml

Returns:

xyzs file with many xyz strs

get_energy()

extract energy