[gmx-developers] difference in force index between gromacs 3.3 and gromacs 4.0.5

matthieu.chavent at free.fr matthieu.chavent at free.fr
Thu Sep 24 17:26:52 CEST 2009


Dear Gromacs Developpers, 

I try to adapt an Interactive Molecular Dynamics code for Gromacs 4.0.5. 

The function that gets some external forces was implemented in gromacs 3.3 in sim_util.c near the line 602:

if (bDoForces) {
    /* Compute forces due to electric field */
    calc_f_el(MASTER(cr) ? field : NULL,
	      start,homenr,mdatoms->chargeA,x,f,inputrec->ex,inputrec->et,t);
    
	  
    /* Communicate the forces */
    if (PAR(cr)) {
      wallcycle_start(wcycle,ewcMOVEF);
		
#added line here	
		gimd_ext_forces( step, cr, mdatoms, f );
	
#end added line
		
      if (DOMAINDECOMP(cr)) {
	dd_move_f(cr->dd,f,buf,fr->fshift);	  
		
	/* Position restraint do not introduce inter-cg forces */
	if (EEL_FULL(fr->eeltype) && cr->dd->n_intercg_excl)
	  dd_move_f(cr->dd,fr->f_novirsum,buf,NULL);
      } else {
	move_f(fplog,cr,GMX_LEFT,GMX_RIGHT,f,buf,nrnb);
	}
      wallcycle_stop(wcycle,ewcMOVEF);
    }
  }

This function works perfectly for Gromacs 3.3 single proc/mpi and for Gromacs 4.0.5 on a single proc. But it didn't work for Gromacs 4.0.5 in mpi... The problem seems to be, when I apply a force in the IMD (using VMD for the visualisation), sometimes I apply no forces on selected atom sometimes it can apply a force when I select an atom... I guess that is, may be, a problem of index (of the force or of the atoms on which we apply the force).  


So, I would like to have some advices/pieces of information, if it is possible, on the differences of force implementation between Gromacs 3.3 and Gromacs 4.0.5.  

Thank you in advance.

   
     Matthieu.

PS: I can detail the gimd_ext_forces if necessary. 







More information about the gromacs.org_gmx-developers mailing list