%
% This file is part of the GROMACS molecular simulation package.
%
-% Copyright (c) 2013, by the GROMACS development team, led by
+% Copyright (c) 2013,2014, by the GROMACS development team, led by
% Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
% and including many others, as listed in the AUTHORS file in the
% top-level source directory and at http://www.gromacs.org.
\tt eiwit & \tt ent & Asc & \tt -f & Entry in the protein date bank \\[-0.1ex]
\tt plot & \tt eps & Asc & \tt & Encapsulated PostScript (tm) file \\[-0.1ex]
\tt conf & \tt esp & Asc & \tt -c & Coordinate file in ESPResSo format \\[-0.1ex]
-\tt gtraj & \tt g87 & Asc & \tt & Gromos-87 ASCII trajectory 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]
edr
ene
eps
-g87
g96
gro
hdb
<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="g87.html">g87</a> <dd>x and v (ascii)
<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)
<a href="gro.html">gro</a>,
<a href="g96.html">g96</a>,
<a href="pdb.html">pdb</a> or
-<a href="g87.html">g87</a>
</dl>
<br><dt><h3>Energy files</h3>
+++ /dev/null
-<title>Gromos87 trajectory file format</title>
-<h3>Description</h3>
-This is a simple ASCII format:<br>
-<pre>
-TITLE
-x(i) (10f8.3)
-box(m) (10f8.8)
-</pre>
-
-The number of atoms is <b>not</b> stored, neither is there any indication
-of whether a box is present. The box is stored only for constant pressure
-simulations. So, you simply have to remember this stuff.
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 g87 tng
- -f2 [<.xtc/.trr/...>] (path/to/long/trajectory.xtc) (Input)
- File name option with a long value: xtc trr cpt trj gro g96 pdb g87 tng
+ -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
+ -f2 <.xtc/.trr/...> (path/to/long/trajectory.xtc) (Input)
+ File name option with a long value: xtc trr cpt trj 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
- g87 tng
+ 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 g87 tng
+ -f <.xtc/.trr/...> (traj.xtc) (Input)
+ Input file description: xtc trr cpt trj gro g96 pdb tng
-mult [<.xtc/.trr/...> [...]] (traj.xtc) (Input, Opt.)
- Multiple file description: xtc trr cpt trj gro g96 pdb g87 tng
+ Multiple file description: xtc trr cpt trj 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
* This file is part of the GROMACS molecular simulation package.
*
* Copyright (c) 1991-2000, University of Groningen, The Netherlands.
- * Copyright (c) 2001-2004, The GROMACS development team,
- * Copyright (c) 2013, by the GROMACS development team, led by
+ * Copyright (c) 2001-2004, The GROMACS development team.
+ * Copyright (c) 2013,2014, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
}
}
-static void write_xyz_conf(const char *outfile, const char *title,
- t_atoms *atoms, rvec *x)
-{
- FILE *fp;
- int i, anr;
- real value;
- char *ptr, *name;
- gmx_atomprop_t aps = gmx_atomprop_init();
-
- fp = gmx_fio_fopen(outfile, "w");
- fprintf(fp, "%3d\n", atoms->nr);
- fprintf(fp, "%s\n", title);
- for (i = 0; (i < atoms->nr); i++)
- {
- anr = atoms->atom[i].atomnumber;
- name = *atoms->atomname[i];
- if (anr == NOTSET)
- {
- if (gmx_atomprop_query(aps, epropElement, "???", name, &value))
- {
- anr = gmx_nint(value);
- }
- }
- if ((ptr = gmx_atomprop_element(aps, anr)) == NULL)
- {
- ptr = name;
- }
- fprintf(fp, "%3s%10.5f%10.5f%10.5f\n", ptr,
- 10*x[i][XX], 10*x[i][YY], 10*x[i][ZZ]);
- }
- gmx_fio_fclose(fp);
- gmx_atomprop_destroy(aps);
-}
-
void write_sto_conf(const char *outfile, const char *title, t_atoms *atoms,
rvec x[], rvec *v, int ePBC, matrix box)
{
write_g96_conf(out, &fr, -1, NULL);
gmx_fio_fclose(out);
break;
- case efXYZ:
- write_xyz_conf(outfile, (strlen(title) > 0) ? title : outfile, atoms, x);
- break;
case efPDB:
case efBRK:
case efENT:
}
}
-static int get_xyz_coordnum(const char *infile)
-{
- FILE *fp;
- int n;
-
- fp = gmx_fio_fopen(infile, "r");
- if (fscanf(fp, "%d", &n) != 1)
- {
- gmx_fatal(FARGS, "Can not read number of atoms from %s", infile);
- }
- gmx_fio_fclose(fp);
-
- return n;
-}
-
-static void read_xyz_conf(const char *infile, char *title,
- t_atoms *atoms, rvec *x)
-{
- FILE *fp;
- int i, n;
- double xx, yy, zz;
- t_symtab *tab;
- char atomnm[32], buf[STRLEN];
-
- snew(tab, 1);
- fp = gmx_fio_fopen(infile, "r");
- fgets2(buf, STRLEN-1, fp);
- if (sscanf(buf, "%d", &n) != 1)
- {
- gmx_fatal(FARGS, "Can not read number of atoms from %s", infile);
- }
- fgets2(buf, STRLEN-1, fp);
- strcpy(title, buf);
- for (i = 0; (i < n); i++)
- {
- fgets2(buf, STRLEN-1, fp);
- if (sscanf(buf, "%s%lf%lf%lf", atomnm, &xx, &yy, &zz) != 4)
- {
- gmx_fatal(FARGS, "Can not read coordinates from %s", infile);
- }
- atoms->atomname[i] = put_symtab(tab, atomnm);
- x[i][XX] = xx*0.1;
- x[i][YY] = yy*0.1;
- x[i][ZZ] = zz*0.1;
- }
- gmx_fio_fclose(fp);
-}
-
void get_stx_coordnum(const char *infile, int *natoms)
{
FILE *in;
*natoms = read_g96_conf(in, infile, &fr, g96_line);
gmx_fio_fclose(in);
break;
- case efXYZ:
- *natoms = get_xyz_coordnum(infile);
- break;
case efPDB:
case efBRK:
case efENT:
case efGRO:
read_whole_conf(infile, title, atoms, x, v, box);
break;
- case efXYZ:
- read_xyz_conf(infile, title, atoms, x);
- break;
case efG96:
fr.title = NULL;
fr.natoms = atoms->nr;
#ifdef USE_XDR
efXTC, efTRR, efCPT,
#endif
- efTRJ, efGRO, efG96, efPDB, efG87, efTNG
+ efTRJ, efGRO, efG96, efPDB, efTNG
};
#define NTRXS asize(trxs)
#ifdef USE_XDR
efXTC, efTRR,
#endif
- efTRJ, efGRO, efG96, efPDB, efG87, efTNG
+ efTRJ, efGRO, efG96, efPDB, efTNG
};
#define NTROS asize(tros)
#define NTRNS asize(trns)
static const int stos[] =
-{ efGRO, efG96, efPDB, efBRK, efENT, efESP, efXYZ };
+{ efGRO, efG96, efPDB, efBRK, efENT, efESP };
#define NSTOS asize(stos)
static const int stxs[] =
{
- efGRO, efG96, efPDB, efBRK, efENT, efESP, efXYZ,
+ efGRO, efG96, efPDB, efBRK, efENT, efESP,
#ifdef USE_XDR
efTPR,
#endif
"Compressed trajectory (portable xdr format): xtc" },
{ eftTNG, ".tng", "traj", NULL,
"Trajectory file (tng format)" },
- { eftASC, ".g87", "gtraj", NULL, "Gromos-87 ASCII trajectory format" },
{ eftXDR, ".edr", "ener", NULL, "Energy file"},
{ eftGEN, ".???", "conf", "-c", "Structure file", NSTXS, stxs },
{ eftGEN, ".???", "out", "-o", "Structure file", NSTOS, stos },
{ eftASC, ".ent", "eiwit", "-f", "Entry in the protein date bank" },
{ eftASC, ".esp", "conf", "-f", "Coordinate file in Espresso format" },
{ eftASC, ".pqr", "state", "-o", "Coordinate file for MEAD"},
- { eftASC, ".xyz", "conf", "-o", "Coordinate file for some other programs" },
{ eftXDR, ".cpt", "state", "-cp", "Checkpoint file"},
{ eftASC, ".log", "run", "-l", "Log file"},
{ eftASC, ".xvg", "graph", "-o", "xvgr/xmgr file"},
* This file is part of the GROMACS molecular simulation package.
*
* Copyright (c) 1991-2000, University of Groningen, The Netherlands.
- * Copyright (c) 2001-2004, The GROMACS development team,
- * Copyright (c) 2013, by the GROMACS development team, led by
+ * Copyright (c) 2001-2004, The GROMACS development team.
+ * Copyright (c) 2013,2014, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
/* this enum should correspond to the array deffile in gmxlib/filenm.c */
enum {
efMDP,
- efTRX, efTRO, efTRN, efTRR, efTRJ, efCOMPRESSED, efXTC, efTNG, efG87,
+ efTRX, efTRO, efTRN, efTRR, efTRJ, efCOMPRESSED, efXTC, efTNG,
efEDR,
- efSTX, efSTO, efGRO, efG96, efPDB, efBRK, efENT, efESP, efPQR, efXYZ,
+ efSTX, efSTO, efGRO, efG96, efPDB, efBRK, efENT, efESP, efPQR,
efCPT,
efLOG, efXVG, efOUT,
efNDX,
+++ /dev/null
-/*
- * This file is part of the GROMACS molecular simulation package.
- *
- * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
- * Copyright (c) 2001-2004, The GROMACS development team,
- * Copyright (c) 2013, by the GROMACS development team, led by
- * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
- * and including many others, as listed in the AUTHORS file in the
- * top-level source directory and at http://www.gromacs.org.
- *
- * GROMACS is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public License
- * as published by the Free Software Foundation; either version 2.1
- * of the License, or (at your option) any later version.
- *
- * GROMACS is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with GROMACS; if not, see
- * http://www.gnu.org/licenses, or write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * If you want to redistribute modifications to GROMACS, please
- * consider that scientific software is very special. Version
- * control is crucial - bugs must be traceable. We will be happy to
- * consider code for inclusion in the official distribution, but
- * derived work must not be called official GROMACS. Details are found
- * in the README & COPYING files - if they are missing, get the
- * official version at http://www.gromacs.org.
- *
- * To help us fund GROMACS development, we humbly ask that you cite
- * the research papers on the package. Check out http://www.gromacs.org.
- */
-
-#include "g87io.h"
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <stdio.h>
-
-#define FPL 10
-
-void write_g87(FILE *fp, int natoms, rvec x[], matrix box)
-{
- int i, j, n;
-
- n = 0;
- for (i = 0; (i < natoms); i++)
- {
- for (j = 0; (j < 3); j++)
- {
- fprintf(fp, "%8.3f", x[i][j]);
- n++;
- if (n == FPL)
- {
- fprintf(fp, "\n");
- n = 0;
- }
- }
- }
- if (n != 0)
- {
- fprintf(fp, "\n");
- }
- if (box != NULL)
- {
- fprintf(fp, "%8.3f%8.3f%8.3f\n", box[XX][XX], box[YY][YY], box[ZZ][ZZ]);
- }
-}
-
-void write_g87_ndx(FILE *fp, int isize, atom_id index[], rvec x[], matrix box)
-{
- int i, j, n;
-
- n = 0;
- for (i = 0; (i < isize); i++)
- {
- for (j = 0; (j < 3); j++)
- {
- fprintf(fp, "%8.3f", x[index[i]][j]);
- n++;
- if (n == FPL)
- {
- fprintf(fp, "\n");
- n = 0;
- }
- }
- }
- if (n != 0)
- {
- fprintf(fp, "\n");
- }
- if (box != NULL)
- {
- fprintf(fp, "%8.3f%8.3f%8.3f\n", box[XX][XX], box[YY][YY], box[ZZ][ZZ]);
- }
-}
+++ /dev/null
-/*
- * This file is part of the GROMACS molecular simulation package.
- *
- * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
- * Copyright (c) 2001-2004, The GROMACS development team,
- * Copyright (c) 2013, by the GROMACS development team, led by
- * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
- * and including many others, as listed in the AUTHORS file in the
- * top-level source directory and at http://www.gromacs.org.
- *
- * GROMACS is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public License
- * as published by the Free Software Foundation; either version 2.1
- * of the License, or (at your option) any later version.
- *
- * GROMACS is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with GROMACS; if not, see
- * http://www.gnu.org/licenses, or write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * If you want to redistribute modifications to GROMACS, please
- * consider that scientific software is very special. Version
- * control is crucial - bugs must be traceable. We will be happy to
- * consider code for inclusion in the official distribution, but
- * derived work must not be called official GROMACS. Details are found
- * in the README & COPYING files - if they are missing, get the
- * official version at http://www.gromacs.org.
- *
- * To help us fund GROMACS development, we humbly ask that you cite
- * the research papers on the package. Check out http://www.gromacs.org.
- */
-
-#ifndef GMX_FILEIO_G87IO_H
-#define GMX_FILEIO_G87IO_H
-
-#include <stdio.h>
-#include "typedefs.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void write_g87(FILE *fp, int natoms, rvec x[], matrix box);
-/* Write a gromos-87 trajectory frame (10f8.3) + box size
- * If box == NULL it is not written
- */
-
-void write_g87_ndx(FILE *fp, int isize, atom_id index[],
- rvec x[], matrix box);
-/* Write a gromos-87 trajectory frame (10f8.3) + box size for
- * a subset of the atoms.
- * If box == NULL it is not written
- */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
#include "pdbio.h"
#include "confio.h"
#include "checkpoint.h"
-#include "g87io.h"
#include "gromacs/fileio/timecontrol.h"
#define SKIP2 100
#define SKIP3 1000
-/* Globals for gromos-87 input */
-typedef enum {
- effXYZ, effXYZBox, effG87, effG87Box, effNR
-} eFileFormat;
-
struct t_trxstatus
{
int __frame;
int nxframe;
t_fileio *fio;
tng_trajectory_t tng;
- eFileFormat eFF;
int NATOMS;
double DT, BOX[3];
gmx_bool bReadBox;
}
/* no break */
case efXTC:
- case efG87:
if (fr->bX)
{
snew(xout, nind);
fr->x, -1, fr->box, ' ', fr->step, nind, ind, gc, TRUE);
}
break;
- case efG87:
- write_g87(gmx_fio_getfp(status->fio), nind, xout, fr->box);
- break;
case efG96:
write_g96_conf(gmx_fio_getfp(status->fio), fr, nind, ind);
break;
}
/* no break */
case efXTC:
- case efG87:
sfree(xout);
break;
default:
' ', fr->step, gc, TRUE);
}
break;
- case efG87:
- write_g87(gmx_fio_getfp(status->fio), fr->natoms, fr->x, fr->box);
- break;
case efG96:
write_g96_conf(gmx_fio_getfp(status->fio), fr, -1, NULL);
break;
return bRet;
}
-static void choose_file_format(FILE *fp)
-{
- int i, m, c;
- int rc;
- eFileFormat eFF;
- t_trxstatus *stat;
-
- printf("\n\n");
- printf(" Select File Format\n");
- printf("---------------------------\n");
- printf("1. XYZ File\n");
- printf("2. XYZ File with Box\n");
- printf("3. Gromos-87 Ascii Trajectory\n");
- printf("4. Gromos-87 Ascii Trajectory with Box\n");
-
- snew(stat, 1);
- status_init(stat);
-
- do
- {
- printf("\nChoice: ");
- fflush(stdout);
- do
- {
- rc = scanf("%d", &i);
- }
- while (rc != 1);
- i--;
- }
- while ((i < 0) || (i >= effNR));
- printf("\n");
-
- stat->eFF = (eFileFormat) i;
-
- for (m = 0; (m < DIM); m++)
- {
- stat->BOX[m] = 0;
- }
-
- stat->bReadBox = (stat->eFF == effG87Box) || (stat->eFF == effXYZBox);
-
- switch (stat->eFF)
- {
- case effXYZ:
- case effXYZBox:
- if (5 != fscanf(fp, "%d%lf%lf%lf%lf", &stat->NATOMS, &stat->BOX[XX], &stat->BOX[YY], &stat->BOX[ZZ], &stat->DT))
- {
- gmx_fatal(FARGS, "Error reading natoms/box in file");
- }
- break;
- case effG87:
- case effG87Box:
- printf("GROMOS! OH DEAR...\n\n");
- printf("Number of atoms ? ");
- fflush(stdout);
- if (1 != scanf("%d", &stat->NATOMS))
- {
- gmx_fatal(FARGS, "Error reading natoms in file");
- }
-
- printf("Time between timeframes ? ");
- fflush(stdout);
- if (1 != scanf("%lf", &stat->DT))
- {
- gmx_fatal(FARGS, "Error reading dt from file");
- }
-
- if (stat->eFF == effG87)
- {
- printf("Box X Y Z ? ");
- fflush(stdout);
- if (3 != scanf("%lf%lf%lf", &stat->BOX[XX], &stat->BOX[YY], &stat->BOX[ZZ]))
- {
- gmx_fatal(FARGS, "Error reading box in file");
- }
- }
- do
- {
- c = fgetc(fp);
- printf("%c", c);
- }
- while (c != '\n');
- printf("\n");
- fflush(stdout);
- break;
- default:
- printf("Hellow World\n");
- }
-}
-
-static gmx_bool do_read_xyz(t_trxstatus *status, FILE *fp, int natoms,
- rvec x[], matrix box)
-{
- int i, m;
- double x0;
-
- for (i = 0; (i < natoms); i++)
- {
- for (m = 0; (m < DIM); m++)
- {
- if (fscanf(fp, "%lf", &x0) != 1)
- {
- if (i || m)
- {
- fprintf(stderr, "error reading statusfile: x[%d][%d]\n", i, m);
- }
- /* else eof! */
- return FALSE;
- }
- x[i][m] = x0;
- }
- }
- if (status->bReadBox)
- {
- for (m = 0; (m < DIM); m++)
- {
- if (fscanf(fp, "%lf", &x0) != 1)
- {
- return FALSE;
- }
- box[m][m] = x0;
- }
- }
- return TRUE;
-}
-
-static gmx_bool xyz_next_x(t_trxstatus *status, FILE *fp, const output_env_t oenv,
- real *t, int natoms, rvec x[], matrix box)
-/* Reads until a new x can be found (return TRUE)
- * or eof (return FALSE)
- */
-{
- real pt;
-
- pt = *t;
- while (!bTimeSet(TBEGIN) || (*t < rTimeValue(TBEGIN)))
- {
- if (!do_read_xyz(status, fp, natoms, x, box))
- {
- return FALSE;
- }
- printcount(status, oenv, *t, FALSE);
- *t += status->DT;
- pt = *t;
- }
- if (!bTimeSet(TEND) || (*t <= rTimeValue(TEND)))
- {
- if (!do_read_xyz(status, fp, natoms, x, box))
- {
- printlast(status, oenv, *t);
- return FALSE;
- }
- printcount(status, oenv, *t, FALSE);
- pt = *t;
- *t += status->DT;
- return TRUE;
- }
- printlast(status, oenv, pt);
- return FALSE;
-}
-
-static int xyz_first_x(t_trxstatus *status, FILE *fp, const output_env_t oenv,
- real *t, rvec **x, matrix box)
-/* Reads fp, mallocs x, and returns x and box
- * Returns natoms when successful, FALSE otherwise
- */
-{
- int m;
-
- initcount(status);
-
- clear_mat(box);
- choose_file_format(fp);
-
- for (m = 0; (m < DIM); m++)
- {
- box[m][m] = status->BOX[m];
- }
-
- snew(*x, status->NATOMS);
- *t = status->DT;
- if (!xyz_next_x(status, fp, oenv, t, status->NATOMS, *x, box))
- {
- return 0;
- }
- *t = 0.0;
-
- return status->NATOMS;
-}
-
static gmx_bool pdb_next_x(t_trxstatus *status, FILE *fp, t_trxframe *fr)
{
t_atoms atoms;
status->persistent_line);
bRet = (fr->natoms > 0);
break;
- case efG87:
- bRet = xyz_next_x(status, gmx_fio_getfp(status->fio), oenv, &fr->time,
- fr->natoms, fr->x, fr->box);
- fr->bTime = bRet;
- fr->bX = bRet;
- fr->bBox = bRet;
- break;
case efXTC:
/* B. Hess 2005-4-20
* Sometimes is off by one frame
}
fio = (*status)->fio = gmx_fio_open(fn, "r");
break;
- case efG87:
- fr->natoms = xyz_first_x(*status, gmx_fio_getfp(fio), oenv, &fr->time,
- &fr->x, fr->box);
- if (fr->natoms)
- {
- fr->bTime = TRUE;
- fr->bX = TRUE;
- fr->bBox = TRUE;
- printcount(*status, oenv, fr->time, FALSE);
- }
- bFirst = FALSE;
- break;
case efXTC:
if (read_first_xtc(fio, &fr->natoms, &fr->step, &fr->time, fr->box, &fr->x,
&fr->prec, &bOK) == 0)
#include "fitahx.h"
#include "gromacs/fileio/futil.h"
#include "gstat.h"
-#include "gromacs/fileio/g87io.h"
#include "hxprops.h"
#include "macros.h"
#include "gromacs/math/utilities.h"
#include "xvgr.h"
#include "gmx_ana.h"
-void dump_otrj(FILE *otrj, int natoms, atom_id all_index[], rvec x[],
- real fac, rvec xav[])
-{
- static FILE *fp = NULL;
- static real fac0 = 1.0;
-
- int i, ai, m;
- real xa, xm;
-
- if (fp == NULL)
- {
- fp = ffopen("WEDGAMMA10.DAT", "w");
- fac0 = fac;
- }
- fac /= fac0;
-
- fprintf(fp, "%10g\n", fac);
-
- for (i = 0; (i < natoms); i++)
- {
- ai = all_index[i];
- for (m = 0; (m < DIM); m++)
- {
- xa = xav[ai][m];
- xm = x[ai][m]*fac;
- xav[ai][m] = xa+xm;
- x[ai][m] = xm;
- }
- }
- write_g87_ndx(otrj, natoms, all_index, x, NULL);
-}
-
int gmx_helix(int argc, char *argv[])
{
const char *desc[] = {
"[BB]9.[bb] Ellipticity at 222 nm according to Hirst and Brooks.",
"[PAR]"
};
- static const char *ppp[efhNR+2] = {
- NULL, "RAD", "TWIST", "RISE", "LEN", "NHX", "DIP", "RMS", "CPHI",
- "RMSA", "PHI", "PSI", "HB3", "HB4", "HB5", "CD222", NULL
- };
static gmx_bool bCheck = FALSE, bFit = TRUE, bDBG = FALSE, bEV = FALSE;
static int rStart = 0, rEnd = 0, r0 = 1;
t_pargs pa [] = {
"Toggle fit to a perfect helix" },
{ "-db", FALSE, etBOOL, {&bDBG},
"Print debug info" },
- { "-prop", FALSE, etENUM, {ppp},
- "Select property to weight eigenvectors with. WARNING experimental stuff" },
{ "-ev", FALSE, etBOOL, {&bEV},
"Write a new 'trajectory' file for ED" },
{ "-ahxstart", FALSE, etINT, {&rStart},
};
output_env_t oenv;
- FILE *otrj;
- char buf[54], prop[256];
+ char buf[54];
t_trxstatus *status;
int natoms, nre, nres;
t_bb *bb;
- int i, j, ai, m, nall, nbb, nca, teller, nSel = 0;
+ int i, j, m, nall, nbb, nca, teller, nSel = 0;
atom_id *bbindex, *caindex, *allindex;
t_topology *top;
int ePBC;
- rvec *x, *xref, *xav;
+ rvec *x, *xref;
real t;
- real rms, fac;
+ real rms;
matrix box;
gmx_rmpbc_t gpbc = NULL;
gmx_bool bRange;
{ efTPX, NULL, NULL, ffREAD },
{ efNDX, NULL, NULL, ffREAD },
{ efTRX, "-f", NULL, ffREAD },
- { efG87, "-to", NULL, ffOPTWR },
{ efSTO, "-cz", "zconf", ffWRITE },
- { efSTO, "-co", "waver", ffWRITE }
};
#define NFILE asize(fnm)
natoms = read_first_x(oenv, &status, opt2fn("-f", NFILE, fnm), &t, &x, box);
- if (opt2bSet("-to", NFILE, fnm))
- {
- otrj = opt2FILE("-to", NFILE, fnm, "w");
- strcpy(prop, ppp[0]);
- fprintf(otrj, "%s Weighted Trajectory: %d atoms, NO box\n", prop, natoms);
- }
- else
- {
- otrj = NULL;
- }
-
if (natoms != top->atoms.nr)
{
gmx_fatal(FARGS, "Sorry can only run when the number of atoms in the run input file (%d) is equal to the number in the trajectory (%d)",
gpbc = gmx_rmpbc_init(&top->idef, ePBC, natoms);
- snew(xav, natoms);
teller = 0;
do
{
xf[efhHB4].fp, xf[efhHB4].fp2,
xf[efhHB5].fp, xf[efhHB5].fp2,
t, nres, bb);
-
- if (otrj)
- {
- dump_otrj(otrj, nall, allindex, x, xf[nSel].val, xav);
- }
}
}
while (read_next_x(oenv, status, &t, x, box));
close_trj(status);
- if (otrj)
- {
- ffclose(otrj);
- fac = 1.0/teller;
- for (i = 0; (i < nall); i++)
- {
- ai = allindex[i];
- for (m = 0; (m < DIM); m++)
- {
- xav[ai][m] *= fac;
- }
- }
- write_sto_conf_indexed(opt2fn("-co", NFILE, fnm),
- "Weighted and Averaged conformation",
- &(top->atoms), xav, NULL, ePBC, box, nall, allindex);
- }
-
for (i = 0; (i < nres); i++)
{
if (bb[i].nrms > 0)
*
* Copyright (c) 1991-2000, University of Groningen, The Netherlands.
* Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2013, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
#include "gromacs/fileio/xtcio.h"
#include "do_fit.h"
#include "rmpbc.h"
-#include "gromacs/fileio/g87io.h"
#include "pbc.h"
#include "xvgr.h"
#include "gromacs/fileio/xdrf.h"
#include "gromacs/fileio/xtcio.h"
#include "do_fit.h"
#include "rmpbc.h"
-#include "gromacs/fileio/g87io.h"
#include "pbc.h"
#include "viewit.h"
#include "xvgr.h"
"[gmx-trjcat] is better suited for concatenating multiple trajectory files.",
"[PAR]",
- "Currently seven formats are supported for input and output:",
- "[TT].xtc[tt], [TT].trr[tt], [TT].trj[tt], [TT].gro[tt], [TT].g96[tt],",
- "[TT].pdb[tt] and [TT].g87[tt].",
+ "The following formats are supported for input and output:",
+ "[TT].xtc[tt], [TT].trr[tt], [TT].trj[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],",
grpnm);
break;
case efXTC:
- case efG87:
case efTRR:
case efTRJ:
out = NULL;
}
}
- if (ftp == efG87)
- {
- fprintf(gmx_fio_getfp(trx_get_fileio(trxout)),
- "Generated by %s. #atoms=%d, a BOX is"
- " stored in this file.\n", ShortProgram(), nout);
- }
-
/* Start the big loop over frames */
file_nr = 0;
frame = 0;
break;
case efTRJ:
case efTRR:
- case efG87:
case efXTC:
if (bSplitHere)
{
"spc2-traj.pdb",
"spc2-traj.g96"
};
-// .g87 and .xyz file reading has been broken (and awkwardly
-// interactive) since at least v4.5 proposed on gmx-developers for
-// removing that support, so not testing it
#ifdef __INTEL_COMPILER
#pragma warning( disable : 177 )
+++ /dev/null
-Generated by bin/trjconv. #atoms=6, a BOX is stored in this file.
- 0.569 1.275 1.165 0.476 1.268 1.128 0.580 1.364 1.209 1.555
- 1.511 0.703 1.498 1.495 0.784 1.496 1.521 0.623
- 3.010 3.010 3.010
- 0.569 9.275 1.165 0.476 1.268 1.128 0.580 1.364 4.209 1.555
- 1.511 0.703 1.498 1.495 0.784 1.496 1.521 2.623
- 4.010 3.030 9.010