[gmx-users] Switching off Coulombs for a charge group.

David spoel at xray.bmc.uu.se
Thu Nov 18 19:56:13 CET 2004


On Thu, 2004-11-18 at 13:37 -0500, Pradip Kumar Biswas wrote:
> Hi,
> Can anyone please tell me what's the best way in Gromacs to switch-off
> all the Coulomb interactions related to a particular charge group?
> 
> I tried with setting the corresponding charges in the chargeA arrays to 
> zero
> by setting the following lines in a loop before going to "do_fnbf()":
> 
> md->chargeA[i]  = 0 ;
> md->chargeA[i+md->nr]  = 0 ;
> md->chargeA[i+2*md->nr]  = 0 ;
> 
you'd probably rather write
md->chargeA[i]  = 0 ;
md->chargeA[i+1]  = 0 ;
md->chargeA[i+2]  = 0 ;

Since md->nr is the length of the array your code would generate a segmentation violation.

Alternatively you could set the charges to zero in the input.

> when [i] correspond to the desired charge.
> 
> Can anyone suggest me how this setting inside Gromacs can jeopardize
> anything else that I cannot see at this moment?
> Thanking you in advance.
> 
> Pradip.
> CSU, Ohio.
> 
> _______________________________________________
> gmx-users mailing list
> gmx-users at gromacs.org
> http://www.gromacs.org/mailman/listinfo/gmx-users
> Please don't post (un)subscribe requests to the list. Use the 
> www interface or send it to gmx-users-request at gromacs.org.
-- 
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