[AMBER-Developers] hook for modify of frc() array

From: Josh Berryman <the.real.josh.berryman.gmail.com>
Date: Tue, 3 May 2011 14:47:57 +0200

Hello Devs, I am writing a module which plugs into the amber code in the
following way:


I runmd I have this code:

call force(xx,ix,ih,ipairs,x,f,ener,ener%vir, &
               xx(l96),xx(l97),xx(l98),xx(l99), qsetup, &
               do_list_update,nstep) !call force() in the normal place

call c_ssti_forces( x, f, .... ) !modify the forces for nefarious
purposes

... the c_ssti_forces() function modifies the interactions; it is part of a
TI thing that I am trying out. In serial, this very simple scheme for
modifying the forces seems to work; but for more than one processor; I have
problems. The most simple function for c_ssti_forces() which gives
divergence is:

c_ssti_forces( f, istart, iend ){

   for(int i = istart - 1; i < iend; i++){
          f[istart*3] *= 0.5;
          f[istart*3] + 1 *= 0.5;
          f[istart*3] + 2 *= 0.5;
   }
   return();
}

The behaviour is odd: for serial, with istart = 1 and iend = natoms; this
stub function just damps the dynamics a bit, as you might hope. For
parallel (with various valued of istart and iend fished out of the code, eg
based on iparpt in the fsum function) the temperature blows up and the
simulation explodes. What is going on? How do I alter forces in a parallel
run? I get the same behaviour with the thermostat turned off or on.

Josh
_______________________________________________
AMBER-Developers mailing list
AMBER-Developers.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber-developers
Received on Tue May 03 2011 - 06:00:03 PDT
Custom Search