<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Dear Éric,<br>
what you are looking for does not necessarily exists: the potential
is composed of local and nonlocal parts. The non-local parts only
make sense when applied to a wavefunction. In other words, you can
compute <psi|V^3|psi> but not necessarily V^3(r). Also keep in
mind that there is one derivative for each phonon, i.e. (3*nat)^3
derivatives.<br>
<br>
That said, if you know what you are doing, the third derivative of
the local part of the external potential is computed in G-space in
the first few lines of PHonon/D3/d3vrho.f90. It is also immediately
multiplied by rho and integrated, but it's easy to skip that part,
and even easier to FFT it to real space at the end.<br>
<br>
This code should make what you want, no guarantee especially on +, -
and "i" factors:<br>
<br>
USE vlocal, ONLY : vloc<br>
! vloc must be initialized, this happens in init_vloc, called by
hinit0 and plenty other places<br>
...<br>
allocate (d3vloc( dfftp%nnr))<br>
do na_i = npert_i, npert_f<br>
na = (na_i - 1) / 3 + 1<br>
icart = na_i - 3 * (na - 1)<br>
do jcart = 1, 3<br>
na_j = 3 * (na - 1) + jcart<br>
do kcart = 1, 3<br>
na_k = 3 * (na - 1) + kcart<br>
do ng = 1, ngm<br>
gtau = tpi * (g (1, ng) * tau (1, na) + g (2, ng) * tau
(2, na) + g (3, ng) * tau (3, na) )<br>
fac = vloc (igtongl (ng), ityp (na) ) * tpiba**3 * omega
*exp ((0.d0,1.d0)*gtau)<br>
d3vloc (nl(ng),na_i, na_j, na_k) = fac * g (icart, ng) *
g (jcart, ng) * g (kcart, ng)<br>
enddo<br>
enddo<br>
enddo<br>
enddo<br>
CALL fwfft ('Dense', d3vloc, dfftp)<br>
<br>
<br>
<br>
<div class="moz-cite-prefix">On 07/21/2014 08:58 AM, Éric Germaneau
wrote:<br>
</div>
<blockquote cite="mid:53CCBA0A.8040906@sjtu.edu.cn" type="cite">
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1">
Dear all,<br>
<br>
The D3 code computes the 3rd derivatives of the potential in
reciprocal space as well as complex calculations.<br>
What I need is just the 3rd derivatives of the potential in real
space. <br>
From the manual the code must compute them.<br>
I'm wondering whether this intermediate calculation is printed
out. <br>
I actually, did not find any information about the output
format/content.<br>
Has anyone enough experiences with D3 to shed some light on this
matter?<br>
Thank you,<br>
<br>
Éric.<br>
<br>
<div class="moz-signature">-- <br>
<font color="#000066"> Éric Germaneau (艾海克), Specialist<br>
Center for High Performance Computing<br>
Shanghai Jiao Tong University<br>
Room 205 Network Center, 800 Dongchuan Road, Shanghai 200240
China<br>
<a moz-do-not-send="true" class="moz-txt-link-abbreviated"
href="mailto:M:germaneau@sjtu.edu.cn">M:germaneau@sjtu.edu.cn</a>
P:+86-136-4161-6480 W:<a moz-do-not-send="true"
class="moz-txt-link-freetext" href="http://hpc.sjtu.edu.cn">http://hpc.sjtu.edu.cn</a>
</font> </div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Pw_forum mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Pw_forum@pwscf.org">Pw_forum@pwscf.org</a>
<a class="moz-txt-link-freetext" href="http://pwscf.org/mailman/listinfo/pw_forum">http://pwscf.org/mailman/listinfo/pw_forum</a></pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Dr. Lorenzo Paulatto
IdR @ IMPMC -- CNRS & Université Paris 6
+33 (0)1 44 275 084 / skype: paulatz
<a class="moz-txt-link-freetext" href="http://www.impmc.upmc.fr/~paulatto/">http://www.impmc.upmc.fr/~paulatto/</a>
23-24/4é16 Boîte courrier 115, 4 place Jussieu 75252 Paris Cédex 05</pre>
</body>
</html>