Skip to content

neb_qe

esta.qeBag.neb_qe

neb

python class

..note:

--to generate supercard along with its contents such as BEGIN_POSITIONS ... content of the supercard here ... END_POSITIONS

for details see documentation of neb.x manual link: https://www.quantum-espresso.org/Doc/INPUT_NEB.html

2) -- to store data (atom no, no of images, atomic symbols, atomic positions) from *axsf data -- to generate xyz files from *axsf file from xcrysden

3) -- to read pathx files; where x = 0, 1, 2, .... and then create xyz files .......

4) -- read xsf file and store data (atomic number, symbols, atomic positions) from xsf file -- create poscar file from xsf file.

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

def test():
    # this is another comment .. will it work or not?

__init__()

xyzfiles are list of xyz files Note: array the files in proper order so as to have a well defined path fo NEB calculations

read_xyz(xyzfiles)

input:
filenames: list of str,  filename xyz file names
output:
atomic positions: array: rank 2 array of shape (natoms, 3)
atomic labels: list/array of strings: rank 1 array of atomic labels

read_axsf(axsf_file)

input:
str: *axsf file name
output:
rank 3 array: atomic positions: array: rank 3 array of shape (nimages, natoms, 3)
list of strings: atomic labels: list/array of strings: rank 1 array of atomic labels
scalar: no of images/number of structures
rank 2 array: cell vectors
rank 3 array: forces on atoms of shape (nimage, natoms, 3)

read_xsf(xsf_file)

input:
str: *xsf file name
output:
rank 2 array: atomic positions: array: rank 3 array of shape (natoms, 3)
list of strings: atomic labels: list/array of strings: rank 1 array of atomic labels
rank 2 array: cell vectors
rank 2 array: forces on atoms of shape (natoms, 3)

read_crd(crd_file=None)

read the *crd file from qe neb output data The *crd file is similar to POSITION_CARD in qe_neb input file

parameters

crd_file: str name of the crd file

Returns:

  • pos ( rank 3 array ) –

    atomic positions: array: rank 3 array of shape (nimages, natoms, 3)

  • symb ( list of strings ) –

    atomic labels: list/array of strings: rank 1 array of atomic labels

  • nimage ( scalar ) –

    no of images/number of structures

  • fixatmID ( list ) –

    list of fix atm ids (numbering from 1)

  • fixatmDir ( list ) –

    list of string tag for each atom fix direction along x, y and z directions e.g ['T T F','F F F', ....]

        return pos, symb, nimage, fixatmID, fixatmDir
    

read_path(path_file, qe_input)

input:
str: *path file name
str: qe neb input file (containing Atomic symbols); atomic symbols are not
    present in *path file
output:

atomic positions: array rank 3 array of shape (nimages, natoms, 3) atomic labels: list/array of strings rank 1 array of atomic labels no of images: scalar number of structures forces: array f shape (nimage, natoms, 3) atomic forces scalar: energy

return (self.pos_path, self.label_qe_neb, self.no_strs_path, self.force_path, self.energy_path)

write_position_card(xyzfiles=None, atm_position=None, symbol=None, atom_fix_index=None, ladd_kpt_lines=False)

Parameters:
(Either xyzfiles: list of strings containg names of the xyz files 
OR atm_position, symbol)

atom_fix_index: list of atom numbers starting from 1 to be fixed in
Returns:
supercard containing atomic positions for all xzy strs for NEB calculations

..note: output of this method: ...

BEGIN_POSITIONS FIRST_IMAGE

ATOMIC_POSITIONS { angstrom }

INTERMEDIATE_IMAGE

ATOMIC_POSITIONS { angstrom }

INTERMEDIATE_IMAGE

ATOMIC_POSITIONS { angstrom }

-- LAST_IMAGE

ATOMIC_POSITIONS { angstrom }

-- END_POSITIONS

to_xyz_files(filename, extension, qe_neb_input=None)

input:
str: filename
str: filename extension (e.g. axsf or path file from NEB calc of qe)

#atomic positions
#atomic labels
#no of atoms
#no of images

or better pass an atom object to this method/function
output:
xyz files in for NEB calculations

to_xyz_plus_delta_files(pos, label, no_strs, filename, extension, qe_neb_input=None)

input:
rank2 array: atomic positions
list: atomic labels
scalar: no of images

str: filename
str: filename extension (e.g. axsf or path file from NEB calc of qe)


or better pass an atom object to this method/function
output:
xyz files with displaced atoms according to vibration pattern or some other displacement
vectors for each atomic position

to_xyz_file(pos, label, filename=None, extension='xsf')

input:
str: filename
str: filename extension (e.g. xsf )

atomic positions
atomic labels

or better pass an atom object to this method/function
output:
xyz file

to_poscar(latvec, pos, label, filename='POSCAR', extension='xsf')

input:
str: filename for the output poscar file; default POSCAR
str: extension ; redundant variable; default is xsf file
rank 2 array: lattice vectors: latvec
rank 2 array: atomic positions: pos
list of string : atomic labels: label

or better pass an atom object to this method/function
output:
POSCAR file

get_symbol_from_atomic_number(atomic_num)

return list of atomic symbols from list of atomic numbers

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