force_constant_and_frequencies_selective_subspace_general_adv
esta.phonon.force_constant_and_frequencies_selective_subspace_general_adv
¶
get_forces_dict(atommove)
¶
get forces fron qe output files with + and - displacements and store them in dictionary with indices indication atoms moving index, atom shift index, and displacemet(+ or -)
get_forces_dict_parta(atommove)
¶
get forces fron qe output files with + and - displacements and store them in dictionary with indices indication atoms moving index, atom shift index, and displacemet(+ or -)
get_idatm_iddir_iddispl(atommove)
¶
get a list of 'idatm-iddir-iddispl' idatm: atom id iddir : atom move direction index iddispl: + or - shift of atoms
atom_direction_shift ==> id atom, id direction, id shift
get_forces_minus(atommove, forces_dict, atom_direction_shift)
¶
extract forces from forces_dict for minus (id=0) displacement
get_forces_plus(atommove, forces_dict, atom_direction_shift)
¶
extract forces from forces_dict for plus (id=1) displacement
get_forces_central(force_c0, force_c1)
¶
Note: difference of force4 +ve disp and force4 -ve disp, and then divide to get the average
sum of forces cannot be taken because that way you are cancelling the forces bcz one force is almost equal but negative of other
get_symmetrized_force_constant_matrix(fcMatrx, atommove)
¶
symmetrize force constant matrix fc(iat, ia, jat, ja)
return (fc(iat, ia, jat, ja) + fc(jat, ja, iat, ia))/2
get_asr(fcMatrix, atommove)
¶
apply accoustic sum rule on the force constant matrix
see Xavier gonze PRB paper:
XAVIER GONZE AND CHANGYOL LEE PHYSICAL REVIEW B VOLUME 55, NUMBER 16 15 APRIL 1997-I
specifically see equations: 44 and 45.. good luck ..read whole paper..sk!!
WARNING: asr is applied only on the part of the force constant matrix defined by the list of moving atoms .. is it ok? .. sk!
write_forces(force_row, ldisp)
¶
may be you need to add ... atoms parameter in the call ..
write forces rows to a file NOTE: only for - and + displacement
todo : for writing central diff force constant .. no need of ldisp tag
get_sqrt_mass_array(label)
¶
for given atomic symbols, return correspoinding masses in amu
get_dynamical_matrix(atommove, sqrt_mass_array, forceconstant)
¶
getting dynamical matrix from force constant matrix at q=0 point
NOTE: for q=0
1. dynmat = fc matric/ sqrt(mass1)/ sqrt(mass2)
2. dynmat in q space = dynmat in R space; see equation 7 in
paper of Ab initio calculation of phonon dispersions in semiconductors
prb. Paolo Giannozzi et al. 1991
reshape_dyn(dynmatrix, atommove)
¶
reshape dynamical matrix
get_eigen(dynamatical_matrix)
¶
dynamical matrix is hermitian matrix .. try taking it Hermitian matrix instead of general matrix
input:
array: array of rank 2 of shape (3*natoms, 3*natoms)
output:
array: 1d array of size 3natoms; it is eigen value
array: 2d array of shape (natoms, 3natoms); it is eigen
vector for each eigval