[gmx-users] ewald_util.c, charge and dipole corrections
Y U Sasidhar
sasidhar at chem.iitb.ac.in
Thu May 20 12:37:26 CEST 2004
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;
/* 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];
}
}
--
Sasidhar
More information about the gromacs.org_gmx-users
mailing list