eminamitani / thermal_conductivity_code

Allen-Feldman thermal conductivity compatible to GULP implementation
MIT License
17 stars 2 forks source link

inverse participation ratio #6

Open eminamitani opened 2 years ago

eminamitani commented 2 years ago

construct module to calculate inverse participation ratio

Sctdhy commented 1 year ago

nmodes=len(eigenvector) iprdat=np.zeros(nmodes) for i in range(nmodes): vec=eigenvector[:,i] inner=vecvec ipr=innerinner print(ipr.sum()) iprdat[i]=ipr.sum() In the original paper, it seems that we should first calculate the sum of squares for the three directions of an atom within a particular pattern before squaring it again. image

eminamitani commented 5 months ago

I made get_IPR_rev module to evaluate the following equation directly. The eigenvector of vibrational mode is normalized, thus, the denomintor is 1. Thus, I evaluate IPR by using np.power(eigenvector_for_mode,4).

スクリーンショット 2024-04-08 19 33 01
eminamitani commented 5 months ago

And, this method and the previous version return the same results, since both evaluate the sum of respective elements to the 4th power, 1x^4+1y^4+1z^4 ..... Nx^4+Ny^4+Nz^4