[gmx-users] set charge as 0 in gromacs code
Shi, Yu (shiy4)
shiy4 at mail.uc.edu
Wed Aug 7 01:16:32 CEST 2013
My system is 512 waters and 1 ion CL-. Now I would like to change the CL charge as 0 in the gromacs code for the short non-bonded interaction. While for the long-range electrostatics (pme) the CL is -1.
My gromacs version is 4.6.2, which automatically starts 8 threads to compute.
In src/kernel/md.c, at line 1191 just before function do_force() , I added codes as following which could find out which atom is CL and change its charge as 0 in a certain thread. After this, when I use g_energy, the Coul.SR of SOL and CL is -88 kJ, which should be 0 kJ.
Does anyone could help me out?
for (stone_a=mdatoms->start; stone_a<mdatoms->start+mdatoms->homenr; stone_a++)
if (mdatoms->chargeA[stone_a] == -1.0)
fprintf(stderr,"the atom %d found with charge %f\n", stone_a,mdatoms->chargeA[stone_a]);
More information about the gromacs.org_gmx-users