[gmx-developers] calc_bonds() does forces wether I like it or not

Berk Hess hess at cbr.su.se
Tue Feb 15 22:51:52 CET 2011


It probably costs less performance with a dummy force array. I think we already have code like that in the making.


Erik Marklund <erikm at xray.bmc.uu.se> ha scritto:

>Hi developers,
>I want to calculate the potential energy of my system at various times 
>throughout the trajectory to make a sort of MC-like trial moves. But 
>when I call do_force() with the GMX_FORCE_BONDED flag set, but not the 
>GMX_FORCE_FORCES flag, I run into a segfault because calc_bonds() always 
>seem to calculate forces but gets a NULL pointer as the f[] argument. I 
>would think that do_force() should refrain from any force calculations, 
>or at least trying to store forces, when called without GMX_FORCE_FORCES 
>set. I can easily circumvent this problem myself, but the behaviour is 
>counterintuitive for not-so-senior developers. Should I add a bunch of 
>"if (f != NULL)" to the bonded functions, commit and push to 
>release-4-5-branches, or should I leave it the way it is?
>Erik Marklund, PhD student
>Dept. of Cell and Molecular Biology, Uppsala University.
>Husargatan 3, Box 596,    75124 Uppsala, Sweden
>phone:    +46 18 471 4537        fax: +46 18 511 755
>erikm at xray.bmc.uu.se    http://folding.bmc.uu.se/
>gmx-developers mailing list
>gmx-developers at gromacs.org
>Please don't post (un)subscribe requests to the list. Use the 
>www interface or send it to gmx-developers-request at gromacs.org.

More information about the gromacs.org_gmx-developers mailing list