[Pw_forum] D3 code (from the PHonon package) output
Lorenzo Paulatto
lorenzo.paulatto at impmc.upmc.fr
Tue Jul 22 09:40:27 CEST 2014
Actually, there is an obvious mistake in what I wrote, this should be
better:
USE vlocal, ONLY : vloc
! vloc must be initialized, this happens in init_vloc, called by hinit0
and plenty other places
...
allocate (d3vloc( dfftp%nnr))
do na_i = npert_i, npert_f
na = (na_i - 1) / 3 + 1
icart = na_i - 3 * (na - 1)
do jcart = 1, 3
na_j = 3 * (na - 1) + jcart
do kcart = 1, 3
na_k = 3 * (na - 1) + kcart
do ng = 1, ngm
gtau = tpi * (g (1, ng) * tau (1, na) + g (2, ng) * tau (2,
na) + g (3, ng) * tau (3, na) )
fac = vloc (igtongl (ng), ityp (na) ) * tpiba**3 * omega
*exp ((0.d0,1.d0)*gtau)
d3vloc (nl(ng),na_i, na_j, na_k) = fac * g (icart, ng) * g
(jcart, ng) * g (kcart, ng)
enddo
CALL invfft ('Dense', d3vloc, dfftp)
enddo
enddo
enddo
cheers
--
Dr. Lorenzo Paulatto
IdR @ IMPMC -- CNRS & Université Paris 6
+33 (0)1 44 275 084 / skype: paulatz
http://www.impmc.upmc.fr/~paulatto/
23-24/4é16 Boîte courrier 115, 4 place Jussieu 75252 Paris Cédex 05
More information about the users
mailing list