From: Teemu Murtola Date: Wed, 22 Jul 2015 04:38:45 +0000 (+0300) Subject: Move read_tps_conf() to confio.h X-Git-Url: http://biod.pnpi.spb.ru/gitweb/?p=alexxy%2Fgromacs.git;a=commitdiff_plain;h=87992126dd5b43f3e00415d07967b99f792a4527 Move read_tps_conf() to confio.h This function is nearly identical to read_stx_conf(), and they even share some helper functions, so they are better in the same file. Now tpxio.h is all about reading/writing tpr files, and code to handle multiple formats is elsewhere. Change-Id: I348a5bae5fe8aae2ad68ec29fe54068fccd97501 --- diff --git a/src/gromacs/fileio/confio.cpp b/src/gromacs/fileio/confio.cpp index 6a022edff8..a7d9fdaa5d 100644 --- a/src/gromacs/fileio/confio.cpp +++ b/src/gromacs/fileio/confio.cpp @@ -58,6 +58,7 @@ #include "gromacs/legacyheaders/typedefs.h" #include "gromacs/math/vec.h" #include "gromacs/pbcutil/pbc.h" +#include "gromacs/topology/atomprop.h" #include "gromacs/topology/mtop_util.h" #include "gromacs/topology/symtab.h" #include "gromacs/topology/topology.h" @@ -1634,6 +1635,50 @@ void get_stx_coordnum(const char *infile, int *natoms) } } +static void tpx_make_chain_identifiers(t_atoms *atoms, t_block *mols) +{ + int m, a, a0, a1, r; + char c, chainid; + int chainnum; + + /* We always assign a new chain number, but save the chain id characters + * for larger molecules. + */ +#define CHAIN_MIN_ATOMS 15 + + chainnum = 0; + chainid = 'A'; + for (m = 0; m < mols->nr; m++) + { + a0 = mols->index[m]; + a1 = mols->index[m+1]; + if ((a1-a0 >= CHAIN_MIN_ATOMS) && (chainid <= 'Z')) + { + c = chainid; + chainid++; + } + else + { + c = ' '; + } + for (a = a0; a < a1; a++) + { + atoms->resinfo[atoms->atom[a].resind].chainnum = chainnum; + atoms->resinfo[atoms->atom[a].resind].chainid = c; + } + chainnum++; + } + + /* Blank out the chain id if there was only one chain */ + if (chainid == 'B') + { + for (r = 0; r < atoms->nres; r++) + { + atoms->resinfo[r].chainid = ' '; + } + } +} + void read_stx_conf(const char *infile, char *title, t_atoms *atoms, rvec x[], rvec *v, int *ePBC, matrix box) { @@ -1715,3 +1760,103 @@ void read_stx_conf(const char *infile, char *title, t_atoms *atoms, gmx_incons("Not supported in read_stx_conf"); } } + +static void done_gmx_groups_t(gmx_groups_t *g) +{ + int i; + + for (i = 0; (i < egcNR); i++) + { + if (NULL != g->grps[i].nm_ind) + { + sfree(g->grps[i].nm_ind); + g->grps[i].nm_ind = NULL; + } + if (NULL != g->grpnr[i]) + { + sfree(g->grpnr[i]); + g->grpnr[i] = NULL; + } + } + /* The contents of this array is in symtab, don't free it here */ + sfree(g->grpname); +} + +gmx_bool read_tps_conf(const char *infile, char *title, t_topology *top, int *ePBC, + rvec **x, rvec **v, matrix box, gmx_bool bMass) +{ + t_tpxheader header; + int natoms, i, version, generation; + gmx_bool bTop, bXNULL = FALSE; + gmx_mtop_t *mtop; + gmx_atomprop_t aps; + + bTop = fn2bTPX(infile); + *ePBC = -1; + if (bTop) + { + read_tpxheader(infile, &header, TRUE, &version, &generation); + if (x) + { + snew(*x, header.natoms); + } + if (v) + { + snew(*v, header.natoms); + } + snew(mtop, 1); + *ePBC = read_tpx(infile, NULL, box, &natoms, + (x == NULL) ? NULL : *x, (v == NULL) ? NULL : *v, NULL, mtop); + *top = gmx_mtop_t_to_t_topology(mtop); + /* In this case we need to throw away the group data too */ + done_gmx_groups_t(&mtop->groups); + sfree(mtop); + std::strcpy(title, *top->name); + tpx_make_chain_identifiers(&top->atoms, &top->mols); + } + else + { + get_stx_coordnum(infile, &natoms); + init_t_atoms(&top->atoms, natoms, (fn2ftp(infile) == efPDB)); + if (x == NULL) + { + snew(x, 1); + bXNULL = TRUE; + } + snew(*x, natoms); + if (v) + { + snew(*v, natoms); + } + read_stx_conf(infile, title, &top->atoms, *x, (v == NULL) ? NULL : *v, ePBC, box); + if (bXNULL) + { + sfree(*x); + sfree(x); + } + if (bMass) + { + aps = gmx_atomprop_init(); + for (i = 0; (i < natoms); i++) + { + if (!gmx_atomprop_query(aps, epropMass, + *top->atoms.resinfo[top->atoms.atom[i].resind].name, + *top->atoms.atomname[i], + &(top->atoms.atom[i].m))) + { + if (debug) + { + fprintf(debug, "Can not find mass for atom %s %d %s, setting to 1\n", + *top->atoms.resinfo[top->atoms.atom[i].resind].name, + top->atoms.resinfo[top->atoms.atom[i].resind].nr, + *top->atoms.atomname[i]); + } + } + } + gmx_atomprop_destroy(aps); + } + top->idef.ntypes = -1; + } + + return bTop; +} diff --git a/src/gromacs/fileio/confio.h b/src/gromacs/fileio/confio.h index 2b149c23a8..f27b1b648b 100644 --- a/src/gromacs/fileio/confio.h +++ b/src/gromacs/fileio/confio.h @@ -3,7 +3,7 @@ * * Copyright (c) 1991-2000, University of Groningen, The Netherlands. * Copyright (c) 2001-2004, The GROMACS development team. - * Copyright (c) 2013,2014, by the GROMACS development team, led by + * Copyright (c) 2013,2014,2015, 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. @@ -52,6 +52,7 @@ extern "C" { struct gmx_mtop_t; struct t_atoms; +struct t_topology; int read_g96_conf(FILE *fp, const char *infile, t_trxframe *fr, char *line); /* read a Gromos96 coordinate or trajectory file, * @@ -107,6 +108,15 @@ void read_stx_conf(const char *infile, char *title, * If ePBC!=NULL return the type of pbc in *ePBC or -1 if unknown. */ +gmx_bool read_tps_conf(const char *infile, char *title, struct t_topology *top, + int *ePBC, rvec **x, rvec **v, matrix box, gmx_bool bMass); +/* Read title, top.atoms, x, v (if not NULL) and box from an STX file, + * memory for atoms, x and v will be allocated. + * Return TRUE if a complete topology was read. + * If infile is a TPX file read the whole top, + * else if bMass=TRUE, read the masses into top.atoms from the mass database. + */ + #ifdef __cplusplus } #endif diff --git a/src/gromacs/fileio/tests/confio.cpp b/src/gromacs/fileio/tests/confio.cpp index 00f971c7d0..eb747f4b60 100644 --- a/src/gromacs/fileio/tests/confio.cpp +++ b/src/gromacs/fileio/tests/confio.cpp @@ -50,7 +50,6 @@ #include #include "gromacs/fileio/filenm.h" -#include "gromacs/fileio/tpxio.h" #include "gromacs/math/vec.h" #include "gromacs/math/vectypes.h" #include "gromacs/topology/atoms.h" diff --git a/src/gromacs/fileio/tpxio.cpp b/src/gromacs/fileio/tpxio.cpp index 8aa9492c46..623c1d23fc 100644 --- a/src/gromacs/fileio/tpxio.cpp +++ b/src/gromacs/fileio/tpxio.cpp @@ -45,7 +45,6 @@ #include -#include "gromacs/fileio/confio.h" #include "gromacs/fileio/filenm.h" #include "gromacs/fileio/gmxfio.h" #include "gromacs/fileio/gmxfio-xdr.h" @@ -54,7 +53,6 @@ #include "gromacs/legacyheaders/names.h" #include "gromacs/legacyheaders/txtdump.h" #include "gromacs/math/vec.h" -#include "gromacs/topology/atomprop.h" #include "gromacs/topology/block.h" #include "gromacs/topology/mtop_util.h" #include "gromacs/topology/symtab.h" @@ -2772,50 +2770,6 @@ static void do_cmap(t_fileio *fio, gmx_cmap_t *cmap_grid, gmx_bool bRead) } -void tpx_make_chain_identifiers(t_atoms *atoms, t_block *mols) -{ - int m, a, a0, a1, r; - char c, chainid; - int chainnum; - - /* We always assign a new chain number, but save the chain id characters - * for larger molecules. - */ -#define CHAIN_MIN_ATOMS 15 - - chainnum = 0; - chainid = 'A'; - for (m = 0; m < mols->nr; m++) - { - a0 = mols->index[m]; - a1 = mols->index[m+1]; - if ((a1-a0 >= CHAIN_MIN_ATOMS) && (chainid <= 'Z')) - { - c = chainid; - chainid++; - } - else - { - c = ' '; - } - for (a = a0; a < a1; a++) - { - atoms->resinfo[atoms->atom[a].resind].chainnum = chainnum; - atoms->resinfo[atoms->atom[a].resind].chainid = c; - } - chainnum++; - } - - /* Blank out the chain id if there was only one chain */ - if (chainid == 'B') - { - for (r = 0; r < atoms->nres; r++) - { - atoms->resinfo[r].chainid = ' '; - } - } -} - static void do_moltype(t_fileio *fio, gmx_moltype_t *molt, gmx_bool bRead, t_symtab *symtab, int file_version, gmx_groups_t *groups) @@ -3709,103 +3663,3 @@ gmx_bool fn2bTPX(const char *file) { return (efTPR == fn2ftp(file)); } - -static void done_gmx_groups_t(gmx_groups_t *g) -{ - int i; - - for (i = 0; (i < egcNR); i++) - { - if (NULL != g->grps[i].nm_ind) - { - sfree(g->grps[i].nm_ind); - g->grps[i].nm_ind = NULL; - } - if (NULL != g->grpnr[i]) - { - sfree(g->grpnr[i]); - g->grpnr[i] = NULL; - } - } - /* The contents of this array is in symtab, don't free it here */ - sfree(g->grpname); -} - -gmx_bool read_tps_conf(const char *infile, char *title, t_topology *top, int *ePBC, - rvec **x, rvec **v, matrix box, gmx_bool bMass) -{ - t_tpxheader header; - int natoms, i, version, generation; - gmx_bool bTop, bXNULL = FALSE; - gmx_mtop_t *mtop; - gmx_atomprop_t aps; - - bTop = fn2bTPX(infile); - *ePBC = -1; - if (bTop) - { - read_tpxheader(infile, &header, TRUE, &version, &generation); - if (x) - { - snew(*x, header.natoms); - } - if (v) - { - snew(*v, header.natoms); - } - snew(mtop, 1); - *ePBC = read_tpx(infile, NULL, box, &natoms, - (x == NULL) ? NULL : *x, (v == NULL) ? NULL : *v, NULL, mtop); - *top = gmx_mtop_t_to_t_topology(mtop); - /* In this case we need to throw away the group data too */ - done_gmx_groups_t(&mtop->groups); - sfree(mtop); - std::strcpy(title, *top->name); - tpx_make_chain_identifiers(&top->atoms, &top->mols); - } - else - { - get_stx_coordnum(infile, &natoms); - init_t_atoms(&top->atoms, natoms, (fn2ftp(infile) == efPDB)); - if (x == NULL) - { - snew(x, 1); - bXNULL = TRUE; - } - snew(*x, natoms); - if (v) - { - snew(*v, natoms); - } - read_stx_conf(infile, title, &top->atoms, *x, (v == NULL) ? NULL : *v, ePBC, box); - if (bXNULL) - { - sfree(*x); - sfree(x); - } - if (bMass) - { - aps = gmx_atomprop_init(); - for (i = 0; (i < natoms); i++) - { - if (!gmx_atomprop_query(aps, epropMass, - *top->atoms.resinfo[top->atoms.atom[i].resind].name, - *top->atoms.atomname[i], - &(top->atoms.atom[i].m))) - { - if (debug) - { - fprintf(debug, "Can not find mass for atom %s %d %s, setting to 1\n", - *top->atoms.resinfo[top->atoms.atom[i].resind].name, - top->atoms.resinfo[top->atoms.atom[i].resind].nr, - *top->atoms.atomname[i]); - } - } - } - gmx_atomprop_destroy(aps); - } - top->idef.ntypes = -1; - } - - return bTop; -} diff --git a/src/gromacs/fileio/tpxio.h b/src/gromacs/fileio/tpxio.h index d85a8e3a0f..cec32f10f2 100644 --- a/src/gromacs/fileio/tpxio.h +++ b/src/gromacs/fileio/tpxio.h @@ -123,17 +123,6 @@ int read_tpx_top(const char *fn, gmx_bool fn2bTPX(const char *file); /* return if *file is one of the TPX file types */ -gmx_bool read_tps_conf(const char *infile, char *title, struct t_topology *top, - int *ePBC, rvec **x, rvec **v, matrix box, gmx_bool bMass); -/* Read title, top.atoms, x, v (if not NULL) and box from an STX file, - * memory for atoms, x and v will be allocated. - * Return TRUE if a complete topology was read. - * If infile is a TPX file read the whole top, - * else if bMass=TRUE, read the masses into top.atoms from the mass database. - */ - -void tpx_make_chain_identifiers(struct t_atoms *atoms, struct t_block *mols); - #ifdef __cplusplus } #endif diff --git a/src/gromacs/gmxana/eigio.c b/src/gromacs/gmxana/eigio.c index 78649cc2f5..1561d5a446 100644 --- a/src/gromacs/gmxana/eigio.c +++ b/src/gromacs/gmxana/eigio.c @@ -38,7 +38,6 @@ #include "eigio.h" -#include "gromacs/fileio/tpxio.h" #include "gromacs/fileio/trnio.h" #include "gromacs/math/vec.h" #include "gromacs/utility/futil.h" diff --git a/src/gromacs/gmxana/gmx_bundle.c b/src/gromacs/gmxana/gmx_bundle.c index 62b309d95c..8daa582b6b 100644 --- a/src/gromacs/gmxana/gmx_bundle.c +++ b/src/gromacs/gmxana/gmx_bundle.c @@ -40,7 +40,7 @@ #include #include "gromacs/commandline/pargs.h" -#include "gromacs/fileio/tpxio.h" +#include "gromacs/fileio/confio.h" #include "gromacs/fileio/trxio.h" #include "gromacs/fileio/xvgr.h" #include "gromacs/gmxana/gmx_ana.h" diff --git a/src/gromacs/gmxana/gmx_chi.c b/src/gromacs/gmxana/gmx_chi.c index 7067df8160..0b12224e2e 100644 --- a/src/gromacs/gmxana/gmx_chi.c +++ b/src/gromacs/gmxana/gmx_chi.c @@ -45,7 +45,6 @@ #include "gromacs/fileio/confio.h" #include "gromacs/fileio/matio.h" #include "gromacs/fileio/pdbio.h" -#include "gromacs/fileio/tpxio.h" #include "gromacs/fileio/xvgr.h" #include "gromacs/gmxana/gmx_ana.h" #include "gromacs/gmxana/gstat.h" diff --git a/src/gromacs/gmxana/gmx_cluster.c b/src/gromacs/gmxana/gmx_cluster.c index f6da5c1243..3a746b6eb3 100644 --- a/src/gromacs/gmxana/gmx_cluster.c +++ b/src/gromacs/gmxana/gmx_cluster.c @@ -41,8 +41,8 @@ #include #include "gromacs/commandline/pargs.h" +#include "gromacs/fileio/confio.h" #include "gromacs/fileio/matio.h" -#include "gromacs/fileio/tpxio.h" #include "gromacs/fileio/trnio.h" #include "gromacs/fileio/trxio.h" #include "gromacs/fileio/xvgr.h" diff --git a/src/gromacs/gmxana/gmx_confrms.c b/src/gromacs/gmxana/gmx_confrms.c index c8768b9227..b4489a7e67 100644 --- a/src/gromacs/gmxana/gmx_confrms.c +++ b/src/gromacs/gmxana/gmx_confrms.c @@ -43,7 +43,6 @@ #include "gromacs/fileio/confio.h" #include "gromacs/fileio/filenm.h" #include "gromacs/fileio/pdbio.h" -#include "gromacs/fileio/tpxio.h" #include "gromacs/gmxana/gmx_ana.h" #include "gromacs/legacyheaders/macros.h" #include "gromacs/legacyheaders/txtdump.h" diff --git a/src/gromacs/gmxana/gmx_current.c b/src/gromacs/gmxana/gmx_current.c index 3a91e57165..107d872230 100644 --- a/src/gromacs/gmxana/gmx_current.c +++ b/src/gromacs/gmxana/gmx_current.c @@ -38,7 +38,7 @@ #include #include "gromacs/commandline/pargs.h" -#include "gromacs/fileio/tpxio.h" +#include "gromacs/fileio/confio.h" #include "gromacs/fileio/trxio.h" #include "gromacs/fileio/xvgr.h" #include "gromacs/gmxana/gmx_ana.h" diff --git a/src/gromacs/gmxana/gmx_density.c b/src/gromacs/gmxana/gmx_density.c index 954e27cac8..29bd719c43 100644 --- a/src/gromacs/gmxana/gmx_density.c +++ b/src/gromacs/gmxana/gmx_density.c @@ -42,7 +42,6 @@ #include #include "gromacs/commandline/pargs.h" -#include "gromacs/fileio/tpxio.h" #include "gromacs/fileio/trxio.h" #include "gromacs/fileio/xvgr.h" #include "gromacs/gmxana/gmx_ana.h" diff --git a/src/gromacs/gmxana/gmx_densmap.c b/src/gromacs/gmxana/gmx_densmap.c index b32b789d05..c88fa5da43 100644 --- a/src/gromacs/gmxana/gmx_densmap.c +++ b/src/gromacs/gmxana/gmx_densmap.c @@ -40,8 +40,8 @@ #include #include "gromacs/commandline/pargs.h" +#include "gromacs/fileio/confio.h" #include "gromacs/fileio/matio.h" -#include "gromacs/fileio/tpxio.h" #include "gromacs/fileio/trxio.h" #include "gromacs/gmxana/gmx_ana.h" #include "gromacs/gmxana/gstat.h" diff --git a/src/gromacs/gmxana/gmx_dipoles.cpp b/src/gromacs/gmxana/gmx_dipoles.cpp index 2cdf41e9fe..a173e8291d 100644 --- a/src/gromacs/gmxana/gmx_dipoles.cpp +++ b/src/gromacs/gmxana/gmx_dipoles.cpp @@ -43,6 +43,7 @@ #include "gromacs/commandline/pargs.h" #include "gromacs/correlationfunctions/autocorr.h" +#include "gromacs/fileio/confio.h" #include "gromacs/fileio/enxio.h" #include "gromacs/fileio/matio.h" #include "gromacs/fileio/trxio.h" diff --git a/src/gromacs/gmxana/gmx_do_dssp.c b/src/gromacs/gmxana/gmx_do_dssp.c index 27748988b6..cc33e17641 100644 --- a/src/gromacs/gmxana/gmx_do_dssp.c +++ b/src/gromacs/gmxana/gmx_do_dssp.c @@ -39,10 +39,10 @@ #include #include "gromacs/commandline/pargs.h" +#include "gromacs/fileio/confio.h" #include "gromacs/fileio/matio.h" #include "gromacs/fileio/pdbio.h" #include "gromacs/fileio/strdb.h" -#include "gromacs/fileio/tpxio.h" #include "gromacs/fileio/trxio.h" #include "gromacs/fileio/xvgr.h" #include "gromacs/gmxana/gstat.h" diff --git a/src/gromacs/gmxana/gmx_filter.c b/src/gromacs/gmxana/gmx_filter.c index cb26f11be0..2f8e6c3b8e 100644 --- a/src/gromacs/gmxana/gmx_filter.c +++ b/src/gromacs/gmxana/gmx_filter.c @@ -3,7 +3,7 @@ * * Copyright (c) 1991-2000, University of Groningen, The Netherlands. * Copyright (c) 2001-2004, The GROMACS development team. - * Copyright (c) 2013,2014, by the GROMACS development team, led by + * Copyright (c) 2013,2014,2015, 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. @@ -40,7 +40,7 @@ #include #include "gromacs/commandline/pargs.h" -#include "gromacs/fileio/tpxio.h" +#include "gromacs/fileio/confio.h" #include "gromacs/fileio/trxio.h" #include "gromacs/gmxana/gmx_ana.h" #include "gromacs/gmxana/princ.h" diff --git a/src/gromacs/gmxana/gmx_genion.c b/src/gromacs/gmxana/gmx_genion.c index 2790a4213f..c7d980eee9 100644 --- a/src/gromacs/gmxana/gmx_genion.c +++ b/src/gromacs/gmxana/gmx_genion.c @@ -42,7 +42,6 @@ #include "gromacs/commandline/pargs.h" #include "gromacs/fileio/confio.h" -#include "gromacs/fileio/tpxio.h" #include "gromacs/gmxana/gmx_ana.h" #include "gromacs/legacyheaders/force.h" #include "gromacs/legacyheaders/macros.h" diff --git a/src/gromacs/gmxana/gmx_gyrate.c b/src/gromacs/gmxana/gmx_gyrate.c index 7d02832330..6b2b937626 100644 --- a/src/gromacs/gmxana/gmx_gyrate.c +++ b/src/gromacs/gmxana/gmx_gyrate.c @@ -41,7 +41,7 @@ #include "gromacs/commandline/pargs.h" #include "gromacs/correlationfunctions/autocorr.h" -#include "gromacs/fileio/tpxio.h" +#include "gromacs/fileio/confio.h" #include "gromacs/fileio/trxio.h" #include "gromacs/fileio/xvgr.h" #include "gromacs/gmxana/gmx_ana.h" diff --git a/src/gromacs/gmxana/gmx_hydorder.c b/src/gromacs/gmxana/gmx_hydorder.c index 603b111b42..98e33e5c9a 100644 --- a/src/gromacs/gmxana/gmx_hydorder.c +++ b/src/gromacs/gmxana/gmx_hydorder.c @@ -39,8 +39,8 @@ #include #include "gromacs/commandline/pargs.h" +#include "gromacs/fileio/confio.h" #include "gromacs/fileio/matio.h" -#include "gromacs/fileio/tpxio.h" #include "gromacs/fileio/trxio.h" #include "gromacs/fileio/xvgr.h" #include "gromacs/gmxana/binsearch.h" diff --git a/src/gromacs/gmxana/gmx_make_edi.c b/src/gromacs/gmxana/gmx_make_edi.c index aa95ade3ea..e33ddc7eea 100644 --- a/src/gromacs/gmxana/gmx_make_edi.c +++ b/src/gromacs/gmxana/gmx_make_edi.c @@ -46,7 +46,6 @@ #include "gromacs/commandline/pargs.h" #include "gromacs/fileio/confio.h" #include "gromacs/fileio/pdbio.h" -#include "gromacs/fileio/tpxio.h" #include "gromacs/fileio/xvgr.h" #include "gromacs/gmxana/eigio.h" #include "gromacs/legacyheaders/macros.h" diff --git a/src/gromacs/gmxana/gmx_mdmat.c b/src/gromacs/gmxana/gmx_mdmat.c index 5aeb6eb931..8d2ac08527 100644 --- a/src/gromacs/gmxana/gmx_mdmat.c +++ b/src/gromacs/gmxana/gmx_mdmat.c @@ -40,9 +40,9 @@ #include #include "gromacs/commandline/pargs.h" +#include "gromacs/fileio/confio.h" #include "gromacs/fileio/filenm.h" #include "gromacs/fileio/matio.h" -#include "gromacs/fileio/tpxio.h" #include "gromacs/fileio/trxio.h" #include "gromacs/fileio/xvgr.h" #include "gromacs/gmxana/gmx_ana.h" diff --git a/src/gromacs/gmxana/gmx_mindist.c b/src/gromacs/gmxana/gmx_mindist.c index 82d7394ad4..214ba9ef40 100644 --- a/src/gromacs/gmxana/gmx_mindist.c +++ b/src/gromacs/gmxana/gmx_mindist.c @@ -41,7 +41,7 @@ #include #include "gromacs/commandline/pargs.h" -#include "gromacs/fileio/tpxio.h" +#include "gromacs/fileio/confio.h" #include "gromacs/fileio/trxio.h" #include "gromacs/fileio/xvgr.h" #include "gromacs/gmxana/gmx_ana.h" diff --git a/src/gromacs/gmxana/gmx_msd.c b/src/gromacs/gmxana/gmx_msd.c index 1e288eac27..3a6361d896 100644 --- a/src/gromacs/gmxana/gmx_msd.c +++ b/src/gromacs/gmxana/gmx_msd.c @@ -41,7 +41,6 @@ #include "gromacs/commandline/pargs.h" #include "gromacs/fileio/confio.h" -#include "gromacs/fileio/tpxio.h" #include "gromacs/fileio/trxio.h" #include "gromacs/fileio/xvgr.h" #include "gromacs/gmxana/gmx_ana.h" diff --git a/src/gromacs/gmxana/gmx_nmens.c b/src/gromacs/gmxana/gmx_nmens.c index ea03919825..4028f46b45 100644 --- a/src/gromacs/gmxana/gmx_nmens.c +++ b/src/gromacs/gmxana/gmx_nmens.c @@ -40,8 +40,8 @@ #include #include "gromacs/commandline/pargs.h" +#include "gromacs/fileio/confio.h" #include "gromacs/fileio/pdbio.h" -#include "gromacs/fileio/tpxio.h" #include "gromacs/fileio/trxio.h" #include "gromacs/gmxana/eigio.h" #include "gromacs/gmxana/gmx_ana.h" diff --git a/src/gromacs/gmxana/gmx_nmtraj.c b/src/gromacs/gmxana/gmx_nmtraj.c index b20d077884..7e98f3de6d 100644 --- a/src/gromacs/gmxana/gmx_nmtraj.c +++ b/src/gromacs/gmxana/gmx_nmtraj.c @@ -41,8 +41,8 @@ #include #include "gromacs/commandline/pargs.h" +#include "gromacs/fileio/confio.h" #include "gromacs/fileio/pdbio.h" -#include "gromacs/fileio/tpxio.h" #include "gromacs/fileio/trxio.h" #include "gromacs/gmxana/eigio.h" #include "gromacs/gmxana/gmx_ana.h" diff --git a/src/gromacs/gmxana/gmx_order.c b/src/gromacs/gmxana/gmx_order.c index 61293ef432..c0dded8283 100644 --- a/src/gromacs/gmxana/gmx_order.c +++ b/src/gromacs/gmxana/gmx_order.c @@ -41,7 +41,6 @@ #include "gromacs/commandline/pargs.h" #include "gromacs/fileio/confio.h" -#include "gromacs/fileio/tpxio.h" #include "gromacs/fileio/trxio.h" #include "gromacs/fileio/xvgr.h" #include "gromacs/gmxana/cmat.h" diff --git a/src/gromacs/gmxana/gmx_principal.c b/src/gromacs/gmxana/gmx_principal.c index 5c2a808ae2..68d10a239b 100644 --- a/src/gromacs/gmxana/gmx_principal.c +++ b/src/gromacs/gmxana/gmx_principal.c @@ -40,7 +40,7 @@ #include #include "gromacs/commandline/pargs.h" -#include "gromacs/fileio/tpxio.h" +#include "gromacs/fileio/confio.h" #include "gromacs/fileio/trxio.h" #include "gromacs/fileio/xvgr.h" #include "gromacs/gmxana/gmx_ana.h" diff --git a/src/gromacs/gmxana/gmx_rms.c b/src/gromacs/gmxana/gmx_rms.c index 4a35277dc5..3e32fa29e1 100644 --- a/src/gromacs/gmxana/gmx_rms.c +++ b/src/gromacs/gmxana/gmx_rms.c @@ -40,8 +40,8 @@ #include #include "gromacs/commandline/pargs.h" +#include "gromacs/fileio/confio.h" #include "gromacs/fileio/matio.h" -#include "gromacs/fileio/tpxio.h" #include "gromacs/fileio/trxio.h" #include "gromacs/fileio/xvgr.h" #include "gromacs/gmxana/cmat.h" diff --git a/src/gromacs/gmxana/gmx_rmsdist.c b/src/gromacs/gmxana/gmx_rmsdist.c index ddb5957837..ad79bb2945 100644 --- a/src/gromacs/gmxana/gmx_rmsdist.c +++ b/src/gromacs/gmxana/gmx_rmsdist.c @@ -39,9 +39,9 @@ #include #include "gromacs/commandline/pargs.h" +#include "gromacs/fileio/confio.h" #include "gromacs/fileio/matio.h" #include "gromacs/fileio/strdb.h" -#include "gromacs/fileio/tpxio.h" #include "gromacs/fileio/trxio.h" #include "gromacs/fileio/xvgr.h" #include "gromacs/gmxana/gmx_ana.h" diff --git a/src/gromacs/gmxana/gmx_rmsf.c b/src/gromacs/gmxana/gmx_rmsf.c index 8cb4bf99a9..223a1d7d59 100644 --- a/src/gromacs/gmxana/gmx_rmsf.c +++ b/src/gromacs/gmxana/gmx_rmsf.c @@ -41,7 +41,6 @@ #include "gromacs/commandline/pargs.h" #include "gromacs/fileio/confio.h" #include "gromacs/fileio/pdbio.h" -#include "gromacs/fileio/tpxio.h" #include "gromacs/fileio/trxio.h" #include "gromacs/fileio/xvgr.h" #include "gromacs/gmxana/gmx_ana.h" @@ -225,7 +224,6 @@ int gmx_rmsf(int argc, char *argv[]) int step, nre, natoms, i, g, m, teller = 0; real t, lambda, *w_rls, *w_rms; - t_tpxheader header; t_inputrec ir; t_topology top; int ePBC; diff --git a/src/gromacs/gmxana/gmx_rotmat.c b/src/gromacs/gmxana/gmx_rotmat.c index c9f3dc16ee..1c95da982f 100644 --- a/src/gromacs/gmxana/gmx_rotmat.c +++ b/src/gromacs/gmxana/gmx_rotmat.c @@ -38,7 +38,7 @@ #include #include "gromacs/commandline/pargs.h" -#include "gromacs/fileio/tpxio.h" +#include "gromacs/fileio/confio.h" #include "gromacs/fileio/trxio.h" #include "gromacs/fileio/xvgr.h" #include "gromacs/gmxana/gmx_ana.h" diff --git a/src/gromacs/gmxana/gmx_sans.c b/src/gromacs/gmxana/gmx_sans.c index 4b08d681a2..90d30a617a 100644 --- a/src/gromacs/gmxana/gmx_sans.c +++ b/src/gromacs/gmxana/gmx_sans.c @@ -38,7 +38,7 @@ #include "config.h" #include "gromacs/commandline/pargs.h" -#include "gromacs/fileio/tpxio.h" +#include "gromacs/fileio/confio.h" #include "gromacs/fileio/trxio.h" #include "gromacs/fileio/xvgr.h" #include "gromacs/gmxana/gmx_ana.h" diff --git a/src/gromacs/gmxana/gmx_sorient.c b/src/gromacs/gmxana/gmx_sorient.c index a12f14bfb8..ac01e53622 100644 --- a/src/gromacs/gmxana/gmx_sorient.c +++ b/src/gromacs/gmxana/gmx_sorient.c @@ -37,7 +37,7 @@ #include "gmxpre.h" #include "gromacs/commandline/pargs.h" -#include "gromacs/fileio/tpxio.h" +#include "gromacs/fileio/confio.h" #include "gromacs/fileio/trxio.h" #include "gromacs/fileio/xvgr.h" #include "gromacs/gmxana/gmx_ana.h" diff --git a/src/gromacs/gmxana/gmx_spatial.c b/src/gromacs/gmxana/gmx_spatial.c index cb3217179b..a7f3d12720 100644 --- a/src/gromacs/gmxana/gmx_spatial.c +++ b/src/gromacs/gmxana/gmx_spatial.c @@ -38,7 +38,7 @@ #include #include "gromacs/commandline/pargs.h" -#include "gromacs/fileio/tpxio.h" +#include "gromacs/fileio/confio.h" #include "gromacs/fileio/trxio.h" #include "gromacs/gmxana/gmx_ana.h" #include "gromacs/legacyheaders/macros.h" diff --git a/src/gromacs/gmxana/gmx_traj.c b/src/gromacs/gmxana/gmx_traj.c index a0993acb1f..7560cec153 100644 --- a/src/gromacs/gmxana/gmx_traj.c +++ b/src/gromacs/gmxana/gmx_traj.c @@ -42,7 +42,6 @@ #include "gromacs/commandline/pargs.h" #include "gromacs/fileio/confio.h" -#include "gromacs/fileio/tpxio.h" #include "gromacs/fileio/trxio.h" #include "gromacs/fileio/xvgr.h" #include "gromacs/gmxana/gmx_ana.h" diff --git a/src/gromacs/gmxana/gmx_trjcat.c b/src/gromacs/gmxana/gmx_trjcat.c index a651272a22..6f8463f63e 100644 --- a/src/gromacs/gmxana/gmx_trjcat.c +++ b/src/gromacs/gmxana/gmx_trjcat.c @@ -46,7 +46,6 @@ #include "gromacs/fileio/pdbio.h" #include "gromacs/fileio/tngio.h" #include "gromacs/fileio/tngio_for_tools.h" -#include "gromacs/fileio/tpxio.h" #include "gromacs/fileio/trnio.h" #include "gromacs/fileio/trxio.h" #include "gromacs/fileio/xtcio.h" diff --git a/src/gromacs/gmxana/gmx_trjorder.c b/src/gromacs/gmxana/gmx_trjorder.c index ea86375c9c..8b9e56ad9a 100644 --- a/src/gromacs/gmxana/gmx_trjorder.c +++ b/src/gromacs/gmxana/gmx_trjorder.c @@ -41,7 +41,7 @@ #include #include "gromacs/commandline/pargs.h" -#include "gromacs/fileio/tpxio.h" +#include "gromacs/fileio/confio.h" #include "gromacs/fileio/trxio.h" #include "gromacs/fileio/xvgr.h" #include "gromacs/gmxana/gmx_ana.h" diff --git a/src/gromacs/gmxana/gmx_vanhove.c b/src/gromacs/gmxana/gmx_vanhove.c index 595ada61ae..8d046f4b6a 100644 --- a/src/gromacs/gmxana/gmx_vanhove.c +++ b/src/gromacs/gmxana/gmx_vanhove.c @@ -42,8 +42,8 @@ #include #include "gromacs/commandline/pargs.h" +#include "gromacs/fileio/confio.h" #include "gromacs/fileio/matio.h" -#include "gromacs/fileio/tpxio.h" #include "gromacs/fileio/trxio.h" #include "gromacs/fileio/xvgr.h" #include "gromacs/gmxana/gmx_ana.h" diff --git a/src/gromacs/gmxana/sfactor.c b/src/gromacs/gmxana/sfactor.c index 79c86b761c..3fcb408faf 100644 --- a/src/gromacs/gmxana/sfactor.c +++ b/src/gromacs/gmxana/sfactor.c @@ -38,8 +38,8 @@ #include "sfactor.h" +#include "gromacs/fileio/confio.h" #include "gromacs/fileio/strdb.h" -#include "gromacs/fileio/tpxio.h" #include "gromacs/fileio/trxio.h" #include "gromacs/fileio/xvgr.h" #include "gromacs/legacyheaders/macros.h" diff --git a/src/gromacs/selection/tests/toputils.cpp b/src/gromacs/selection/tests/toputils.cpp index 26fb504dcd..b982172559 100644 --- a/src/gromacs/selection/tests/toputils.cpp +++ b/src/gromacs/selection/tests/toputils.cpp @@ -45,7 +45,7 @@ #include -#include "gromacs/fileio/tpxio.h" +#include "gromacs/fileio/confio.h" #include "gromacs/fileio/trx.h" #include "gromacs/fileio/trxio.h" #include "gromacs/math/vec.h" diff --git a/src/gromacs/trajectoryanalysis/runnercommon.cpp b/src/gromacs/trajectoryanalysis/runnercommon.cpp index 407682ed5c..f7db229341 100644 --- a/src/gromacs/trajectoryanalysis/runnercommon.cpp +++ b/src/gromacs/trajectoryanalysis/runnercommon.cpp @@ -45,8 +45,8 @@ #include +#include "gromacs/fileio/confio.h" #include "gromacs/fileio/timecontrol.h" -#include "gromacs/fileio/tpxio.h" #include "gromacs/fileio/trx.h" #include "gromacs/fileio/trxio.h" #include "gromacs/legacyheaders/oenv.h"