Open eminamitani opened 3 years 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.
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).
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
construct module to calculate inverse participation ratio