get total force on a group of atoms within GlobalMasterSMD

From: Liao Chen (Liao.Chen_at_utsa.edu)
Date: Sun Apr 11 2010 - 19:02:16 CDT

Hello!
 
I'm trying to adapt the source code of GloabalMasterSMD so that the pulling force depends upon the total force acting on the SMD group of atoms excerted by all other atoms of the system. Trying several ways all end up with either segmentation fault or null results. Your guidance for coding will be appreciated most gratefully. Below is what I tried:
 
AtomIDList::const_iterator f_a_i = getForceIdBegin();
AtomIDList::const_iterator f_a_e = getForceIdEnd();
ForceList::const_iterator f_i = getTotalForce();
Force f= 0;//to be equal to the negative of the total force on the group.
while(f_a_i != f_a_e){
f -= *f_i;
f_a_i++;
f_i++;
}
<mailto:namd-l_at_ks.uiuc.edu>

This archive was generated by hypermail 2.1.6 : Wed Feb 29 2012 - 15:54:00 CST