Moved ngmx to C++, renamed it to view.
[alexxy/gromacs.git] / src / programs / view / molps.cpp
similarity index 91%
rename from src/ngmx/molps.c
rename to src/programs/view/molps.cpp
index 736594e40420b1f18568060a39326991975b8b77..a2f851e79a3d1c776fbbcb8c528102c419352d56 100644 (file)
@@ -9,7 +9,7 @@
  *                        VERSION 3.2.0
  * Written by David van der Spoel, Erik Lindahl, Berk Hess, and others.
  * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
- * Copyright (c) 2001-2004, The GROMACS development team,
+ * Copyright (c) 2001-2013, The GROMACS development team,
  * check out http://www.gromacs.org for more information.
 
  * This program is free software; you can redistribute it and/or
@@ -78,7 +78,7 @@ static void init_pbc(matrix box)
     }
 }
 
-static gmx_bool local_pbc_dx(rvec x1, rvec x2)
+static bool local_pbc_dx(rvec x1, rvec x2)
 {
     int  i;
     real dx;
@@ -88,19 +88,19 @@ static gmx_bool local_pbc_dx(rvec x1, rvec x2)
         dx = x1[i]-x2[i];
         if (dx > gl_hbox[i])
         {
-            return FALSE;
+            return false;
         }
         else if (dx <= gl_mhbox[i])
         {
-            return FALSE;
+            return false;
         }
     }
-    return TRUE;
+    return true;
 }
 
 static void ps_draw_bond(t_psdata ps,
                          atom_id ai, atom_id aj, iv2 vec2[],
-                         rvec x[], char **atomnm[], int size[], gmx_bool bBalls)
+                         rvec x[], char **atomnm[], int size[], bool bBalls)
 {
     char    *ic, *jc;
     int      xi, yi, xj, yj;
@@ -142,14 +142,14 @@ static void ps_draw_bond(t_psdata ps,
 }
 
 void ps_draw_objects(t_psdata ps, int nobj, t_object objs[], iv2 vec2[], rvec x[],
-                     char **atomnm[], int size[], gmx_bool bShowHydro, int bond_type,
-                     gmx_bool bPlus)
+                     char **atomnm[], int size[], bool bShowHydro, int bond_type,
+                     bool bPlus)
 {
-    gmx_bool     bBalls;
+    bool         bBalls;
     int          i;
     t_object    *obj;
 
-    bBalls = FALSE;
+    bBalls = false;
     for (i = 0; (i < nobj); i++)
     {
         obj = &(objs[i]);
@@ -219,8 +219,6 @@ static void draw_box(t_psdata ps, t_3dview *view, matrix box,
 
 void ps_draw_mol(t_psdata ps, t_manager *man)
 {
-    static char tstr[2][20];
-    static int  ntime = 0;
     t_windata  *win;
     t_3dview   *view;
     t_molwin   *mw;
@@ -265,13 +263,6 @@ void ps_draw_mol(t_psdata ps, t_manager *man)
     /* Start drawing
        XClearWindow(x11->disp,win->self); */
 
-    /* Draw Time
-       sprintf(tstr[ntime],"Time: %.3 ps",man->time);
-       if (strcmp(tstr[ntime],tstr[1-ntime]) != 0) {
-       set_vbtime(x11,man->vbox,tstr[ntime]);
-       ntime=1-ntime;
-       }*/
-
     if (mw->boxtype != esbNone)
     {
         draw_box(ps, view, man->box, x0, y0, sx, sy);