[gmx-users] ewald_util.c, charge and dipole corrections

David spoel at xray.bmc.uu.se
Thu May 20 15:09:34 CEST 2004


On Thu, 2004-05-20 at 12:37, Y U Sasidhar wrote:
> I am attaching below code fragment from ewals_util.c. The 
> code refers to charge and dipole corrections. What are these 
> corrections ? I will be thankful to you for your response.
> 
> /* Global corrections only on master process */
>    if(MASTER(cr)) {
>      /* Apply charge correction */
>      /* use vc as a dummy variable */
>      vc=qsum*qsum*M_PI*ONE_4PI_EPS0/(2.0*vol*vol*ewc*ewc);
>      for(iv=0;iv<DIM;iv++)
>        lr_vir[iv][iv]+=vc;
>      Vcharge=-vol*vc;

Charge correction

> 
>      /* Apply surface dipole correction:
>       * correction = dipole_coeff * (dipole)^2
>       * Note that we have to transform back to gromacs 
> units, since
>       * mu_tot contains the dipole in debye units (for output).
>       */
>      if(dipole_coeff!=0) {
>        if(ewald_geometry==eewg3D)
> 	Vdipole=dipole_coeff*DEBYE2ENM*DEBYE2ENM*
> 	 
> (mu_tot[XX]*mu_tot[XX]+mu_tot[YY]*mu_tot[YY]+mu_tot[ZZ]*mu_tot[ZZ]);
>        else if(ewald_geometry==eewg3DC)
> 	Vdipole=dipole_coeff*DEBYE2ENM*DEBYE2ENM*mu_tot[ZZ]*mu_tot[ZZ];
Dipole Correction
>      }
>    }
-- 
David.
________________________________________________________________________
David van der Spoel, PhD, Assoc. Prof., Molecular Biophysics group,
Dept. of Cell and Molecular Biology, Uppsala University.
Husargatan 3, Box 596,  	75124 Uppsala, Sweden
phone:	46 18 471 4205		fax: 46 18 511 755
spoel at xray.bmc.uu.se	spoel at gromacs.org   http://xray.bmc.uu.se/~spoel
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++




More information about the gromacs.org_gmx-users mailing list