Skip to content

read_force_constant_stable

esta.phononBag.read_force_constant_stable

read_force_constant_phonopy(filename, poscar_file=None)

read force constant from the phonopy.yaml file created using the following command; phonopy --qe --cell ScPtO.scf2phon.in --include-fc -p band.conf | tee fc_pair_of_atoms.out

the band.conf contains the following lines: DIM = 1 1 1 PRIMITIVE_AXIS = AUTO BAND = 0. 0. 0. 0 0 0.1 BAND_POINTS=1 WRITEDM = .TRUE.

.. note:: the force constant are extraced from the q=0 calculation done using phonopy with qe as the backend. Should work for all the non-zero qpts as well..not test yet!!

the units of the force-constants are ry/au^2, see the phonopy.yaml file for more 
details. In output the units are converted to eV/Ang^2.

Parameters:

  • filename (str) –

    name of the filename, phonopy.yaml

Returns:

  • lattice ( array ) –

    cell vectors

  • symbol ( list ) –

    list of symbols

  • pos ( array ) –

    atomic positions

  • masses ( array of scalars ) –

    mass of atoms

  • force_constant (force_constant_tensor_reshape) : array of rank 4

    force constant all pair of atoms; (atmindx, atmindx, 3,3) note: from this eigen value of fc matrix after digonalisation is obtained for each atom pair

  • fc_list ( list of dictionaries ) –

    list of atomic pair dictionaries

  • return lattice, symbol, pos, mass_atom, force_constant_tensor_reshape, fc_list
  • .. important::

    to find force constant (scalar) for each atom pair with NN, 2NN, 3NN interactions ; units are eV/Ang^2. to do this just see the same atomic pair with different atomic distance as present in the list of fc dictionary or output.csv or output.xlsx file and plot the data.

filter_force_constant_atomic_pairs(fc_list)

given the list of dictionary containing atomic pair force constants along with corresponding distances, and atomic symbols, extract the unqiue force-constant atomic pairs ...