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

Y U Sasidhar sasidhar at chem.iitb.ac.in
Thu May 20 13:16:52 CEST 2004


David wrote:

> 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.

I mean what these corrections stand for ? Why are they 
required ? What is the significance of these corrections ?

>>
>>/* 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
> 
>>     }
>>   }


-- 
  Sasidhar





More information about the gromacs.org_gmx-users mailing list