Remove .tpa, .tpb, .tpx, .trj files. Part of #1500.
[alexxy/gromacs.git] / src / gromacs / fileio / gmxfio.c
index 3a38bf87f37c2319df0a5f4288a7c4615ea92454..24dbc9f54a26b3b2ef46c767432d48d5e749c27a 100644 (file)
@@ -86,51 +86,20 @@ static tMPI_Thread_mutex_t open_file_mutex = TMPI_THREAD_MUTEX_INITIALIZER;
 static const int ftpXDR[] =
 { efTPR, efTRR, efEDR, efXTC, efTNG, efMTX, efCPT };
 static const int ftpASC[] =
-{ efTPA, efGRO, efPDB };
+{ efGRO, efPDB, efG96 };
 static const int ftpBIN[] =
-{ efTPB, efTRJ, efTNG };
+{ efTNG };
 #ifdef HAVE_XML
 static const int ftpXML[] =
 {   efXML};
 #endif
 
-const char *itemstr[eitemNR] =
-{
-    "[header]", "[inputrec]", "[box]", "[topology]", "[coordinates]",
-    "[velocities]", "[forces]"
-};
-
 const char *eioNames[eioNR] =
 {
     "REAL", "INT", "GMX_STE_T", "UCHAR", "NUCHAR", "USHORT", "RVEC", "NRVEC",
     "IVEC", "STRING"
 };
 
-
-
-/* Comment strings for TPA only */
-const char *comment_str[eitemNR] = {
-    "; The header holds information on the number of atoms etc. and on whether\n"
-    "; certain items are present in the file or not.\n"
-    "; \n"
-    ";                             WARNING\n"
-    ";                   DO NOT EDIT THIS FILE BY HAND\n"
-    "; The GROMACS preprocessor performs a lot of checks on your input that\n"
-    "; you ignore when editing this. Your simulation may crash because of this\n",
-    "; The inputrec holds the parameters for MD such as the number of steps,\n"
-    "; the timestep and the cut-offs.\n",
-    "; The simulation box in nm.\n",
-    "; The topology section describes the topology of the molecules\n"
-    "; i.e. bonds, angles and dihedrals etc. and also holds the force field\n"
-    "; parameters.\n",
-    "; The atomic coordinates in nm\n",
-    "; The atomic velocities in nm/ps\n",
-    "; The forces on the atoms in nm/ps^2\n"
-};
-
-
-
-
 /******************************************************************
  *
  * Internal functions:
@@ -433,41 +402,34 @@ t_fileio *gmx_fio_open(const char *fn, const char *mode)
     gmx_bool  bRead, bReadWrite;
     int       xdrid;
 
-    if (fn2ftp(fn) == efTPA)
+    /* sanitize the mode string */
+    if (strncmp(mode, "r+", 2) == 0)
+    {
+        strcpy(newmode, "r+");
+    }
+    else if (mode[0] == 'r')
+    {
+        strcpy(newmode, "r");
+    }
+    else if (strncmp(mode, "w+", 2) == 0)
+    {
+        strcpy(newmode, "w+");
+    }
+    else if (mode[0] == 'w')
+    {
+        strcpy(newmode, "w");
+    }
+    else if (strncmp(mode, "a+", 2) == 0)
+    {
+        strcpy(newmode, "a+");
+    }
+    else if (mode[0] == 'a')
     {
-        strcpy(newmode, mode);
+        strcpy(newmode, "a");
     }
     else
     {
-        /* sanitize the mode string */
-        if (strncmp(mode, "r+", 2) == 0)
-        {
-            strcpy(newmode, "r+");
-        }
-        else if (mode[0] == 'r')
-        {
-            strcpy(newmode, "r");
-        }
-        else if (strncmp(mode, "w+", 2) == 0)
-        {
-            strcpy(newmode, "w+");
-        }
-        else if (mode[0] == 'w')
-        {
-            strcpy(newmode, "w");
-        }
-        else if (strncmp(mode, "a+", 2) == 0)
-        {
-            strcpy(newmode, "a+");
-        }
-        else if (mode[0] == 'a')
-        {
-            strcpy(newmode, "a");
-        }
-        else
-        {
-            gmx_fatal(FARGS, "DEATH HORROR in gmx_fio_open, mode is '%s'", mode);
-        }
+        gmx_fatal(FARGS, "DEATH HORROR in gmx_fio_open, mode is '%s'", mode);
     }
 
     /* Check if it should be opened as a binary file */
@@ -546,14 +508,6 @@ t_fileio *gmx_fio_open(const char *fn, const char *mode)
             gmx_fseek(fio->fp, 0, SEEK_END);
         }
     }
-    else
-    {
-        /* Use stdin/stdout for I/O */
-        fio->iFTP   = efTPA;
-        fio->fp     = bRead ? stdin : stdout;
-        fio->fn     = gmx_strdup("STDIO");
-        fio->bStdio = TRUE;
-    }
     fio->bRead             = bRead;
     fio->bReadWrite        = bReadWrite;
     fio->bDouble           = (sizeof(real) == sizeof(double));