[gmx-developers] tpic with large cavities

Daniel Larsson larsson at xray.bmc.uu.se
Tue Nov 16 18:05:24 CET 2010


Hi all,

Currently I'm looking into the cavity test particle insertion (TPIC) code since I want to make a modified version of the algorithm. Due to obtaining strange results I started to do some testing of the original tpic algorithm (using the current git version). My test system is a plain water box into which I insert a helium atom. I calculate the energy in a spherical cavity at the center of the box and when the radius of insertion (rtpi in the mdp file) is increased I expect the energies to converge towards the energy calculated using the standard TPI algorithm for the whole box.

Small radii gives quite accurate energies, but large radii give much lower energies than expected. A clue might be that the threshold for my system lies around the size of the cutoff. When I tried to debug the code I noticed that (as far as I can see) do_forces are using the center of the cavity instead of the actual insertion point. But setting "fr->cg_cm[top->cgs.nr-1]" to "x_tp" instead of "x_init" did not help.

This should not be a sampling problem since insufficient sampling would overestimate the energy rather than underestimate it. (And the energies seems to converge nicely too.)

Another problem in the TPIC code is that the box volume is used to calculate the energies instead of the volume of the insertion sphere (which is constant and cancels out in the equation). This might give large errors if the box volume changes a lot due to pressure rescaling.

Ideas and comments are most welcome!

Best regards,
Daniel




More information about the gromacs.org_gmx-developers mailing list