Skip to content

read_force_constant

esta.phononBag.phonopy.read_force_constant

read_force_constant_phonopy(filename)

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.

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 ( array ) –

    force constant between pair of atoms

  • return lattice, symbol, pos, mass_atom, force_constant_tensor_reshape, force_constant_norm