\tt conf & \tt esp & Asc & \tt -c & Coordinate file in ESPResSo format \\[-0.1ex]
\tt conf & \tt g96 & Asc & \tt -c & Coordinate file in Gromos-96 format \\[-0.1ex]
\tt conf & \tt gro & Asc & \tt -c & Coordinate file in Gromos-87 format \\[-0.1ex]
-\tt conf & \tt gro & & \tt -c & Structure: \tt gro g96 pdb esp tpr tpb tpa \\[-0.1ex]
+\tt conf & \tt gro & & \tt -c & Structure: \tt gro g96 pdb esp tpr \\[-0.1ex]
\tt out & \tt gro & & \tt -o & Structure: \tt gro g96 pdb esp \\[-0.1ex]
\tt polar & \tt hdb & Asc & \tt & Hydrogen data base \\[-0.1ex]
\tt topinc & \tt itp & Asc & \tt & Include file for topology \\[-0.1ex]
\tt residue & \tt rtp & Asc & \tt & Residue Type file used by {\tt pdb2gmx} \\[-0.1ex]
\tt doc & \tt tex & Asc & \tt -o & LaTeX file \\[-0.1ex]
\tt topol & \tt top & Asc & \tt -p & Topology file \\[-0.1ex]
-\tt topol & \tt tpb & Bin & \tt -s & Binary run input file \\[-0.1ex]
-\tt topol & \tt tpr & & \tt -s & Generic run input: \tt tpr tpb tpa \\[-0.1ex]
-\tt topol & \tt tpr & & \tt -s & Structure+mass(db): \tt tpr tpb tpa gro g96 pdb \\[-0.1ex]
+\tt topol & \tt tpr & & \tt -s & Generic run input: \tt tpr \\[-0.1ex]
+\tt topol & \tt tpr & & \tt -s & Structure+mass(db): \tt tpr gro g96 pdb \\[-0.1ex]
\tt topol & \tt tpr & xdr & \tt -s & Portable xdr run input file \\[-0.1ex]
-\tt traj & \tt trj & Bin & \tt & Trajectory file (architecture specific) \\[-0.1ex]
-\tt traj & \tt trr & & \tt & Full precision trajectory: \tt trr trj cpt \\[-0.1ex]
+\tt traj & \tt trr & & \tt & Full precision trajectory: \tt trr cpt \\[-0.1ex]
\tt traj & \tt trr & xdr & \tt & Trajectory in portable xdr format \\[-0.1ex]
\tt root & \tt xpm & Asc & \tt & X PixMap compatible matrix file \\[-0.1ex]
-\tt traj & \tt xtc & & \tt -f & Trajec., input: \tt xtc trr trj cpt gro g96 pdb \\[-0.1ex]
-\tt traj & \tt xtc & & \tt -f & Trajectory, output: \tt xtc trr trj gro g96 pdb \\[-0.1ex]
+\tt traj & \tt xtc & & \tt -f & Trajec., input: \tt xtc trr cpt gro g96 pdb \\[-0.1ex]
+\tt traj & \tt xtc & & \tt -f & Trajectory, output: \tt xtc trr gro g96 pdb \\[-0.1ex]
\tt traj & \tt xtc & xdr & \tt & Compressed trajectory (portable xdr format) \\[-0.1ex]
\tt graph & \tt xvg & Asc & \tt -o & xvgr/xmgr file \\[-0.1ex]
\dline
% LocalWords: lccX atomtp atp Asc Atomtype pdb gmx eiwit brk Brookhaven cpt tm
% LocalWords: xdr nnnice dat dlg ngmx sam edi edo ener edr ene ent eps conf ss
-% LocalWords: PostScript ESPResSo gtraj Gromos gro tpr tpb tpa hdb topinc itp
-% LocalWords: grompp mdp mtx ndx rtp tex LaTeX topol traj trj trr xpm PixMap
+% LocalWords: PostScript ESPResSo gtraj Gromos gro tpr hdb topinc itp
+% LocalWords: grompp mdp mtx ndx rtp tex LaTeX topol traj trr xpm PixMap
% LocalWords: xtc Trajec xvg xvgr xmgr ps
tex
top
tng
-tpa
-tpb
tpr
-trj
trr
xpm
xtc
<dt><b>Generic structure formats:</b>
<a href="gro.html">gro</a>,
<a href="g96.html">g96</a>,
-<a href="pdb.html">pdb</a>,
-<a href="tpr.html">tpr</a>,
-<a href="tpb.html">tpb</a> or
-<a href="tpa.html">tpa</a>
+<a href="pdb.html">pdb</a>, or
+<a href="tpr.html">tpr</a>
<dt><b>Structure+mass(db):</b>
<a href="tpr.html">tpr</a>,
-<a href="tpb.html">tpb</a>,
-<a href="tpa.html">tpa</a>,
<a href="gro.html">gro</a>,
<a href="g96.html">g96</a> or
<a href="pdb.html">pdb</a>.
<dd><dl compact>
<dt><a href="tpr.html">tpr</a> <dd>system topology, parameters, coordinates
and velocities (binary, portable)
-<dt><a href="tpa.html">tpa</a> <dd>system topology, parameters, coordinates
-and velocities (ascii)
-<dt><a href="tpb.html">tpb</a> <dd>system topology, parameters, coordinates
-and velocities (binary)
<dt><b>Generic run input file formats:</b>
-<a href="tpr.html">tpr</a>,
-<a href="tpb.html">tpb</a> or
-<a href="tpa.html">tpa</a>
+<a href="tpr.html">tpr</a>
</dl>
<br><dt><h3>Trajectory files</h3>
<dd><dl compact>
<dt><a href="tng.html">tng</a> <dd>Any kind of data (compressed, portable, any precision)
-<dt><a href="trj.html">trj</a> <dd>x, v and f (binary, full precision)
<dt><a href="trr.html">trr</a> <dd>x, v and f (binary, full precision, portable)
<dt><a href="xtc.html">xtc</a> <dd>x only (compressed, portable, any precision)
<dt><a href="gro.html">gro</a> <dd>x and v (ascii, any precision)
<dt><a href="g96.html">g96</a> <dd>x only (ascii, fixed high precision)
<dt><a href="pdb.html">pdb</a> <dd>x only (ascii, reduced precision)
<dt><b>Formats for full-precision data:</b>
-<a href="tng.html">tng</a>,
-<a href="trr.html">trr</a> or
-<a href="trj.html">trj</a>
+<a href="tng.html">tng</a> or
+<a href="trr.html">trr</a>
<dt><b>Generic trajectory formats:</b>
<a href="tng.html">tng</a>,
<a href="xtc.html">xtc</a>,
<a href="trr.html">trr</a>,
-<a href="trj.html">trj</a>,
<a href="gro.html">gro</a>,
<a href="g96.html">g96</a>,
<a href="pdb.html">pdb</a> or
The next step is to combine the molecular structure (<TT><a href="gro.html">.gro</a></TT> file),
topology (<TT><a href="top.html">.top</a></TT> file) MD-parameters (<TT><a href="mdp_opt.html">.mdp</a></TT> file) and
(optionally) the
-index file (<TT><a href="ndx.html">ndx</a></TT>) to generate a run input file (<TT><a href="tpr.html">.tpr</a></tt> extension or
-<TT><a href="tpb.html">.tpb</a></tt> if you don't have XDR).
+index file (<TT><a href="ndx.html">ndx</a></TT>) to generate a run input file (<TT><a href="tpr.html">.tpr</a></tt> extension.
This file contains all information needed to start a simulation with GROMACS.
The
<a href="../programs/gmx-grompp.html">gmx grompp</a> program processes all
is the run input file (<TT><a href="tpr.html">.tpr</a></TT> file).
The output files of
<TT><a href="../programs/gmx-mdrun.html">gmx mdrun</a></TT> are the
-trajectory file (<TT><a href="trr.html">.trr</a></TT> file
-or <TT><a href="trj.html">.trj</a></TT> if you don't have XDR) and a logfile (
+trajectory file (<TT><a href="trr.html">.trr</a></TT> file) and a logfile (
<TT><a href="log.html">.log</A></TT> file).
<P></P>
<title>mtx file format</title>
<H3>Description</H3>
Files with the mtx file extension contain a matrix.
-The file format is identical to the <a href="trj.html">trj</a> format.
+The file format is identical to the <a href="trr.html">trr</a> format.
Currently this file format is only used for hessian matrices,
which are produced with <a href="../programs/gmx-mdrun.html">gmx mdrun</a> and read by
<a href="../programs/gmx-nmeig.html">gmx nmeig</a>.
<LI>
All GROMACS programs can read compressed or g-zipped files. There
might be a problem with reading compressed <tt>.xtc</tt>,
-<tt>.trr</tt> and <tt>.trj</tt> files, but these will not compress
+<tt>.trr</tt> files, but these will not compress
very well anyway.
<P>
<LI>
<H3>Description</H3>
The top file extension stands for topology. It is an ascii file which is
read by <a href="../programs/gmx-grompp.html">gmx grompp</a> which processes it
-and creates a binary topology (<a href="tpb.html">.tpb file</a>).<br>
+and creates a binary topology (<a href="tpr.html">.tpr file</a>).<br>
A sample file is included below:
<pre>
;
+++ /dev/null
-<title>tpa file format</title>
-<H3>Description</H3>
-The tpa file extension stands for binary run input file. This file contains
-the starting structure of your simulation, The molecular topology and
-all the simulation data. Because this file is in binary format it
-cannot be read with a normal editor. To read a binary run input file type:
-<PRE>
-% <a href="../programs/gmx-dump.html">gmx dump</a> -s topol.tpa
-</PRE>
-or if you're not such a fast reader:
-<PRE>
-% gmxdump -s topol.tpa | more
-</PRE>
-
-<p>
-You can also compare two tpa files using:
-<pre>
-% <a href="../programs/gmx-check.html">gmx check</a> -s1 top1 -s2 top2 | more
-</pre>
+++ /dev/null
-<title>tpb file format</title>
-<h3>Description</h3>
-The tpb file extension stands for binary run input file. This file contains
-the starting structure of your simulation, The molecular topology and
-all the simulation data. Because this file is in binary format it
-cannot be read with a normal editor. To read a binary run input file type:
-<PRE>
-% <a href="../programs/gmx-dump.html">gmx dump</a> -s topol.tpb
-</PRE>
-or if you're not such a fast reader:
-<PRE>
-% gmxdump -s topol.tpb | more
-</PRE>
-
-<p>
-You can also compare two tpb files using:
-<pre>
-% <a href="../programs/gmx-check.html">gmx check</a> -s1 top1 -s2 top2 | more
-</pre>
+++ /dev/null
-<title>trj file format</title>
-<h3>Description</h3>
-Files with the trj file extension contain the trajectory of a simulation.
-In this file all the coordinates, velocities, forces and energies are
-printed as you told GROMACS in your mdp file. This file is in binary
-format an can be read with <a href="../programs/gmx-dump.html">gmx dump</a>.
-<PRE>
-% <a href="../programs/gmx-dump.html">gmx dump</a> -f traj.trj
-</PRE>
-or if you're not such a fast reader:
-<PRE>
-% gmxdump -f traj.trj | more
-</PRE>
-
-<p>
-You can also get a quick look in the contents of the file (number of
-frames etc.) using:
-<PRE>
-% <a href="../programs/gmx-check.html">gmx check</a> -f traj.trj
-</PRE>
int main(int argc,char *argv[])
{
static char *desc[] = {
- "[TT]gmxdump[tt] reads a run input file ([TT].tpa[tt]/[TT].tpr[tt]/[TT].tpb[tt]),",
- "a trajectory ([TT].trj[tt]/[TT].trr[tt]/[TT].xtc[tt]) or an energy",
- "file ([TT].ene[tt]/[TT].edr[tt]) and prints that to standard",
+ "[TT]gmxdump[tt] reads a run input file ([TT].tpr[tt]),",
+ "a trajectory ([TT].trr[tt]/[TT].xtc[tt]) or an energy",
+ "file ([TT].edr[tt]) and prints that to standard",
"output in a readable format. This program is essential for",
"checking your run input file in case of problems.[PAR]"
};
{
t_filenm fnm[] = {
{ efTRX, "-f1", NULL, ffREAD },
- { efTPX, "-f2", "foo", ffREAD },
+ { efSTO, "-f2", "foo", ffREAD },
{ efTRX, "-f3", NULL, ffREAD },
{ efSTX, "-f4", NULL, ffREAD }
};
args_.append("test");
std::string expected1 = addFileArg("-f1", "1.trr", efNoExtension);
- std::string expected2 = addFileArg("-f2", ".tpa", efEmptyValue);
+ std::string expected2 = addFileArg("-f2", ".pdb", efEmptyValue);
std::string expected3 = addFileArg("-f3", ".trr", efEmptyValue);
std::string expected4 = addFileArg(NULL, ".pdb", efEmptyValue);
std::string deffnm = gmx::Path::stripExtension(expected3);
Options to specify input and output files:
-f [<.xtc/.trr/...>] (path/to/long/trajectory/name.xtc) (Input)
- File name option with a long value: xtc trr cpt trj gro g96 pdb tng
+ File name option with a long value: xtc trr cpt gro g96 pdb tng
-f2 [<.xtc/.trr/...>] (path/to/long/trajectory.xtc) (Input)
- File name option with a long value: xtc trr cpt trj gro g96 pdb tng
+ File name option with a long value: xtc trr cpt gro g96 pdb tng
-lib [<.xtc/.trr/...>] (path/to/long/trajectory/name.xtc) (Input, Opt., Lib.)
- File name option with a long value and type: xtc trr cpt trj gro g96 pdb
- tng
+ File name option with a long value and type: xtc trr cpt gro g96 pdb tng
-longfileopt [<.dat>] (deffile.dat) (Input, Opt.)
File name option with a long name
-longfileopt2 [<.dat>] (path/to/long/file/name.dat) (Input, Opt., Lib.)
Options to specify input and output files:
-f [<.xtc/.trr/...>] (traj.xtc) (Input)
- Input file description: xtc trr cpt trj gro g96 pdb tng
+ Input file description: xtc trr cpt gro g96 pdb tng
-mult [<.xtc/.trr/...> [...]] (traj.xtc) (Input, Opt.)
- Multiple file description: xtc trr cpt trj gro g96 pdb tng
+ Multiple file description: xtc trr cpt gro g96 pdb tng
-lib [<.dat>] (libdata.dat) (Input, Opt., Lib.) Library file description
-io [<.dat>] (inout.dat) (In/Out, Opt.) Input/Output file description
-o <.xvg> (Output, Opt.) Output file description
gmx_fio_fclose(out);
break;
case efTPR:
- case efTPB:
- case efTPA:
gmx_fatal(FARGS, "Sorry, can not write a topology to %s", outfile);
break;
default:
gmx_fio_fclose(out);
break;
case efTPR:
- case efTPB:
- case efTPA:
gmx_fatal(FARGS, "Sorry, can not write a topology to %s", outfile);
break;
default:
case efESP:
*natoms = get_espresso_coordnum(infile);
break;
- case efTPA:
- case efTPB:
case efTPR:
{
t_tpxheader tpx;
read_espresso_conf(infile, atoms, x, v, box);
break;
case efTPR:
- case efTPB:
- case efTPA:
snew(mtop, 1);
i = read_tpx(infile, NULL, box, &natoms, x, v, NULL, mtop);
if (ePBC)
#ifdef USE_XDR
efXTC, efTRR, efCPT,
#endif
- efTRJ, efGRO, efG96, efPDB, efTNG
+ efGRO, efG96, efPDB, efTNG
};
#define NTRXS asize(trxs)
#ifdef USE_XDR
efXTC, efTRR,
#endif
- efTRJ, efGRO, efG96, efPDB, efTNG
+ efGRO, efG96, efPDB, efTNG
};
#define NTROS asize(tros)
#ifdef USE_XDR
efTRR, efCPT,
#endif
- efTRJ, efTNG
+ efTNG
};
#define NTRNS asize(trns)
static const int stxs[] =
{
- efGRO, efG96, efPDB, efBRK, efENT, efESP,
+ efGRO, efG96, efPDB, efBRK, efENT, efESP
#ifdef USE_XDR
- efTPR,
+ , efTPR
#endif
- efTPB, efTPA
};
#define NSTXS asize(stxs)
-static const int tpxs[] =
-{
-#ifdef USE_XDR
- efTPR,
-#endif
- efTPB, efTPA
-};
-#define NTPXS asize(tpxs)
-
static const int tpss[] =
{
#ifdef USE_XDR
efTPR,
#endif
- efTPB, efTPA, efGRO, efG96, efPDB, efBRK, efENT
+ efGRO, efG96, efPDB, efBRK, efENT
};
#define NTPSS asize(tpss)
{ eftGEN, ".???", "traj", NULL,
"Full precision trajectory", NTRNS, trns },
{ eftXDR, ".trr", "traj", NULL, "Trajectory in portable xdr format" },
- { eftBIN, ".trj", "traj", NULL, "Trajectory file (architecture specific)" },
{ eftGEN, ".???", "traj_comp", NULL,
"Compressed trajectory (tng format or portable xdr format)", NTRCOMPRESSED, trcompressed},
{ eftXDR, ".xtc", "traj", NULL,
{ eftASC, ".ndx", "index", "-n", "Index file", },
{ eftASC, ".top", "topol", "-p", "Topology file"},
{ eftASC, ".itp", "topinc", NULL, "Include file for topology"},
- { eftGEN, ".???", "topol", "-s", "Run input file", NTPXS, tpxs },
{ eftGEN, ".???", "topol", "-s", "Structure+mass(db)", NTPSS, tpss },
{ eftXDR, ".tpr", "topol", "-s", "Portable xdr run input file"},
- { eftASC, ".tpa", "topol", "-s", "Ascii run input file"},
- { eftBIN, ".tpb", "topol", "-s", "Binary run input file"},
{ eftASC, ".tex", "doc", "-o", "LaTeX file"},
{ eftASC, ".rtp", "residue", NULL, "Residue Type file used by pdb2gmx" },
{ eftASC, ".atp", "atomtp", NULL, "Atomtype file used by pdb2gmx" },
return "sto";
case efSTX:
return "stx";
- case efTPX:
- return "tpx";
case efTPS:
return "tps";
default:
/* this enum should correspond to the array deffile in gmxlib/filenm.c */
enum {
efMDP,
- efTRX, efTRO, efTRN, efTRR, efTRJ, efCOMPRESSED, efXTC, efTNG,
+ efTRX, efTRO, efTRN, efTRR, efCOMPRESSED, efXTC, efTNG,
efEDR,
efSTX, efSTO, efGRO, efG96, efPDB, efBRK, efENT, efESP, efPQR,
efCPT,
efLOG, efXVG, efOUT,
efNDX,
efTOP, efITP,
- efTPX, efTPS, efTPR, efTPA, efTPB,
+ efTPS, efTPR,
efTEX, efRTP, efATP, efHDB,
efDAT, efDLG,
efMAP, efEPS, efMAT, efM2P,
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:
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 */
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));
typedef struct t_fileio t_fileio;
-extern const char *itemstr[eitemNR];
-extern const char *comment_str[eitemNR];
-
/* NOTE ABOUT THREAD SAFETY:
The functions are all thread-safe, provided that two threads don't
t_fileio *gmx_fio_open(const char *fn, const char *mode);
/* Open a new file for reading or writing.
* The file type will be deduced from the file name.
- * If fn is NULL, stdin / stdout will be used for Ascii I/O (TPA type)
- * mode may be "r", "w", or "a". You should append a "b" to the mode
- * if you are writing a binary file, but the routine will also
- * doublecheck it and try to do it if you forgot. This has no effect on
- * unix, but is important on windows.
*/
int gmx_fio_close(t_fileio *fp);
***************************************************/
void gmx_fio_rewind(t_fileio *fio);
-/* Rewind the tpa file in fio */
+/* Rewind the file in fio */
int gmx_fio_flush(t_fileio *fio);
/* Flush the fio, returns 0 on success */
/* Needed for backward compatibility */
#define MAXNODES 256
-static void _do_section(t_fileio *fio, int key, gmx_bool bRead, const char *src,
- int line)
-{
- char buf[STRLEN];
- gmx_bool bDbg;
-
- if (gmx_fio_getftp(fio) == efTPA)
- {
- if (!bRead)
- {
- gmx_fio_write_string(fio, itemstr[key]);
- bDbg = gmx_fio_getdebug(fio);
- gmx_fio_setdebug(fio, FALSE);
- gmx_fio_write_string(fio, comment_str[key]);
- gmx_fio_setdebug(fio, bDbg);
- }
- else
- {
- if (gmx_fio_getdebug(fio))
- {
- fprintf(stderr, "Looking for section %s (%s, %d)",
- itemstr[key], src, line);
- }
-
- do
- {
- gmx_fio_do_string(fio, buf);
- }
- while ((gmx_strcasecmp(buf, itemstr[key]) != 0));
-
- if (gmx_strcasecmp(buf, itemstr[key]) != 0)
- {
- gmx_fatal(FARGS, "\nCould not find section heading %s", itemstr[key]);
- }
- else if (gmx_fio_getdebug(fio))
- {
- fprintf(stderr, " and found it\n");
- }
- }
- }
-}
-
-#define do_section(fio, key, bRead) _do_section(fio, key, bRead, __FILE__, __LINE__)
-
/**************************************************************
*
* Now the higer level routines that do io of the structures and arrays
gmx_fio_checktype(fio);
gmx_fio_setdebug(fio, bDebugMode());
- /* NEW! XDR tpb file */
+ /* XDR binary topology file */
precision = sizeof(real);
if (bRead)
{
gmx_fio_getname(fio), fver, tpx_version);
}
- do_section(fio, eitemHEADER, bRead);
gmx_fio_do_int(fio, tpx->natoms);
if (fver >= 28)
{
#define do_test(fio, b, p) if (bRead && (p != NULL) && !b) gmx_fatal(FARGS, "No %s in %s",#p, gmx_fio_getname(fio))
do_test(fio, tpx.bBox, state->box);
- do_section(fio, eitemBOX, bRead);
if (tpx.bBox)
{
gmx_fio_ndo_rvec(fio, state->box, DIM);
if (file_version < 26)
{
do_test(fio, tpx.bIr, ir);
- do_section(fio, eitemIR, bRead);
if (tpx.bIr)
{
if (ir)
}
do_test(fio, tpx.bTop, mtop);
- do_section(fio, eitemTOP, bRead);
if (tpx.bTop)
{
if (mtop)
}
}
do_test(fio, tpx.bX, state->x);
- do_section(fio, eitemX, bRead);
if (tpx.bX)
{
if (bRead)
}
do_test(fio, tpx.bV, state->v);
- do_section(fio, eitemV, bRead);
if (tpx.bV)
{
if (bRead)
}
do_test(fio, tpx.bF, f);
- do_section(fio, eitemF, bRead);
if (tpx.bF)
{
gmx_fio_ndo_rvec(fio, f, state->natoms);
if (file_version >= 26)
{
do_test(fio, tpx.bIr, ir);
- do_section(fio, eitemIR, bRead);
if (tpx.bIr)
{
if (file_version >= 53)
gmx_bool fn2bTPX(const char *file)
{
- switch (fn2ftp(file))
- {
- case efTPR:
- case efTPB:
- case efTPA:
- return TRUE;
- default:
- return FALSE;
- }
+ return (efTPR == fn2ftp(file));
}
static void done_gmx_groups_t(gmx_groups_t *g)
* These routines handle reading and writing of preprocessed
* topology files in any of the following formats:
* TPR : topology in XDR format, portable accross platforms
- * TPB : binary topology, not portable accross platforms
- * TPA : ascii topology (possibbly huge)
* TRR : trajectory in XDR format (non compressed)
- * TRJ : trajectory in binary format
*
* Files are written in the precision with which the source are compiled,
* but double and single precision can be read by either.
void write_tpx_state(const char *fn,
t_inputrec *ir, t_state *state, struct gmx_mtop_t *mtop);
/* Write a file, and close it again.
- * If fn == NULL, an efTPA file will be written to stdout (which
- * will not be closed afterwards)
*/
void read_tpx_state(const char *fn,
t_inputrec *ir, matrix box, int *natoms,
rvec *x, rvec *v, rvec *f, struct gmx_mtop_t *mtop);
/* Read a file, and close it again.
- * If fn == NULL, an efTPA file will be read from stdin (which
- * will not be closed afterwards)
* When step, t or lambda are NULL they will not be stored.
* Returns ir->ePBC, if it could be read from the file.
*/
/**************************************************************
*
- * These routines handle trj (trajectory) I/O, they read and
- * write trj/trr files. The routines should be able to read single
+ * These routines handle trr (trajectory) I/O, they read and
+ * write trr files. The routines should be able to read single
* and double precision files without the user noting it.
* The files are backward compatible, therefore the header holds
* some unused variables.
} t_trnheader;
t_fileio *open_trn(const char *fn, const char *mode);
-/* Open a trj / trr file */
+/* Open a trr / trr file */
void close_trn(t_fileio *fio);
/* Close it */
switch (ftp)
{
- case efTRJ:
case efTRR:
case efTNG:
break;
switch (ftp)
{
- case efTRJ:
case efTRR:
case efTNG:
if (fr->bV)
case efXTC:
write_xtc(status->fio, nind, fr->step, fr->time, fr->box, xout, prec);
break;
- case efTRJ:
case efTRR:
fwrite_trn(status->fio, nframes_read(status),
fr->time, fr->step, fr->box, nind, xout, vout, fout);
switch (ftp)
{
- case efTRN:
- case efTRJ:
case efTRR:
case efTNG:
if (vout)
switch (gmx_fio_getftp(status->fio))
{
- case efTRJ:
case efTRR:
break;
default:
case efXTC:
write_xtc(status->fio, fr->natoms, fr->step, fr->time, fr->box, fr->x, prec);
break;
- case efTRJ:
case efTRR:
fwrite_trn(status->fio, fr->step, fr->time, fr->lambda, fr->box, fr->natoms,
fr->bX ? fr->x : NULL, fr->bV ? fr->v : NULL, fr->bF ? fr->f : NULL);
}
switch (ftp)
{
- case efTRJ:
case efTRR:
bRet = gmx_next_frame(status, fr);
break;
}
switch (ftp)
{
- case efTRJ:
case efTRR:
break;
case efCPT:
struct t_trxframe *fr);
void close_trx(t_trxstatus *status);
-/* Close trj file as opened with read_first_x, read_frist_frame
+/* Close trajectory file as opened with read_first_x, read_frist_frame
* or open_trx. Identical to close_trj.
*/
*/
void close_trj(t_trxstatus *status);
-/* Close trj file as opened with read_first_x, read_frist_frame
+/* Close trajectory file as opened with read_first_x, read_first_frame
* or open_trx. Identical to close_trx.
*/
void rewind_trj(t_trxstatus *status);
-/* Rewind trj file as opened with read_first_x */
+/* Rewind trajectory file as opened with read_first_x */
struct t_topology *read_top(const char *fn, int *ePBC);
/* Extract a topology data structure from a topology file.
t_filenm fnm[] = { /* files for g_density */
{ efTRX, "-f", NULL, ffREAD },
{ efNDX, NULL, NULL, ffOPTRD },
- { efTPX, NULL, NULL, ffREAD },
+ { efTPR, NULL, NULL, ffREAD },
{ efDAT, "-ei", "electrons", ffOPTRD }, /* file with nr. of electrons */
{ efXVG, "-o", "density", ffWRITE },
};
/* Calculate axis */
axis = toupper(axtitle[0]) - 'X';
- top = read_top(ftp2fn(efTPX, NFILE, fnm), &ePBC); /* read topology file */
+ top = read_top(ftp2fn(efTPR, NFILE, fnm), &ePBC); /* read topology file */
if (dens_opt[0][0] == 'n')
{
for (i = 0; (i < top->atoms.nr); i++)
t_filenm fnm[] = {
- { efTPX, "-s", NULL, ffREAD }, /* this is for the topology */
+ { efTPR, "-s", NULL, ffREAD }, /* this is for the topology */
{ efTRX, "-f", NULL, ffREAD }, /* and this for the trajectory */
{ efNDX, "-n", NULL, ffREAD}, /* this is to select groups */
{ efDAT, "-o", "Density4D", ffOPTWR}, /* This is for outputting the entire 4D densityfield in binary format */
bRawOut = opt2bSet("-or", NFILE, fnm);
bGraph = opt2bSet("-og", NFILE, fnm);
bOut = opt2bSet("-o", NFILE, fnm);
- top = read_top(ftp2fn(efTPX, NFILE, fnm), &ePBC);
+ top = read_top(ftp2fn(efTPR, NFILE, fnm), &ePBC);
snew(grpname, 1);
snew(index, 1);
snew(ngx, 1);
t_filenm fnm[] = {
{ efEDR, "-en", NULL, ffOPTRD },
{ efTRX, "-f", NULL, ffREAD },
- { efTPX, NULL, NULL, ffREAD },
+ { efTPR, NULL, NULL, ffREAD },
{ efNDX, NULL, NULL, ffOPTRD },
{ efXVG, "-o", "Mtot", ffWRITE },
{ efXVG, "-eps", "epsilon", ffWRITE },
}
snew(top, 1);
- ePBC = read_tpx_top(ftp2fn(efTPX, NFILE, fnm), NULL, box,
+ ePBC = read_tpx_top(ftp2fn(efTPR, NFILE, fnm), NULL, box,
&natoms, NULL, NULL, NULL, top);
snew(gnx, ncos);
gmx_rmpbc_t gpbc = NULL;
t_filenm fnm[] = {
- { efTPX, NULL, NULL, ffREAD },
+ { efTPR, NULL, NULL, ffREAD },
{ efTRX, "-f", NULL, ffREAD },
{ efXVG, "-ds", "drsum", ffWRITE },
{ efXVG, "-da", "draver", ffWRITE },
init5(ntop);
}
- read_tpxheader(ftp2fn(efTPX, NFILE, fnm), &header, FALSE, NULL, NULL);
+ read_tpxheader(ftp2fn(efTPR, NFILE, fnm), &header, FALSE, NULL, NULL);
snew(xtop, header.natoms);
- read_tpx(ftp2fn(efTPX, NFILE, fnm), &ir, box, &ntopatoms, xtop, NULL, NULL, &mtop);
+ read_tpx(ftp2fn(efTPR, NFILE, fnm), &ir, box, &ntopatoms, xtop, NULL, NULL, &mtop);
bPDB = opt2bSet("-q", NFILE, fnm);
if (bPDB)
{
t_filenm fnm[] = {
{ efTRN, "-f", NULL, ffREAD },
- { efTPX, "-s", NULL, ffREAD },
+ { efTPR, "-s", NULL, ffREAD },
{ efNDX, NULL, NULL, ffOPTRD },
{ efXVG, "-vacf", "vacf", ffWRITE },
{ efXVG, "-mvacf", "mvacf", ffWRITE },
please_cite(fplog, "Pascal2011a");
please_cite(fplog, "Caleman2011b");
- read_tps_conf(ftp2fn(efTPX, NFILE, fnm), title, &top, &ePBC, NULL, NULL, box,
+ read_tps_conf(ftp2fn(efTPR, NFILE, fnm), title, &top, &ePBC, NULL, NULL, box,
TRUE);
V = det(box);
tmass = 0;
gmx_fatal(FARGS, "Output file should be a .pdb file"
" when using the -grasp option\n");
}
- if ((bMead || bGrasp) && !((fn2ftp(infile) == efTPR) ||
- (fn2ftp(infile) == efTPA) ||
- (fn2ftp(infile) == efTPB)))
+ if ((bMead || bGrasp) && (fn2ftp(infile) != efTPR))
{
- gmx_fatal(FARGS, "Input file should be a .tp[abr] file"
+ gmx_fatal(FARGS, "Input file should be a .tpr file"
" when using the -mead option\n");
}
t_filenm fnm[] = {
{ efEDR, "-f", NULL, ffREAD },
{ efEDR, "-f2", NULL, ffOPTRD },
- { efTPX, "-s", NULL, ffOPTRD },
+ { efTPR, "-s", NULL, ffOPTRD },
{ efXVG, "-o", "energy", ffWRITE },
{ efXVG, "-viol", "violaver", ffOPTWR },
{ efXVG, "-pairs", "pairs", ffOPTWR },
if (bORIRE || bOTEN)
{
- get_orires_parms(ftp2fn(efTPX, NFILE, fnm), &nor, &nex, &or_label, &oobs);
+ get_orires_parms(ftp2fn(efTPR, NFILE, fnm), &nor, &nex, &or_label, &oobs);
}
if (bORIRE)
}
else if (bDisRe)
{
- nbounds = get_bounds(ftp2fn(efTPX, NFILE, fnm), &bounds, &index, &pair, &npairs,
+ nbounds = get_bounds(ftp2fn(efTPR, NFILE, fnm), &bounds, &index, &pair, &npairs,
&mtop, &top, &ir);
snew(violaver, npairs);
out = xvgropen(opt2fn("-o", NFILE, fnm), "Sum of Violations",
}
else if (bDHDL)
{
- get_dhdl_parms(ftp2fn(efTPX, NFILE, fnm), &ir);
+ get_dhdl_parms(ftp2fn(efTPR, NFILE, fnm), &ir);
}
/* Initiate energies and set them to zero */
output_env_t oenv;
gmx_rng_t rng;
t_filenm fnm[] = {
- { efTPX, NULL, NULL, ffREAD },
+ { efTPR, NULL, NULL, ffREAD },
{ efNDX, NULL, NULL, ffOPTRD },
{ efSTO, "-o", NULL, ffWRITE },
{ efTOP, "-p", "topol", ffOPTRW }
}
/* Read atom positions and charges */
- read_tps_conf(ftp2fn(efTPX, NFILE, fnm), title, &top, &ePBC, &x, &v, box, FALSE);
+ read_tps_conf(ftp2fn(efTPR, NFILE, fnm), title, &top, &ePBC, &x, &v, box, FALSE);
atoms = top.atoms;
/* Compute total charge */
{ efTRX, "-f", NULL, ffREAD }, /* trajectory file */
{ efNDX, NULL, NULL, ffREAD }, /* index file */
{ efNDX, "-nm", NULL, ffOPTRD }, /* index with micelle atoms */
- { efTPX, NULL, NULL, ffREAD }, /* topology file */
+ { efTPR, NULL, NULL, ffREAD }, /* topology file */
{ efXVG, "-o", "order", ffWRITE }, /* xvgr output file */
};
}
bMicel = opt2bSet("-nm", NFILE, fnm);
- top = read_top(ftp2fn(efTPX, NFILE, fnm), &ePBC); /* read topology file */
+ top = read_top(ftp2fn(efTPR, NFILE, fnm), &ePBC); /* read topology file */
rd_index(ftp2fn(efNDX, NFILE, fnm), 1, &ngx, &index, &grpname);
};
t_filenm fnm[] = {
{ efTRX, "-f", NULL, ffREAD },
- { efTPX, NULL, NULL, ffREAD },
+ { efTPR, NULL, NULL, ffREAD },
{ efNDX, NULL, NULL, ffOPTRD },
/* { efNDX, "-sel", "select", ffOPTRD },*/
{ efXVG, "-num", "hbnum", ffWRITE },
hb = mk_hbdata(bHBmap, opt2bSet("-dan", NFILE, fnm), bMerge || bContact, bGem, gemmode);
/* get topology */
- read_tpx_top(ftp2fn(efTPX, NFILE, fnm), &ir, box, &natoms, NULL, NULL, NULL, &top);
+ read_tpx_top(ftp2fn(efTPR, NFILE, fnm), &ir, box, &natoms, NULL, NULL, NULL, &top);
snew(grpnames, grNR);
snew(index, grNR);
gmx_rmpbc_t gpbc = NULL;
gmx_bool bRange;
t_filenm fnm[] = {
- { efTPX, NULL, NULL, ffREAD },
+ { efTPR, NULL, NULL, ffREAD },
{ efNDX, NULL, NULL, ffREAD },
{ efTRX, "-f", NULL, ffREAD },
{ efSTO, "-cz", "zconf", ffWRITE },
bRange = (opt2parg_bSet("-ahxstart", asize(pa), pa) &&
opt2parg_bSet("-ahxend", asize(pa), pa));
- top = read_top(ftp2fn(efTPX, NFILE, fnm), &ePBC);
+ top = read_top(ftp2fn(efTPR, NFILE, fnm), &ePBC);
natoms = read_first_x(oenv, &status, opt2fn("-f", NFILE, fnm), &t, &x, box);
/* Read reference frame from tpx file to compute helix length */
snew(xref, top->atoms.nr);
- read_tpx(ftp2fn(efTPX, NFILE, fnm),
+ read_tpx(ftp2fn(efTPR, NFILE, fnm),
NULL, NULL, &natoms, xref, NULL, NULL, NULL);
calc_hxprops(nres, bb, xref);
do_start_end(nres, bb, &nbb, bbindex, &nca, caindex, bRange, rStart, rEnd);
#define NPA asize(pa)
t_filenm fnm[] = {
- { efTPX, NULL, NULL, ffREAD },
+ { efTPR, NULL, NULL, ffREAD },
{ efTRX, "-f", NULL, ffREAD },
{ efNDX, NULL, NULL, ffOPTRD },
{ efDAT, "-oaxis", "helixaxis", ffWRITE },
return 0;
}
- top = read_top(ftp2fn(efTPX, NFILE, fnm), &ePBC);
+ top = read_top(ftp2fn(efTPR, NFILE, fnm), &ePBC);
for (i = 0; i < 3; i++)
{
t_filenm fnm[] = { /* files for g_order */
{ efTRX, "-f", NULL, ffREAD }, /* trajectory file */
{ efNDX, "-n", NULL, ffREAD }, /* index file */
- { efTPX, "-s", NULL, ffREAD }, /* topology file */
+ { efTPR, "-s", NULL, ffREAD }, /* topology file */
{ efXPM, "-o", "intf", ffWRMULT}, /* XPM- surface maps */
{ efOUT, "-or", "raw", ffOPTWRMULT }, /* xvgr output file */
{ efOUT, "-Spect", "intfspect", ffOPTWRMULT}, /* Fourier spectrum interfaces */
}
ndxfnm = ftp2fn(efNDX, NFILE, fnm);
- tpsfnm = ftp2fn(efTPX, NFILE, fnm);
+ tpsfnm = ftp2fn(efTPR, NFILE, fnm);
trxfnm = ftp2fn(efTRX, NFILE, fnm);
/* Calculate axis */
int *nr;
char **grpnames;
t_filenm fnm[] = {
- { efTPX, NULL, NULL, ffREAD },
+ { efTPR, NULL, NULL, ffREAD },
{ efNDX, NULL, "angle", ffWRITE }
};
#define NFILE asize(fnm)
ft = select_ftype(opt[0], &nft, &mult);
- top = read_top(ftp2fn(efTPX, NFILE, fnm), NULL);
+ top = read_top(ftp2fn(efTPR, NFILE, fnm), NULL);
ntype = calc_ntype(nft, ft, &(top->idef));
snew(grpnames, ntype);
t_filenm fnm[] = {
{ efMTX, "-f", "hessian", ffREAD },
- { efTPX, NULL, NULL, ffREAD },
+ { efTPR, NULL, NULL, ffREAD },
{ efXVG, "-of", "eigenfreq", ffWRITE },
{ efXVG, "-ol", "eigenval", ffWRITE },
{ efXVG, "-os", "spectrum", ffOPTWR },
}
/* Read tpr file for volume and number of harmonic terms */
- read_tpxheader(ftp2fn(efTPX, NFILE, fnm), &tpx, TRUE, &version, &generation);
+ read_tpxheader(ftp2fn(efTPR, NFILE, fnm), &tpx, TRUE, &version, &generation);
snew(top_x, tpx.natoms);
- read_tpx(ftp2fn(efTPX, NFILE, fnm), NULL, box, &natoms,
+ read_tpx(ftp2fn(efTPR, NFILE, fnm), NULL, box, &natoms,
top_x, NULL, NULL, &mtop);
if (bCons)
{
"All GROMACS programs can read compressed or g-zipped files. There "
"might be a problem with reading compressed [TT].xtc[tt], "
- "[TT].trr[tt] and [TT].trj[tt] files, but these will not compress "
+ "[TT].trr[tt] files, but these will not compress "
"very well anyway.",
"Most GROMACS programs can process a trajectory with fewer atoms than "
{ efTRX, "-f", NULL, ffREAD }, /* trajectory file */
{ efNDX, "-n", NULL, ffREAD }, /* index file */
{ efNDX, "-nr", NULL, ffREAD }, /* index for radial axis calculation */
- { efTPX, NULL, NULL, ffREAD }, /* topology file */
+ { efTPR, NULL, NULL, ffREAD }, /* topology file */
{ efXVG, "-o", "order", ffWRITE }, /* xvgr output file */
{ efXVG, "-od", "deuter", ffWRITE }, /* xvgr output file */
{ efPDB, "-ob", NULL, ffWRITE }, /* write Scd as B factors to PDB if permolecule */
sgfnm = opt2fn_null("-Sg", NFILE, fnm);
skfnm = opt2fn_null("-Sk", NFILE, fnm);
ndxfnm = opt2fn_null("-n", NFILE, fnm);
- tpsfnm = ftp2fn(efTPX, NFILE, fnm);
+ tpsfnm = ftp2fn(efTPR, NFILE, fnm);
trxfnm = ftp2fn(efTRX, NFILE, fnm);
/* Calculate axis */
fprintf(stderr, "Taking carbons as unsaturated!\n");
}
- top = read_top(ftp2fn(efTPX, NFILE, fnm), &ePBC); /* read topology file */
+ top = read_top(ftp2fn(efTPR, NFILE, fnm), &ePBC); /* read topology file */
block = init_index(ftp2fn(efNDX, NFILE, fnm), &grpname);
index = block->index; /* get indices from t_block block */
static t_filenm fnm[] = {
- { efTPX, "-s", NULL, ffREAD },
+ { efTPR, "-s", NULL, ffREAD },
{ efOUT, "-o", "error", ffWRITE },
- { efTPX, "-so", "tuned", ffOPTWR }
+ { efTPR, "-so", "tuned", ffOPTWR }
};
output_env_t oenv = NULL;
};
t_filenm fnm[] = {
- { efTPX, NULL, NULL, ffREAD },
+ { efTPR, NULL, NULL, ffREAD },
{ efTRX, "-f", NULL, ffREAD },
{ efNDX, NULL, NULL, ffOPTRD },
{ efXVG, "-o", "polystat", ffWRITE },
}
snew(top, 1);
- ePBC = read_tpx_top(ftp2fn(efTPX, NFILE, fnm),
+ ePBC = read_tpx_top(ftp2fn(efTPR, NFILE, fnm),
NULL, box, &natoms, NULL, NULL, NULL, top);
fprintf(stderr, "Select a group of polymer mainchain atoms:\n");
t_filenm fnm[] = { /* files for g_order */
{ efTRX, "-f", NULL, ffREAD }, /* trajectory file */
{ efNDX, NULL, NULL, ffREAD }, /* index file */
- { efTPX, NULL, NULL, ffREAD }, /* topology file */
+ { efTPR, NULL, NULL, ffREAD }, /* topology file */
{ efXVG, "-o", "potential", ffWRITE }, /* xvgr output file */
{ efXVG, "-oc", "charge", ffWRITE }, /* xvgr output file */
{ efXVG, "-of", "field", ffWRITE }, /* xvgr output file */
/* Calculate axis */
axis = toupper(axtitle[0]) - 'X';
- top = read_top(ftp2fn(efTPX, NFILE, fnm), &ePBC); /* read topology file */
+ top = read_top(ftp2fn(efTPR, NFILE, fnm), &ePBC); /* read topology file */
snew(grpname, ngrps);
snew(index, ngrps);
output_env_t oenv;
t_filenm fnm[] = {
{ efTRX, "-f", NULL, ffREAD },
- { efTPX, NULL, NULL, ffREAD },
+ { efTPR, NULL, NULL, ffREAD },
{ efXVG, NULL, "rama", ffWRITE }
};
#define NFILE asize(fnm)
snew(xr, 1);
- init_rama(oenv, ftp2fn(efTRX, NFILE, fnm), ftp2fn(efTPX, NFILE, fnm), xr, 3);
+ init_rama(oenv, ftp2fn(efTRX, NFILE, fnm), ftp2fn(efTPR, NFILE, fnm), xr, 3);
out = xvgropen(ftp2fn(efXVG, NFILE, fnm), "Ramachandran Plot", "Phi", "Psi", oenv);
xvgr_line_props(out, 0, elNone, ecFrank, oenv);
int ePBC;
t_filenm fnm[] = {
{ efTRX, "-f", NULL, ffREAD },
- { efTPX, NULL, NULL, ffREAD },
+ { efTPR, NULL, NULL, ffREAD },
{ efNDX, NULL, NULL, ffREAD },
{ efXVG, "-o", "rotacf", ffWRITE }
};
"these can not be atom doublets\n");
}
- top = read_top(ftp2fn(efTPX, NFILE, fnm), &ePBC);
+ top = read_top(ftp2fn(efTPR, NFILE, fnm), &ePBC);
snew(c1, nvec);
for (i = 0; (i < nvec); i++)
};
t_filenm fnm[] = {
{ efTRX, "-f", NULL, ffREAD },
- { efTPX, NULL, NULL, ffREAD },
+ { efTPR, NULL, NULL, ffREAD },
};
#define NFILE asize(fnm)
return 0;
}
- top = read_top(ftp2fn(efTPX, NFILE, fnm), &ePBC);
+ top = read_top(ftp2fn(efTPR, NFILE, fnm), &ePBC);
cg = mk_charge(&top->atoms, &(top->cgs), &ncg);
snew(cgdist, ncg);
snew(nWithin, ncg);
#define NFILE asize(fnm)
t_filenm fnm[] = {
- { efTPX, "-s", NULL, ffREAD },
+ { efTPR, "-s", NULL, ffREAD },
{ efTRX, "-f", NULL, ffREAD },
{ efNDX, NULL, NULL, ffOPTRD },
{ efDAT, "-d", "nsfactor", ffOPTRD },
/* Try to read files */
fnDAT = ftp2fn(efDAT, NFILE, fnm);
- fnTPX = ftp2fn(efTPX, NFILE, fnm);
+ fnTPX = ftp2fn(efTPR, NFILE, fnm);
fnTRX = ftp2fn(efTRX, NFILE, fnm);
gnsf = gmx_neutronstructurefactors_init(fnDAT);
t_filenm fnm[] = {
{ efTRX, NULL, NULL, ffREAD },
- { efTPX, NULL, NULL, ffREAD },
+ { efTPR, NULL, NULL, ffREAD },
{ efNDX, NULL, NULL, ffOPTRD },
{ efXVG, NULL, "scdist", ffWRITE }
};
snew(top, 1);
snew(ir, 1);
- read_tpx_top(ftp2fn(efTPX, NFILE, fnm),
+ read_tpx_top(ftp2fn(efTPR, NFILE, fnm),
ir, box, &natoms, NULL, NULL, NULL, top);
/* get index groups */
void check_trn(const char *fn)
{
- if ((fn2ftp(fn) != efTRJ) && (fn2ftp(fn) != efTRR))
+ if (fn2ftp(fn) != efTRR)
{
gmx_fatal(FARGS, "%s is not a trajectory file, exiting\n", fn);
}
gmx_fatal(FARGS, "You forgot to set the truncation time");
}
- /* Check whether this is a .trj file */
+ /* Check whether this is a .trr file */
check_trn(fn);
in = open_trn(fn, "r");
"[PAR]",
"The following formats are supported for input and output:",
- "[TT].xtc[tt], [TT].trr[tt], [TT].trj[tt], [TT].gro[tt], [TT].g96[tt]",
+ "[TT].xtc[tt], [TT].trr[tt], [TT].gro[tt], [TT].g96[tt]",
"and [TT].pdb[tt].",
"The file formats are detected from the file extension.",
"The precision of [TT].xtc[tt] and [TT].gro[tt] output is taken from the",
"input file for [TT].xtc[tt], [TT].gro[tt] and [TT].pdb[tt],",
"and from the [TT]-ndec[tt] option for other input formats. The precision",
"is always taken from [TT]-ndec[tt], when this option is set.",
- "All other formats have fixed precision. [TT].trr[tt] and [TT].trj[tt]",
+ "All other formats have fixed precision. [TT].trr[tt]",
"output can be single or double precision, depending on the precision",
"of the [THISMODULE] binary.",
"Note that velocities are only supported in",
- "[TT].trr[tt], [TT].trj[tt], [TT].gro[tt] and [TT].g96[tt] files.[PAR]",
+ "[TT].trr[tt], [TT].gro[tt] and [TT].g96[tt] files.[PAR]",
"Option [TT]-sep[tt] can be used to write every frame to a separate",
"[TT].gro, .g96[tt] or [TT].pdb[tt] file. By default, all frames all written to one file.",
"can reduce the number of frames while using low-pass frequency",
"filtering, this reduces aliasing of high frequency motions.[PAR]",
- "Using [TT]-trunc[tt] [THISMODULE] can truncate [TT].trj[tt] in place, i.e.",
+ "Using [TT]-trunc[tt] [THISMODULE] can truncate [TT].trr[tt] in place, i.e.",
"without copying the file. This is useful when a run has crashed",
"during disk I/O (i.e. full disk), or when two contiguous",
"trajectories must be concatenated without having double frames.[PAR]",
{
/* check if velocities are possible in input and output files */
ftpin = fn2ftp(in_file);
- bVels = (ftp == efTRR || ftp == efTRJ || ftp == efGRO ||
+ bVels = (ftp == efTRR || ftp == efGRO ||
ftp == efG96 || ftp == efTNG)
- && (ftpin == efTRR || ftpin == efTRJ || ftpin == efGRO ||
+ && (ftpin == efTRR || ftpin == efGRO ||
ftpin == efG96 || ftpin == efTNG || ftpin == efCPT);
}
if (bSeparate || bSplit)
useatoms.nr = nout;
}
/* select what to read */
- if (ftp == efTRR || ftp == efTRJ)
+ if (ftp == efTRR)
{
flags = TRX_READ_X;
}
break;
case efXTC:
case efTRR:
- case efTRJ:
out = NULL;
if (!bSplit && !bSubTraj)
{
write_tng_frame(trxout, &frout);
// TODO when trjconv behaves better: work how to read and write lambda
break;
- case efTRJ:
case efTRR:
case efXTC:
if (bSplitHere)
/* g_tune_pme */
{ efOUT, "-p", "perf", ffWRITE },
{ efLOG, "-err", "bencherr", ffWRITE },
- { efTPX, "-so", "tuned", ffWRITE },
+ { efTPR, "-so", "tuned", ffWRITE },
/* mdrun: */
- { efTPX, NULL, NULL, ffREAD },
+ { efTPR, NULL, NULL, ffREAD },
{ efTRN, "-o", NULL, ffWRITE },
{ efCOMPRESSED, "-x", NULL, ffOPTWR },
{ efCPT, "-cpi", NULL, ffOPTRD },
* Read a trajectory and calculate angles and dihedrals.
*
* trj_fn file name of trajectory
- * tpb_fn file name of tpb file
* bAngles do we have to read angles or dihedrals
* bSaveAll do we have to store all in the dih array
* bRb do we have Ryckaert-Bellemans dihedrals (trans = 0)
strcat(buf, ".");
/* Add extension again */
- strcat(buf, (ftp == efTPX) ? "tpr" : (ftp == efEDR) ? "edr" : ftp2ext(ftp));
+ strcat(buf, (ftp == efTPR) ? "tpr" : (ftp == efEDR) ? "edr" : ftp2ext(ftp));
if (debug)
{
fprintf(debug, "rank %d par_fn '%s'\n", cr->nodeid, buf);
* at the actual file name
*/
if (is_output(&fnm[i]) ||
- fnm[i].ftp == efTPX || fnm[i].ftp == efCPT ||
+ fnm[i].ftp == efTPR || fnm[i].ftp == efCPT ||
strcmp(fnm[i].opt, "-rerun") == 0)
{
ftp = fn2ftp(fnm[i].fns[0]);
{ efNDX, NULL, NULL, ffOPTRD },
{ efTOP, NULL, NULL, ffREAD },
{ efTOP, "-pp", "processed", ffOPTWR },
- { efTPX, "-o", NULL, ffWRITE },
+ { efTPR, "-o", NULL, ffWRITE },
{ efTRN, "-t", NULL, ffOPTRD },
{ efEDR, "-e", NULL, ffOPTRD },
/* This group is needed by the VMD viewer as the start configuration for IMD sessions: */
}
done_warning(wi, FARGS);
- write_tpx_state(ftp2fn(efTPX, NFILE, fnm), ir, &state, sys);
+ write_tpx_state(ftp2fn(efTPR, NFILE, fnm), ir, &state, sys);
/* Output IMD group, if bIMD is TRUE */
write_IMDgroup_to_file(ir->bIMD, ir, &state, sys, NFILE, fnm);
int gmx_check(int argc, char *argv[])
{
const char *desc[] = {
- "[THISMODULE] reads a trajectory ([TT].trj[tt], [TT].trr[tt] or ",
- "[TT].xtc[tt]), an energy file ([TT].ene[tt] or [TT].edr[tt])",
+ "[THISMODULE] reads a trajectory ([TT].tng[tt], [TT].trr[tt] or ",
+ "[TT].xtc[tt]), an energy file ([TT].edr[tt])",
"or an index file ([TT].ndx[tt])",
"and prints out useful information about them.[PAR]",
"Option [TT]-c[tt] checks for presence of coordinates,",
"file are indeed correct in the trajectory. If not you may have",
"non-matching files due to e.g. deshuffling or due to problems with",
"virtual sites. With these flags, [TT]gmx check[tt] provides a quick check for such problems.[PAR]",
- "The program can compare two run input ([TT].tpr[tt], [TT].tpb[tt] or",
- "[TT].tpa[tt]) files",
+ "The program can compare two run input ([TT].tpr[tt])",
+ "files",
"when both [TT]-s1[tt] and [TT]-s2[tt] are supplied.",
"Similarly a pair of trajectory files can be compared (using the [TT]-f2[tt]",
"option), or a pair of energy files (using the [TT]-e2[tt] option).[PAR]",
t_filenm fnm[] = {
{ efTRX, "-f", NULL, ffOPTRD },
{ efTRX, "-f2", NULL, ffOPTRD },
- { efTPX, "-s1", "top1", ffOPTRD },
- { efTPX, "-s2", "top2", ffOPTRD },
+ { efTPR, "-s1", "top1", ffOPTRD },
+ { efTPR, "-s2", "top2", ffOPTRD },
{ efTPS, "-c", NULL, ffOPTRD },
{ efEDR, "-e", NULL, ffOPTRD },
{ efEDR, "-e2", "ener2", ffOPTRD },
}
else if (fn2)
{
- fprintf(stderr, "Please give me TWO trajectory (.xtc/.trr/.trj) files!\n");
+ fprintf(stderr, "Please give me TWO trajectory (.xtc/.trr/.tng) files!\n");
}
fn1 = opt2fn_null("-s1", NFILE, fnm);
}
else if ((fn1 && !opt2fn_null("-f", NFILE, fnm)) || (!fn1 && fn2))
{
- fprintf(stderr, "Please give me TWO run input (.tpr/.tpa/.tpb) files\n"
+ fprintf(stderr, "Please give me TWO run input (.tpr) files\n"
"or specify the -m flag to generate a methods.tex file\n");
}
char buf[200], buf2[200];
output_env_t oenv;
t_filenm fnm[] = {
- { efTPX, NULL, NULL, ffREAD },
+ { efTPR, NULL, NULL, ffREAD },
{ efTRN, "-f", NULL, ffOPTRD },
{ efEDR, "-e", NULL, ffOPTRD },
{ efNDX, NULL, NULL, ffOPTRD },
- { efTPX, "-o", "tpxout", ffWRITE }
+ { efTPR, "-o", "tprout", ffWRITE }
};
#define NFILE asize(fnm)
bTime = opt2parg_bSet("-time", asize(pa), pa);
bTraj = (opt2bSet("-f", NFILE, fnm) || bTime);
- top_fn = ftp2fn(efTPX, NFILE, fnm);
+ top_fn = ftp2fn(efTPR, NFILE, fnm);
fprintf(stderr, "Reading toplogy and stuff from %s\n", top_fn);
snew(ir, 1);
void list_trx(const char *fn)
{
- int ftp;
-
- ftp = fn2ftp(fn);
- if (ftp == efXTC)
- {
- list_xtc(fn);
- }
- else if ((ftp == efTRR) || (ftp == efTRJ))
- {
- list_trn(fn);
- }
- else if (ftp == efTNG)
- {
- list_tng(fn);
- }
- else
+ switch (fn2ftp(fn))
{
- fprintf(stderr, "File %s is of an unsupported type. Try using the command\n 'less %s'\n",
- fn, fn);
+ case efXTC:
+ list_xtc(fn);
+ break;
+ case efTRR:
+ list_trn(fn);
+ break;
+ case efTNG:
+ list_tng(fn);
+ break;
+ default:
+ fprintf(stderr, "File %s is of an unsupported type. Try using the command\n 'less %s'\n",
+ fn, fn);
}
}
int gmx_dump(int argc, char *argv[])
{
const char *desc[] = {
- "[THISMODULE] reads a run input file ([TT].tpa[tt]/[TT].tpr[tt]/[TT].tpb[tt]),",
- "a trajectory ([TT].trj[tt]/[TT].trr[tt]/[TT].xtc[tt]), an energy",
- "file ([TT].ene[tt]/[TT].edr[tt]), or a checkpoint file ([TT].cpt[tt])",
+ "[THISMODULE] reads a run input file ([TT].tpr[tt]),",
+ "a trajectory ([TT].trr[tt]/[TT].xtc[tt]/[TT]/tng[tt]), an energy",
+ "file ([TT].edr[tt]) or a checkpoint file ([TT].cpt[tt])",
"and prints that to standard output in a readable format.",
"This program is essential for checking your run input file in case of",
"problems.[PAR]",
"Position restraint output from -sys -s is broken"
};
t_filenm fnm[] = {
- { efTPX, "-s", NULL, ffOPTRD },
+ { efTPR, "-s", NULL, ffOPTRD },
{ efTRX, "-f", NULL, ffOPTRD },
{ efEDR, "-e", NULL, ffOPTRD },
{ efCPT, NULL, NULL, ffOPTRD },
}
- if (ftp2bSet(efTPX, NFILE, fnm))
+ if (ftp2bSet(efTPR, NFILE, fnm))
{
- list_tpx(ftp2fn(efTPX, NFILE, fnm), bShowNumbers,
+ list_tpx(ftp2fn(efTPR, NFILE, fnm), bShowNumbers,
ftp2fn_null(efMDP, NFILE, fnm), bSysTop);
}
else if (ftp2bSet(efTRX, NFILE, fnm))
};
t_commrec *cr;
t_filenm fnm[] = {
- { efTPX, NULL, NULL, ffREAD },
+ { efTPR, NULL, NULL, ffREAD },
{ efTRN, "-o", NULL, ffWRITE },
{ efCOMPRESSED, "-x", NULL, ffOPTWR },
{ efCPT, "-cpi", NULL, ffOPTRD },
get_input(membed_input, &xy_fac, &xy_max, &z_fac, &z_max, &it_xy, &it_z, &probe_rad, &low_up_rm,
&maxwarn, &pieces, &bALLOW_ASYMMETRY);
- tpr_version = get_tpr_version(ftp2fn(efTPX, nfile, fnm));
+ tpr_version = get_tpr_version(ftp2fn(efTPR, nfile, fnm));
if (tpr_version < membed_version)
{
gmx_fatal(FARGS, "Version of *.tpr file to old (%d). "
if (SIMMASTER(cr))
{
/* Read (nearly) all data required for the simulation */
- read_tpx_state(ftp2fn(efTPX, nfile, fnm), inputrec, state, NULL, mtop);
+ read_tpx_state(ftp2fn(efTPR, nfile, fnm), inputrec, state, NULL, mtop);
if (inputrec->cutoff_scheme != ecutsVERLET &&
((Flags & MD_TESTVERLET) || getenv("GMX_VERLET_SCHEME") != NULL))
snew(gmx, 1);
snew(gmx->wd, 1);
- ePBC = read_tpx_top(ftp2fn(efTPX, nfile, fnm),
+ ePBC = read_tpx_top(ftp2fn(efTPR, nfile, fnm),
NULL, box, &natom, NULL, NULL, NULL, &top);
read_first_frame(oenv, &status, ftp2fn(efTRX, nfile, fnm), &fr, TRX_DONT_SKIP);
init_dlgs(x11, gmx);
/* Now do file operations */
- set_file(x11, gmx->man, ftp2fn(efTRX, nfile, fnm), ftp2fn(efTPX, nfile, fnm));
+ set_file(x11, gmx->man, ftp2fn(efTRX, nfile, fnm), ftp2fn(efTPR, nfile, fnm));
ShowDlg(gmx->dlgs[edFilter]);
}
output_env_t oenv;
t_filenm fnm[] = {
{ efTRX, "-f", NULL, ffREAD },
- { efTPX, NULL, NULL, ffREAD },
+ { efTPR, NULL, NULL, ffREAD },
{ efNDX, NULL, NULL, ffOPTRD }
};
#define NFILE asize(fnm)