mdrun-gpu now doesn't output individual energy term, only the totals.
authorRossen Apostolov <rossen@cbr.su.se>
Sat, 25 Sep 2010 12:21:52 +0000 (14:21 +0200)
committerRossen Apostolov <rossen@cbr.su.se>
Sat, 25 Sep 2010 12:21:52 +0000 (14:21 +0200)
Closes bug 568.

src/kernel/md_openmm.c
src/mdlib/mdebin.c

index 9305dcb460208b402a642bad6618c9c5576123a8..808f264259d6b9c1fa22721e7bb770117952871f 100644 (file)
@@ -526,7 +526,7 @@ double do_md_openmm(FILE *fplog,t_commrec *cr,int nfile,const t_filenm fnm[],
 
             openmm_copy_state(openmmData, state, &t, f, enerd, bX, bV, bF, do_ene);
 
-            upd_mdebin(mdebin, FALSE,TRUE,
+            upd_mdebin(mdebin,FALSE,FALSE,
                        t,mdatoms->tmass,enerd,state,lastbox,
                        shake_vir,force_vir,total_vir,pres,
                        ekind,mu_tot,constr);
index 8d8987a43d360a45951b65bd79622ee6cace09b4..70833bccf8ce19202fac3cb7d65ff122cd440ad4 100644 (file)
@@ -179,7 +179,9 @@ t_mdebin *init_mdebin(ener_file_t fp_ene,
         md->bEInd[i]=FALSE;
     }
 
-    for(i=0; i<F_NRE; i++) {
+#ifndef GMX_OPENMM
+    for(i=0; i<F_NRE; i++)
+    {
         md->bEner[i] = FALSE;
         if (i == F_LJ)
             md->bEner[i] = !bBHAM;
@@ -238,6 +240,13 @@ t_mdebin *init_mdebin(ener_file_t fp_ene,
         else
             md->bEner[i] = (gmx_mtop_ftype_count(mtop,i) > 0);
     }
+#else
+    /* OpenMM always produces only the following 4 energy terms */
+    md->bEner[F_EPOT] = TRUE;
+    md->bEner[F_EKIN] = TRUE;
+    md->bEner[F_ETOT] = TRUE;
+    md->bEner[F_TEMP] = TRUE;
+#endif
 
     md->f_nre=0;
     for(i=0; i<F_NRE; i++)