[Pw_forum] dipole moment calculation

Aihua Zhang zah7903 at gmail.com
Sat Mar 14 02:59:19 CET 2009


Hi,

The snippet of code in compute_dip.f90 I changed is as following

!                 rijk(ipol) = REAL(i1,dp)*at(ipol,1)*deltax + &
!                      REAL(j1,dp)*at(ipol,2)*deltay + &
!                      REAL(k11,dp)*at(ipol,3)*deltaz
                 rijk(ipol) = (REAL(i,dp)-1.d0)*at(ipol,1)*deltax + &
                      (REAL(j,dp)-1.d0)*at(ipol,2)*deltay + &
                      (REAL(k,dp)-1.d0)*at(ipol,3)*deltaz

It works in my test of water. Someone who understands the code thoroughly
should proof the change.

Aihua

On Wed, Mar 11, 2009 at 9:38 AM, Lorenzo Paulatto <paulatto at sissa.it> wrote:

> On Wed, 11 Mar 2009 05:24:38 +0100, Aihua Zhang <zah7903 at gmail.com> wrote:
> > The second possible bug is in compute_dip.f90, where r and r in rho(r)
> > seem dismatch when calculating the electronic dipole. After matching r
> with
> > rho(r) in the code, the reasonable identical results are obtains, i.e.
> > the calculated dipole and total energy are independent of where the
> molecule
> > is put in the supercell.
>
> Good job Aihua Zhang!
> Could you please provide more information on this bug, so it can be fixed
> mainstream?
> I have long suspected a bug in that part, and I know at least another
> person who's working on it at the moment, as far as I know with no luck.
>
> cheers
>
> --
> Lorenzo Paulatto
> SISSA  &  DEMOCRITOS (Trieste)
> phone: +39 040 3787 511
> skype: paulatz
> www:   http://people.sissa.it/~paulatto/<http://people.sissa.it/%7Epaulatto/>
>
>     *** save italian brains ***
>  http://saveitalianbrains.wordpress.com/
> _______________________________________________
> Pw_forum mailing list
> Pw_forum at pwscf.org
> http://www.democritos.it/mailman/listinfo/pw_forum
>



-- 
------------------------------------------------------------------
Research Fellow,
Dept. of Physics, National Univ. of Singapore
10 Kent Ridge Crescent, Singapore, 119260
Tel: +65 6516 7844
------------------------------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.quantum-espresso.org/pipermail/users/attachments/20090314/6bb87fb1/attachment.html>


More information about the users mailing list