Skip to content

read_write_adv

esta.qeBag.read_write_adv

RWpwo

Class to read and write data file for the atomic structures

  • read cell parmeters and/or atomic positions
  • write this data in xyz, poscar, and qe-str format

get_atm_positions()

find atom positions with labels ...

get_cell_parameters()

return: cell vectors in angstrom or bohr

what is does:

for 'rlx' calculations: search: "lattice parameter (alat)" "crystal axes: (cart. coord. in units of alat)"

for 'vc-relax' calculations: search: 'CELL_PARAMETERS (angstrom)' ...

get_energies_and_kpt()

get the band energies at k point by reading the scf calculation out file

NOTE: Need verbosity ='high' in the scf input file to print the band energies

get_xyz_file()

get xyz file by reading the atomic positions and atomic labels: use method - get_atm_positions(infile)

return: outfile: write data in xyz file specified by name outfile

IMPORTANT: ordeing same elements together: not done yet .. to be done.. .. so for the time being open the file with Avogadro and save again as xyz file

get_xyz_grouped_file()

get xyz file by reading the atomic positions and atomic labels: use method - get_atm_positions(infile)

return: outfile: write data in xyz file specified by name outfile

NOTE: similar atoms are grouped together

get_poscar()

write cell_parameters and atomic postions, atom labels etc in poscar file

get_element_label(input_atomic_number)

using mendeleev for it : big database of elemental properties

In [22]: from mendeleev import element 
In [21]: for i in [5,6,7,8]: 
...:     element(i) 
...:     print (element(i).symbol) 
...:                                                                                                                            
B
C
N
O

get_unique_list(inp)

get unique elements of list

return: string for each type of atoms

get_grouped_list(llist)

get same string elements of list grouped together

get_neach_type(inp)

get number of list entries of each type

return:

  list of integers for each type of atoms specifying their number

RWpwi

class to read the pw input file and create poscar file

return: generate poscar file after reading the pw input file

get_unique_list(inp)

get unique elements of list

return: string for each type of atoms

get_grouped_list(llist)

get same string elements of list grouped together

get_neach_type(inp)

get number of list entries of each type

return:

  list of integers for each type of atoms specifying their

get_poscar()

write cell_parameters and atomic postions, atom labels etc in poscar file