ttadano / alamode

Ab initio simulator for thermal transport and lattice anharmonicity
http://sourceforge.net/projects/alamode
MIT License
137 stars 54 forks source link

Faster mode transformation in calculating reciprocal-space IFCs. #169

Closed r-masuki closed 7 months ago

r-masuki commented 7 months ago

Implemented the faster mode transformation in calculating the reciprocal-space representation of the IFCs.

The mode-transformation of the quartic IFCs from the Cartesian ($\alpha,\mu$) representation to the normal coordinate ($\lambda$) representation can be written as $\widetilde{\Phi}(-k\lambda_1,k\lambda_2, k' \lambda_3,-k'\lambda4)$ = $\sum{\alpha\mu} \epsilon_{k\lambda_1,\alpha_1\mu1}^{*} \epsilon{k\lambda_2,\alpha_2\mu2} \epsilon{k'\lambda_3,\alpha_3\mu3} \epsilon{k'\lambda_4,\alpha_4\mu4}^{*} \widetilde{\Phi}{\mu_1\mu_2\mu_3\mu_4}(-k\alpha_1,k\alpha_2, k' \alpha_3,-k'\alpha_4)$. Here, the computational cost of this tranformation is nearly $O(\text{ns}^8)$ in the straightforward implementation. However, it can be reduced to $O(\text{ns}^5)$ by separately performing the transformation on each index. $\text{ns}$ is the number of phonon branches. Please see Scph::compute_V4_elements_mpi_over_kpoint and Scph::compute_V4_elements_mpi_over_band for the details and the implementation.

The similar speedup can be applied to the mode transformation of cubic IFCs as well, which is implemented in Scph::compute_V3_elements_mpi_over_kpoint and Scph::compute_V3_elements_for_given_IFCs.