From: Mark Abraham Date: Tue, 17 Sep 2013 08:07:13 +0000 (+0200) Subject: Create fileio module X-Git-Url: http://biod.pnpi.spb.ru/gitweb/?a=commitdiff_plain;h=8df8c14d75437fbfa5b8f29421d319cf1e94a5be;p=alexxy%2Fgromacs.git Create fileio module This patch contains only code motion. There are no functional code changes. Moves lots of I/O code into src/gromacs/fileio. This means lots of changes to avoid having everything as a compile-time dependency of everything else because everything is pulled in via typedefs.h, etc. Note that src/gromacs/legacyheaders/filenm.h and src/gromacs/legacyheaders/types/filenm.h have been consolidated into src/gromacs/fileio/filenm.h. I/O code in files named stat*[ch] now lives in various new files in fileio. Files outside of the module now #include its header files in a proper way, e.g. #include #include "../fileio/filenm.h" or "gromacs/fileio/filenm.h" according to whether they are an installed header, or not. Files within the module are blessed and do not need that qualifier. This module installs most of its headers (because they're almost all inter-dependent; gmxfio_int.h is not installed because it is only useful internally, vmdio.h is not installed because it relies on a header from src/external) Files in new module * conform to preferred include-guard format. * have up-to-date copyright headers thanks to Teemu's automatic script * that are installed headers refer to other GROMACS include files via relative paths Moves mdrun trajectory writing into wrapper function. Removes small pieces of I/O code that was hiding behind "#if 0". Some pieces of I/O code specific to the gmxpreprocess module have remained there. Moved a cppcheck suppression to follow matio.cpp to its new home. Minor fix to xdrf.h logic, since it is now the subject of a CMake test. Refs #1292, #1193, #1137 Change-Id: I820036298d574966d596ab9e258ed8676e359184 --- diff --git a/share/html/online/xtc.html b/share/html/online/xtc.html index 971d80c770..25faf96f4e 100644 --- a/share/html/online/xtc.html +++ b/share/html/online/xtc.html @@ -69,7 +69,7 @@ extern int write_xtc(XDR *xd, matrix box,rvec *x,real prec); /* Write a frame to xtc file */ -To use the library function include "xtcio.h" +To use the library function include "gromacs/fileio/xtcio.h" in your file and link with -lgmx.$(CPU)

diff --git a/src/contrib/anaf.c b/src/contrib/anaf.c index d5d352959d..b2611d5e83 100644 --- a/src/contrib/anaf.c +++ b/src/contrib/anaf.c @@ -41,18 +41,18 @@ #include #include "main.h" #include "macros.h" -#include "futil.h" +#include "gromacs/fileio/futil.h" #include "statutil.h" #include "copyrite.h" #include "sysstuff.h" #include "txtdump.h" #include "gmx_fatal.h" -#include "xtcio.h" -#include "enxio.h" +#include "gromacs/fileio/xtcio.h" +#include "gromacs/fileio/enxio.h" #include "smalloc.h" -#include "gmxfio.h" -#include "tpxio.h" -#include "trnio.h" +#include "gromacs/fileio/gmxfio.h" +#include "gromacs/fileio/tpxio.h" +#include "gromacs/fileio/trnio.h" #include "txtdump.h" #include "vec.h" diff --git a/src/contrib/compnl.c b/src/contrib/compnl.c index 648a6c8470..d983eca601 100644 --- a/src/contrib/compnl.c +++ b/src/contrib/compnl.c @@ -39,11 +39,11 @@ #include "ns.h" #include "smalloc.h" #include "wnblist.h" -#include "futil.h" +#include "gromacs/fileio/futil.h" #include "macros.h" #include "statutil.h" #include "copyrite.h" -#include "confio.h" +#include "gromacs/fileio/confio.h" #include "pbc.h" #include "vec.h" diff --git a/src/contrib/do_multiprot.c b/src/contrib/do_multiprot.c index 3477e9e5a8..127cd43b3a 100644 --- a/src/contrib/do_multiprot.c +++ b/src/contrib/do_multiprot.c @@ -48,18 +48,18 @@ #include "mshift.h" #include "statutil.h" #include "copyrite.h" -#include "pdbio.h" +#include "gromacs/fileio/pdbio.h" #include "gmx_fatal.h" #include "xvgr.h" -#include "matio.h" +#include "gromacs/fileio/matio.h" #include "index.h" #include "gstat.h" -#include "tpxio.h" +#include "gromacs/fileio/tpxio.h" #include "viewit.h" #include "gbutil.h" #include "vec.h" -#include "confio.h" -#include "gmxfio.h" +#include "gromacs/fileio/confio.h" +#include "gromacs/fileio/gmxfio.h" typedef struct { int resnr; diff --git a/src/contrib/do_shift.c b/src/contrib/do_shift.c index 7b4fa42802..a6a06ab791 100644 --- a/src/contrib/do_shift.c +++ b/src/contrib/do_shift.c @@ -47,12 +47,12 @@ #include "mshift.h" #include "statutil.h" #include "copyrite.h" -#include "confio.h" +#include "gromacs/fileio/confio.h" #include "gmx_fatal.h" #include "xvgr.h" #include "gstat.h" #include "index.h" -#include "pdbio.h" +#include "gromacs/fileio/pdbio.h" void cat(FILE *out,char *fn,real t) { diff --git a/src/contrib/ehanal.c b/src/contrib/ehanal.c index 264afb8de7..e7662de6de 100644 --- a/src/contrib/ehanal.c +++ b/src/contrib/ehanal.c @@ -45,14 +45,14 @@ #include "statutil.h" #include "gmx_fatal.h" #include "random.h" -#include "pdbio.h" -#include "futil.h" +#include "gromacs/fileio/pdbio.h" +#include "gromacs/fileio/futil.h" #include "physics.h" #include "xvgr.h" #include "vec.h" #include "names.h" #include "ehdata.h" -#include "pdbio.h" +#include "gromacs/fileio/pdbio.h" t_histo *init_histo(int np,real minx,real maxx) { diff --git a/src/contrib/ehdata.c b/src/contrib/ehdata.c index 2b5c640063..d1e8b571f6 100644 --- a/src/contrib/ehdata.c +++ b/src/contrib/ehdata.c @@ -45,7 +45,7 @@ #include "gmx_fatal.h" #include "random.h" #include "strdb.h" -#include "futil.h" +#include "gromacs/fileio/futil.h" #include "physics.h" #include "ehdata.h" diff --git a/src/contrib/ehole.c b/src/contrib/ehole.c index a6817d4236..a9b33e5da6 100644 --- a/src/contrib/ehole.c +++ b/src/contrib/ehole.c @@ -46,8 +46,8 @@ #include "statutil.h" #include "gmx_fatal.h" #include "random.h" -#include "pdbio.h" -#include "futil.h" +#include "gromacs/fileio/pdbio.h" +#include "gromacs/fileio/futil.h" #include "physics.h" #include "xvgr.h" #include "vec.h" diff --git a/src/contrib/g_anavel.c b/src/contrib/g_anavel.c index eb7656c65b..cd00f75cd1 100644 --- a/src/contrib/g_anavel.c +++ b/src/contrib/g_anavel.c @@ -42,15 +42,15 @@ #include "statutil.h" #include "random.h" #include "names.h" -#include "matio.h" +#include "gromacs/fileio/matio.h" #include "physics.h" #include "vec.h" -#include "futil.h" +#include "gromacs/fileio/futil.h" #include "copyrite.h" #include "xvgr.h" #include "string2.h" #include "index.h" -#include "tpxio.h" +#include "gromacs/fileio/tpxio.h" int main(int argc,char *argv[]) { diff --git a/src/contrib/gmx_sdf.c b/src/contrib/gmx_sdf.c index 62f66a9e47..4679657883 100644 --- a/src/contrib/gmx_sdf.c +++ b/src/contrib/gmx_sdf.c @@ -30,14 +30,14 @@ #include "pbc.h" #include "rmpbc.h" #include "copyrite.h" -#include "futil.h" +#include "gromacs/fileio/futil.h" #include "statutil.h" -#include "tpxio.h" +#include "gromacs/fileio/tpxio.h" #include "index.h" #include "smalloc.h" #include "nrnb.h" #include "gstat.h" -#include "matio.h" +#include "gromacs/fileio/matio.h" #include "gmx_fatal.h" diff --git a/src/contrib/hexamer.c b/src/contrib/hexamer.c index 2a264c113a..e0a35f3e5a 100644 --- a/src/contrib/hexamer.c +++ b/src/contrib/hexamer.c @@ -39,8 +39,8 @@ #include #include #include -#include "pdbio.h" -#include "confio.h" +#include "gromacs/fileio/pdbio.h" +#include "gromacs/fileio/confio.h" #include "symtab.h" #include "smalloc.h" #include "symtab.h" diff --git a/src/contrib/hrefify.c b/src/contrib/hrefify.c index d9d02944c9..51158cce2f 100644 --- a/src/contrib/hrefify.c +++ b/src/contrib/hrefify.c @@ -43,11 +43,11 @@ #include "typedefs.h" #include "macros.h" #include "string2.h" -#include "confio.h" +#include "gromacs/fileio/confio.h" #include "vec.h" #include "statutil.h" #include "copyrite.h" -#include "pdbio.h" +#include "gromacs/fileio/pdbio.h" #include "strdb.h" gmx_bool isword(char c) diff --git a/src/contrib/mkice.c b/src/contrib/mkice.c index f9ee5bf48e..c07ae87868 100644 --- a/src/contrib/mkice.c +++ b/src/contrib/mkice.c @@ -42,7 +42,7 @@ #include "statutil.h" #include "copyrite.h" #include "gmx_fatal.h" -#include "pdbio.h" +#include "gromacs/fileio/pdbio.h" #include "macros.h" #include "smalloc.h" #include "vec.h" @@ -50,11 +50,11 @@ #include "physics.h" #include "names.h" #include "txtdump.h" -#include "trnio.h" +#include "gromacs/fileio/trnio.h" #include "symtab.h" #include "strdb.h" #include "atomprop.h" -#include "confio.h" +#include "gromacs/fileio/confio.h" #define TET 109.47 #define DCONS 0.117265878 diff --git a/src/contrib/pmetest.c b/src/contrib/pmetest.c index 4c248be8fc..0db918ca84 100644 --- a/src/contrib/pmetest.c +++ b/src/contrib/pmetest.c @@ -43,9 +43,9 @@ #include "main.h" #include "nrnb.h" #include "txtdump.h" -#include "tpxio.h" +#include "gromacs/fileio/tpxio.h" #include "statutil.h" -#include "futil.h" +#include "gromacs/fileio/futil.h" #include "gmx_fatal.h" #include "vec.h" #include "mdatoms.h" diff --git a/src/contrib/test.c b/src/contrib/test.c index 1f88caa1b0..8b28c3a37e 100644 --- a/src/contrib/test.c +++ b/src/contrib/test.c @@ -43,7 +43,7 @@ #include "copyrite.h" #include "gmx_fatal.h" #include "xvgr.h" -#include "pdbio.h" +#include "gromacs/fileio/pdbio.h" #include "macros.h" #include "smalloc.h" #include "vec.h" @@ -51,9 +51,9 @@ #include "physics.h" #include "names.h" #include "txtdump.h" -#include "trnio.h" +#include "gromacs/fileio/trnio.h" #include "symtab.h" -#include "confio.h" +#include "gromacs/fileio/confio.h" real pot(real x,real qq,real c6,real c12) { diff --git a/src/contrib/testlr.c b/src/contrib/testlr.c index 86fc1d4d28..ed92684790 100644 --- a/src/contrib/testlr.c +++ b/src/contrib/testlr.c @@ -40,7 +40,7 @@ #include "macros.h" #include "names.h" #include "smalloc.h" -#include "tpxio.h" +#include "gromacs/fileio/tpxio.h" #include "statutil.h" #include "writeps.h" #include "copyrite.h" diff --git a/src/contrib/testxml.c b/src/contrib/testxml.c index e1d1bdbdcb..3c742b44d5 100644 --- a/src/contrib/testxml.c +++ b/src/contrib/testxml.c @@ -36,7 +36,7 @@ #include "smalloc.h" #include "xmlio.h" #include "statutil.h" -#include "tpxio.h" +#include "gromacs/fileio/tpxio.h" int cmain(int argc,char *argv[]) { diff --git a/src/gromacs/CMakeLists.txt b/src/gromacs/CMakeLists.txt index 32a82ff0f2..3b40dbc374 100644 --- a/src/gromacs/CMakeLists.txt +++ b/src/gromacs/CMakeLists.txt @@ -55,6 +55,7 @@ add_subdirectory(onlinehelp) add_subdirectory(options) add_subdirectory(timing) add_subdirectory(utility) +add_subdirectory(fileio) if (NOT GMX_BUILD_MDRUN_ONLY) add_subdirectory(legacyheaders) add_subdirectory(gmxana) diff --git a/src/gromacs/analysisdata/modules/plot.cpp b/src/gromacs/analysisdata/modules/plot.cpp index 7b07ae1167..da30bc44f2 100644 --- a/src/gromacs/analysisdata/modules/plot.cpp +++ b/src/gromacs/analysisdata/modules/plot.cpp @@ -49,7 +49,7 @@ #include -#include "gromacs/legacyheaders/gmxfio.h" +#include "gromacs/fileio/gmxfio.h" #include "gromacs/legacyheaders/oenv.h" #include "gromacs/legacyheaders/vec.h" #include "gromacs/legacyheaders/xvgr.h" diff --git a/src/gromacs/fileio/CMakeLists.txt b/src/gromacs/fileio/CMakeLists.txt new file mode 100644 index 0000000000..bf84268904 --- /dev/null +++ b/src/gromacs/fileio/CMakeLists.txt @@ -0,0 +1,60 @@ +# +# This file is part of the GROMACS molecular simulation package. +# +# 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. + +file(GLOB FILEIO_SOURCES *.cpp *.c) +set(LIBGROMACS_SOURCES ${LIBGROMACS_SOURCES} ${FILEIO_SOURCES} PARENT_SCOPE) + +set(FILEIO_PUBLIC_HEADERS + confio.h + enxio.h + filenm.h + futil.h + gmx_system_xdr.h + gmxfio.h + matio.h + mdoutf.h + pdbio.h + tpxio.h + trajectory_writing.h + trnio.h + trx.h + trxio.h + xdrf.h + xtcio.h + ) +gmx_install_headers(fileio ${FILEIO_PUBLIC_HEADERS}) + +if (BUILD_TESTING) +# add_subdirectory(tests) +endif (BUILD_TESTING) diff --git a/src/gromacs/gmxlib/confio.c b/src/gromacs/fileio/confio.c similarity index 97% rename from src/gromacs/gmxlib/confio.c rename to src/gromacs/fileio/confio.c index 8159c7442f..4cd8a4bdfe 100644 --- a/src/gromacs/gmxlib/confio.c +++ b/src/gromacs/fileio/confio.c @@ -1,36 +1,38 @@ /* + * This file is part of the GROMACS molecular simulation package. * - * This source code is part of - * - * G R O M A C S - * - * GROningen MAchine for Chemical Simulations - * - * VERSION 3.2.0 - * Written by David van der Spoel, Erik Lindahl, Berk Hess, and others. * Copyright (c) 1991-2000, University of Groningen, The Netherlands. * Copyright (c) 2001-2004, The GROMACS development team, - * check out http://www.gromacs.org for more information. - - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 + * 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. * - * If you want to redistribute modifications, 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 www.gromacs.org. + * 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. * - * To help us fund GROMACS development, we humbly ask that you cite - * the papers on the package - you can find them in the top README file. + * 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. * - * For more info, check our website at http://www.gromacs.org + * 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. * - * And Hey: - * GROningen Mixture of Alchemy and Childrens' Stories + * To help us fund GROMACS development, we humbly ask that you cite + * the research papers on the package. Check out http://www.gromacs.org. */ #ifdef HAVE_CONFIG_H #include @@ -52,9 +54,9 @@ #include "filenm.h" #include "pdbio.h" #include "tpxio.h" +#include "trxio.h" #include "gmx_fatal.h" #include "copyrite.h" -#include "filenm.h" #include "statutil.h" #include "pbc.h" #include "mtop_util.h" diff --git a/src/gromacs/legacyheaders/confio.h b/src/gromacs/fileio/confio.h similarity index 66% rename from src/gromacs/legacyheaders/confio.h rename to src/gromacs/fileio/confio.h index 04900a88ca..b1d37770d8 100644 --- a/src/gromacs/legacyheaders/confio.h +++ b/src/gromacs/fileio/confio.h @@ -1,43 +1,45 @@ /* + * This file is part of the GROMACS molecular simulation package. * - * This source code is part of - * - * G R O M A C S - * - * GROningen MAchine for Chemical Simulations - * - * VERSION 3.2.0 - * Written by David van der Spoel, Erik Lindahl, Berk Hess, and others. * Copyright (c) 1991-2000, University of Groningen, The Netherlands. * Copyright (c) 2001-2004, The GROMACS development team, - * check out http://www.gromacs.org for more information. - - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 + * 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. * - * If you want to redistribute modifications, 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 www.gromacs.org. + * 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. * - * To help us fund GROMACS development, we humbly ask that you cite - * the papers on the package - you can find them in the top README file. + * 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. * - * For more info, check our website at http://www.gromacs.org + * 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. * - * And Hey: - * Gromacs Runs On Most of All Computer Systems + * 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 _confio_h -#define _confio_h +#ifndef GMX_FILEIO_CONFIO_H +#define GMX_FILEIO_CONFIO_H -#include "typedefs.h" +#include "../legacyheaders/typedefs.h" /* For reading coordinate files it is assumed that enough memory * has been allocated beforehand. @@ -104,4 +106,4 @@ void read_stx_conf(const char *infile, char *title, } #endif -#endif /* _confio_h */ +#endif /* GMX_FILEIO_CONFIO_H */ diff --git a/src/gromacs/gmxlib/enxio.c b/src/gromacs/fileio/enxio.c similarity index 95% rename from src/gromacs/gmxlib/enxio.c rename to src/gromacs/fileio/enxio.c index a297697d71..ba9b0c8f9d 100644 --- a/src/gromacs/gmxlib/enxio.c +++ b/src/gromacs/fileio/enxio.c @@ -1,37 +1,38 @@ -/* -*- mode: c; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; c-file-style: "stroustrup"; -*- +/* + * This file is part of the GROMACS molecular simulation package. * - * - * This source code is part of - * - * G R O M A C S - * - * GROningen MAchine for Chemical Simulations - * - * VERSION 3.2.0 - * Written by David van der Spoel, Erik Lindahl, Berk Hess, and others. * Copyright (c) 1991-2000, University of Groningen, The Netherlands. * Copyright (c) 2001-2004, The GROMACS development team, - * check out http://www.gromacs.org for more information. - - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 + * 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. * - * If you want to redistribute modifications, 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 www.gromacs.org. + * 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. * - * To help us fund GROMACS development, we humbly ask that you cite - * the papers on the package - you can find them in the top README file. + * 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. * - * For more info, check our website at http://www.gromacs.org + * 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. * - * And Hey: - * GROningen Mixture of Alchemy and Childrens' Stories + * To help us fund GROMACS development, we humbly ask that you cite + * the research papers on the package. Check out http://www.gromacs.org. */ #ifdef HAVE_CONFIG_H #include @@ -706,13 +707,6 @@ static gmx_bool do_eheader(ener_file_t ef, int *file_version, t_enxframe *fr, if (*bOK && *file_version == 1 && nre_test < 0) { -#if 0 - if (fp >= ener_old_nalloc) - { - gmx_incons("Problem with reading old format energy files"); - } -#endif - if (!ef->eo.bReadFirstStep) { ef->eo.bReadFirstStep = TRUE; diff --git a/src/gromacs/legacyheaders/enxio.h b/src/gromacs/fileio/enxio.h similarity index 78% rename from src/gromacs/legacyheaders/enxio.h rename to src/gromacs/fileio/enxio.h index 529ac63a1b..6a7b27505d 100644 --- a/src/gromacs/legacyheaders/enxio.h +++ b/src/gromacs/fileio/enxio.h @@ -1,44 +1,46 @@ /* + * This file is part of the GROMACS molecular simulation package. * - * This source code is part of - * - * G R O M A C S - * - * GROningen MAchine for Chemical Simulations - * - * VERSION 3.2.0 - * Written by David van der Spoel, Erik Lindahl, Berk Hess, and others. * Copyright (c) 1991-2000, University of Groningen, The Netherlands. * Copyright (c) 2001-2004, The GROMACS development team, - * check out http://www.gromacs.org for more information. - - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 + * 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. * - * If you want to redistribute modifications, 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 www.gromacs.org. + * 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. * - * To help us fund GROMACS development, we humbly ask that you cite - * the papers on the package - you can find them in the top README file. + * 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. * - * For more info, check our website at http://www.gromacs.org + * 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. * - * And Hey: - * Gromacs Runs On Most of All Computer Systems + * 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 _enxio_h -#define _enxio_h +#ifndef GMX_FILEIO_ENXIO_H +#define GMX_FILEIO_ENXIO_H -#include "sysstuff.h" -#include "typedefs.h" -#include "pbc.h" +#include "../legacyheaders/sysstuff.h" +#include "../legacyheaders/typedefs.h" +#include "../legacyheaders/pbc.h" #include "gmxfio.h" #ifdef __cplusplus @@ -214,4 +216,4 @@ void add_subblocks_enxblock(t_enxblock *eb, int n); } #endif -#endif /* _enerio_h */ +#endif /* GMX_FILEIO_ENERIO_H */ diff --git a/src/gromacs/gmxlib/filenm.c b/src/gromacs/fileio/filenm.c similarity index 91% rename from src/gromacs/gmxlib/filenm.c rename to src/gromacs/fileio/filenm.c index 1f96cc160f..f51ea4e50c 100644 --- a/src/gromacs/gmxlib/filenm.c +++ b/src/gromacs/fileio/filenm.c @@ -1,37 +1,41 @@ /* + * This file is part of the GROMACS molecular simulation package. * - * This source code is part of - * - * G R O M A C S - * - * GROningen MAchine for Chemical Simulations - * - * VERSION 3.2.0 - * Written by David van der Spoel, Erik Lindahl, Berk Hess, and others. * Copyright (c) 1991-2000, University of Groningen, The Netherlands. * Copyright (c) 2001-2004, The GROMACS development team, - * check out http://www.gromacs.org for more information. - - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 + * 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. * - * If you want to redistribute modifications, 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 www.gromacs.org. + * 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. * - * To help us fund GROMACS development, we humbly ask that you cite - * the papers on the package - you can find them in the top README file. + * 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. * - * For more info, check our website at http://www.gromacs.org + * 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. * - * And Hey: - * GROningen Mixture of Alchemy and Childrens' Stories + * 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 "filenm.h" + #ifdef HAVE_CONFIG_H #include #endif @@ -42,7 +46,6 @@ #include "smalloc.h" #include "string2.h" #include "gmx_fatal.h" -#include "filenm.h" #include "futil.h" #include "xdrf.h" #include "macros.h" @@ -146,7 +149,7 @@ typedef struct const int *tps; } t_deffile; -/* this array should correspond to the enum in include/types/filenm.h */ +/* this array should correspond to the enum in filenm.h */ static const t_deffile deffile[efNR] = { @@ -227,12 +230,6 @@ void set_default_file_name(const char *name) tMPI_Thread_mutex_unlock(&filenm_mutex); #endif -#if 0 - for (i = 0; i < efNR; i++) - { - deffile[i].defnm = default_file_name; - } -#endif } const char *ftp2ext(int ftp) @@ -961,58 +958,6 @@ const char *ftp2fn_null(int ftp, int nfile, const t_filenm fnm[]) return NULL; } -#if 0 -static void add_filters(char *filter, int *n, int nf, const int ftp[]) -{ - char buf[8]; - int i; - - sprintf(filter, "*.{"); - for (i = 0; (i < nf); i++) - { - sprintf(buf, "%s", ftp2ext(ftp[i])); - if (*n > 0) - { - strcat(filter, ","); - } - strcat(filter, buf); - (*n)++; - } - strcat(filter, "}"); -} - -char *ftp2filter(int ftp) -{ - int n; - static char filter[128]; - - filter[0] = '\0'; - n = 0; - switch (ftp) - { - case efTRX: - add_filters(filter, &n, NTRXS, trxs); - break; - case efTRN: - add_filters(filter, &n, NTRNS, trns); - break; - case efSTO: - add_filters(filter, &n, NSTOS, stos); - break; - case efSTX: - add_filters(filter, &n, NSTXS, stxs); - break; - case efTPX: - add_filters(filter, &n, NTPXS, tpxs); - break; - default: - sprintf(filter, "*%s", ftp2ext(ftp)); - break; - } - return filter; -} -#endif - gmx_bool is_optional(const t_filenm *fnm) { return ((fnm->flag & ffOPT) == ffOPT); diff --git a/src/gromacs/legacyheaders/filenm.h b/src/gromacs/fileio/filenm.h similarity index 60% rename from src/gromacs/legacyheaders/filenm.h rename to src/gromacs/fileio/filenm.h index dd708e4e76..49725e7e32 100644 --- a/src/gromacs/legacyheaders/filenm.h +++ b/src/gromacs/fileio/filenm.h @@ -1,40 +1,42 @@ /* + * This file is part of the GROMACS molecular simulation package. * - * This source code is part of - * - * G R O M A C S - * - * GROningen MAchine for Chemical Simulations - * - * VERSION 3.2.0 - * Written by David van der Spoel, Erik Lindahl, Berk Hess, and others. * Copyright (c) 1991-2000, University of Groningen, The Netherlands. * Copyright (c) 2001-2004, The GROMACS development team, - * check out http://www.gromacs.org for more information. - - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 + * 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. * - * If you want to redistribute modifications, 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 www.gromacs.org. + * 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. * - * To help us fund GROMACS development, we humbly ask that you cite - * the papers on the package - you can find them in the top README file. + * 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. * - * For more info, check our website at http://www.gromacs.org + * 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. * - * And Hey: - * Gromacs Runs On Most of All Computer Systems + * 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 _filenm_h -#define _filenm_h +#ifndef GMX_FILEIO_FILENM_H +#define GMX_FILEIO_FILENM_H #include "futil.h" @@ -42,6 +44,54 @@ extern "C" { #endif +/* this enum should correspond to the array deffile in gmxlib/filenm.c */ +enum { + efMDP, + efTRX, efTRO, efTRN, efTRR, efTRJ, efXTC, efG87, + efEDR, + efSTX, efSTO, efGRO, efG96, efPDB, efBRK, efENT, efESP, efPQR, efXYZ, + efCPT, + efLOG, efXVG, efOUT, + efNDX, + efTOP, efITP, + efTPX, efTPS, efTPR, efTPA, efTPB, + efTEX, efRTP, efATP, efHDB, + efDAT, efDLG, + efMAP, efEPS, efMAT, efM2P, + efMTX, + efEDI, + efCUB, + efXPM, + efRND, + efNR +}; + +typedef struct { + int ftp; /* File type (see enum above) */ + const char *opt; /* Command line option */ + const char *fn; /* File name (as set in source code) */ + unsigned long flag; /* Flag for all kinds of info (see defs)*/ + int nfiles; /* number of files */ + char **fns; /* File names */ +} t_filenm; + +#define ffSET 1<<0 +#define ffREAD 1<<1 +#define ffWRITE 1<<2 +#define ffOPT 1<<3 +#define ffLIB 1<<4 +#define ffMULT 1<<5 +#define ffRW (ffREAD | ffWRITE) +#define ffOPTRD (ffREAD | ffOPT) +#define ffOPTWR (ffWRITE| ffOPT) +#define ffOPTRW (ffRW | ffOPT) +#define ffLIBRD (ffREAD | ffLIB) +#define ffLIBOPTRD (ffOPTRD | ffLIB) +#define ffRDMULT (ffREAD | ffMULT) +#define ffOPTRDMULT (ffRDMULT | ffOPT) +#define ffWRMULT (ffWRITE | ffMULT) +#define ffOPTWRMULT (ffWRMULT | ffOPT) + void set_default_file_name(const char *name); /* Set the default file name for all file types to name */ @@ -109,12 +159,6 @@ int ftp2fns(char **fns[], int ftp, int nfile, const t_filenm fnm[]); /* Return the number of files for the first option with type ftp and the files in **fns[] (will be allocated), or NULL when none found. */ -#if 0 -/* This function is not thread-safe and used nowhere: */ -char *ftp2filter(int ftp); -/* Return a file extension filter for file type */ -#endif - #define ftp2FILE(ftp, nfile, fnm, mode) ffopen(ftp2fn(ftp, nfile, fnm), mode) /* Return a file pointer from the filename (see above) */ @@ -160,4 +204,4 @@ void done_filenms(int nf, t_filenm fnm[]); } #endif -#endif /* _filenm_h */ +#endif /* GMX_FILEIO_FILENM_H */ diff --git a/src/gromacs/gmxlib/futil.cpp b/src/gromacs/fileio/futil.cpp similarity index 95% rename from src/gromacs/gmxlib/futil.cpp rename to src/gromacs/fileio/futil.cpp index a1fb7aa930..8f571e12bf 100644 --- a/src/gromacs/gmxlib/futil.cpp +++ b/src/gromacs/fileio/futil.cpp @@ -1,37 +1,38 @@ -/* -*- mode: c; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; c-file-style: "stroustrup"; -*- +/* + * This file is part of the GROMACS molecular simulation package. * - * - * This source code is part of - * - * G R O M A C S - * - * GROningen MAchine for Chemical Simulations - * - * VERSION 3.2.0 - * Written by David van der Spoel, Erik Lindahl, Berk Hess, and others. * Copyright (c) 1991-2000, University of Groningen, The Netherlands. * Copyright (c) 2001-2004, The GROMACS development team, - * check out http://www.gromacs.org for more information. - - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 + * 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. * - * If you want to redistribute modifications, 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 www.gromacs.org. + * 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. * - * To help us fund GROMACS development, we humbly ask that you cite - * the papers on the package - you can find them in the top README file. + * 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. * - * For more info, check our website at http://www.gromacs.org + * 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. * - * And Hey: - * GROningen Mixture of Alchemy and Childrens' Stories + * To help us fund GROMACS development, we humbly ask that you cite + * the research papers on the package. Check out http://www.gromacs.org. */ #ifdef HAVE_CONFIG_H #include diff --git a/src/gromacs/legacyheaders/futil.h b/src/gromacs/fileio/futil.h similarity index 74% rename from src/gromacs/legacyheaders/futil.h rename to src/gromacs/fileio/futil.h index 23fe9946b8..8e644085a0 100644 --- a/src/gromacs/legacyheaders/futil.h +++ b/src/gromacs/fileio/futil.h @@ -1,44 +1,46 @@ /* + * This file is part of the GROMACS molecular simulation package. * - * This source code is part of - * - * G R O M A C S - * - * GROningen MAchine for Chemical Simulations - * - * VERSION 3.2.0 - * Written by David van der Spoel, Erik Lindahl, Berk Hess, and others. * Copyright (c) 1991-2000, University of Groningen, The Netherlands. * Copyright (c) 2001-2004, The GROMACS development team, - * check out http://www.gromacs.org for more information. - - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 + * 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. * - * If you want to redistribute modifications, 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 www.gromacs.org. + * 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. * - * To help us fund GROMACS development, we humbly ask that you cite - * the papers on the package - you can find them in the top README file. + * 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. * - * For more info, check our website at http://www.gromacs.org + * 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. * - * And Hey: - * Gromacs Runs On Most of All Computer Systems + * 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 _futil_h -#define _futil_h +#ifndef GMX_FILEIO_FUTIL_H +#define GMX_FILEIO_FUTIL_H #include -#include "typedefs.h" -#include "types/commrec.h" +#include "../legacyheaders/typedefs.h" +#include "../legacyheaders/types/commrec.h" #ifdef __cplusplus extern "C" { @@ -200,4 +202,4 @@ void gmx_getcwd(char *buffer, size_t size); } #endif -#endif /* _futil_h */ +#endif /* GMX_FILEIO_FUTIL_H */ diff --git a/src/gromacs/gmxlib/gmx_system_xdr.c b/src/gromacs/fileio/gmx_system_xdr.c similarity index 92% rename from src/gromacs/gmxlib/gmx_system_xdr.c rename to src/gromacs/fileio/gmx_system_xdr.c index 71b6abd587..00155532e8 100644 --- a/src/gromacs/gmxlib/gmx_system_xdr.c +++ b/src/gromacs/fileio/gmx_system_xdr.c @@ -1,36 +1,38 @@ /* + * This file is part of the GROMACS molecular simulation package. * - * This source code is part of - * - * G R O M A C S - * - * GROningen MAchine for Chemical Simulations - * - * VERSION 3.2.0 - * Written by David van der Spoel, Erik Lindahl, Berk Hess, and others. * Copyright (c) 1991-2000, University of Groningen, The Netherlands. * Copyright (c) 2001-2004, The GROMACS development team, - * check out http://www.gromacs.org for more information. - - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 + * 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. * - * If you want to redistribute modifications, 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 www.gromacs.org. + * 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. * - * To help us fund GROMACS development, we humbly ask that you cite - * the papers on the package - you can find them in the top README file. + * 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. * - * For more info, check our website at http://www.gromacs.org + * 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. * - * And Hey: - * GROningen Mixture of Alchemy and Childrens' Stories + * To help us fund GROMACS development, we humbly ask that you cite + * the research papers on the package. Check out http://www.gromacs.org. */ #ifdef HAVE_CONFIG_H #include diff --git a/src/gromacs/legacyheaders/gmx_system_xdr.h b/src/gromacs/fileio/gmx_system_xdr.h similarity index 82% rename from src/gromacs/legacyheaders/gmx_system_xdr.h rename to src/gromacs/fileio/gmx_system_xdr.h index e096ed63f7..23e156bec7 100644 --- a/src/gromacs/legacyheaders/gmx_system_xdr.h +++ b/src/gromacs/fileio/gmx_system_xdr.h @@ -1,40 +1,42 @@ /* + * This file is part of the GROMACS molecular simulation package. * - * This source code is part of - * - * G R O M A C S - * - * GROningen MAchine for Chemical Simulations - * - * VERSION 3.2.0 - * Written by David van der Spoel, Erik Lindahl, Berk Hess, and others. * Copyright (c) 1991-2000, University of Groningen, The Netherlands. - * Copyright (c) 2001-2004, The GROMACS development team, - * check out http://www.gromacs.org for more information. - - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 + * 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. * - * If you want to redistribute modifications, 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 www.gromacs.org. + * 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. * - * To help us fund GROMACS development, we humbly ask that you cite - * the papers on the package - you can find them in the top README file. + * 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. * - * For more info, check our website at http://www.gromacs.org + * 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. * - * And Hey: - * Gromacs Runs On Most of All Computer Systems + * 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_system_xdr_h -#define _gmx_system_xdr_h +#ifndef GMX_FILEIO_GMX_SYSTEM_XDR_H +#define GMX_FILEIO_GMX_SYSTEM_XDR_H #include #include @@ -257,4 +259,4 @@ void xdr_free (xdrproc_t __proc, char *__objp); } #endif -#endif /* _gmx_system_xdr_h */ +#endif /* GMX_FILEIO_GMX_SYSTEM_XDR_H */ diff --git a/src/gromacs/gmxlib/gmxfio.c b/src/gromacs/fileio/gmxfio.c similarity index 94% rename from src/gromacs/gmxlib/gmxfio.c rename to src/gromacs/fileio/gmxfio.c index d8d3110461..700c84c2be 100644 --- a/src/gromacs/gmxlib/gmxfio.c +++ b/src/gromacs/fileio/gmxfio.c @@ -1,37 +1,38 @@ -/* -*- mode: c; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; c-file-style: "stroustrup"; -*- - * - * - * This source code is part of - * - * G R O M A C S - * - * GROningen MAchine for Chemical Simulations +/* + * This file is part of the GROMACS molecular simulation package. * - * VERSION 3.2.0 - * Written by David van der Spoel, Erik Lindahl, Berk Hess, and others. * Copyright (c) 1991-2000, University of Groningen, The Netherlands. * Copyright (c) 2001-2004, The GROMACS development team, - * check out http://www.gromacs.org for more information. - - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 + * 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. * - * If you want to redistribute modifications, 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 www.gromacs.org. + * 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. * - * To help us fund GROMACS development, we humbly ask that you cite - * the papers on the package - you can find them in the top README file. + * 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. * - * For more info, check our website at http://www.gromacs.org + * 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. * - * And Hey: - * GROningen Mixture of Alchemy and Childrens' Stories + * To help us fund GROMACS development, we humbly ask that you cite + * the research papers on the package. Check out http://www.gromacs.org. */ #ifdef HAVE_CONFIG_H #include diff --git a/src/gromacs/legacyheaders/gmxfio.h b/src/gromacs/fileio/gmxfio.h similarity index 93% rename from src/gromacs/legacyheaders/gmxfio.h rename to src/gromacs/fileio/gmxfio.h index ac612cec68..ed8d354247 100644 --- a/src/gromacs/legacyheaders/gmxfio.h +++ b/src/gromacs/fileio/gmxfio.h @@ -1,40 +1,42 @@ /* + * This file is part of the GROMACS molecular simulation package. * - * This source code is part of - * - * G R O M A C S - * - * GROningen MAchine for Chemical Simulations - * - * VERSION 3.2.0 - * Written by David van der Spoel, Erik Lindahl, Berk Hess, and others. * Copyright (c) 1991-2000, University of Groningen, The Netherlands. * Copyright (c) 2001-2004, The GROMACS development team, - * check out http://www.gromacs.org for more information. - - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 + * 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. * - * If you want to redistribute modifications, 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 www.gromacs.org. + * 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. * - * To help us fund GROMACS development, we humbly ask that you cite - * the papers on the package - you can find them in the top README file. + * 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. * - * For more info, check our website at http://www.gromacs.org + * 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. * - * And Hey: - * Gromacs Runs On Most of All Computer Systems + * 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 _gmxfio_h -#define _gmxfio_h +#ifndef GMX_FILEIO_GMXFIO_H +#define GMX_FILEIO_GMXFIO_H #include #include "sysstuff.h" diff --git a/src/gromacs/gmxlib/gmxfio_asc.c b/src/gromacs/fileio/gmxfio_asc.c similarity index 88% rename from src/gromacs/gmxlib/gmxfio_asc.c rename to src/gromacs/fileio/gmxfio_asc.c index 33ac9f5d81..c02cab30c5 100644 --- a/src/gromacs/gmxlib/gmxfio_asc.c +++ b/src/gromacs/fileio/gmxfio_asc.c @@ -1,37 +1,38 @@ -/* -*- mode: c; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; c-file-style: "stroustrup"; -*- +/* + * This file is part of the GROMACS molecular simulation package. * - * - * This source code is part of - * - * G R O M A C S - * - * GROningen MAchine for Chemical Simulations - * - * VERSION 3.2.0 - * Written by David van der Spoel, Erik Lindahl, Berk Hess, and others. * Copyright (c) 1991-2000, University of Groningen, The Netherlands. * Copyright (c) 2001-2004, The GROMACS development team, - * check out http://www.gromacs.org for more information. - - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 + * 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. * - * If you want to redistribute modifications, 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 www.gromacs.org. + * 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. * - * To help us fund GROMACS development, we humbly ask that you cite - * the papers on the package - you can find them in the top README file. + * 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. * - * For more info, check our website at http://www.gromacs.org + * 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. * - * And Hey: - * GROningen Mixture of Alchemy and Childrens' Stories + * To help us fund GROMACS development, we humbly ask that you cite + * the research papers on the package. Check out http://www.gromacs.org. */ diff --git a/src/gromacs/gmxlib/gmxfio_bin.c b/src/gromacs/fileio/gmxfio_bin.c similarity index 77% rename from src/gromacs/gmxlib/gmxfio_bin.c rename to src/gromacs/fileio/gmxfio_bin.c index 72e5bb3a76..cf50e0fdc4 100644 --- a/src/gromacs/gmxlib/gmxfio_bin.c +++ b/src/gromacs/fileio/gmxfio_bin.c @@ -1,37 +1,38 @@ -/* -*- mode: c; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; c-file-style: "stroustrup"; -*- +/* + * This file is part of the GROMACS molecular simulation package. * - * - * This source code is part of - * - * G R O M A C S - * - * GROningen MAchine for Chemical Simulations - * - * VERSION 3.2.0 - * Written by David van der Spoel, Erik Lindahl, Berk Hess, and others. * Copyright (c) 1991-2000, University of Groningen, The Netherlands. * Copyright (c) 2001-2004, The GROMACS development team, - * check out http://www.gromacs.org for more information. - - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 + * 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. * - * If you want to redistribute modifications, 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 www.gromacs.org. + * 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. * - * To help us fund GROMACS development, we humbly ask that you cite - * the papers on the package - you can find them in the top README file. + * 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. * - * For more info, check our website at http://www.gromacs.org + * 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. * - * And Hey: - * GROningen Mixture of Alchemy and Childrens' Stories + * To help us fund GROMACS development, we humbly ask that you cite + * the research papers on the package. Check out http://www.gromacs.org. */ #ifdef HAVE_CONFIG_H #include diff --git a/src/gromacs/gmxlib/gmxfio_int.h b/src/gromacs/fileio/gmxfio_int.h similarity index 70% rename from src/gromacs/gmxlib/gmxfio_int.h rename to src/gromacs/fileio/gmxfio_int.h index 91fc7930c7..9a8f069c90 100644 --- a/src/gromacs/gmxlib/gmxfio_int.h +++ b/src/gromacs/fileio/gmxfio_int.h @@ -1,39 +1,42 @@ -/* -*- mode: c; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; c-file-style: "stroustrup"; -*- +/* + * This file is part of the GROMACS molecular simulation package. * - * - * This source code is part of - * - * G R O M A C S - * - * GROningen MAchine for Chemical Simulations - * - * VERSION 3.2.0 - * Written by David van der Spoel, Erik Lindahl, Berk Hess, and others. * Copyright (c) 1991-2000, University of Groningen, The Netherlands. * Copyright (c) 2001-2004, The GROMACS development team, - * check out http://www.gromacs.org for more information. - - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 + * 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. * - * If you want to redistribute modifications, 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 www.gromacs.org. + * 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. * - * To help us fund GROMACS development, we humbly ask that you cite - * the papers on the package - you can find them in the top README file. + * 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. * - * For more info, check our website at http://www.gromacs.org + * 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. * - * And Hey: - * GROningen Mixture of Alchemy and Childrens' Stories + * 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_GMXFIO_INT_H +#define GMX_FILEIO_GMXFIO_INT_H /* This is the new improved and thread safe version of gmxfio. */ @@ -127,3 +130,5 @@ void gmx_fio_fe(t_fileio *fio, int eio, const char *desc, const char *srcfile, /* lock/unlock the mutex associated with a fio */ void gmx_fio_lock(t_fileio *fio); void gmx_fio_unlock(t_fileio *fio); + +#endif diff --git a/src/gromacs/gmxlib/gmxfio_rw.c b/src/gromacs/fileio/gmxfio_rw.c similarity index 94% rename from src/gromacs/gmxlib/gmxfio_rw.c rename to src/gromacs/fileio/gmxfio_rw.c index 3fade5a428..6a66545c9b 100644 --- a/src/gromacs/gmxlib/gmxfio_rw.c +++ b/src/gromacs/fileio/gmxfio_rw.c @@ -1,37 +1,38 @@ -/* -*- mode: c; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; c-file-style: "stroustrup"; -*- +/* + * This file is part of the GROMACS molecular simulation package. * - * - * This source code is part of - * - * G R O M A C S - * - * GROningen MAchine for Chemical Simulations - * - * VERSION 3.2.0 - * Written by David van der Spoel, Erik Lindahl, Berk Hess, and others. * Copyright (c) 1991-2000, University of Groningen, The Netherlands. * Copyright (c) 2001-2004, The GROMACS development team, - * check out http://www.gromacs.org for more information. - - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 + * 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. * - * If you want to redistribute modifications, 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 www.gromacs.org. + * 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. * - * To help us fund GROMACS development, we humbly ask that you cite - * the papers on the package - you can find them in the top README file. + * 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. * - * For more info, check our website at http://www.gromacs.org + * 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. * - * And Hey: - * GROningen Mixture of Alchemy and Childrens' Stories + * To help us fund GROMACS development, we humbly ask that you cite + * the research papers on the package. Check out http://www.gromacs.org. */ #ifdef HAVE_CONFIG_H #include diff --git a/src/gromacs/gmxlib/gmxfio_xdr.c b/src/gromacs/fileio/gmxfio_xdr.c similarity index 85% rename from src/gromacs/gmxlib/gmxfio_xdr.c rename to src/gromacs/fileio/gmxfio_xdr.c index 35a04b26b2..da24d2a748 100644 --- a/src/gromacs/gmxlib/gmxfio_xdr.c +++ b/src/gromacs/fileio/gmxfio_xdr.c @@ -1,37 +1,38 @@ -/* -*- mode: c; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; c-file-style: "stroustrup"; -*- +/* + * This file is part of the GROMACS molecular simulation package. * - * - * This source code is part of - * - * G R O M A C S - * - * GROningen MAchine for Chemical Simulations - * - * VERSION 3.2.0 - * Written by David van der Spoel, Erik Lindahl, Berk Hess, and others. * Copyright (c) 1991-2000, University of Groningen, The Netherlands. * Copyright (c) 2001-2004, The GROMACS development team, - * check out http://www.gromacs.org for more information. - - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 + * 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. * - * If you want to redistribute modifications, 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 www.gromacs.org. + * 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. * - * To help us fund GROMACS development, we humbly ask that you cite - * the papers on the package - you can find them in the top README file. + * 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. * - * For more info, check our website at http://www.gromacs.org + * 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. * - * And Hey: - * GROningen Mixture of Alchemy and Childrens' Stories + * To help us fund GROMACS development, we humbly ask that you cite + * the research papers on the package. Check out http://www.gromacs.org. */ #ifdef HAVE_CONFIG_H #include diff --git a/src/gromacs/gmxlib/libxdrf.c b/src/gromacs/fileio/libxdrf.c similarity index 96% rename from src/gromacs/gmxlib/libxdrf.c rename to src/gromacs/fileio/libxdrf.c index 38d97680e2..60dba86d01 100644 --- a/src/gromacs/gmxlib/libxdrf.c +++ b/src/gromacs/fileio/libxdrf.c @@ -1,36 +1,38 @@ /* + * This file is part of the GROMACS molecular simulation package. * - * This source code is part of - * - * G R O M A C S - * - * GROningen MAchine for Chemical Simulations - * - * VERSION 3.2.0 - * Written by David van der Spoel, Erik Lindahl, Berk Hess, and others. * Copyright (c) 1991-2000, University of Groningen, The Netherlands. * Copyright (c) 2001-2004, The GROMACS development team, - * check out http://www.gromacs.org for more information. - - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 + * 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. * - * If you want to redistribute modifications, 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 www.gromacs.org. + * 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. * - * To help us fund GROMACS development, we humbly ask that you cite - * the papers on the package - you can find them in the top README file. + * 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. * - * For more info, check our website at http://www.gromacs.org + * 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. * - * And Hey: - * GROningen Mixture of Alchemy and Childrens' Stories + * To help us fund GROMACS development, we humbly ask that you cite + * the research papers on the package. Check out http://www.gromacs.org. */ #ifdef HAVE_CONFIG_H #include @@ -48,19 +50,6 @@ #include "gmx_fatal.h" -#if 0 -#ifdef HAVE_FSEEKO -# define gmx_fseek(A, B, C) fseeko(A, B, C) -# define gmx_ftell(A) ftello(A) -# define gmx_off_t off_t -#else -# define gmx_fseek(A, B, C) fseek(A, B, C) -# define gmx_ftell(A) ftell(A) -# define gmx_off_t int -#endif -#endif - - /* This is just for clarity - it can never be anything but 4! */ #define XDR_INT_SIZE 4 diff --git a/src/gromacs/gmxlib/matio.cpp b/src/gromacs/fileio/matio.cpp similarity index 95% rename from src/gromacs/gmxlib/matio.cpp rename to src/gromacs/fileio/matio.cpp index ef8b1e7968..cdd1f6ba86 100644 --- a/src/gromacs/gmxlib/matio.cpp +++ b/src/gromacs/fileio/matio.cpp @@ -1,36 +1,38 @@ /* + * This file is part of the GROMACS molecular simulation package. * - * This source code is part of - * - * G R O M A C S - * - * GROningen MAchine for Chemical Simulations - * - * VERSION 3.2.0 - * Written by David van der Spoel, Erik Lindahl, Berk Hess, and others. * Copyright (c) 1991-2000, University of Groningen, The Netherlands. * Copyright (c) 2001-2004, The GROMACS development team, - * check out http://www.gromacs.org for more information. - - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 + * 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. * - * If you want to redistribute modifications, 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 www.gromacs.org. + * 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. * - * To help us fund GROMACS development, we humbly ask that you cite - * the papers on the package - you can find them in the top README file. + * 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. * - * For more info, check our website at http://www.gromacs.org + * 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. * - * And Hey: - * GROningen Mixture of Alchemy and Childrens' Stories + * To help us fund GROMACS development, we humbly ask that you cite + * the research papers on the package. Check out http://www.gromacs.org. */ #ifdef HAVE_CONFIG_H #include diff --git a/src/gromacs/legacyheaders/matio.h b/src/gromacs/fileio/matio.h similarity index 71% rename from src/gromacs/legacyheaders/matio.h rename to src/gromacs/fileio/matio.h index bb71968ea4..b2547c229d 100644 --- a/src/gromacs/legacyheaders/matio.h +++ b/src/gromacs/fileio/matio.h @@ -1,42 +1,44 @@ /* + * This file is part of the GROMACS molecular simulation package. * - * This source code is part of - * - * G R O M A C S - * - * GROningen MAchine for Chemical Simulations - * - * VERSION 3.2.0 - * Written by David van der Spoel, Erik Lindahl, Berk Hess, and others. * Copyright (c) 1991-2000, University of Groningen, The Netherlands. * Copyright (c) 2001-2004, The GROMACS development team, - * check out http://www.gromacs.org for more information. - - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 + * 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. * - * If you want to redistribute modifications, 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 www.gromacs.org. + * 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. * - * To help us fund GROMACS development, we humbly ask that you cite - * the papers on the package - you can find them in the top README file. + * 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. * - * For more info, check our website at http://www.gromacs.org + * 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. * - * And Hey: - * Gromacs Runs On Most of All Computer Systems + * 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 _matio_h -#define _matio_h +#ifndef GMX_FILEIO_MATIO_H +#define GMX_FILEIO_MATIO_H -#include "typedefs.h" +#include "../legacyheaders/typedefs.h" #ifdef __cplusplus extern "C" { @@ -136,4 +138,4 @@ void clear_matrix(int nx, int ny, real **m); } #endif -#endif /* _matio_h */ +#endif /* GMX_FILEIO_MATIO_H */ diff --git a/src/gromacs/fileio/mdoutf.c b/src/gromacs/fileio/mdoutf.c new file mode 100644 index 0000000000..e636ddf148 --- /dev/null +++ b/src/gromacs/fileio/mdoutf.c @@ -0,0 +1,154 @@ +/* + * This file is part of the GROMACS molecular simulation package. + * + * 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 "mdoutf.h" + +#include "gromacs/legacyheaders/xvgr.h" +#include "trnio.h" +#include "xtcio.h" +#include "gromacs/legacyheaders/mdrun.h" +#include "gromacs/legacyheaders/smalloc.h" + +gmx_mdoutf_t *init_mdoutf(int nfile, const t_filenm fnm[], int mdrun_flags, + const t_commrec *cr, const t_inputrec *ir, + const output_env_t oenv) +{ + gmx_mdoutf_t *of; + char filemode[3]; + gmx_bool bAppendFiles; + + snew(of, 1); + + of->fp_trn = NULL; + of->fp_ene = NULL; + of->fp_xtc = NULL; + of->fp_dhdl = NULL; + of->fp_field = NULL; + + of->eIntegrator = ir->eI; + of->bExpanded = ir->bExpanded; + of->elamstats = ir->expandedvals->elamstats; + of->simulation_part = ir->simulation_part; + + if (MASTER(cr)) + { + bAppendFiles = (mdrun_flags & MD_APPENDFILES); + + of->bKeepAndNumCPT = (mdrun_flags & MD_KEEPANDNUMCPT); + + sprintf(filemode, bAppendFiles ? "a+" : "w+"); + + if ((EI_DYNAMICS(ir->eI) || EI_ENERGY_MINIMIZATION(ir->eI)) +#ifndef GMX_FAHCORE + && + !(EI_DYNAMICS(ir->eI) && + ir->nstxout == 0 && + ir->nstvout == 0 && + ir->nstfout == 0) +#endif + ) + { + of->fp_trn = open_trn(ftp2fn(efTRN, nfile, fnm), filemode); + } + if (EI_DYNAMICS(ir->eI) && + ir->nstxtcout > 0) + { + of->fp_xtc = open_xtc(ftp2fn(efXTC, nfile, fnm), filemode); + of->xtc_prec = ir->xtcprec; + } + if (EI_DYNAMICS(ir->eI) || EI_ENERGY_MINIMIZATION(ir->eI)) + { + of->fp_ene = open_enx(ftp2fn(efEDR, nfile, fnm), filemode); + } + of->fn_cpt = opt2fn("-cpo", nfile, fnm); + + if ((ir->efep != efepNO || ir->bSimTemp) && ir->fepvals->nstdhdl > 0 && + (ir->fepvals->separate_dhdl_file == esepdhdlfileYES ) && + EI_DYNAMICS(ir->eI)) + { + if (bAppendFiles) + { + of->fp_dhdl = gmx_fio_fopen(opt2fn("-dhdl", nfile, fnm), filemode); + } + else + { + of->fp_dhdl = open_dhdl(opt2fn("-dhdl", nfile, fnm), ir, oenv); + } + } + + if (opt2bSet("-field", nfile, fnm) && + (ir->ex[XX].n || ir->ex[YY].n || ir->ex[ZZ].n)) + { + if (bAppendFiles) + { + of->fp_dhdl = gmx_fio_fopen(opt2fn("-field", nfile, fnm), + filemode); + } + else + { + of->fp_field = xvgropen(opt2fn("-field", nfile, fnm), + "Applied electric field", "Time (ps)", + "E (V/nm)", oenv); + } + } + } + + return of; +} + +void done_mdoutf(gmx_mdoutf_t *of) +{ + if (of->fp_ene != NULL) + { + close_enx(of->fp_ene); + } + if (of->fp_xtc) + { + close_xtc(of->fp_xtc); + } + if (of->fp_trn) + { + close_trn(of->fp_trn); + } + if (of->fp_dhdl != NULL) + { + gmx_fio_fclose(of->fp_dhdl); + } + if (of->fp_field != NULL) + { + gmx_fio_fclose(of->fp_field); + } + + sfree(of); +} diff --git a/src/gromacs/fileio/mdoutf.h b/src/gromacs/fileio/mdoutf.h new file mode 100644 index 0000000000..fab17b971b --- /dev/null +++ b/src/gromacs/fileio/mdoutf.h @@ -0,0 +1,77 @@ +/* + * This file is part of the GROMACS molecular simulation package. + * + * 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_MDOUTF_H +#define GMX_FILEIO_MDOUTF_H + +#include "filenm.h" +#include +#include "../legacyheaders/types/simple.h" +#include "enxio.h" +#include "gmxfio.h" + +typedef struct { + t_fileio *fp_trn; + t_fileio *fp_xtc; + int xtc_prec; + ener_file_t fp_ene; + const char *fn_cpt; + gmx_bool bKeepAndNumCPT; + int eIntegrator; + gmx_bool bExpanded; + int elamstats; + int simulation_part; + FILE *fp_dhdl; + FILE *fp_field; +} gmx_mdoutf_t; + +gmx_mdoutf_t *init_mdoutf(int nfile, const t_filenm fnm[], + int mdrun_flags, + const t_commrec *cr, const t_inputrec *ir, + const output_env_t oenv); +/* Returns a pointer to a data structure with all output file pointers + * and names required by mdrun. + */ + +void done_mdoutf(gmx_mdoutf_t *of); +/* Close all open output files and free the of pointer */ + +#define MDOF_X (1<<0) +#define MDOF_V (1<<1) +#define MDOF_F (1<<2) +#define MDOF_XTC (1<<3) +#define MDOF_CPT (1<<4) + +#endif /* GMX_FILEIO_MDOUTF_H */ diff --git a/src/gromacs/gmxlib/pdbio.c b/src/gromacs/fileio/pdbio.c similarity index 94% rename from src/gromacs/gmxlib/pdbio.c rename to src/gromacs/fileio/pdbio.c index e97ca13796..099bb3ca76 100644 --- a/src/gromacs/gmxlib/pdbio.c +++ b/src/gromacs/fileio/pdbio.c @@ -1,36 +1,38 @@ /* + * This file is part of the GROMACS molecular simulation package. * - * This source code is part of - * - * G R O M A C S - * - * GROningen MAchine for Chemical Simulations - * - * VERSION 3.2.0 - * Written by David van der Spoel, Erik Lindahl, Berk Hess, and others. * Copyright (c) 1991-2000, University of Groningen, The Netherlands. * Copyright (c) 2001-2004, The GROMACS development team, - * check out http://www.gromacs.org for more information. - - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 + * 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. * - * If you want to redistribute modifications, 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 www.gromacs.org. + * 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. * - * To help us fund GROMACS development, we humbly ask that you cite - * the papers on the package - you can find them in the top README file. + * 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. * - * For more info, check our website at http://www.gromacs.org + * 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. * - * And Hey: - * GROningen Mixture of Alchemy and Childrens' Stories + * To help us fund GROMACS development, we humbly ask that you cite + * the research papers on the package. Check out http://www.gromacs.org. */ #ifdef HAVE_CONFIG_H #include diff --git a/src/gromacs/legacyheaders/pdbio.h b/src/gromacs/fileio/pdbio.h similarity index 70% rename from src/gromacs/legacyheaders/pdbio.h rename to src/gromacs/fileio/pdbio.h index fda43124fe..18745d2c87 100644 --- a/src/gromacs/legacyheaders/pdbio.h +++ b/src/gromacs/fileio/pdbio.h @@ -1,45 +1,47 @@ /* + * This file is part of the GROMACS molecular simulation package. * - * This source code is part of - * - * G R O M A C S - * - * GROningen MAchine for Chemical Simulations - * - * VERSION 3.2.0 - * Written by David van der Spoel, Erik Lindahl, Berk Hess, and others. * Copyright (c) 1991-2000, University of Groningen, The Netherlands. * Copyright (c) 2001-2004, The GROMACS development team, - * check out http://www.gromacs.org for more information. - - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 + * 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. * - * If you want to redistribute modifications, 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 www.gromacs.org. + * 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. * - * To help us fund GROMACS development, we humbly ask that you cite - * the papers on the package - you can find them in the top README file. + * 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. * - * For more info, check our website at http://www.gromacs.org + * 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. * - * And Hey: - * Gromacs Runs On Most of All Computer Systems + * 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 _pdbio_h -#define _pdbio_h +#ifndef GMX_FILEIO_PDBIO_H +#define GMX_FILEIO_PDBIO_H -#include "sysstuff.h" -#include "typedefs.h" -#include "symtab.h" -#include "atomprop.h" +#include "../legacyheaders/sysstuff.h" +#include "../legacyheaders/typedefs.h" +#include "../legacyheaders/symtab.h" +#include "../legacyheaders/atomprop.h" #ifdef __cplusplus extern "C" { @@ -150,4 +152,4 @@ void gmx_conect_done(gmx_conect gc); } #endif -#endif /* _pdbio_h */ +#endif /* GMX_FILEIO_PDBIO_H */ diff --git a/src/gromacs/gmxlib/tpxio.c b/src/gromacs/fileio/tpxio.c similarity index 98% rename from src/gromacs/gmxlib/tpxio.c rename to src/gromacs/fileio/tpxio.c index 2999c66b23..f319075b4b 100644 --- a/src/gromacs/gmxlib/tpxio.c +++ b/src/gromacs/fileio/tpxio.c @@ -1,37 +1,38 @@ -/* -*- mode: c; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; c-file-style: "stroustrup"; -*- - * - * - * This source code is part of - * - * G R O M A C S - * - * GROningen MAchine for Chemical Simulations +/* + * This file is part of the GROMACS molecular simulation package. * - * VERSION 3.2.0 - * Written by David van der Spoel, Erik Lindahl, Berk Hess, and others. * Copyright (c) 1991-2000, University of Groningen, The Netherlands. * Copyright (c) 2001-2004, The GROMACS development team, - * check out http://www.gromacs.org for more information. - - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 + * 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. * - * If you want to redistribute modifications, 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 www.gromacs.org. + * 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. * - * To help us fund GROMACS development, we humbly ask that you cite - * the papers on the package - you can find them in the top README file. + * 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. * - * For more info, check our website at http://www.gromacs.org + * 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. * - * And Hey: - * GROningen Mixture of Alchemy and Childrens' Stories + * To help us fund GROMACS development, we humbly ask that you cite + * the research papers on the package. Check out http://www.gromacs.org. */ #ifdef HAVE_CONFIG_H #include diff --git a/src/gromacs/legacyheaders/tpxio.h b/src/gromacs/fileio/tpxio.h similarity index 74% rename from src/gromacs/legacyheaders/tpxio.h rename to src/gromacs/fileio/tpxio.h index 4be410b030..0e64f3b070 100644 --- a/src/gromacs/legacyheaders/tpxio.h +++ b/src/gromacs/fileio/tpxio.h @@ -1,40 +1,42 @@ /* + * This file is part of the GROMACS molecular simulation package. * - * This source code is part of - * - * G R O M A C S - * - * GROningen MAchine for Chemical Simulations - * - * VERSION 3.2.0 - * Written by David van der Spoel, Erik Lindahl, Berk Hess, and others. * Copyright (c) 1991-2000, University of Groningen, The Netherlands. * Copyright (c) 2001-2004, The GROMACS development team, - * check out http://www.gromacs.org for more information. - - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 + * 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. * - * If you want to redistribute modifications, 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 www.gromacs.org. + * 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. * - * To help us fund GROMACS development, we humbly ask that you cite - * the papers on the package - you can find them in the top README file. + * 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. * - * For more info, check our website at http://www.gromacs.org + * 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. * - * And Hey: - * Gromacs Runs On Most of All Computer Systems + * 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 _tpxio_h -#define _tpxio_h +#ifndef GMX_FILEIO_TPXIO_H +#define GMX_FILEIO_TPXIO_H /************************************************************** @@ -45,7 +47,7 @@ * can also be used with the routines in gmxfio.h * **************************************************************/ -#include "typedefs.h" +#include "../legacyheaders/typedefs.h" #include "gmxfio.h" #ifdef __cplusplus diff --git a/src/programs/mdrun/trajectory_writing.c b/src/gromacs/fileio/trajectory_writing.c similarity index 74% rename from src/programs/mdrun/trajectory_writing.c rename to src/gromacs/fileio/trajectory_writing.c index abf0c61c3c..1f8c73dc86 100644 --- a/src/programs/mdrun/trajectory_writing.c +++ b/src/gromacs/fileio/trajectory_writing.c @@ -1,36 +1,36 @@ /* + * This file is part of the GROMACS molecular simulation package. * - * This source code is part of + * 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. * - * G R O M A C S - * - * GROningen MAchine for Chemical Simulations - * - * VERSION 3.2.0 - * Written by David van der Spoel, Erik Lindahl, Berk Hess, and others. - * Copyright (c) 1991-2000, University of Groningen, The Netherlands. - * Copyright (c) 2001-2004, The GROMACS development team, - * check out http://www.gromacs.org for more information. - - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 + * 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. * - * If you want to redistribute modifications, 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 www.gromacs.org. + * 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. * - * To help us fund GROMACS development, we humbly ask that you cite - * the papers on the package - you can find them in the top README file. + * 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. * - * For more info, check our website at http://www.gromacs.org + * 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. * - * And Hey: - * Gallium Rubidium Oxygen Manganese Argon Carbon Silicon + * To help us fund GROMACS development, we humbly ask that you cite + * the research papers on the package. Check out http://www.gromacs.org. */ #ifdef HAVE_CONFIG_H #include @@ -44,6 +44,8 @@ #include "gmx_wallcycle.h" #include "mdrun.h" #include "confio.h" +#include "trajectory_writing.h" +#include "mdoutf.h" void do_trajectory_writing(FILE *fplog, diff --git a/src/gromacs/fileio/trajectory_writing.h b/src/gromacs/fileio/trajectory_writing.h new file mode 100644 index 0000000000..2fa803abe3 --- /dev/null +++ b/src/gromacs/fileio/trajectory_writing.h @@ -0,0 +1,92 @@ +/* + * 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_TRAJECTORY_WRITING_H +#define GMX_FILEIO_TRAJECTORY_WRITING_H + +#include +#include "filenm.h" +#include "mdoutf.h" +#include "../legacyheaders/types/simple.h" +#include "../legacyheaders/types/commrec.h" +#include "../legacyheaders/update.h" +#include "../legacyheaders/mdebin.h" + +void +do_trajectory_writing(FILE *fplog, + t_commrec *cr, + int nfile, + const t_filenm fnm[], + gmx_large_int_t step, + gmx_large_int_t step_rel, + double t, + t_inputrec *ir, + t_state *state, + t_state *state_global, + gmx_mtop_t *top_global, + t_forcerec *fr, + gmx_update_t upd, + gmx_mdoutf_t *outf, + t_mdebin *mdebin, + gmx_ekindata_t *ekind, + rvec *f, + rvec *f_global, + gmx_wallcycle_t wcycle, + gmx_rng_t mcrng, + int *nchkpt, + gmx_bool bCPT, + gmx_bool bRerunMD, + gmx_bool bLastStep, + gmx_bool bDoConfOut, + gmx_bool bSumEkinhOld + ); +/* Wrapper routine for trajectory writing */ + +void write_traj(FILE *fplog, t_commrec *cr, + gmx_mdoutf_t *of, + int mdof_flags, + gmx_mtop_t *top_global, + gmx_large_int_t step, double t, + t_state *state_local, t_state *state_global, + rvec *f_local, rvec *f_global, + int *n_xtc, rvec **x_xtc); +/* Routine that writes frames to trn, xtc and/or checkpoint. + * What is written is determined by the mdof_flags defined above. + * Data is collected to the master node only when necessary. + */ + +#endif /* GMX_FILEIO_TRAJECTORY_WRITING_H */ diff --git a/src/gromacs/fileio/trajectory_writing_low_level.c b/src/gromacs/fileio/trajectory_writing_low_level.c new file mode 100644 index 0000000000..764b961972 --- /dev/null +++ b/src/gromacs/fileio/trajectory_writing_low_level.c @@ -0,0 +1,240 @@ +/* + * This file is part of the GROMACS molecular simulation package. + * + * 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 "trajectory_writing.h" +#include "gromacs/legacyheaders/mvdata.h" +#include "gromacs/legacyheaders/domdec.h" +#include "checkpoint.h" +#include "trnio.h" +#include "xtcio.h" +#include "gromacs/legacyheaders/smalloc.h" + +static void moveit(t_commrec *cr, rvec xx[]) +{ + if (!xx) + { + return; + } + + move_rvecs(cr, FALSE, FALSE, xx, NULL, (cr->nnodes-cr->npmenodes)-1, NULL); +} + +void write_traj(FILE *fplog, t_commrec *cr, + gmx_mdoutf_t *of, + int mdof_flags, + gmx_mtop_t *top_global, + gmx_large_int_t step, double t, + t_state *state_local, t_state *state_global, + rvec *f_local, rvec *f_global, + int *n_xtc, rvec **x_xtc) +{ + int i, j; + gmx_groups_t *groups; + rvec *xxtc; + rvec *local_v; + rvec *global_v; + +#define MX(xvf) moveit(cr, xvf) + + /* MRS -- defining these variables is to manage the difference + * between half step and full step velocities, but there must be a better way . . . */ + + local_v = state_local->v; + global_v = state_global->v; + + if (DOMAINDECOMP(cr)) + { + if (mdof_flags & MDOF_CPT) + { + dd_collect_state(cr->dd, state_local, state_global); + } + else + { + if (mdof_flags & (MDOF_X | MDOF_XTC)) + { + dd_collect_vec(cr->dd, state_local, state_local->x, + state_global->x); + } + if (mdof_flags & MDOF_V) + { + dd_collect_vec(cr->dd, state_local, local_v, + global_v); + } + } + if (mdof_flags & MDOF_F) + { + dd_collect_vec(cr->dd, state_local, f_local, f_global); + } + } + else + { + if (mdof_flags & MDOF_CPT) + { + /* All pointers in state_local are equal to state_global, + * but we need to copy the non-pointer entries. + */ + state_global->lambda = state_local->lambda; + state_global->veta = state_local->veta; + state_global->vol0 = state_local->vol0; + copy_mat(state_local->box, state_global->box); + copy_mat(state_local->boxv, state_global->boxv); + copy_mat(state_local->svir_prev, state_global->svir_prev); + copy_mat(state_local->fvir_prev, state_global->fvir_prev); + copy_mat(state_local->pres_prev, state_global->pres_prev); + } + if (cr->nnodes > 1) + { + /* Particle decomposition, collect the data on the master node */ + if (mdof_flags & MDOF_CPT) + { + if (state_local->flags & (1<x); + } + if (state_local->flags & (1<v); + } + if (state_local->flags & (1<sd_X); + } + if (state_global->nrngi > 1) + { + if (state_local->flags & (1<ld_rng, + state_local->nrng*sizeof(state_local->ld_rng[0]), MPI_BYTE, + state_global->ld_rng, + state_local->nrng*sizeof(state_local->ld_rng[0]), MPI_BYTE, + MASTERRANK(cr), cr->mpi_comm_mygroup); +#endif + } + if (state_local->flags & (1<ld_rngi, + sizeof(state_local->ld_rngi[0]), MPI_BYTE, + state_global->ld_rngi, + sizeof(state_local->ld_rngi[0]), MPI_BYTE, + MASTERRANK(cr), cr->mpi_comm_mygroup); +#endif + } + } + } + else + { + if (mdof_flags & (MDOF_X | MDOF_XTC)) + { + MX(state_global->x); + } + if (mdof_flags & MDOF_V) + { + MX(global_v); + } + } + if (mdof_flags & MDOF_F) + { + MX(f_global); + } + } + } + + if (MASTER(cr)) + { + if (mdof_flags & MDOF_CPT) + { + write_checkpoint(of->fn_cpt, of->bKeepAndNumCPT, + fplog, cr, of->eIntegrator, of->simulation_part, + of->bExpanded, of->elamstats, step, t, state_global); + } + + if (mdof_flags & (MDOF_X | MDOF_V | MDOF_F)) + { + fwrite_trn(of->fp_trn, step, t, state_local->lambda[efptFEP], + state_local->box, top_global->natoms, + (mdof_flags & MDOF_X) ? state_global->x : NULL, + (mdof_flags & MDOF_V) ? global_v : NULL, + (mdof_flags & MDOF_F) ? f_global : NULL); + if (gmx_fio_flush(of->fp_trn) != 0) + { + gmx_file("Cannot write trajectory; maybe you are out of disk space?"); + } + gmx_fio_check_file_position(of->fp_trn); + } + if (mdof_flags & MDOF_XTC) + { + groups = &top_global->groups; + if (*n_xtc == -1) + { + *n_xtc = 0; + for (i = 0; (i < top_global->natoms); i++) + { + if (ggrpnr(groups, egcXTC, i) == 0) + { + (*n_xtc)++; + } + } + if (*n_xtc != top_global->natoms) + { + snew(*x_xtc, *n_xtc); + } + } + if (*n_xtc == top_global->natoms) + { + xxtc = state_global->x; + } + else + { + xxtc = *x_xtc; + j = 0; + for (i = 0; (i < top_global->natoms); i++) + { + if (ggrpnr(groups, egcXTC, i) == 0) + { + copy_rvec(state_global->x[i], xxtc[j++]); + } + } + } + if (write_xtc(of->fp_xtc, *n_xtc, step, t, + state_local->box, xxtc, of->xtc_prec) == 0) + { + gmx_fatal(FARGS, "XTC error - maybe you are out of disk space?"); + } + gmx_fio_check_file_position(of->fp_xtc); + } + } +} diff --git a/src/gromacs/gmxlib/trnio.c b/src/gromacs/fileio/trnio.c similarity index 84% rename from src/gromacs/gmxlib/trnio.c rename to src/gromacs/fileio/trnio.c index c8784a5377..23e76ea4a5 100644 --- a/src/gromacs/gmxlib/trnio.c +++ b/src/gromacs/fileio/trnio.c @@ -1,36 +1,38 @@ /* + * This file is part of the GROMACS molecular simulation package. * - * This source code is part of - * - * G R O M A C S - * - * GROningen MAchine for Chemical Simulations - * - * VERSION 3.2.0 - * Written by David van der Spoel, Erik Lindahl, Berk Hess, and others. * Copyright (c) 1991-2000, University of Groningen, The Netherlands. * Copyright (c) 2001-2004, The GROMACS development team, - * check out http://www.gromacs.org for more information. - - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 + * 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. * - * If you want to redistribute modifications, 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 www.gromacs.org. + * 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. * - * To help us fund GROMACS development, we humbly ask that you cite - * the papers on the package - you can find them in the top README file. + * 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. * - * For more info, check our website at http://www.gromacs.org + * 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. * - * And Hey: - * GROningen Mixture of Alchemy and Childrens' Stories + * To help us fund GROMACS development, we humbly ask that you cite + * the research papers on the package. Check out http://www.gromacs.org. */ #ifdef HAVE_CONFIG_H #include diff --git a/src/gromacs/legacyheaders/trnio.h b/src/gromacs/fileio/trnio.h similarity index 72% rename from src/gromacs/legacyheaders/trnio.h rename to src/gromacs/fileio/trnio.h index 2d6bfbb497..c5ae63e453 100644 --- a/src/gromacs/legacyheaders/trnio.h +++ b/src/gromacs/fileio/trnio.h @@ -1,40 +1,42 @@ /* + * This file is part of the GROMACS molecular simulation package. * - * This source code is part of - * - * G R O M A C S - * - * GROningen MAchine for Chemical Simulations - * - * VERSION 3.2.0 - * Written by David van der Spoel, Erik Lindahl, Berk Hess, and others. * Copyright (c) 1991-2000, University of Groningen, The Netherlands. * Copyright (c) 2001-2004, The GROMACS development team, - * check out http://www.gromacs.org for more information. - - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 + * 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. * - * If you want to redistribute modifications, 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 www.gromacs.org. + * 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. * - * To help us fund GROMACS development, we humbly ask that you cite - * the papers on the package - you can find them in the top README file. + * 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. * - * For more info, check our website at http://www.gromacs.org + * 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. * - * And Hey: - * Gromacs Runs On Most of All Computer Systems + * 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 _trnio_h -#define _trnio_h +#ifndef GMX_FILEIO_TRNIO_H +#define GMX_FILEIO_TRNIO_H /************************************************************** * @@ -51,7 +53,7 @@ * **************************************************************/ -#include "typedefs.h" +#include "../legacyheaders/typedefs.h" #include "gmxfio.h" #ifdef __cplusplus diff --git a/src/gromacs/legacyheaders/types/trx.h b/src/gromacs/fileio/trx.h similarity index 63% rename from src/gromacs/legacyheaders/types/trx.h rename to src/gromacs/fileio/trx.h index 1358234e28..479f8d6a05 100644 --- a/src/gromacs/legacyheaders/types/trx.h +++ b/src/gromacs/fileio/trx.h @@ -1,36 +1,38 @@ /* + * This file is part of the GROMACS molecular simulation package. * - * This source code is part of - * - * G R O M A C S - * - * GROningen MAchine for Chemical Simulations - * - * VERSION 3.2.0 - * Written by David van der Spoel, Erik Lindahl, Berk Hess, and others. * Copyright (c) 1991-2000, University of Groningen, The Netherlands. * Copyright (c) 2001-2004, The GROMACS development team, - * check out http://www.gromacs.org for more information. - - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 + * 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. * - * If you want to redistribute modifications, 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 www.gromacs.org. + * 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. * - * To help us fund GROMACS development, we humbly ask that you cite - * the papers on the package - you can find them in the top README file. + * 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. * - * For more info, check our website at http://www.gromacs.org + * 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. * - * And Hey: - * GRoups of Organic Molecules in ACtion for Science + * To help us fund GROMACS development, we humbly ask that you cite + * the research papers on the package. Check out http://www.gromacs.org. */ /* The gmx_bools indicate whether a field was read from the trajectory. @@ -38,10 +40,10 @@ * not be allocated. */ -#ifndef _trx_h -#define _trx_h +#ifndef GMX_FILEIO_TRX_H +#define GMX_FILEIO_TRX_H -#include "atoms.h" +#include "../legacyheaders/types/atoms.h" #ifdef __cplusplus extern "C" { diff --git a/src/gromacs/gmxlib/trxio.c b/src/gromacs/fileio/trxio.c similarity index 92% rename from src/gromacs/gmxlib/trxio.c rename to src/gromacs/fileio/trxio.c index 367c2b1210..17baacab63 100644 --- a/src/gromacs/gmxlib/trxio.c +++ b/src/gromacs/fileio/trxio.c @@ -1,37 +1,42 @@ /* + * This file is part of the GROMACS molecular simulation package. * - * This source code is part of - * - * G R O M A C S - * - * GROningen MAchine for Chemical Simulations - * - * VERSION 3.2.0 - * Written by David van der Spoel, Erik Lindahl, Berk Hess, and others. * Copyright (c) 1991-2000, University of Groningen, The Netherlands. * Copyright (c) 2001-2004, The GROMACS development team, - * check out http://www.gromacs.org for more information. - - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 + * 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. * - * If you want to redistribute modifications, please consider that - * scientific software is very special. Version control is crucial - - * bugs must be traceable. We will be happy to consider code forxd - * 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 www.gromacs.org. + * 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. * - * To help us fund GROMACS development, we humbly ask that you cite - * the papers on the package - you can find them in the top README file. + * 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. * - * For more info, check our website at http://www.gromacs.org + * 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. * - * And Hey: - * GROningen Mixture of Alchemy and Childrens' Stories + * 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 "trxio.h" + #ifdef HAVE_CONFIG_H #include #endif @@ -45,11 +50,12 @@ #include "pbc.h" #include "statutil.h" #include "gmxfio.h" +#include "trxio.h" +#include "gromacs/legacyheaders/statutil.h" #include "trnio.h" #include "names.h" #include "vec.h" #include "futil.h" -#include "gmxfio.h" #include "xtcio.h" #include "pdbio.h" #include "confio.h" @@ -80,6 +86,47 @@ struct t_trxstatus char *persistent_line; /* Persistent line for reading g96 trajectories */ }; +/* utility functions */ + +int check_times2(real t, real t0, gmx_bool bDouble) +{ + int r; + +#ifndef GMX_DOUBLE + /* since t is float, we can not use double precision for bRmod */ + bDouble = FALSE; +#endif + + r = -1; + if ((!bTimeSet(TBEGIN) || (t >= rTimeValue(TBEGIN))) && + (!bTimeSet(TEND) || (t <= rTimeValue(TEND)))) + { + if (bTimeSet(TDELTA) && !bRmod_fd(t, t0, rTimeValue(TDELTA), bDouble)) + { + r = -1; + } + else + { + r = 0; + } + } + else if (bTimeSet(TEND) && (t >= rTimeValue(TEND))) + { + r = 1; + } + if (debug) + { + fprintf(debug, "t=%g, t0=%g, b=%g, e=%g, dt=%g: r=%d\n", + t, t0, rTimeValue(TBEGIN), rTimeValue(TEND), rTimeValue(TDELTA), r); + } + return r; +} + +int check_times(real t) +{ + return check_times2(t, t, FALSE); +} + static void initcount(t_trxstatus *status) { status->__frame = -1; diff --git a/src/gromacs/fileio/trxio.h b/src/gromacs/fileio/trxio.h new file mode 100644 index 0000000000..b5ba5bb8b5 --- /dev/null +++ b/src/gromacs/fileio/trxio.h @@ -0,0 +1,212 @@ +/* + * 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_TRXIO_H +#define GMX_FILEIO_TRXIO_H + +#include "../legacyheaders/typedefs.h" +#include "filenm.h" +#include "../legacyheaders/readinp.h" +#include "pdbio.h" +#include "../legacyheaders/oenv.h" +#include "gmxfio.h" + +#ifdef __cplusplus +extern "C" { +#endif +#if 0 /* avoid screwing up indentation */ +} +#endif + +/* a dedicated status type contains fp, etc. */ +typedef struct t_trxstatus t_trxstatus; + +/* I/O function types */ + +/************************************************ + * Trajectory functions + ************************************************/ + +int prec2ndec(real prec); +/* Convert precision in 1/(nm) to number of decimal places */ + +void clear_trxframe(t_trxframe *fr, gmx_bool bFirst); +/* Set all content gmx_booleans to FALSE. + * When bFirst = TRUE, set natoms=-1, all pointers to NULL + * and all data to zero. + */ + +void set_trxframe_ePBC(t_trxframe *fr, int ePBC); +/* Set the type of periodic boundary conditions, ePBC=-1 is not set */ + +int nframes_read(t_trxstatus *status); +/* Returns the number of frames read from the trajectory */ + +int write_trxframe_indexed(t_trxstatus *status, t_trxframe *fr, int nind, + const atom_id *ind, gmx_conect gc); +/* Write an indexed frame to a TRX file, see write_trxframe. gc may be NULL */ + +int write_trxframe(t_trxstatus *status, t_trxframe *fr, gmx_conect gc); +/* Write a frame to a TRX file. + * Only entries for which the gmx_boolean is TRUE will be written, + * except for step, time, lambda and/or box, which may not be + * omitted for certain trajectory formats. + * The precision for .xtc and .gro is fr->prec, when fr->bPrec=FALSE, + * the precision is set to 1000. + * gc is important for pdb file writing only and may be NULL. + */ + +int write_trx(t_trxstatus *status, int nind, const atom_id *ind, t_atoms *atoms, + int step, real time, matrix box, rvec x[], rvec *v, + gmx_conect gc); +/* Write an indexed frame to a TRX file. + * v can be NULL. + * atoms can be NULL for file types which don't need atom names. + */ + +void close_trx(t_trxstatus *status); +/* Close trj file as opened with read_first_x, read_frist_frame + * or open_trx. Identical to close_trj. + */ + +t_trxstatus *open_trx(const char *outfile, const char *filemode); +/* Open a TRX file and return an allocated status pointer */ + +/* get a fileio from a trxstatus */ +t_fileio *trx_get_fileio(t_trxstatus *status); + + +gmx_bool bRmod_fd(double a, double b, double c, gmx_bool bDouble); +/* Returns TRUE when (a - b) MOD c = 0, using a margin which is slightly + * larger than the float/double precision. + */ + +#ifdef GMX_DOUBLE +#define bRmod(a, b, c) bRmod_fd(a, b, c, TRUE) +#else +#define bRmod(a, b, c) bRmod_fd(a, b, c, FALSE) +#endif + +int check_times2(real t, real t0, gmx_bool bDouble); +/* This routine checkes if the read-in time is correct or not; + * returns -1 if ttend + * where margin is 0.1*min(t-tp,tp-tpp), if this positive, 0 otherwise. + * tp and tpp should be the time of the previous frame and the one before. + * The mod is done with single or double precision accuracy depending + * on the value of bDouble. + */ + +int check_times(real t); +/* This routine checkes if the read-in time is correct or not; + * returns -1 if ttend + */ + + + + + +/* For trxframe.flags, used in trxframe read routines. + * When a READ flag is set, the field will be read when present, + * but a frame might be returned which does not contain the field. + * When a NEED flag is set, frames not containing the field will be skipped. + */ +#define TRX_READ_X (1<<0) +#define TRX_NEED_X (1<<1) +#define TRX_READ_V (1<<2) +#define TRX_NEED_V (1<<3) +#define TRX_READ_F (1<<4) +#define TRX_NEED_F (1<<5) +/* Useful for reading natoms from a trajectory without skipping */ +#define TRX_DONT_SKIP (1<<6) + +/* For trxframe.not_ok */ +#define HEADER_NOT_OK (1<<0) +#define DATA_NOT_OK (1<<1) +#define FRAME_NOT_OK (HEADER_NOT_OK | DATA_NOT_OK) + +int read_first_frame(const output_env_t oenv, t_trxstatus **status, + const char *fn, t_trxframe *fr, int flags); +/* Read the first frame which is in accordance with flags, which are + * defined further up in this file. + * Returns natoms when succeeded, 0 otherwise. + * Memory will be allocated for flagged entries. + * The flags are copied to fr for subsequent calls to read_next_frame. + * Returns TRUE when succeeded, FALSE otherwise. + */ + +gmx_bool read_next_frame(const output_env_t oenv, t_trxstatus *status, + t_trxframe *fr); +/* Reads the next frame which is in accordance with fr->flags. + * Returns TRUE when succeeded, FALSE otherwise. + */ + +int read_first_x(const output_env_t oenv, t_trxstatus **status, + const char *fn, real *t, rvec **x, matrix box); +/* These routines read first coordinates and box, and allocates + * memory for the coordinates, for a trajectory file. + * The routine returns the number of atoms, or 0 when something is wrong. + * The integer in status should be passed to calls of read_next_x + */ + +gmx_bool read_next_x(const output_env_t oenv, t_trxstatus *status, real *t, rvec x[], matrix box); +/* Read coordinates and box from a trajectory file. Return TRUE when all well, + * or FALSE when end of file (or last frame requested by user). + * status is the integer set in read_first_x. + */ + +void close_trj(t_trxstatus *status); +/* Close trj file as opened with read_first_x, read_frist_frame + * or open_trx. Identical to close_trx. + */ + +void rewind_trj(t_trxstatus *status); +/* Rewind trj file as opened with read_first_x */ + +t_topology *read_top(const char *fn, int *ePBC); +/* Extract a topology data structure from a topology file. + * If ePBC!=NULL *ePBC gives the pbc type. + */ + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/src/gromacs/gmxlib/vmdio.c b/src/gromacs/fileio/vmdio.c similarity index 89% rename from src/gromacs/gmxlib/vmdio.c rename to src/gromacs/fileio/vmdio.c index b27e02ae69..15b6f80b13 100644 --- a/src/gromacs/gmxlib/vmdio.c +++ b/src/gromacs/fileio/vmdio.c @@ -1,20 +1,39 @@ -/* -*- mode: c; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; c-file-style: "stroustrup"; -*- - * +/* + * This file is part of the GROMACS molecular simulation package. * - * This file is part of Gromacs Copyright (c) 1991-2008 - * David van der Spoel, Erik Lindahl, Berk Hess, University of Groningen. + * Copyright (c) 1991-2008, by 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. * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 + * 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. * - * To help us fund GROMACS development, we humbly ask that you cite - * the research papers on the package. Check out http://www.gromacs.org + * 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. * - * And Hey: - * Gnomes, ROck Monsters And Chili Sauce + * 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. */ + #ifdef HAVE_CONFIG_H #include #endif diff --git a/src/gromacs/fileio/vmdio.h b/src/gromacs/fileio/vmdio.h new file mode 100644 index 0000000000..05d4e8a360 --- /dev/null +++ b/src/gromacs/fileio/vmdio.h @@ -0,0 +1,62 @@ +/* + * This file is part of the GROMACS molecular simulation package. + * + * Copyright (c) 1991-2008, by 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_VMDIO_H_ +#define GMX_FILEIO_VMDIO_H_ + +#include "external/vmd_molfile/molfile_plugin.h" +#include "trx.h" + +#ifdef __cplusplus +extern "C" { +#endif + +struct gmxvmdplugin +{ + molfile_plugin_t *api; + const char * filetype; + void * handle; + gmx_bool bV; +}; + +int read_first_vmd_frame(const char *fn, struct trxframe *fr); +gmx_bool read_next_vmd_frame(struct trxframe *fr); + +#ifdef __cplusplus +} +#endif + +#endif /* GMX_FILEIO_VMDIO_H_ */ diff --git a/src/gromacs/gmxlib/xdrd.c b/src/gromacs/fileio/xdrd.c similarity index 63% rename from src/gromacs/gmxlib/xdrd.c rename to src/gromacs/fileio/xdrd.c index 1746883557..8da1b6af2f 100644 --- a/src/gromacs/gmxlib/xdrd.c +++ b/src/gromacs/fileio/xdrd.c @@ -1,36 +1,38 @@ /* + * This file is part of the GROMACS molecular simulation package. * - * This source code is part of - * - * G R O M A C S - * - * GROningen MAchine for Chemical Simulations - * - * VERSION 3.2.0 - * Written by David van der Spoel, Erik Lindahl, Berk Hess, and others. * Copyright (c) 1991-2000, University of Groningen, The Netherlands. * Copyright (c) 2001-2004, The GROMACS development team, - * check out http://www.gromacs.org for more information. - - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 + * 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. * - * If you want to redistribute modifications, 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 www.gromacs.org. + * 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. * - * To help us fund GROMACS development, we humbly ask that you cite - * the papers on the package - you can find them in the top README file. + * 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. * - * For more info, check our website at http://www.gromacs.org + * 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. * - * And Hey: - * GROningen Mixture of Alchemy and Childrens' Stories + * To help us fund GROMACS development, we humbly ask that you cite + * the research papers on the package. Check out http://www.gromacs.org. */ #ifdef HAVE_CONFIG_H #include diff --git a/src/gromacs/legacyheaders/xdrf.h b/src/gromacs/fileio/xdrf.h similarity index 60% rename from src/gromacs/legacyheaders/xdrf.h rename to src/gromacs/fileio/xdrf.h index 2fa3c65952..1edafcc1ec 100644 --- a/src/gromacs/legacyheaders/xdrf.h +++ b/src/gromacs/fileio/xdrf.h @@ -1,51 +1,53 @@ /* + * This file is part of the GROMACS molecular simulation package. * - * This source code is part of - * - * G R O M A C S - * - * GROningen MAchine for Chemical Simulations - * - * VERSION 3.2.0 - * Written by David van der Spoel, Erik Lindahl, Berk Hess, and others. * Copyright (c) 1991-2000, University of Groningen, The Netherlands. * Copyright (c) 2001-2004, The GROMACS development team, - * check out http://www.gromacs.org for more information. - - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 + * 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. * - * If you want to redistribute modifications, 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 www.gromacs.org. + * 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. * - * To help us fund GROMACS development, we humbly ask that you cite - * the papers on the package - you can find them in the top README file. + * 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. * - * For more info, check our website at http://www.gromacs.org + * 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. * - * And Hey: - * Gromacs Runs On Most of All Computer Systems + * 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 _xdrf_h -#define _xdrf_h +#ifndef GMX_FILEIO_XDRF_H +#define GMX_FILEIO_XDRF_H #include -#include "typedefs.h" +#include "../legacyheaders/typedefs.h" #ifdef __PGI /*Portland group compiler*/ #define int64_t long long #endif #include "../utility/gmx_header_config.h" -#if (defined GMX_NATIVE_WINDOWS || defined GMX_CYGWIN || defined GMX_INTERNAL_XDR) +#ifdef GMX_INTERNAL_XDR #include "gmx_system_xdr.h" #else #include diff --git a/src/gromacs/gmxlib/xtcio.c b/src/gromacs/fileio/xtcio.c similarity index 78% rename from src/gromacs/gmxlib/xtcio.c rename to src/gromacs/fileio/xtcio.c index 2e1d7d6204..039e1020a8 100644 --- a/src/gromacs/gmxlib/xtcio.c +++ b/src/gromacs/fileio/xtcio.c @@ -1,36 +1,38 @@ /* + * This file is part of the GROMACS molecular simulation package. * - * This source code is part of - * - * G R O M A C S - * - * GROningen MAchine for Chemical Simulations - * - * VERSION 3.2.0 - * Written by David van der Spoel, Erik Lindahl, Berk Hess, and others. * Copyright (c) 1991-2000, University of Groningen, The Netherlands. * Copyright (c) 2001-2004, The GROMACS development team, - * check out http://www.gromacs.org for more information. - - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 + * 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. * - * If you want to redistribute modifications, 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 www.gromacs.org. + * 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. * - * To help us fund GROMACS development, we humbly ask that you cite - * the papers on the package - you can find them in the top README file. + * 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. * - * For more info, check our website at http://www.gromacs.org + * 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. * - * And Hey: - * GROningen Mixture of Alchemy and Childrens' Stories + * To help us fund GROMACS development, we humbly ask that you cite + * the research papers on the package. Check out http://www.gromacs.org. */ #ifdef HAVE_CONFIG_H #include diff --git a/src/gromacs/legacyheaders/xtcio.h b/src/gromacs/fileio/xtcio.h similarity index 50% rename from src/gromacs/legacyheaders/xtcio.h rename to src/gromacs/fileio/xtcio.h index 15a157784e..c21e7e8e25 100644 --- a/src/gromacs/legacyheaders/xtcio.h +++ b/src/gromacs/fileio/xtcio.h @@ -1,42 +1,44 @@ /* + * This file is part of the GROMACS molecular simulation package. * - * This source code is part of - * - * G R O M A C S - * - * GROningen MAchine for Chemical Simulations - * - * VERSION 3.2.0 - * Written by David van der Spoel, Erik Lindahl, Berk Hess, and others. * Copyright (c) 1991-2000, University of Groningen, The Netherlands. * Copyright (c) 2001-2004, The GROMACS development team, - * check out http://www.gromacs.org for more information. - - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 + * 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. * - * If you want to redistribute modifications, 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 www.gromacs.org. + * 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. * - * To help us fund GROMACS development, we humbly ask that you cite - * the papers on the package - you can find them in the top README file. + * 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. * - * For more info, check our website at http://www.gromacs.org + * 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. * - * And Hey: - * Gromacs Runs On Most of All Computer Systems + * 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 _xtcio_h -#define _xtcio_h +#ifndef GMX_FILEIO_XTCIO_H +#define GMX_FILEIO_XTCIO_H -#include "typedefs.h" +#include "../legacyheaders/typedefs.h" #include "gmxfio.h" #include "xdrf.h" diff --git a/src/gromacs/gmxana/anadih.c b/src/gromacs/gmxana/anadih.c index 667cb21619..2377ebd8ac 100644 --- a/src/gromacs/gmxana/anadih.c +++ b/src/gromacs/gmxana/anadih.c @@ -48,7 +48,8 @@ #include "typedefs.h" #include "vec.h" #include "gstat.h" -#include "confio.h" +#include "gromacs/fileio/confio.h" +#include "gromacs/fileio/trxio.h" void print_one(const output_env_t oenv, const char *base, const char *name, const char *title, const char *ylabel, int nf, real time[], diff --git a/src/gromacs/gmxana/autocorr.c b/src/gromacs/gmxana/autocorr.c index 6ddced1088..a93f9a7e06 100644 --- a/src/gromacs/gmxana/autocorr.c +++ b/src/gromacs/gmxana/autocorr.c @@ -43,7 +43,7 @@ #include "physics.h" #include "smalloc.h" #include "xvgr.h" -#include "futil.h" +#include "gromacs/fileio/futil.h" #include "gstat.h" #include "names.h" #include "gmx_fatal.h" diff --git a/src/gromacs/gmxana/cmat.c b/src/gromacs/gmxana/cmat.c index 788d4e791d..baf258018d 100644 --- a/src/gromacs/gmxana/cmat.c +++ b/src/gromacs/gmxana/cmat.c @@ -41,8 +41,8 @@ #include "macros.h" #include "vec.h" #include "xvgr.h" -#include "matio.h" -#include "futil.h" +#include "gromacs/fileio/matio.h" +#include "gromacs/fileio/futil.h" t_mat *init_mat(int n1, gmx_bool b1D) { diff --git a/src/gromacs/gmxana/eigio.c b/src/gromacs/gmxana/eigio.c index 677281a39a..6fa683843a 100644 --- a/src/gromacs/gmxana/eigio.c +++ b/src/gromacs/gmxana/eigio.c @@ -39,10 +39,10 @@ #include "smalloc.h" #include "vec.h" #include "eigio.h" -#include "trnio.h" -#include "tpxio.h" +#include "gromacs/fileio/trnio.h" +#include "gromacs/fileio/tpxio.h" #include "statutil.h" -#include "futil.h" +#include "gromacs/fileio/futil.h" void read_eigenvectors(const char *file, int *natoms, gmx_bool *bFit, rvec **xref, gmx_bool *bDMR, diff --git a/src/gromacs/gmxana/expfit.c b/src/gromacs/gmxana/expfit.c index 504ef0656a..d72498ac65 100644 --- a/src/gromacs/gmxana/expfit.c +++ b/src/gromacs/gmxana/expfit.c @@ -44,7 +44,7 @@ #include "typedefs.h" #include "smalloc.h" #include "xvgr.h" -#include "futil.h" +#include "gromacs/fileio/futil.h" #include "gstat.h" #include "vec.h" #include "statutil.h" diff --git a/src/gromacs/gmxana/gmx_anadock.c b/src/gromacs/gmxana/gmx_anadock.c index d49ab00c68..534c2768a2 100644 --- a/src/gromacs/gmxana/gmx_anadock.c +++ b/src/gromacs/gmxana/gmx_anadock.c @@ -39,9 +39,9 @@ #include #endif -#include "confio.h" +#include "gromacs/fileio/confio.h" #include "copyrite.h" -#include "futil.h" +#include "gromacs/fileio/futil.h" #include "gmx_fatal.h" #include "smalloc.h" #include "string2.h" diff --git a/src/gromacs/gmxana/gmx_anaeig.c b/src/gromacs/gmxana/gmx_anaeig.c index 27b1cc6305..277992d444 100644 --- a/src/gromacs/gmxana/gmx_anaeig.c +++ b/src/gromacs/gmxana/gmx_anaeig.c @@ -45,13 +45,14 @@ #include "gmx_fatal.h" #include "vec.h" #include "pbc.h" -#include "futil.h" +#include "gromacs/fileio/futil.h" #include "statutil.h" #include "index.h" -#include "pdbio.h" -#include "confio.h" -#include "tpxio.h" -#include "matio.h" +#include "gromacs/fileio/pdbio.h" +#include "gromacs/fileio/confio.h" +#include "gromacs/fileio/tpxio.h" +#include "gromacs/fileio/trxio.h" +#include "gromacs/fileio/matio.h" #include "mshift.h" #include "xvgr.h" #include "do_fit.h" diff --git a/src/gromacs/gmxana/gmx_analyze.c b/src/gromacs/gmxana/gmx_analyze.c index 21c3dd48a6..d778559aa1 100644 --- a/src/gromacs/gmxana/gmx_analyze.c +++ b/src/gromacs/gmxana/gmx_analyze.c @@ -46,7 +46,7 @@ #include "gmx_fatal.h" #include "vec.h" #include "copyrite.h" -#include "futil.h" +#include "gromacs/fileio/futil.h" #include "readinp.h" #include "statutil.h" #include "txtdump.h" diff --git a/src/gromacs/gmxana/gmx_angle.c b/src/gromacs/gmxana/gmx_angle.c index 91f817d690..54455820a3 100644 --- a/src/gromacs/gmxana/gmx_angle.c +++ b/src/gromacs/gmxana/gmx_angle.c @@ -42,7 +42,7 @@ #include "physics.h" #include "typedefs.h" #include "smalloc.h" -#include "futil.h" +#include "gromacs/fileio/futil.h" #include "statutil.h" #include "copyrite.h" #include "vec.h" @@ -51,7 +51,7 @@ #include "gmx_fatal.h" #include "xvgr.h" #include "gstat.h" -#include "trnio.h" +#include "gromacs/fileio/trnio.h" #include "gmx_ana.h" diff --git a/src/gromacs/gmxana/gmx_bar.c b/src/gromacs/gmxana/gmx_bar.c index 6d3abc6a7b..8a04a8267b 100644 --- a/src/gromacs/gmxana/gmx_bar.c +++ b/src/gromacs/gmxana/gmx_bar.c @@ -46,10 +46,10 @@ #include "sysstuff.h" #include "typedefs.h" #include "smalloc.h" -#include "futil.h" +#include "gromacs/fileio/futil.h" #include "statutil.h" #include "macros.h" -#include "enxio.h" +#include "gromacs/fileio/enxio.h" #include "physics.h" #include "gmx_fatal.h" #include "xvgr.h" diff --git a/src/gromacs/gmxana/gmx_bundle.c b/src/gromacs/gmxana/gmx_bundle.c index 95edc2c30f..cc2ec9a149 100644 --- a/src/gromacs/gmxana/gmx_bundle.c +++ b/src/gromacs/gmxana/gmx_bundle.c @@ -44,12 +44,13 @@ #include "smalloc.h" #include "macros.h" #include "vec.h" -#include "futil.h" +#include "gromacs/fileio/futil.h" #include "statutil.h" #include "index.h" #include "xvgr.h" #include "rmpbc.h" -#include "tpxio.h" +#include "gromacs/fileio/tpxio.h" +#include "gromacs/fileio/trxio.h" #include "physics.h" #include "gmx_ana.h" diff --git a/src/gromacs/gmxana/gmx_chi.c b/src/gromacs/gmxana/gmx_chi.c index 7b3c07ac9e..02a751cac4 100644 --- a/src/gromacs/gmxana/gmx_chi.c +++ b/src/gromacs/gmxana/gmx_chi.c @@ -38,10 +38,10 @@ #include #include -#include "confio.h" -#include "pdbio.h" +#include "gromacs/fileio/confio.h" +#include "gromacs/fileio/pdbio.h" #include "gmx_fatal.h" -#include "futil.h" +#include "gromacs/fileio/futil.h" #include "gstat.h" #include "macros.h" #include "maths.h" @@ -49,7 +49,7 @@ #include "index.h" #include "smalloc.h" #include "statutil.h" -#include "tpxio.h" +#include "gromacs/fileio/tpxio.h" #include #include "sysstuff.h" #include "txtdump.h" @@ -57,7 +57,7 @@ #include "vec.h" #include "strdb.h" #include "xvgr.h" -#include "matio.h" +#include "gromacs/fileio/matio.h" #include "gmx_ana.h" static gmx_bool bAllowed(real phi, real psi) diff --git a/src/gromacs/gmxana/gmx_cluster.c b/src/gromacs/gmxana/gmx_cluster.c index fa94b9095a..3553243982 100644 --- a/src/gromacs/gmxana/gmx_cluster.c +++ b/src/gromacs/gmxana/gmx_cluster.c @@ -42,7 +42,8 @@ #include "smalloc.h" #include "typedefs.h" #include "statutil.h" -#include "tpxio.h" +#include "gromacs/fileio/tpxio.h" +#include "gromacs/fileio/trxio.h" #include "string2.h" #include "vec.h" #include "macros.h" @@ -51,11 +52,11 @@ #include "pbc.h" #include "rmpbc.h" #include "xvgr.h" -#include "futil.h" -#include "matio.h" +#include "gromacs/fileio/futil.h" +#include "gromacs/fileio/matio.h" #include "cmat.h" #include "do_fit.h" -#include "trnio.h" +#include "gromacs/fileio/trnio.h" #include "viewit.h" #include "gmx_ana.h" diff --git a/src/gromacs/gmxana/gmx_clustsize.c b/src/gromacs/gmxana/gmx_clustsize.c index ee15ee3e2f..d09ce185c6 100644 --- a/src/gromacs/gmxana/gmx_clustsize.c +++ b/src/gromacs/gmxana/gmx_clustsize.c @@ -48,9 +48,10 @@ #include "rmpbc.h" #include "statutil.h" #include "xvgr.h" -#include "futil.h" +#include "gromacs/fileio/futil.h" #include "statutil.h" -#include "tpxio.h" +#include "gromacs/fileio/tpxio.h" +#include "gromacs/fileio/trxio.h" #include "index.h" #include "smalloc.h" #include "calcgrid.h" @@ -59,7 +60,7 @@ #include "coulomb.h" #include "pme.h" #include "gstat.h" -#include "matio.h" +#include "gromacs/fileio/matio.h" #include "mtop_util.h" #include "gmx_ana.h" diff --git a/src/gromacs/gmxana/gmx_confrms.c b/src/gromacs/gmxana/gmx_confrms.c index 532764c3fe..d0ceeece24 100644 --- a/src/gromacs/gmxana/gmx_confrms.c +++ b/src/gromacs/gmxana/gmx_confrms.c @@ -36,22 +36,22 @@ #include #endif -#include "filenm.h" +#include "gromacs/fileio/filenm.h" #include "smalloc.h" #include "macros.h" #include #include "typedefs.h" #include "xvgr.h" #include "statutil.h" -#include "tpxio.h" +#include "gromacs/fileio/tpxio.h" #include "string2.h" #include "vec.h" #include "index.h" #include "pbc.h" #include "gmx_fatal.h" -#include "futil.h" -#include "confio.h" -#include "pdbio.h" +#include "gromacs/fileio/futil.h" +#include "gromacs/fileio/confio.h" +#include "gromacs/fileio/pdbio.h" #include "txtdump.h" #include "do_fit.h" #include "viewit.h" diff --git a/src/gromacs/gmxana/gmx_covar.c b/src/gromacs/gmxana/gmx_covar.c index 3826abc60a..bd9d49b28e 100644 --- a/src/gromacs/gmxana/gmx_covar.c +++ b/src/gromacs/gmxana/gmx_covar.c @@ -51,21 +51,22 @@ #include "macros.h" #include "vec.h" #include "pbc.h" -#include "futil.h" +#include "gromacs/fileio/futil.h" #include "statutil.h" #include "index.h" -#include "confio.h" -#include "trnio.h" +#include "gromacs/fileio/confio.h" +#include "gromacs/fileio/trnio.h" #include "mshift.h" #include "xvgr.h" #include "do_fit.h" #include "rmpbc.h" #include "txtdump.h" -#include "matio.h" +#include "gromacs/fileio/matio.h" #include "eigio.h" #include "physics.h" #include "gmx_ana.h" #include "string2.h" +#include "gromacs/fileio/trxio.h" #include "gromacs/linearalgebra/eigensolver.h" diff --git a/src/gromacs/gmxana/gmx_current.c b/src/gromacs/gmxana/gmx_current.c index 4a76624e0e..4255a31a65 100644 --- a/src/gromacs/gmxana/gmx_current.c +++ b/src/gromacs/gmxana/gmx_current.c @@ -45,7 +45,8 @@ #include "smalloc.h" #include "vec.h" #include "statutil.h" -#include "tpxio.h" +#include "gromacs/fileio/tpxio.h" +#include "gromacs/fileio/trxio.h" #include "xvgr.h" #include "rmpbc.h" #include "pbc.h" diff --git a/src/gromacs/gmxana/gmx_density.c b/src/gromacs/gmxana/gmx_density.c index 5b9a491536..543f3d3223 100644 --- a/src/gromacs/gmxana/gmx_density.c +++ b/src/gromacs/gmxana/gmx_density.c @@ -48,10 +48,11 @@ #include "vec.h" #include "xvgr.h" #include "pbc.h" -#include "futil.h" +#include "gromacs/fileio/futil.h" #include "statutil.h" #include "index.h" -#include "tpxio.h" +#include "gromacs/fileio/tpxio.h" +#include "gromacs/fileio/trxio.h" #include "physics.h" #include "gmx_ana.h" #include "macros.h" diff --git a/src/gromacs/gmxana/gmx_densmap.c b/src/gromacs/gmxana/gmx_densmap.c index 98660f7762..47925674ee 100644 --- a/src/gromacs/gmxana/gmx_densmap.c +++ b/src/gromacs/gmxana/gmx_densmap.c @@ -46,7 +46,7 @@ #include "macros.h" #include "vec.h" #include "pbc.h" -#include "futil.h" +#include "gromacs/fileio/futil.h" #include "statutil.h" #include "index.h" #include "mshift.h" @@ -54,9 +54,10 @@ #include "princ.h" #include "rmpbc.h" #include "txtdump.h" -#include "tpxio.h" +#include "gromacs/fileio/tpxio.h" +#include "gromacs/fileio/trxio.h" #include "gstat.h" -#include "matio.h" +#include "gromacs/fileio/matio.h" #include "pbc.h" #include "gmx_ana.h" diff --git a/src/gromacs/gmxana/gmx_densorder.cpp b/src/gromacs/gmxana/gmx_densorder.cpp index dda8676a18..72c9877c1f 100644 --- a/src/gromacs/gmxana/gmx_densorder.cpp +++ b/src/gromacs/gmxana/gmx_densorder.cpp @@ -48,12 +48,13 @@ #include "vec.h" #include "xvgr.h" #include "pbc.h" -#include "futil.h" +#include "gromacs/fileio/futil.h" #include "statutil.h" #include "index.h" -#include "tpxio.h" +#include "gromacs/fileio/tpxio.h" +#include "gromacs/fileio/trxio.h" #include "physics.h" -#include "matio.h" +#include "gromacs/fileio/matio.h" #include "dens_filter.h" #include "binsearch.h" #include "powerspect.h" diff --git a/src/gromacs/gmxana/gmx_dielectric.c b/src/gromacs/gmxana/gmx_dielectric.c index 244bfe555d..7b83d08bf6 100644 --- a/src/gromacs/gmxana/gmx_dielectric.c +++ b/src/gromacs/gmxana/gmx_dielectric.c @@ -45,7 +45,7 @@ #include "string2.h" #include "gstat.h" #include "smalloc.h" -#include "futil.h" +#include "gromacs/fileio/futil.h" #include "macros.h" #include "maths.h" #include "xvgr.h" diff --git a/src/gromacs/gmxana/gmx_dipoles.cpp b/src/gromacs/gmxana/gmx_dipoles.cpp index e45dab8597..c214d05766 100644 --- a/src/gromacs/gmxana/gmx_dipoles.cpp +++ b/src/gromacs/gmxana/gmx_dipoles.cpp @@ -47,7 +47,7 @@ #include "vec.h" #include "pbc.h" #include "bondf.h" -#include "futil.h" +#include "gromacs/fileio/futil.h" #include "xvgr.h" #include "txtdump.h" #include "gmx_statistics.h" @@ -57,11 +57,12 @@ #include "names.h" #include "physics.h" #include "calcmu.h" -#include "enxio.h" +#include "gromacs/fileio/enxio.h" #include "nrjac.h" -#include "matio.h" +#include "gromacs/fileio/matio.h" #include "gmx_ana.h" #include "copyrite.h" +#include "gromacs/fileio/trxio.h" #include "gromacs/utility/exceptions.h" #include "gromacs/utility/programinfo.h" diff --git a/src/gromacs/gmxana/gmx_disre.c b/src/gromacs/gmxana/gmx_disre.c index 297fa89e47..fe8b6f4b79 100644 --- a/src/gromacs/gmxana/gmx_disre.c +++ b/src/gromacs/gmxana/gmx_disre.c @@ -44,7 +44,7 @@ #include "xvgr.h" #include "vec.h" #include "do_fit.h" -#include "confio.h" +#include "gromacs/fileio/confio.h" #include "smalloc.h" #include "nrnb.h" #include "disre.h" @@ -52,13 +52,14 @@ #include "force.h" #include "gstat.h" #include "main.h" -#include "pdbio.h" +#include "gromacs/fileio/pdbio.h" #include "index.h" #include "mdatoms.h" -#include "tpxio.h" +#include "gromacs/fileio/tpxio.h" +#include "gromacs/fileio/trxio.h" #include "mdrun.h" #include "names.h" -#include "matio.h" +#include "gromacs/fileio/matio.h" #include "mtop_util.h" #include "gmx_ana.h" diff --git a/src/gromacs/gmxana/gmx_do_dssp.c b/src/gromacs/gmxana/gmx_do_dssp.c index a92ab9ef73..472af731f1 100644 --- a/src/gromacs/gmxana/gmx_do_dssp.c +++ b/src/gromacs/gmxana/gmx_do_dssp.c @@ -47,13 +47,14 @@ #include "smalloc.h" #include "mshift.h" #include "statutil.h" -#include "pdbio.h" +#include "gromacs/fileio/pdbio.h" #include "gmx_fatal.h" #include "xvgr.h" -#include "matio.h" +#include "gromacs/fileio/matio.h" #include "index.h" #include "gstat.h" -#include "tpxio.h" +#include "gromacs/fileio/tpxio.h" +#include "gromacs/fileio/trxio.h" #include "viewit.h" diff --git a/src/gromacs/gmxana/gmx_dos.c b/src/gromacs/gmxana/gmx_dos.c index f2989b126e..830a3d0537 100644 --- a/src/gromacs/gmxana/gmx_dos.c +++ b/src/gromacs/gmxana/gmx_dos.c @@ -38,10 +38,10 @@ #include #include -#include "confio.h" +#include "gromacs/fileio/confio.h" #include "copyrite.h" #include "gmx_fatal.h" -#include "futil.h" +#include "gromacs/fileio/futil.h" #include "gstat.h" #include "macros.h" #include "maths.h" @@ -59,6 +59,7 @@ #include "correl.h" #include "gmx_ana.h" #include "gromacs/fft/fft.h" +#include "gromacs/fileio/trxio.h" enum { VACF, MVACF, DOS, DOS_SOLID, DOS_DIFF, DOS_CP, DOS_S, DOS_A, DOS_E, DOS_NR diff --git a/src/gromacs/gmxana/gmx_dyecoupl.c b/src/gromacs/gmxana/gmx_dyecoupl.c index 9941f8ed77..53382de9a9 100644 --- a/src/gromacs/gmxana/gmx_dyecoupl.c +++ b/src/gromacs/gmxana/gmx_dyecoupl.c @@ -28,14 +28,15 @@ * * For more info, check our website at http://www.gromacs.org */ -#include -#include -#include -#include -#include -#include -#include -#include +#include "copyrite.h" +#include "gromacs/fileio/filenm.h" +#include "macros.h" +#include "pbc.h" +#include "smalloc.h" +#include "statutil.h" +#include "vec.h" +#include "xvgr.h" +#include "gromacs/fileio/trxio.h" int gmx_dyecoupl(int argc, char *argv[]) diff --git a/src/gromacs/gmxana/gmx_dyndom.c b/src/gromacs/gmxana/gmx_dyndom.c index 807370f2ef..e2fbf96075 100644 --- a/src/gromacs/gmxana/gmx_dyndom.c +++ b/src/gromacs/gmxana/gmx_dyndom.c @@ -40,13 +40,14 @@ #include "statutil.h" #include "smalloc.h" #include "index.h" -#include "confio.h" +#include "gromacs/fileio/confio.h" #include "gmx_fatal.h" #include "vec.h" #include "physics.h" #include "random.h" #include "gmx_ana.h" #include "macros.h" +#include "gromacs/fileio/trxio.h" static void rot_conf(t_atoms *atoms, rvec x[], rvec v[], real trans, real angle, diff --git a/src/gromacs/gmxana/gmx_editconf.c b/src/gromacs/gmxana/gmx_editconf.c index 1927f9c49a..ee138ae722 100644 --- a/src/gromacs/gmxana/gmx_editconf.c +++ b/src/gromacs/gmxana/gmx_editconf.c @@ -40,8 +40,8 @@ #include #include #include -#include "pdbio.h" -#include "confio.h" +#include "gromacs/fileio/pdbio.h" +#include "gromacs/fileio/confio.h" #include "symtab.h" #include "smalloc.h" #include "macros.h" @@ -55,7 +55,8 @@ #include "strdb.h" #include "physics.h" #include "atomprop.h" -#include "tpxio.h" +#include "gromacs/fileio/tpxio.h" +#include "gromacs/fileio/trxio.h" #include "pbc.h" #include "princ.h" #include "txtdump.h" diff --git a/src/gromacs/gmxana/gmx_eneconv.c b/src/gromacs/gmxana/gmx_eneconv.c index 37da1c0079..24d9eede79 100644 --- a/src/gromacs/gmxana/gmx_eneconv.c +++ b/src/gromacs/gmxana/gmx_eneconv.c @@ -46,9 +46,10 @@ #include "names.h" #include "macros.h" #include "gmx_fatal.h" -#include "enxio.h" +#include "gromacs/fileio/enxio.h" #include "vec.h" #include "gmx_ana.h" +#include "gromacs/fileio/trxio.h" #define TIME_EXPLICIT 0 #define TIME_CONTINUE 1 diff --git a/src/gromacs/gmxana/gmx_enemat.c b/src/gromacs/gmxana/gmx_enemat.c index 25c5e37617..7c9efe6b85 100644 --- a/src/gromacs/gmxana/gmx_enemat.c +++ b/src/gromacs/gmxana/gmx_enemat.c @@ -43,16 +43,17 @@ #include "gmx_fatal.h" #include "vec.h" #include "smalloc.h" -#include "enxio.h" +#include "gromacs/fileio/enxio.h" #include "statutil.h" #include "names.h" #include "macros.h" #include "xvgr.h" #include "gstat.h" #include "physics.h" -#include "matio.h" +#include "gromacs/fileio/matio.h" #include "strdb.h" #include "gmx_ana.h" +#include "gromacs/fileio/trxio.h" static int search_str2(int nstr, char **str, char *key) diff --git a/src/gromacs/gmxana/gmx_energy.c b/src/gromacs/gmxana/gmx_energy.c index 46d04b2121..16d185daea 100644 --- a/src/gromacs/gmxana/gmx_energy.c +++ b/src/gromacs/gmxana/gmx_energy.c @@ -46,7 +46,7 @@ #include "vec.h" #include "string2.h" #include "smalloc.h" -#include "enxio.h" +#include "gromacs/fileio/enxio.h" #include "statutil.h" #include "names.h" #include "copyrite.h" @@ -54,7 +54,8 @@ #include "xvgr.h" #include "gstat.h" #include "physics.h" -#include "tpxio.h" +#include "gromacs/fileio/tpxio.h" +#include "gromacs/fileio/trxio.h" #include "viewit.h" #include "mtop_util.h" #include "gmx_ana.h" diff --git a/src/gromacs/gmxana/gmx_filter.c b/src/gromacs/gmxana/gmx_filter.c index 20538b46bb..dd8bd10f7c 100644 --- a/src/gromacs/gmxana/gmx_filter.c +++ b/src/gromacs/gmxana/gmx_filter.c @@ -46,7 +46,8 @@ #include "vec.h" #include "statutil.h" #include "index.h" -#include "tpxio.h" +#include "gromacs/fileio/tpxio.h" +#include "gromacs/fileio/trxio.h" #include "princ.h" #include "do_fit.h" #include "rmpbc.h" diff --git a/src/gromacs/gmxana/gmx_genbox.cpp b/src/gromacs/gmxana/gmx_genbox.cpp index 0e6be00592..13d60ecd5a 100644 --- a/src/gromacs/gmxana/gmx_genbox.cpp +++ b/src/gromacs/gmxana/gmx_genbox.cpp @@ -43,12 +43,12 @@ #include "smalloc.h" #include "string2.h" #include "physics.h" -#include "confio.h" +#include "gromacs/fileio/confio.h" #include "txtdump.h" #include #include "macros.h" #include "random.h" -#include "futil.h" +#include "gromacs/fileio/futil.h" #include "atomprop.h" #include "names.h" #include "vec.h" @@ -57,7 +57,7 @@ #include "vec.h" #include "gbutil.h" #include "addconf.h" -#include "pdbio.h" +#include "gromacs/fileio/pdbio.h" #include "pbc.h" #include "gmx_ana.h" #include "xvgr.h" diff --git a/src/gromacs/gmxana/gmx_genconf.c b/src/gromacs/gmxana/gmx_genconf.c index 4bf1f507a0..a9e9b53777 100644 --- a/src/gromacs/gmxana/gmx_genconf.c +++ b/src/gromacs/gmxana/gmx_genconf.c @@ -41,7 +41,7 @@ #include "string2.h" #include "smalloc.h" #include "sysstuff.h" -#include "confio.h" +#include "gromacs/fileio/confio.h" #include "statutil.h" #include "vec.h" #include "random.h" @@ -51,6 +51,7 @@ #include "names.h" #include "sortwater.h" #include "gmx_ana.h" +#include "gromacs/fileio/trxio.h" static void rand_rot(int natoms, rvec x[], rvec v[], vec4 xrot[], vec4 vrot[], int *seed, rvec max_rot) diff --git a/src/gromacs/gmxana/gmx_genion.c b/src/gromacs/gmxana/gmx_genion.c index 7a4b3e5e89..a5b85c9cbb 100644 --- a/src/gromacs/gmxana/gmx_genion.c +++ b/src/gromacs/gmxana/gmx_genion.c @@ -40,16 +40,16 @@ #include "string2.h" #include "smalloc.h" #include "sysstuff.h" -#include "confio.h" +#include "gromacs/fileio/confio.h" #include "statutil.h" #include "pbc.h" #include "force.h" #include "gmx_fatal.h" -#include "futil.h" +#include "gromacs/fileio/futil.h" #include "maths.h" #include "macros.h" #include "vec.h" -#include "tpxio.h" +#include "gromacs/fileio/tpxio.h" #include "mdrun.h" #include "main.h" #include "random.h" diff --git a/src/gromacs/gmxana/gmx_genpr.c b/src/gromacs/gmxana/gmx_genpr.c index 798546a27e..c4ef377c02 100644 --- a/src/gromacs/gmxana/gmx_genpr.c +++ b/src/gromacs/gmxana/gmx_genpr.c @@ -42,8 +42,8 @@ #include #include "smalloc.h" #include "typedefs.h" -#include "confio.h" -#include "futil.h" +#include "gromacs/fileio/confio.h" +#include "gromacs/fileio/futil.h" #include "macros.h" #include "vec.h" #include "index.h" diff --git a/src/gromacs/gmxana/gmx_gyrate.c b/src/gromacs/gmxana/gmx_gyrate.c index a9d3c15faf..8b5f378467 100644 --- a/src/gromacs/gmxana/gmx_gyrate.c +++ b/src/gromacs/gmxana/gmx_gyrate.c @@ -46,7 +46,7 @@ #include "macros.h" #include "vec.h" #include "pbc.h" -#include "futil.h" +#include "gromacs/fileio/futil.h" #include "statutil.h" #include "index.h" #include "mshift.h" @@ -54,7 +54,8 @@ #include "princ.h" #include "rmpbc.h" #include "txtdump.h" -#include "tpxio.h" +#include "gromacs/fileio/tpxio.h" +#include "gromacs/fileio/trxio.h" #include "gstat.h" #include "gmx_ana.h" diff --git a/src/gromacs/gmxana/gmx_h2order.c b/src/gromacs/gmxana/gmx_h2order.c index 0ee3aa1c7c..e519b09eab 100644 --- a/src/gromacs/gmxana/gmx_h2order.c +++ b/src/gromacs/gmxana/gmx_h2order.c @@ -48,10 +48,11 @@ #include "vec.h" #include "xvgr.h" #include "pbc.h" -#include "futil.h" +#include "gromacs/fileio/futil.h" #include "statutil.h" #include "index.h" #include "gmx_ana.h" +#include "gromacs/fileio/trxio.h" /****************************************************************************/ diff --git a/src/gromacs/gmxana/gmx_hbond.c b/src/gromacs/gmxana/gmx_hbond.c index 92ea501334..15336ee971 100644 --- a/src/gromacs/gmxana/gmx_hbond.c +++ b/src/gromacs/gmxana/gmx_hbond.c @@ -46,8 +46,9 @@ #include "copyrite.h" #include "sysstuff.h" #include "txtdump.h" -#include "futil.h" -#include "tpxio.h" +#include "gromacs/fileio/futil.h" +#include "gromacs/fileio/tpxio.h" +#include "gromacs/fileio/trxio.h" #include "physics.h" #include "macros.h" #include "gmx_fatal.h" @@ -56,7 +57,7 @@ #include "vec.h" #include "xvgr.h" #include "gstat.h" -#include "matio.h" +#include "gromacs/fileio/matio.h" #include "string2.h" #include "pbc.h" #include "correl.h" diff --git a/src/gromacs/gmxana/gmx_helix.c b/src/gromacs/gmxana/gmx_helix.c index dbb3145f0c..56f4c59756 100644 --- a/src/gromacs/gmxana/gmx_helix.c +++ b/src/gromacs/gmxana/gmx_helix.c @@ -38,17 +38,18 @@ #include -#include "confio.h" +#include "gromacs/fileio/confio.h" #include "gmx_fatal.h" #include "fitahx.h" -#include "futil.h" +#include "gromacs/fileio/futil.h" #include "gstat.h" #include "wgms.h" #include "hxprops.h" #include "macros.h" #include "maths.h" #include "pbc.h" -#include "tpxio.h" +#include "gromacs/fileio/tpxio.h" +#include "gromacs/fileio/trxio.h" #include "physics.h" #include "index.h" #include "smalloc.h" diff --git a/src/gromacs/gmxana/gmx_helixorient.c b/src/gromacs/gmxana/gmx_helixorient.c index 9ce31d19f8..31364688f0 100644 --- a/src/gromacs/gmxana/gmx_helixorient.c +++ b/src/gromacs/gmxana/gmx_helixorient.c @@ -47,11 +47,12 @@ #include "index.h" #include "pbc.h" #include "gmx_fatal.h" -#include "futil.h" +#include "gromacs/fileio/futil.h" #include "gstat.h" #include "pbc.h" #include "do_fit.h" #include "gmx_ana.h" +#include "gromacs/fileio/trxio.h" int gmx_helixorient(int argc, char *argv[]) diff --git a/src/gromacs/gmxana/gmx_hydorder.c b/src/gromacs/gmxana/gmx_hydorder.c index 838cf022f0..678dd35de5 100644 --- a/src/gromacs/gmxana/gmx_hydorder.c +++ b/src/gromacs/gmxana/gmx_hydorder.c @@ -51,11 +51,12 @@ #include "vec.h" #include "xvgr.h" #include "pbc.h" -#include "futil.h" +#include "gromacs/fileio/futil.h" #include "statutil.h" #include "index.h" -#include "tpxio.h" -#include "matio.h" +#include "gromacs/fileio/tpxio.h" +#include "gromacs/fileio/trxio.h" +#include "gromacs/fileio/matio.h" #include "binsearch.h" #include "powerspect.h" diff --git a/src/gromacs/gmxana/gmx_kinetics.c b/src/gromacs/gmxana/gmx_kinetics.c index 143ec322e8..11f17df108 100644 --- a/src/gromacs/gmxana/gmx_kinetics.c +++ b/src/gromacs/gmxana/gmx_kinetics.c @@ -46,7 +46,7 @@ #include "gmx_fatal.h" #include "vec.h" #include "copyrite.h" -#include "futil.h" +#include "gromacs/fileio/futil.h" #include "readinp.h" #include "statutil.h" #include "txtdump.h" diff --git a/src/gromacs/gmxana/gmx_lie.c b/src/gromacs/gmxana/gmx_lie.c index 304bb1ea2b..7e5eaeda31 100644 --- a/src/gromacs/gmxana/gmx_lie.c +++ b/src/gromacs/gmxana/gmx_lie.c @@ -48,13 +48,14 @@ #include "macros.h" #include "gmx_fatal.h" #include "vec.h" -#include "futil.h" +#include "gromacs/fileio/futil.h" #include "statutil.h" #include "txtdump.h" -#include "enxio.h" +#include "gromacs/fileio/enxio.h" #include "gstat.h" #include "xvgr.h" #include "gmx_ana.h" +#include "gromacs/fileio/trxio.h" typedef struct { diff --git a/src/gromacs/gmxana/gmx_make_edi.c b/src/gromacs/gmxana/gmx_make_edi.c index 58eb419be4..41b7144a2a 100644 --- a/src/gromacs/gmxana/gmx_make_edi.c +++ b/src/gromacs/gmxana/gmx_make_edi.c @@ -53,12 +53,12 @@ #include "gmx_fatal.h" #include "vec.h" #include "pbc.h" -#include "futil.h" +#include "gromacs/fileio/futil.h" #include "statutil.h" -#include "pdbio.h" -#include "confio.h" -#include "tpxio.h" -#include "matio.h" +#include "gromacs/fileio/pdbio.h" +#include "gromacs/fileio/confio.h" +#include "gromacs/fileio/tpxio.h" +#include "gromacs/fileio/matio.h" #include "mshift.h" #include "xvgr.h" #include "do_fit.h" diff --git a/src/gromacs/gmxana/gmx_make_ndx.c b/src/gromacs/gmxana/gmx_make_ndx.c index 213d573ebd..dc4818cd6c 100644 --- a/src/gromacs/gmxana/gmx_make_ndx.c +++ b/src/gromacs/gmxana/gmx_make_ndx.c @@ -42,11 +42,11 @@ #include #include "sysstuff.h" #include "strdb.h" -#include "futil.h" +#include "gromacs/fileio/futil.h" #include "macros.h" #include "string2.h" #include "statutil.h" -#include "confio.h" +#include "gromacs/fileio/confio.h" #include "typedefs.h" #include "index.h" #include "smalloc.h" diff --git a/src/gromacs/gmxana/gmx_mdmat.c b/src/gromacs/gmxana/gmx_mdmat.c index 53b9bc1761..157304abc0 100644 --- a/src/gromacs/gmxana/gmx_mdmat.c +++ b/src/gromacs/gmxana/gmx_mdmat.c @@ -43,15 +43,16 @@ #include "vec.h" #include "sysstuff.h" #include "typedefs.h" -#include "filenm.h" +#include "gromacs/fileio/filenm.h" #include "statutil.h" -#include "futil.h" +#include "gromacs/fileio/futil.h" #include "gmx_fatal.h" #include "smalloc.h" -#include "matio.h" +#include "gromacs/fileio/matio.h" #include "xvgr.h" #include "index.h" -#include "tpxio.h" +#include "gromacs/fileio/tpxio.h" +#include "gromacs/fileio/trxio.h" #include "rmpbc.h" #include "pbc.h" #include "gmx_ana.h" diff --git a/src/gromacs/gmxana/gmx_mindist.c b/src/gromacs/gmxana/gmx_mindist.c index ea7077c102..1654f5d76b 100644 --- a/src/gromacs/gmxana/gmx_mindist.c +++ b/src/gromacs/gmxana/gmx_mindist.c @@ -47,12 +47,13 @@ #include "vec.h" #include "xvgr.h" #include "pbc.h" -#include "futil.h" +#include "gromacs/fileio/futil.h" #include "statutil.h" #include "index.h" -#include "tpxio.h" +#include "gromacs/fileio/tpxio.h" +#include "gromacs/fileio/trxio.h" #include "rmpbc.h" -#include "xtcio.h" +#include "gromacs/fileio/xtcio.h" #include "gmx_ana.h" diff --git a/src/gromacs/gmxana/gmx_mk_angndx.c b/src/gromacs/gmxana/gmx_mk_angndx.c index 1860751d2d..55bb768f05 100644 --- a/src/gromacs/gmxana/gmx_mk_angndx.c +++ b/src/gromacs/gmxana/gmx_mk_angndx.c @@ -45,8 +45,9 @@ #include "statutil.h" #include "macros.h" #include "string2.h" -#include "futil.h" +#include "gromacs/fileio/futil.h" #include "gmx_fatal.h" +#include "gromacs/fileio/trxio.h" static int calc_ntype(int nft, int *ft, t_idef *idef) { diff --git a/src/gromacs/gmxana/gmx_morph.c b/src/gromacs/gmxana/gmx_morph.c index dc568deea6..9e8145fe55 100644 --- a/src/gromacs/gmxana/gmx_morph.c +++ b/src/gromacs/gmxana/gmx_morph.c @@ -39,12 +39,13 @@ #include "statutil.h" #include "smalloc.h" #include "macros.h" -#include "confio.h" +#include "gromacs/fileio/confio.h" #include "xvgr.h" #include "index.h" #include "do_fit.h" #include "gmx_ana.h" #include "gmx_fatal.h" +#include "gromacs/fileio/trxio.h" static real dointerp(int n, rvec x1[], rvec x2[], rvec xx[], diff --git a/src/gromacs/gmxana/gmx_msd.c b/src/gromacs/gmxana/gmx_msd.c index f0b94dd16c..92afde099e 100644 --- a/src/gromacs/gmxana/gmx_msd.c +++ b/src/gromacs/gmxana/gmx_msd.c @@ -45,16 +45,17 @@ #include "macros.h" #include "statutil.h" #include "maths.h" -#include "futil.h" +#include "gromacs/fileio/futil.h" #include "index.h" #include "typedefs.h" #include "xvgr.h" #include "gstat.h" #include "gmx_statistics.h" -#include "tpxio.h" +#include "gromacs/fileio/tpxio.h" +#include "gromacs/fileio/trxio.h" #include "pbc.h" #include "vec.h" -#include "confio.h" +#include "gromacs/fileio/confio.h" #include "gmx_ana.h" diff --git a/src/gromacs/gmxana/gmx_nmeig.c b/src/gromacs/gmxana/gmx_nmeig.c index 536dece1e1..63cb2aff8e 100644 --- a/src/gromacs/gmxana/gmx_nmeig.c +++ b/src/gromacs/gmxana/gmx_nmeig.c @@ -47,7 +47,7 @@ #include "vec.h" #include "pbc.h" #include "copyrite.h" -#include "futil.h" +#include "gromacs/fileio/futil.h" #include "statutil.h" #include "index.h" #include "mshift.h" diff --git a/src/gromacs/gmxana/gmx_nmens.c b/src/gromacs/gmxana/gmx_nmens.c index b5c4904ae4..5500f29518 100644 --- a/src/gromacs/gmxana/gmx_nmens.c +++ b/src/gromacs/gmxana/gmx_nmens.c @@ -46,11 +46,12 @@ #include "macros.h" #include "gmx_fatal.h" #include "vec.h" -#include "futil.h" +#include "gromacs/fileio/futil.h" #include "statutil.h" #include "index.h" -#include "pdbio.h" -#include "tpxio.h" +#include "gromacs/fileio/pdbio.h" +#include "gromacs/fileio/tpxio.h" +#include "gromacs/fileio/trxio.h" #include "txtdump.h" #include "physics.h" #include "random.h" diff --git a/src/gromacs/gmxana/gmx_nmtraj.c b/src/gromacs/gmxana/gmx_nmtraj.c index c6f24fb6f5..7f1dd598f9 100644 --- a/src/gromacs/gmxana/gmx_nmtraj.c +++ b/src/gromacs/gmxana/gmx_nmtraj.c @@ -46,11 +46,12 @@ #include "macros.h" #include "gmx_fatal.h" #include "vec.h" -#include "futil.h" +#include "gromacs/fileio/futil.h" #include "statutil.h" #include "index.h" -#include "pdbio.h" -#include "tpxio.h" +#include "gromacs/fileio/pdbio.h" +#include "gromacs/fileio/tpxio.h" +#include "gromacs/fileio/trxio.h" #include "txtdump.h" #include "physics.h" #include "random.h" diff --git a/src/gromacs/gmxana/gmx_order.c b/src/gromacs/gmxana/gmx_order.c index 2a094df242..5860fb6f62 100644 --- a/src/gromacs/gmxana/gmx_order.c +++ b/src/gromacs/gmxana/gmx_order.c @@ -48,11 +48,12 @@ #include "vec.h" #include "xvgr.h" #include "pbc.h" -#include "futil.h" +#include "gromacs/fileio/futil.h" #include "statutil.h" #include "index.h" -#include "tpxio.h" -#include "confio.h" +#include "gromacs/fileio/tpxio.h" +#include "gromacs/fileio/trxio.h" +#include "gromacs/fileio/confio.h" #include "cmat.h" #include "gmx_ana.h" diff --git a/src/gromacs/gmxana/gmx_pme_error.cpp b/src/gromacs/gmxana/gmx_pme_error.cpp index e863973145..aa6fbf076a 100644 --- a/src/gromacs/gmxana/gmx_pme_error.cpp +++ b/src/gromacs/gmxana/gmx_pme_error.cpp @@ -37,7 +37,7 @@ #include "smalloc.h" #include "vec.h" #include "copyrite.h" -#include "tpxio.h" +#include "gromacs/fileio/tpxio.h" #include "string2.h" #include "readinp.h" #include "calcgrid.h" diff --git a/src/gromacs/gmxana/gmx_polystat.c b/src/gromacs/gmxana/gmx_polystat.c index 28934ff562..00880db0c4 100644 --- a/src/gromacs/gmxana/gmx_polystat.c +++ b/src/gromacs/gmxana/gmx_polystat.c @@ -42,7 +42,7 @@ #include "physics.h" #include "typedefs.h" #include "smalloc.h" -#include "futil.h" +#include "gromacs/fileio/futil.h" #include "statutil.h" #include "vec.h" #include "index.h" @@ -50,7 +50,8 @@ #include "gmx_fatal.h" #include "xvgr.h" #include "rmpbc.h" -#include "tpxio.h" +#include "gromacs/fileio/tpxio.h" +#include "gromacs/fileio/trxio.h" #include "nrjac.h" #include "gmx_ana.h" diff --git a/src/gromacs/gmxana/gmx_potential.c b/src/gromacs/gmxana/gmx_potential.c index 64c8f6e484..530d8a8381 100644 --- a/src/gromacs/gmxana/gmx_potential.c +++ b/src/gromacs/gmxana/gmx_potential.c @@ -49,11 +49,12 @@ #include "vec.h" #include "xvgr.h" #include "pbc.h" -#include "futil.h" +#include "gromacs/fileio/futil.h" #include "statutil.h" #include "index.h" #include "gmx_ana.h" #include "string2.h" +#include "gromacs/fileio/trxio.h" #define EPS0 8.85419E-12 #define ELC 1.60219E-19 diff --git a/src/gromacs/gmxana/gmx_principal.c b/src/gromacs/gmxana/gmx_principal.c index 8fe808599f..634bfab692 100644 --- a/src/gromacs/gmxana/gmx_principal.c +++ b/src/gromacs/gmxana/gmx_principal.c @@ -46,7 +46,7 @@ #include "macros.h" #include "vec.h" #include "pbc.h" -#include "futil.h" +#include "gromacs/fileio/futil.h" #include "statutil.h" #include "index.h" #include "mshift.h" @@ -54,7 +54,8 @@ #include "princ.h" #include "rmpbc.h" #include "txtdump.h" -#include "tpxio.h" +#include "gromacs/fileio/tpxio.h" +#include "gromacs/fileio/trxio.h" #include "gstat.h" #include "gmx_ana.h" diff --git a/src/gromacs/gmxana/gmx_rama.c b/src/gromacs/gmxana/gmx_rama.c index 5b6b70e7dd..9329ddf20e 100644 --- a/src/gromacs/gmxana/gmx_rama.c +++ b/src/gromacs/gmxana/gmx_rama.c @@ -46,7 +46,7 @@ #include "xvgr.h" #include "physics.h" #include "pbc.h" -#include "futil.h" +#include "gromacs/fileio/futil.h" #include "statutil.h" #include "index.h" #include "nrama.h" diff --git a/src/gromacs/gmxana/gmx_rdf.c b/src/gromacs/gmxana/gmx_rdf.c index e01a23474f..418dc6d2c6 100644 --- a/src/gromacs/gmxana/gmx_rdf.c +++ b/src/gromacs/gmxana/gmx_rdf.c @@ -46,9 +46,10 @@ #include "vec.h" #include "pbc.h" #include "xvgr.h" -#include "futil.h" +#include "gromacs/fileio/futil.h" #include "statutil.h" -#include "tpxio.h" +#include "gromacs/fileio/tpxio.h" +#include "gromacs/fileio/trxio.h" #include "physics.h" #include "index.h" #include "smalloc.h" @@ -56,7 +57,7 @@ #include "nrnb.h" #include "coulomb.h" #include "gstat.h" -#include "matio.h" +#include "gromacs/fileio/matio.h" #include "gmx_ana.h" #include "names.h" diff --git a/src/gromacs/gmxana/gmx_rms.c b/src/gromacs/gmxana/gmx_rms.c index 58e04506dc..eb83a075df 100644 --- a/src/gromacs/gmxana/gmx_rms.c +++ b/src/gromacs/gmxana/gmx_rms.c @@ -47,12 +47,13 @@ #include "vec.h" #include "index.h" #include "gmx_fatal.h" -#include "futil.h" +#include "gromacs/fileio/futil.h" #include "princ.h" #include "rmpbc.h" #include "do_fit.h" -#include "matio.h" -#include "tpxio.h" +#include "gromacs/fileio/matio.h" +#include "gromacs/fileio/tpxio.h" +#include "gromacs/fileio/trxio.h" #include "cmat.h" #include "viewit.h" #include "gmx_ana.h" diff --git a/src/gromacs/gmxana/gmx_rmsdist.c b/src/gromacs/gmxana/gmx_rmsdist.c index 39d175bbf9..54270efa1a 100644 --- a/src/gromacs/gmxana/gmx_rmsdist.c +++ b/src/gromacs/gmxana/gmx_rmsdist.c @@ -44,7 +44,8 @@ #include "typedefs.h" #include "names.h" #include "statutil.h" -#include "tpxio.h" +#include "gromacs/fileio/tpxio.h" +#include "gromacs/fileio/trxio.h" #include "string2.h" #include "strdb.h" #include "vec.h" @@ -52,8 +53,8 @@ #include "index.h" #include "pbc.h" #include "xvgr.h" -#include "futil.h" -#include "matio.h" +#include "gromacs/fileio/futil.h" +#include "gromacs/fileio/matio.h" #include "gmx_ana.h" diff --git a/src/gromacs/gmxana/gmx_rmsf.c b/src/gromacs/gmxana/gmx_rmsf.c index 60bae51292..9db04ee338 100644 --- a/src/gromacs/gmxana/gmx_rmsf.c +++ b/src/gromacs/gmxana/gmx_rmsf.c @@ -45,15 +45,16 @@ #include "string2.h" #include "vec.h" #include "index.h" -#include "pdbio.h" -#include "tpxio.h" +#include "gromacs/fileio/pdbio.h" +#include "gromacs/fileio/tpxio.h" +#include "gromacs/fileio/trxio.h" #include "pbc.h" #include "gmx_fatal.h" -#include "futil.h" +#include "gromacs/fileio/futil.h" #include "do_fit.h" #include "princ.h" #include "rmpbc.h" -#include "confio.h" +#include "gromacs/fileio/confio.h" #include "gmx_ana.h" #include "gromacs/linearalgebra/eigensolver.h" diff --git a/src/gromacs/gmxana/gmx_rotacf.c b/src/gromacs/gmxana/gmx_rotacf.c index 7d74838d9f..00107b08a9 100644 --- a/src/gromacs/gmxana/gmx_rotacf.c +++ b/src/gromacs/gmxana/gmx_rotacf.c @@ -42,7 +42,7 @@ #include "physics.h" #include "typedefs.h" #include "smalloc.h" -#include "futil.h" +#include "gromacs/fileio/futil.h" #include "statutil.h" #include "index.h" #include "macros.h" @@ -51,6 +51,7 @@ #include "gstat.h" #include "vec.h" #include "gmx_ana.h" +#include "gromacs/fileio/trxio.h" int gmx_rotacf(int argc, char *argv[]) diff --git a/src/gromacs/gmxana/gmx_rotmat.c b/src/gromacs/gmxana/gmx_rotmat.c index 4b5d7217fa..d09769eee7 100644 --- a/src/gromacs/gmxana/gmx_rotmat.c +++ b/src/gromacs/gmxana/gmx_rotmat.c @@ -47,13 +47,14 @@ #include "macros.h" #include "vec.h" #include "pbc.h" -#include "futil.h" +#include "gromacs/fileio/futil.h" #include "statutil.h" #include "index.h" #include "mshift.h" #include "xvgr.h" #include "rmpbc.h" -#include "tpxio.h" +#include "gromacs/fileio/tpxio.h" +#include "gromacs/fileio/trxio.h" #include "do_fit.h" #include "gmx_ana.h" diff --git a/src/gromacs/gmxana/gmx_saltbr.c b/src/gromacs/gmxana/gmx_saltbr.c index e9448a49dd..55520825ba 100644 --- a/src/gromacs/gmxana/gmx_saltbr.c +++ b/src/gromacs/gmxana/gmx_saltbr.c @@ -42,9 +42,10 @@ #include "vec.h" #include "sysstuff.h" #include "typedefs.h" -#include "filenm.h" +#include "gromacs/fileio/filenm.h" +#include "gromacs/fileio/trxio.h" #include "statutil.h" -#include "futil.h" +#include "gromacs/fileio/futil.h" #include "gmx_fatal.h" #include "smalloc.h" #include "pbc.h" diff --git a/src/gromacs/gmxana/gmx_sans.c b/src/gromacs/gmxana/gmx_sans.c index dd7961d7fb..46c6ec774b 100644 --- a/src/gromacs/gmxana/gmx_sans.c +++ b/src/gromacs/gmxana/gmx_sans.c @@ -46,12 +46,13 @@ #include "pbc.h" #include "xvgr.h" #include "copyrite.h" -#include "futil.h" +#include "gromacs/fileio/futil.h" #include "statutil.h" -#include "tpxio.h" +#include "gromacs/fileio/tpxio.h" +#include "gromacs/fileio/trxio.h" #include "index.h" #include "gstat.h" -#include "matio.h" +#include "gromacs/fileio/matio.h" #include "gmx_ana.h" #include "nsfactor.h" #include "gmx_omp.h" diff --git a/src/gromacs/gmxana/gmx_sas.c b/src/gromacs/gmxana/gmx_sas.c index 311de78bb4..df615299bc 100644 --- a/src/gromacs/gmxana/gmx_sas.c +++ b/src/gromacs/gmxana/gmx_sas.c @@ -47,17 +47,18 @@ #include "xvgr.h" #include "pbc.h" #include "copyrite.h" -#include "futil.h" +#include "gromacs/fileio/futil.h" #include "statutil.h" #include "index.h" #include "nsc.h" -#include "pdbio.h" -#include "confio.h" +#include "gromacs/fileio/pdbio.h" +#include "gromacs/fileio/confio.h" #include "rmpbc.h" #include "names.h" #include "atomprop.h" #include "physics.h" -#include "tpxio.h" +#include "gromacs/fileio/tpxio.h" +#include "gromacs/fileio/trxio.h" #include "gmx_ana.h" diff --git a/src/gromacs/gmxana/gmx_saxs.c b/src/gromacs/gmxana/gmx_saxs.c index 811620a7dc..2d440115ab 100644 --- a/src/gromacs/gmxana/gmx_saxs.c +++ b/src/gromacs/gmxana/gmx_saxs.c @@ -47,9 +47,9 @@ #include "pbc.h" #include "xvgr.h" #include "copyrite.h" -#include "futil.h" +#include "gromacs/fileio/futil.h" #include "statutil.h" -#include "tpxio.h" +#include "gromacs/fileio/tpxio.h" #include "physics.h" #include "index.h" #include "smalloc.h" @@ -57,7 +57,7 @@ #include "nrnb.h" #include "coulomb.h" #include "gstat.h" -#include "matio.h" +#include "gromacs/fileio/matio.h" #include "gmx_ana.h" #include "names.h" #include "sfactor.h" diff --git a/src/gromacs/gmxana/gmx_sham.c b/src/gromacs/gmxana/gmx_sham.c index a7e0315f3f..43dacb3287 100644 --- a/src/gromacs/gmxana/gmx_sham.c +++ b/src/gromacs/gmxana/gmx_sham.c @@ -44,15 +44,15 @@ #include "macros.h" #include "gmx_fatal.h" #include "vec.h" -#include "futil.h" +#include "gromacs/fileio/futil.h" #include "readinp.h" #include "statutil.h" #include "txtdump.h" #include "gstat.h" #include "xvgr.h" #include "physics.h" -#include "pdbio.h" -#include "matio.h" +#include "gromacs/fileio/pdbio.h" +#include "gromacs/fileio/matio.h" #include "gmx_ana.h" diff --git a/src/gromacs/gmxana/gmx_sigeps.c b/src/gromacs/gmxana/gmx_sigeps.c index f3514be61f..7e4d850b79 100644 --- a/src/gromacs/gmxana/gmx_sigeps.c +++ b/src/gromacs/gmxana/gmx_sigeps.c @@ -45,7 +45,7 @@ #include "statutil.h" #include "gmx_fatal.h" #include "xvgr.h" -#include "pdbio.h" +#include "gromacs/fileio/pdbio.h" #include "macros.h" #include "smalloc.h" #include "vec.h" @@ -53,9 +53,9 @@ #include "physics.h" #include "names.h" #include "txtdump.h" -#include "trnio.h" +#include "gromacs/fileio/trnio.h" #include "symtab.h" -#include "confio.h" +#include "gromacs/fileio/confio.h" real pot(real x, real qq, real c6, real cn, int npow) { diff --git a/src/gromacs/gmxana/gmx_sorient.c b/src/gromacs/gmxana/gmx_sorient.c index d23d071dfd..77f2a3237c 100644 --- a/src/gromacs/gmxana/gmx_sorient.c +++ b/src/gromacs/gmxana/gmx_sorient.c @@ -44,7 +44,8 @@ #include "xvgr.h" #include "pbc.h" #include "index.h" -#include "tpxio.h" +#include "gromacs/fileio/tpxio.h" +#include "gromacs/fileio/trxio.h" #include "gmx_ana.h" diff --git a/src/gromacs/gmxana/gmx_spatial.c b/src/gromacs/gmxana/gmx_spatial.c index e5c3c75d21..de0706e38b 100644 --- a/src/gromacs/gmxana/gmx_spatial.c +++ b/src/gromacs/gmxana/gmx_spatial.c @@ -43,7 +43,8 @@ #include "smalloc.h" #include "vec.h" #include "statutil.h" -#include "tpxio.h" +#include "gromacs/fileio/tpxio.h" +#include "gromacs/fileio/trxio.h" #include #include "index.h" #include "pbc.h" diff --git a/src/gromacs/gmxana/gmx_spol.c b/src/gromacs/gmxana/gmx_spol.c index 6a55642908..71b2c7c29b 100644 --- a/src/gromacs/gmxana/gmx_spol.c +++ b/src/gromacs/gmxana/gmx_spol.c @@ -44,7 +44,8 @@ #include "xvgr.h" #include "pbc.h" #include "index.h" -#include "tpxio.h" +#include "gromacs/fileio/tpxio.h" +#include "gromacs/fileio/trxio.h" #include "physics.h" #include "gmx_ana.h" diff --git a/src/gromacs/gmxana/gmx_tcaf.c b/src/gromacs/gmxana/gmx_tcaf.c index a2f1079371..dedf26baa5 100644 --- a/src/gromacs/gmxana/gmx_tcaf.c +++ b/src/gromacs/gmxana/gmx_tcaf.c @@ -38,9 +38,9 @@ #include #include -#include "confio.h" +#include "gromacs/fileio/confio.h" #include "gmx_fatal.h" -#include "futil.h" +#include "gromacs/fileio/futil.h" #include "gstat.h" #include "macros.h" #include "maths.h" @@ -57,6 +57,7 @@ #include "xvgr.h" #include "pbc.h" #include "gmx_ana.h" +#include "gromacs/fileio/trxio.h" #define NK 24 diff --git a/src/gromacs/gmxana/gmx_traj.c b/src/gromacs/gmxana/gmx_traj.c index b119fbc749..42b73e2caa 100644 --- a/src/gromacs/gmxana/gmx_traj.c +++ b/src/gromacs/gmxana/gmx_traj.c @@ -46,16 +46,17 @@ #include "macros.h" #include "vec.h" #include "pbc.h" -#include "futil.h" +#include "gromacs/fileio/futil.h" #include "statutil.h" #include "index.h" #include "mshift.h" #include "xvgr.h" -#include "tpxio.h" +#include "gromacs/fileio/tpxio.h" +#include "gromacs/fileio/trxio.h" #include "rmpbc.h" #include "physics.h" #include "nrjac.h" -#include "confio.h" +#include "gromacs/fileio/confio.h" #include "gmx_ana.h" diff --git a/src/gromacs/gmxana/gmx_trjcat.c b/src/gromacs/gmxana/gmx_trjcat.c index 9aeffd36cd..1850cb1a14 100644 --- a/src/gromacs/gmxana/gmx_trjcat.c +++ b/src/gromacs/gmxana/gmx_trjcat.c @@ -42,23 +42,24 @@ #include "sysstuff.h" #include "smalloc.h" #include "typedefs.h" -#include "gmxfio.h" -#include "tpxio.h" -#include "trnio.h" +#include "gromacs/fileio/gmxfio.h" +#include "gromacs/fileio/tpxio.h" +#include "gromacs/fileio/trxio.h" +#include "gromacs/fileio/trnio.h" #include "statutil.h" -#include "futil.h" -#include "pdbio.h" -#include "confio.h" +#include "gromacs/fileio/futil.h" +#include "gromacs/fileio/pdbio.h" +#include "gromacs/fileio/confio.h" #include "names.h" #include "index.h" #include "vec.h" -#include "xtcio.h" +#include "gromacs/fileio/xtcio.h" #include "do_fit.h" #include "rmpbc.h" #include "wgms.h" #include "pbc.h" #include "xvgr.h" -#include "xdrf.h" +#include "gromacs/fileio/xdrf.h" #include "gmx_ana.h" #define TIME_EXPLICIT 0 diff --git a/src/gromacs/gmxana/gmx_trjconv.c b/src/gromacs/gmxana/gmx_trjconv.c index 9b3e515688..bdee05c3a4 100644 --- a/src/gromacs/gmxana/gmx_trjconv.c +++ b/src/gromacs/gmxana/gmx_trjconv.c @@ -42,17 +42,18 @@ #include "sysstuff.h" #include "smalloc.h" #include "typedefs.h" -#include "gmxfio.h" -#include "tpxio.h" -#include "trnio.h" +#include "gromacs/fileio/gmxfio.h" +#include "gromacs/fileio/tpxio.h" +#include "gromacs/fileio/trxio.h" +#include "gromacs/fileio/trnio.h" #include "statutil.h" -#include "futil.h" -#include "pdbio.h" -#include "confio.h" +#include "gromacs/fileio/futil.h" +#include "gromacs/fileio/pdbio.h" +#include "gromacs/fileio/confio.h" #include "names.h" #include "index.h" #include "vec.h" -#include "xtcio.h" +#include "gromacs/fileio/xtcio.h" #include "do_fit.h" #include "rmpbc.h" #include "wgms.h" diff --git a/src/gromacs/gmxana/gmx_trjorder.c b/src/gromacs/gmxana/gmx_trjorder.c index fa2faee6fc..9ea317fc41 100644 --- a/src/gromacs/gmxana/gmx_trjorder.c +++ b/src/gromacs/gmxana/gmx_trjorder.c @@ -45,7 +45,7 @@ #include "macros.h" #include "vec.h" #include "pbc.h" -#include "futil.h" +#include "gromacs/fileio/futil.h" #include "statutil.h" #include "index.h" #include "mshift.h" @@ -53,7 +53,8 @@ #include "princ.h" #include "rmpbc.h" #include "txtdump.h" -#include "tpxio.h" +#include "gromacs/fileio/tpxio.h" +#include "gromacs/fileio/trxio.h" #include "gmx_ana.h" typedef struct { diff --git a/src/gromacs/gmxana/gmx_tune_pme.c b/src/gromacs/gmxana/gmx_tune_pme.c index 04b9119a3c..97d3dfd778 100644 --- a/src/gromacs/gmxana/gmx_tune_pme.c +++ b/src/gromacs/gmxana/gmx_tune_pme.c @@ -49,7 +49,7 @@ #include "vec.h" #include "copyrite.h" #include "statutil.h" -#include "tpxio.h" +#include "gromacs/fileio/tpxio.h" #include "string2.h" #include "readinp.h" #include "calcgrid.h" diff --git a/src/gromacs/gmxana/gmx_vanhove.c b/src/gromacs/gmxana/gmx_vanhove.c index f8eecbef5c..77ba1f51ac 100644 --- a/src/gromacs/gmxana/gmx_vanhove.c +++ b/src/gromacs/gmxana/gmx_vanhove.c @@ -45,14 +45,15 @@ #include "macros.h" #include "statutil.h" #include "maths.h" -#include "futil.h" +#include "gromacs/fileio/futil.h" #include "index.h" #include "typedefs.h" #include "xvgr.h" #include "gstat.h" -#include "tpxio.h" +#include "gromacs/fileio/tpxio.h" +#include "gromacs/fileio/trxio.h" #include "vec.h" -#include "matio.h" +#include "gromacs/fileio/matio.h" #include "gmx_ana.h" diff --git a/src/gromacs/gmxana/gmx_velacc.c b/src/gromacs/gmxana/gmx_velacc.c index d1ed3da32e..9f24f0e8c2 100644 --- a/src/gromacs/gmxana/gmx_velacc.c +++ b/src/gromacs/gmxana/gmx_velacc.c @@ -38,9 +38,9 @@ #include #include -#include "confio.h" +#include "gromacs/fileio/confio.h" #include "gmx_fatal.h" -#include "futil.h" +#include "gromacs/fileio/futil.h" #include "gstat.h" #include "macros.h" #include "maths.h" @@ -57,6 +57,7 @@ #include "xvgr.h" #include "gmx_ana.h" #include "gromacs/fft/fft.h" +#include "gromacs/fileio/trxio.h" static void index_atom2mol(int *n, atom_id *index, t_block *mols) { diff --git a/src/gromacs/gmxana/gmx_wham.cpp b/src/gromacs/gmxana/gmx_wham.cpp index 66432762cc..9ec7dad037 100644 --- a/src/gromacs/gmxana/gmx_wham.cpp +++ b/src/gromacs/gmxana/gmx_wham.cpp @@ -53,7 +53,7 @@ #include "vec.h" #include "copyrite.h" #include "statutil.h" -#include "tpxio.h" +#include "gromacs/fileio/tpxio.h" #include "names.h" #include "gmx_random.h" #include "gmx_ana.h" diff --git a/src/gromacs/gmxana/gmx_wheel.c b/src/gromacs/gmxana/gmx_wheel.c index ad0eb20254..8e08d17a20 100644 --- a/src/gromacs/gmxana/gmx_wheel.c +++ b/src/gromacs/gmxana/gmx_wheel.c @@ -48,7 +48,7 @@ #include "vec.h" #include "xvgr.h" #include "pbc.h" -#include "futil.h" +#include "gromacs/fileio/futil.h" #include "strdb.h" #include "statutil.h" #include "pbc.h" diff --git a/src/gromacs/gmxana/gmx_xpm2ps.c b/src/gromacs/gmxana/gmx_xpm2ps.c index b0420a11f5..2346c0de4d 100644 --- a/src/gromacs/gmxana/gmx_xpm2ps.c +++ b/src/gromacs/gmxana/gmx_xpm2ps.c @@ -44,13 +44,14 @@ #include "macros.h" #include "statutil.h" #include "writeps.h" -#include "futil.h" +#include "gromacs/fileio/futil.h" #include "gmx_fatal.h" #include "smalloc.h" #include "string2.h" -#include "matio.h" +#include "gromacs/fileio/matio.h" #include "viewit.h" #include "gmx_ana.h" +#include "gromacs/fileio/trxio.h" #define FUDGE 1.2 #define DDD 2 diff --git a/src/gromacs/gmxana/nsfactor.c b/src/gromacs/gmxana/nsfactor.c index 8b1c6869fe..b4dc3f2166 100644 --- a/src/gromacs/gmxana/nsfactor.c +++ b/src/gromacs/gmxana/nsfactor.c @@ -38,7 +38,7 @@ #include #include -#include "futil.h" +#include "gromacs/fileio/futil.h" #include "gmx_random.h" #include "smalloc.h" #include "sysstuff.h" diff --git a/src/gromacs/gmxana/powerspect.c b/src/gromacs/gmxana/powerspect.c index eea8ad8838..6b276b711a 100644 --- a/src/gromacs/gmxana/powerspect.c +++ b/src/gromacs/gmxana/powerspect.c @@ -41,7 +41,7 @@ #include "smalloc.h" #include "gromacs/fft/fft.h" #include "gmx_fatal.h" -#include "futil.h" +#include "gromacs/fileio/futil.h" #include "interf.h" #include "powerspect.h" diff --git a/src/gromacs/gmxana/pp2shift.c b/src/gromacs/gmxana/pp2shift.c index 8a0d4f639f..895f3b2e42 100644 --- a/src/gromacs/gmxana/pp2shift.c +++ b/src/gromacs/gmxana/pp2shift.c @@ -39,13 +39,13 @@ #include #include #include "typedefs.h" -#include "futil.h" +#include "gromacs/fileio/futil.h" #include "macros.h" #include "physics.h" #include "smalloc.h" #include "statutil.h" #include "gstat.h" -#include "matio.h" +#include "gromacs/fileio/matio.h" #include "copyrite.h" #include "gmx_fatal.h" diff --git a/src/gromacs/gmxlib/atomprop.c b/src/gromacs/gmxlib/atomprop.c index 21bb2a94b7..bd59cb6f30 100644 --- a/src/gromacs/gmxlib/atomprop.c +++ b/src/gromacs/gmxlib/atomprop.c @@ -40,7 +40,7 @@ #include "sysstuff.h" #include "smalloc.h" #include "string2.h" -#include "futil.h" +#include "gromacs/fileio/futil.h" #include "maths.h" #include "gmx_fatal.h" #include "atomprop.h" diff --git a/src/gromacs/gmxlib/checkpoint.c b/src/gromacs/gmxlib/checkpoint.c index eb4f8e0e98..bb263c4f28 100644 --- a/src/gromacs/gmxlib/checkpoint.c +++ b/src/gromacs/gmxlib/checkpoint.c @@ -42,19 +42,19 @@ #endif -#include "filenm.h" +#include "gromacs/fileio/filenm.h" #include "names.h" #include "typedefs.h" #include "smalloc.h" -#include "gmxfio.h" -#include "xdrf.h" +#include "gromacs/fileio/gmxfio.h" +#include "gromacs/fileio/xdrf.h" #include "statutil.h" #include "txtdump.h" #include "vec.h" #include "network.h" #include "gmx_random.h" #include "checkpoint.h" -#include "futil.h" +#include "gromacs/fileio/futil.h" #include "string2.h" #include diff --git a/src/gromacs/gmxlib/copyrite.cpp b/src/gromacs/gmxlib/copyrite.cpp index 99229e0052..2369081992 100644 --- a/src/gromacs/gmxlib/copyrite.cpp +++ b/src/gromacs/gmxlib/copyrite.cpp @@ -49,7 +49,7 @@ /* This file is completely threadsafe - keep it that way! */ -#include "gromacs/legacyheaders/futil.h" +#include "gromacs/fileio/futil.h" #include "gromacs/legacyheaders/macros.h" #include "gromacs/legacyheaders/random.h" #include "gromacs/legacyheaders/smalloc.h" diff --git a/src/gromacs/gmxlib/disre.c b/src/gromacs/gmxlib/disre.c index b3ab78184b..ad4e54aa3a 100644 --- a/src/gromacs/gmxlib/disre.c +++ b/src/gromacs/gmxlib/disre.c @@ -44,7 +44,7 @@ #include "smalloc.h" #include "macros.h" #include "vec.h" -#include "futil.h" +#include "gromacs/fileio/futil.h" #include "xvgr.h" #include "gmx_fatal.h" #include "bondf.h" diff --git a/src/gromacs/gmxlib/ewald_util.c b/src/gromacs/gmxlib/ewald_util.c index 4b6b790d52..cce16bed75 100644 --- a/src/gromacs/gmxlib/ewald_util.c +++ b/src/gromacs/gmxlib/ewald_util.c @@ -45,7 +45,7 @@ #include "smalloc.h" #include "physics.h" #include "txtdump.h" -#include "futil.h" +#include "gromacs/fileio/futil.h" #include "names.h" #include "writeps.h" #include "macros.h" diff --git a/src/gromacs/gmxlib/gmx_fatal.c b/src/gromacs/gmxlib/gmx_fatal.c index d86e196a0d..6fa091f196 100644 --- a/src/gromacs/gmxlib/gmx_fatal.c +++ b/src/gromacs/gmxlib/gmx_fatal.c @@ -42,7 +42,7 @@ #include #include #include -#include "futil.h" +#include "gromacs/fileio/futil.h" #include "statutil.h" #include "main.h" #include "network.h" @@ -51,7 +51,7 @@ #include "macros.h" #include "string2.h" #include "smalloc.h" -#include "gmxfio.h" +#include "gromacs/fileio/gmxfio.h" #include "gromacs/utility/gmxmpi.h" diff --git a/src/gromacs/gmxlib/gmxcpp.c b/src/gromacs/gmxlib/gmxcpp.c index a0253ea74f..b3cc3fa06e 100644 --- a/src/gromacs/gmxlib/gmxcpp.c +++ b/src/gromacs/gmxlib/gmxcpp.c @@ -47,7 +47,7 @@ #include "string2.h" #include "smalloc.h" -#include "futil.h" +#include "gromacs/fileio/futil.h" #include "macros.h" #include "gmx_fatal.h" #include "gmxcpp.h" diff --git a/src/gromacs/gmxlib/index.c b/src/gromacs/gmxlib/index.c index 5c8492490f..c7f9c98014 100644 --- a/src/gromacs/gmxlib/index.c +++ b/src/gromacs/gmxlib/index.c @@ -41,12 +41,12 @@ #include #include "sysstuff.h" #include "strdb.h" -#include "futil.h" +#include "gromacs/fileio/futil.h" #include "macros.h" #include "names.h" #include "string2.h" #include "statutil.h" -#include "confio.h" +#include "gromacs/fileio/confio.h" #include "main.h" #include "typedefs.h" #include "smalloc.h" @@ -54,7 +54,7 @@ #include "macros.h" #include "index.h" #include "txtdump.h" -#include "gmxfio.h" +#include "gromacs/fileio/gmxfio.h" diff --git a/src/gromacs/gmxlib/main.cpp b/src/gromacs/gmxlib/main.cpp index 55f4c2525c..c3a5f66cd6 100644 --- a/src/gromacs/gmxlib/main.cpp +++ b/src/gromacs/gmxlib/main.cpp @@ -53,9 +53,9 @@ #include "network.h" #include "main.h" #include "macros.h" -#include "futil.h" -#include "filenm.h" -#include "gmxfio.h" +#include "gromacs/fileio/futil.h" +#include "gromacs/fileio/filenm.h" +#include "gromacs/fileio/gmxfio.h" #include "string2.h" #include "copyrite.h" diff --git a/src/gromacs/gmxlib/mshift.c b/src/gromacs/gmxlib/mshift.c index 5eb8bd641d..e8f5c96a26 100644 --- a/src/gromacs/gmxlib/mshift.c +++ b/src/gromacs/gmxlib/mshift.c @@ -41,7 +41,7 @@ #include "gmx_fatal.h" #include "macros.h" #include "vec.h" -#include "futil.h" +#include "gromacs/fileio/futil.h" #include "mshift.h" #include "main.h" #include "pbc.h" diff --git a/src/gromacs/gmxlib/nrama.c b/src/gromacs/gmxlib/nrama.c index c5bab6f30f..4bf5f2dd05 100644 --- a/src/gromacs/gmxlib/nrama.c +++ b/src/gromacs/gmxlib/nrama.c @@ -43,7 +43,7 @@ #include "typedefs.h" #include "random.h" #include "bondf.h" -#include "futil.h" +#include "gromacs/fileio/futil.h" #include "gmx_fatal.h" #include "nrama.h" #include "rmpbc.h" diff --git a/src/gromacs/gmxlib/readinp.c b/src/gromacs/gmxlib/readinp.c index 96f5be0aff..23345f5b20 100644 --- a/src/gromacs/gmxlib/readinp.c +++ b/src/gromacs/gmxlib/readinp.c @@ -40,12 +40,12 @@ #include #include "typedefs.h" #include "string2.h" -#include "futil.h" +#include "gromacs/fileio/futil.h" #include "smalloc.h" #include "readinp.h" #include "macros.h" #include "statutil.h" -#include "gmxfio.h" +#include "gromacs/fileio/gmxfio.h" #include "names.h" #include "warninp.h" #include "gmx_fatal.h" diff --git a/src/gromacs/gmxlib/rmpbc.c b/src/gromacs/gmxlib/rmpbc.c index 0a251ba580..4545df1298 100644 --- a/src/gromacs/gmxlib/rmpbc.c +++ b/src/gromacs/gmxlib/rmpbc.c @@ -43,7 +43,7 @@ #include "mshift.h" #include "pbc.h" #include "gstat.h" -#include "futil.h" +#include "gromacs/fileio/futil.h" #include "vec.h" typedef struct { diff --git a/src/gromacs/gmxlib/sfactor.c b/src/gromacs/gmxlib/sfactor.c index 574bd3c49f..8c4cbf9163 100644 --- a/src/gromacs/gmxlib/sfactor.c +++ b/src/gromacs/gmxlib/sfactor.c @@ -40,20 +40,21 @@ #include "sysstuff.h" #include "smalloc.h" #include "string2.h" -#include "futil.h" +#include "gromacs/fileio/futil.h" #include "maths.h" #include "gmx_fatal.h" #include "vec.h" #include "macros.h" #include "index.h" #include "strdb.h" -#include "tpxio.h" +#include "gromacs/fileio/tpxio.h" +#include "gromacs/fileio/trxio.h" #include "typedefs.h" #include "statutil.h" #include "oenv.h" -#include "gmxfio.h" +#include "gromacs/fileio/gmxfio.h" #include "xvgr.h" -#include "matio.h" +#include "gromacs/fileio/matio.h" #include "names.h" #include "sfactor.h" diff --git a/src/gromacs/gmxlib/statutil.cpp b/src/gromacs/gmxlib/statutil.cpp index b70df1d256..1755369e9d 100644 --- a/src/gromacs/gmxlib/statutil.cpp +++ b/src/gromacs/gmxlib/statutil.cpp @@ -46,10 +46,11 @@ #include "string2.h" #include "smalloc.h" #include "statutil.h" -#include "tpxio.h" +#include "gromacs/fileio/tpxio.h" #include "gmx_fatal.h" #include "network.h" -#include "gmxfio.h" +#include "gromacs/fileio/gmxfio.h" +#include "gromacs/fileio/trxio.h" #include "gromacs/onlinehelp/wman.h" #include "gromacs/utility/exceptions.h" @@ -126,46 +127,6 @@ gmx_bool bRmod_fd(double a, double b, double c, gmx_bool bDouble) } } -int check_times2(real t, real t0, gmx_bool bDouble) -{ - int r; - -#ifndef GMX_DOUBLE - /* since t is float, we can not use double precision for bRmod */ - bDouble = FALSE; -#endif - - r = -1; - if ((!bTimeSet(TBEGIN) || (t >= rTimeValue(TBEGIN))) && - (!bTimeSet(TEND) || (t <= rTimeValue(TEND)))) - { - if (bTimeSet(TDELTA) && !bRmod_fd(t, t0, rTimeValue(TDELTA), bDouble)) - { - r = -1; - } - else - { - r = 0; - } - } - else if (bTimeSet(TEND) && (t >= rTimeValue(TEND))) - { - r = 1; - } - if (debug) - { - fprintf(debug, "t=%g, t0=%g, b=%g, e=%g, dt=%g: r=%d\n", - t, t0, rTimeValue(TBEGIN), rTimeValue(TEND), rTimeValue(TDELTA), r); - } - return r; -} - -int check_times(real t) -{ - return check_times2(t, t, FALSE); -} - - static void set_default_time_unit(const char *time_list[], gmx_bool bCanTime) diff --git a/src/gromacs/gmxlib/strdb.c b/src/gromacs/gmxlib/strdb.c index 9012f0ec39..54d018f4b1 100644 --- a/src/gromacs/gmxlib/strdb.c +++ b/src/gromacs/gmxlib/strdb.c @@ -39,7 +39,7 @@ #include #include #include "string2.h" -#include "futil.h" +#include "gromacs/fileio/futil.h" #include "smalloc.h" #include "gmx_fatal.h" #include "strdb.h" diff --git a/src/gromacs/gmxlib/string2.c b/src/gromacs/gmxlib/string2.c index 1fba7cef9a..246a5b75f6 100644 --- a/src/gromacs/gmxlib/string2.c +++ b/src/gromacs/gmxlib/string2.c @@ -68,7 +68,7 @@ #include "gmx_fatal.h" #include "macros.h" #include "string2.h" -#include "futil.h" +#include "gromacs/fileio/futil.h" int continuing(char *s) { diff --git a/src/gromacs/gmxlib/tcontrol.c b/src/gromacs/gmxlib/tcontrol.c index 7befe045ed..7b53634baa 100644 --- a/src/gromacs/gmxlib/tcontrol.c +++ b/src/gromacs/gmxlib/tcontrol.c @@ -32,12 +32,13 @@ * And Hey: * GROningen Mixture of Alchemy and Childrens' Stories */ +#include "gromacs/legacyheaders/statutil.h" + #ifdef HAVE_CONFIG_H #include #endif #include "typedefs.h" -#include "statutil.h" #include "gmx_fatal.h" #ifdef GMX_THREAD_MPI diff --git a/src/gromacs/gmxlib/viewit.c b/src/gromacs/gmxlib/viewit.c index c2244de20e..3e7d351d0b 100644 --- a/src/gromacs/gmxlib/viewit.c +++ b/src/gromacs/gmxlib/viewit.c @@ -41,7 +41,7 @@ #include "statutil.h" #include "viewit.h" #include "string2.h" -#include "filenm.h" +#include "gromacs/fileio/filenm.h" #include "macros.h" #include "gmx_fatal.h" diff --git a/src/gromacs/gmxlib/vmdio.h b/src/gromacs/gmxlib/vmdio.h deleted file mode 100644 index 166b8b327e..0000000000 --- a/src/gromacs/gmxlib/vmdio.h +++ /dev/null @@ -1,44 +0,0 @@ -/* -*- mode: c; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; c-file-style: "stroustrup"; -*- - * - * - * This file is part of Gromacs Copyright (c) 1991-2008 - * David van der Spoel, Erik Lindahl, Berk Hess, University of Groningen. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * To help us fund GROMACS development, we humbly ask that you cite - * the research papers on the package. Check out http://www.gromacs.org - * - * And Hey: - * Gnomes, ROck Monsters And Chili Sauce - */ - -#ifndef VMDIO_H_ -#define VMDIO_H_ - -#include "external/vmd_molfile/molfile_plugin.h" -#include "types/trx.h" - -#ifdef __cplusplus -extern "C" { -#endif - -struct gmxvmdplugin -{ - molfile_plugin_t *api; - const char * filetype; - void * handle; - gmx_bool bV; -}; - -int read_first_vmd_frame(const char *fn, struct trxframe *fr); -gmx_bool read_next_vmd_frame(struct trxframe *fr); - -#ifdef __cplusplus -} -#endif - -#endif /* VMDIO_H_ */ diff --git a/src/gromacs/gmxlib/writeps.c b/src/gromacs/gmxlib/writeps.c index 68d3c366af..343f054d26 100644 --- a/src/gromacs/gmxlib/writeps.c +++ b/src/gromacs/gmxlib/writeps.c @@ -37,11 +37,11 @@ #endif #include -#include "futil.h" +#include "gromacs/fileio/futil.h" #include "gmx_fatal.h" #include "writeps.h" #include "smalloc.h" -#include "gmxfio.h" +#include "gromacs/fileio/gmxfio.h" const char *fontnm[efontNR] = { "Times-Roman", "Times-Italic", "Times-Bold", "Times-BoldItalic", diff --git a/src/gromacs/gmxlib/xvgr.cpp b/src/gromacs/gmxlib/xvgr.cpp index 39d08cafb9..3f847f9b38 100644 --- a/src/gromacs/gmxlib/xvgr.cpp +++ b/src/gromacs/gmxlib/xvgr.cpp @@ -47,14 +47,14 @@ #include "sysstuff.h" #include "string2.h" -#include "futil.h" +#include "gromacs/fileio/futil.h" #include "statutil.h" #include "copyrite.h" #include "smalloc.h" #include "xvgr.h" #include "viewit.h" #include "vec.h" -#include "gmxfio.h" +#include "gromacs/fileio/gmxfio.h" #include "gromacs/utility/exceptions.h" #include "gromacs/utility/programinfo.h" diff --git a/src/gromacs/gmxpreprocess/fflibutil.cpp b/src/gromacs/gmxpreprocess/fflibutil.cpp index 2b8a7088e3..cd8e2dec6c 100644 --- a/src/gromacs/gmxpreprocess/fflibutil.cpp +++ b/src/gromacs/gmxpreprocess/fflibutil.cpp @@ -45,7 +45,7 @@ #include #include "sysstuff.h" #include "string2.h" -#include "futil.h" +#include "gromacs/fileio/futil.h" #include "network.h" #include "gmx_fatal.h" #include "smalloc.h" diff --git a/src/gromacs/gmxpreprocess/gen_ad.c b/src/gromacs/gmxpreprocess/gen_ad.c index 9d039961b7..c51603611e 100644 --- a/src/gromacs/gmxpreprocess/gen_ad.c +++ b/src/gromacs/gmxpreprocess/gen_ad.c @@ -43,7 +43,7 @@ #include "macros.h" #include "smalloc.h" #include "string2.h" -#include "confio.h" +#include "gromacs/fileio/confio.h" #include "vec.h" #include "pbc.h" #include "toputil.h" diff --git a/src/gromacs/gmxpreprocess/gen_vsite.c b/src/gromacs/gmxpreprocess/gen_vsite.c index ea9f649309..e9d1558f1d 100644 --- a/src/gromacs/gmxpreprocess/gen_vsite.c +++ b/src/gromacs/gmxpreprocess/gen_vsite.c @@ -49,7 +49,7 @@ #include "physics.h" #include "index.h" #include "names.h" -#include "futil.h" +#include "gromacs/fileio/futil.h" #include "gpp_atomtype.h" #include "fflibutil.h" #include "macros.h" diff --git a/src/gromacs/gmxpreprocess/genhydro.c b/src/gromacs/gmxpreprocess/genhydro.c index 71de6714a7..ec20baa349 100644 --- a/src/gromacs/gmxpreprocess/genhydro.c +++ b/src/gromacs/gmxpreprocess/genhydro.c @@ -43,11 +43,11 @@ #include "typedefs.h" #include "smalloc.h" #include "string2.h" -#include "confio.h" +#include "gromacs/fileio/confio.h" #include "symtab.h" #include "vec.h" #include "statutil.h" -#include "futil.h" +#include "gromacs/fileio/futil.h" #include "gmx_fatal.h" #include "physics.h" #include "calch.h" diff --git a/src/gromacs/gmxpreprocess/genhydro.h b/src/gromacs/gmxpreprocess/genhydro.h index bf78eb795a..c44412edbb 100644 --- a/src/gromacs/gmxpreprocess/genhydro.h +++ b/src/gromacs/gmxpreprocess/genhydro.h @@ -36,7 +36,7 @@ #ifndef _genhydro_h #define _genhydro_h -#include "pdbio.h" +#include "gromacs/fileio/pdbio.h" #include "hackblock.h" extern int add_h(t_atoms **pdbaptr, rvec *xptr[], diff --git a/src/gromacs/gmxpreprocess/h_db.c b/src/gromacs/gmxpreprocess/h_db.c index c3b10f6e2f..606ac4cb32 100644 --- a/src/gromacs/gmxpreprocess/h_db.c +++ b/src/gromacs/gmxpreprocess/h_db.c @@ -41,10 +41,10 @@ #include "string2.h" #include "sysstuff.h" #include "smalloc.h" -#include "futil.h" +#include "gromacs/fileio/futil.h" #include "symtab.h" #include "h_db.h" -#include "gmxfio.h" +#include "gromacs/fileio/gmxfio.h" #include "fflibutil.h" #include "gmx_fatal.h" #include "macros.h" diff --git a/src/gromacs/gmxpreprocess/pdb2top.cpp b/src/gromacs/gmxpreprocess/pdb2top.cpp index 971755755e..f138b62552 100644 --- a/src/gromacs/gmxpreprocess/pdb2top.cpp +++ b/src/gromacs/gmxpreprocess/pdb2top.cpp @@ -45,7 +45,7 @@ #include "smalloc.h" #include "macros.h" #include "symtab.h" -#include "futil.h" +#include "gromacs/fileio/futil.h" #include "statutil.h" #include "gmx_fatal.h" #include "pdb2top.h" @@ -58,9 +58,9 @@ #include "topio.h" #include "string2.h" #include "physics.h" -#include "pdbio.h" +#include "gromacs/fileio/pdbio.h" #include "gen_ad.h" -#include "filenm.h" +#include "gromacs/fileio/filenm.h" #include "index.h" #include "gen_vsite.h" #include "add_par.h" diff --git a/src/gromacs/gmxpreprocess/readpull.c b/src/gromacs/gmxpreprocess/readpull.c index 6fa075400b..0b2c2f985f 100644 --- a/src/gromacs/gmxpreprocess/readpull.c +++ b/src/gromacs/gmxpreprocess/readpull.c @@ -40,7 +40,7 @@ #include #include "sysstuff.h" #include "princ.h" -#include "futil.h" +#include "gromacs/fileio/futil.h" #include "statutil.h" #include "vec.h" #include "smalloc.h" diff --git a/src/gromacs/gmxpreprocess/readrot.c b/src/gromacs/gmxpreprocess/readrot.c index ca05f8c3eb..1f9837e9c3 100644 --- a/src/gromacs/gmxpreprocess/readrot.c +++ b/src/gromacs/gmxpreprocess/readrot.c @@ -38,8 +38,8 @@ #include "smalloc.h" #include "readir.h" #include "names.h" -#include "futil.h" -#include "trnio.h" +#include "gromacs/fileio/futil.h" +#include "gromacs/fileio/trnio.h" #include "txtdump.h" static char *RotStr = {"Enforced rotation:"}; diff --git a/src/gromacs/gmxpreprocess/resall.c b/src/gromacs/gmxpreprocess/resall.c index 667a4be35a..5c5fbfcb05 100644 --- a/src/gromacs/gmxpreprocess/resall.c +++ b/src/gromacs/gmxpreprocess/resall.c @@ -41,7 +41,7 @@ #include #include "string2.h" #include "strdb.h" -#include "futil.h" +#include "gromacs/fileio/futil.h" #include "smalloc.h" #include "gmx_fatal.h" #include "symtab.h" diff --git a/src/gromacs/gmxpreprocess/ter_db.c b/src/gromacs/gmxpreprocess/ter_db.c index 88ec7168f9..342b27c6d8 100644 --- a/src/gromacs/gmxpreprocess/ter_db.c +++ b/src/gromacs/gmxpreprocess/ter_db.c @@ -40,7 +40,7 @@ #include "smalloc.h" #include "typedefs.h" #include "symtab.h" -#include "futil.h" +#include "gromacs/fileio/futil.h" #include "resall.h" #include "h_db.h" #include "string2.h" @@ -48,7 +48,7 @@ #include "gmx_fatal.h" #include "ter_db.h" #include "toputil.h" -#include "gmxfio.h" +#include "gromacs/fileio/gmxfio.h" #include "fflibutil.h" diff --git a/src/gromacs/gmxpreprocess/topio.c b/src/gromacs/gmxpreprocess/topio.c index 263e4c4775..7cd2bc23d2 100644 --- a/src/gromacs/gmxpreprocess/topio.c +++ b/src/gromacs/gmxpreprocess/topio.c @@ -45,12 +45,12 @@ #include #include -#include "futil.h" +#include "gromacs/fileio/futil.h" #include "sysstuff.h" #include "typedefs.h" #include "smalloc.h" #include "macros.h" -#include "gmxfio.h" +#include "gromacs/fileio/gmxfio.h" #include "txtdump.h" #include "physics.h" #include "macros.h" diff --git a/src/gromacs/legacyheaders/checkpoint.h b/src/gromacs/legacyheaders/checkpoint.h index 38115e85be..40df46de2a 100644 --- a/src/gromacs/legacyheaders/checkpoint.h +++ b/src/gromacs/legacyheaders/checkpoint.h @@ -38,7 +38,8 @@ #include "typedefs.h" -#include "gmxfio.h" +#include "../fileio/gmxfio.h" +#include "../fileio/filenm.h" #ifdef __cplusplus extern "C" { diff --git a/src/gromacs/legacyheaders/ebin.h b/src/gromacs/legacyheaders/ebin.h index 6581b3d1eb..c57cb316c7 100644 --- a/src/gromacs/legacyheaders/ebin.h +++ b/src/gromacs/legacyheaders/ebin.h @@ -38,7 +38,7 @@ #include "sysstuff.h" #include "typedefs.h" -#include "enxio.h" +#include "../fileio/enxio.h" #ifdef __cplusplus extern "C" { diff --git a/src/gromacs/legacyheaders/gstat.h b/src/gromacs/legacyheaders/gstat.h index bc0ecd8a8a..ee5e6e9aec 100644 --- a/src/gromacs/legacyheaders/gstat.h +++ b/src/gromacs/legacyheaders/gstat.h @@ -40,6 +40,7 @@ #include "statutil.h" #include "mshift.h" #include "rmpbc.h" +#include "index.h" #ifdef __cplusplus extern "C" { diff --git a/src/gromacs/legacyheaders/hackblock.h b/src/gromacs/legacyheaders/hackblock.h index 74971ae523..8a5a1532c3 100644 --- a/src/gromacs/legacyheaders/hackblock.h +++ b/src/gromacs/legacyheaders/hackblock.h @@ -37,7 +37,7 @@ #define _hackblock_h #include "typedefs.h" -#include "pdbio.h" +#include "../fileio/pdbio.h" #include "grompp.h" #include "gpp_atomtype.h" diff --git a/src/gromacs/legacyheaders/main.h b/src/gromacs/legacyheaders/main.h index cce5d48b5b..73c717f2c6 100644 --- a/src/gromacs/legacyheaders/main.h +++ b/src/gromacs/legacyheaders/main.h @@ -39,6 +39,7 @@ #include #include "network.h" +#include "../fileio/filenm.h" #ifdef __cplusplus extern "C" { diff --git a/src/gromacs/legacyheaders/mdebin.h b/src/gromacs/legacyheaders/mdebin.h index 315376436f..932bbf7aa9 100644 --- a/src/gromacs/legacyheaders/mdebin.h +++ b/src/gromacs/legacyheaders/mdebin.h @@ -39,7 +39,7 @@ #include "typedefs.h" #include "sysstuff.h" #include "ebin.h" -#include "enxio.h" +#include "../fileio/enxio.h" #include "types/state.h" #ifdef __cplusplus diff --git a/src/gromacs/legacyheaders/mdrun.h b/src/gromacs/legacyheaders/mdrun.h index ed921d3440..26214a6cc7 100644 --- a/src/gromacs/legacyheaders/mdrun.h +++ b/src/gromacs/legacyheaders/mdrun.h @@ -42,7 +42,7 @@ #include "network.h" #include "sim_util.h" #include "tgroup.h" -#include "filenm.h" +#include "../fileio/filenm.h" #include "mshift.h" #include "edsam.h" #include "mdebin.h" @@ -204,36 +204,6 @@ int mdrunner(gmx_hw_opt_t *hw_opt, const char *deviceOptions, unsigned long Flags); /* Driver routine, that calls the different methods */ -void -do_trajectory_writing(FILE *fplog, - t_commrec *cr, - int nfile, - const t_filenm fnm[], - gmx_large_int_t step, - gmx_large_int_t step_rel, - double t, - t_inputrec *ir, - t_state *state, - t_state *state_global, - gmx_mtop_t *top_global, - t_forcerec *fr, - gmx_update_t upd, - gmx_mdoutf_t *outf, - t_mdebin *mdebin, - gmx_ekindata_t *ekind, - rvec *f, - rvec *f_global, - gmx_wallcycle_t wcycle, - gmx_rng_t mcrng, - int *nchkpt, - gmx_bool bCPT, - gmx_bool bRerunMD, - gmx_bool bLastStep, - gmx_bool bDoConfOut, - gmx_bool bSumEkinhOld - ); -/* Wrapper routine for trajectory writing */ - #ifdef __cplusplus } #endif diff --git a/src/gromacs/legacyheaders/nrama.h b/src/gromacs/legacyheaders/nrama.h index 8c2bc3333e..e2faa90d8d 100644 --- a/src/gromacs/legacyheaders/nrama.h +++ b/src/gromacs/legacyheaders/nrama.h @@ -39,6 +39,7 @@ #include "typedefs.h" #include "statutil.h" #include "mshift.h" +#include "../fileio/trxio.h" #ifdef __cplusplus extern "C" { diff --git a/src/gromacs/legacyheaders/sim_util.h b/src/gromacs/legacyheaders/sim_util.h index 7c943fe41f..ab5d8f2534 100644 --- a/src/gromacs/legacyheaders/sim_util.h +++ b/src/gromacs/legacyheaders/sim_util.h @@ -37,31 +37,17 @@ #define _sim_util_h #include "typedefs.h" -#include "enxio.h" +#include "../fileio/enxio.h" #include "mdebin.h" #include "update.h" #include "vcm.h" #include "gromacs/timing/walltime_accounting.h" +#include "../fileio/mdoutf.h" #ifdef __cplusplus extern "C" { #endif -typedef struct { - t_fileio *fp_trn; - t_fileio *fp_xtc; - int xtc_prec; - ener_file_t fp_ene; - const char *fn_cpt; - gmx_bool bKeepAndNumCPT; - int eIntegrator; - gmx_bool bExpanded; - int elamstats; - int simulation_part; - FILE *fp_dhdl; - FILE *fp_field; -} gmx_mdoutf_t; - typedef struct gmx_global_stat *gmx_global_stat_t; void do_pbc_first(FILE *log, matrix box, t_forcerec *fr, @@ -91,36 +77,6 @@ void global_stat(FILE *log, gmx_global_stat_t gs, gmx_bool bSumEkinhOld, int flags); /* Communicate statistics over cr->mpi_comm_mysim */ -gmx_mdoutf_t *init_mdoutf(int nfile, const t_filenm fnm[], - int mdrun_flags, - const t_commrec *cr, const t_inputrec *ir, - const output_env_t oenv); -/* Returns a pointer to a data structure with all output file pointers - * and names required by mdrun. - */ - -void done_mdoutf(gmx_mdoutf_t *of); -/* Close all open output files and free the of pointer */ - -#define MDOF_X (1<<0) -#define MDOF_V (1<<1) -#define MDOF_F (1<<2) -#define MDOF_XTC (1<<3) -#define MDOF_CPT (1<<4) - -void write_traj(FILE *fplog, t_commrec *cr, - gmx_mdoutf_t *of, - int mdof_flags, - gmx_mtop_t *top_global, - gmx_large_int_t step, double t, - t_state *state_local, t_state *state_global, - rvec *f_local, rvec *f_global, - int *n_xtc, rvec **x_xtc); -/* Routine that writes frames to trn, xtc and/or checkpoint. - * What is written is determined by the mdof_flags defined above. - * Data is collected to the master node only when necessary. - */ - int do_per_step(gmx_large_int_t step, gmx_large_int_t nstep); /* Return TRUE if io should be done */ diff --git a/src/gromacs/legacyheaders/statutil.h b/src/gromacs/legacyheaders/statutil.h index a2a8a446aa..6bd9dbab6d 100644 --- a/src/gromacs/legacyheaders/statutil.h +++ b/src/gromacs/legacyheaders/statutil.h @@ -36,12 +36,9 @@ #ifndef _statutil_h #define _statutil_h -#include "typedefs.h" -#include "filenm.h" +#include "../fileio/filenm.h" #include "readinp.h" -#include "pdbio.h" #include "oenv.h" -#include "gmxfio.h" #ifdef __cplusplus extern "C" { @@ -67,12 +64,6 @@ void setTimeValue(int tcontrol, real value); /* End trajectory time control */ -/* a dedicated status type contains fp, etc. */ -typedef struct t_trxstatus t_trxstatus; - -/* I/O function types */ - - /* LEGACY FUNCTIONS The program names, command lines, etc. are now also set in the output_env @@ -89,154 +80,6 @@ const char *Program(void); /* Id. without leading directory */ const char *ShortProgram(void); -/************************************************ - * Trajectory functions - ************************************************/ - -int prec2ndec(real prec); -/* Convert precision in 1/(nm) to number of decimal places */ - -void clear_trxframe(t_trxframe *fr, gmx_bool bFirst); -/* Set all content gmx_booleans to FALSE. - * When bFirst = TRUE, set natoms=-1, all pointers to NULL - * and all data to zero. - */ - -void set_trxframe_ePBC(t_trxframe *fr, int ePBC); -/* Set the type of periodic boundary conditions, ePBC=-1 is not set */ - -int nframes_read(t_trxstatus *status); -/* Returns the number of frames read from the trajectory */ - -int write_trxframe_indexed(t_trxstatus *status, t_trxframe *fr, int nind, - const atom_id *ind, gmx_conect gc); -/* Write an indexed frame to a TRX file, see write_trxframe. gc may be NULL */ - -int write_trxframe(t_trxstatus *status, t_trxframe *fr, gmx_conect gc); -/* Write a frame to a TRX file. - * Only entries for which the gmx_boolean is TRUE will be written, - * except for step, time, lambda and/or box, which may not be - * omitted for certain trajectory formats. - * The precision for .xtc and .gro is fr->prec, when fr->bPrec=FALSE, - * the precision is set to 1000. - * gc is important for pdb file writing only and may be NULL. - */ - -int write_trx(t_trxstatus *status, int nind, const atom_id *ind, t_atoms *atoms, - int step, real time, matrix box, rvec x[], rvec *v, - gmx_conect gc); -/* Write an indexed frame to a TRX file. - * v can be NULL. - * atoms can be NULL for file types which don't need atom names. - */ - -void close_trx(t_trxstatus *status); -/* Close trj file as opened with read_first_x, read_frist_frame - * or open_trx. Identical to close_trj. - */ - -t_trxstatus *open_trx(const char *outfile, const char *filemode); -/* Open a TRX file and return an allocated status pointer */ - -/* get a fileio from a trxstatus */ -t_fileio *trx_get_fileio(t_trxstatus *status); - - -gmx_bool bRmod_fd(double a, double b, double c, gmx_bool bDouble); -/* Returns TRUE when (a - b) MOD c = 0, using a margin which is slightly - * larger than the float/double precision. - */ - -#ifdef GMX_DOUBLE -#define bRmod(a, b, c) bRmod_fd(a, b, c, TRUE) -#else -#define bRmod(a, b, c) bRmod_fd(a, b, c, FALSE) -#endif - -int check_times2(real t, real t0, gmx_bool bDouble); -/* This routine checkes if the read-in time is correct or not; - * returns -1 if ttend - * where margin is 0.1*min(t-tp,tp-tpp), if this positive, 0 otherwise. - * tp and tpp should be the time of the previous frame and the one before. - * The mod is done with single or double precision accuracy depending - * on the value of bDouble. - */ - -int check_times(real t); -/* This routine checkes if the read-in time is correct or not; - * returns -1 if ttend - */ - - - - - -/* For trxframe.flags, used in trxframe read routines. - * When a READ flag is set, the field will be read when present, - * but a frame might be returned which does not contain the field. - * When a NEED flag is set, frames not containing the field will be skipped. - */ -#define TRX_READ_X (1<<0) -#define TRX_NEED_X (1<<1) -#define TRX_READ_V (1<<2) -#define TRX_NEED_V (1<<3) -#define TRX_READ_F (1<<4) -#define TRX_NEED_F (1<<5) -/* Useful for reading natoms from a trajectory without skipping */ -#define TRX_DONT_SKIP (1<<6) - -/* For trxframe.not_ok */ -#define HEADER_NOT_OK (1<<0) -#define DATA_NOT_OK (1<<1) -#define FRAME_NOT_OK (HEADER_NOT_OK | DATA_NOT_OK) - -int read_first_frame(const output_env_t oenv, t_trxstatus **status, - const char *fn, t_trxframe *fr, int flags); -/* Read the first frame which is in accordance with flags, which are - * defined further up in this file. - * Returns natoms when succeeded, 0 otherwise. - * Memory will be allocated for flagged entries. - * The flags are copied to fr for subsequent calls to read_next_frame. - * Returns TRUE when succeeded, FALSE otherwise. - */ - -gmx_bool read_next_frame(const output_env_t oenv, t_trxstatus *status, - t_trxframe *fr); -/* Reads the next frame which is in accordance with fr->flags. - * Returns TRUE when succeeded, FALSE otherwise. - */ - -int read_first_x(const output_env_t oenv, t_trxstatus **status, - const char *fn, real *t, rvec **x, matrix box); -/* These routines read first coordinates and box, and allocates - * memory for the coordinates, for a trajectory file. - * The routine returns the number of atoms, or 0 when something is wrong. - * The integer in status should be passed to calls of read_next_x - */ - -gmx_bool read_next_x(const output_env_t oenv, t_trxstatus *status, real *t, rvec x[], matrix box); -/* Read coordinates and box from a trajectory file. Return TRUE when all well, - * or FALSE when end of file (or last frame requested by user). - * status is the integer set in read_first_x. - */ - -void close_trj(t_trxstatus *status); -/* Close trj file as opened with read_first_x, read_frist_frame - * or open_trx. Identical to close_trx. - */ - -void rewind_trj(t_trxstatus *status); -/* Rewind trj file as opened with read_first_x */ - -t_topology *read_top(const char *fn, int *ePBC); -/* Extract a topology data structure from a topology file. - * If ePBC!=NULL *ePBC gives the pbc type. - */ - /***************************************************** * Some command line parsing routines *****************************************************/ diff --git a/src/gromacs/legacyheaders/txtdump.h b/src/gromacs/legacyheaders/txtdump.h index 3d42710fe0..01aa9273a9 100644 --- a/src/gromacs/legacyheaders/txtdump.h +++ b/src/gromacs/legacyheaders/txtdump.h @@ -39,7 +39,7 @@ #include #include "typedefs.h" -#include "tpxio.h" +#include "../fileio/tpxio.h" #ifdef __cplusplus extern "C" { diff --git a/src/gromacs/legacyheaders/typedefs.h b/src/gromacs/legacyheaders/typedefs.h index 25820cda9e..d3963b3db7 100644 --- a/src/gromacs/legacyheaders/typedefs.h +++ b/src/gromacs/legacyheaders/typedefs.h @@ -48,7 +48,7 @@ #include "types/symtab.h" #include "types/idef.h" #include "types/atoms.h" -#include "types/trx.h" +#include "../fileio/trx.h" #include "types/topology.h" #include "types/energy.h" #include "types/inputrec.h" @@ -63,7 +63,6 @@ #include "types/mdatom.h" #include "types/pbc.h" #include "types/ifunc.h" -#include "types/filenm.h" #include "types/group.h" #include "types/state.h" #include "types/shellfc.h" diff --git a/src/gromacs/legacyheaders/types/filenm.h b/src/gromacs/legacyheaders/types/filenm.h deleted file mode 100644 index ea6aadc3fa..0000000000 --- a/src/gromacs/legacyheaders/types/filenm.h +++ /dev/null @@ -1,91 +0,0 @@ -/* - * - * This source code is part of - * - * G R O M A C S - * - * GROningen MAchine for Chemical Simulations - * - * VERSION 3.2.0 - * Written by David van der Spoel, Erik Lindahl, Berk Hess, and others. - * Copyright (c) 1991-2000, University of Groningen, The Netherlands. - * Copyright (c) 2001-2004, The GROMACS development team, - * check out http://www.gromacs.org for more information. - - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * If you want to redistribute modifications, 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 www.gromacs.org. - * - * To help us fund GROMACS development, we humbly ask that you cite - * the papers on the package - you can find them in the top README file. - * - * For more info, check our website at http://www.gromacs.org - * - * And Hey: - * GRoups of Organic Molecules in ACtion for Science - */ - -#ifdef __cplusplus -extern "C" { -#endif - - -/* this enum should correspond to the array deffile in gmxlib/filenm.c */ -enum { - efMDP, - efTRX, efTRO, efTRN, efTRR, efTRJ, efXTC, efG87, - efEDR, - efSTX, efSTO, efGRO, efG96, efPDB, efBRK, efENT, efESP, efPQR, efXYZ, - efCPT, - efLOG, efXVG, efOUT, - efNDX, - efTOP, efITP, - efTPX, efTPS, efTPR, efTPA, efTPB, - efTEX, efRTP, efATP, efHDB, - efDAT, efDLG, - efMAP, efEPS, efMAT, efM2P, - efMTX, - efEDI, - efCUB, - efXPM, - efRND, - efNR -}; - -typedef struct { - int ftp; /* File type (see enum above) */ - const char *opt; /* Command line option */ - const char *fn; /* File name (as set in source code) */ - unsigned long flag; /* Flag for all kinds of info (see defs)*/ - int nfiles; /* number of files */ - char **fns; /* File names */ -} t_filenm; - -#define ffSET 1<<0 -#define ffREAD 1<<1 -#define ffWRITE 1<<2 -#define ffOPT 1<<3 -#define ffLIB 1<<4 -#define ffMULT 1<<5 -#define ffRW (ffREAD | ffWRITE) -#define ffOPTRD (ffREAD | ffOPT) -#define ffOPTWR (ffWRITE| ffOPT) -#define ffOPTRW (ffRW | ffOPT) -#define ffLIBRD (ffREAD | ffLIB) -#define ffLIBOPTRD (ffOPTRD | ffLIB) -#define ffRDMULT (ffREAD | ffMULT) -#define ffOPTRDMULT (ffRDMULT | ffOPT) -#define ffWRMULT (ffWRITE | ffMULT) -#define ffOPTWRMULT (ffWRMULT | ffOPT) - -#ifdef __cplusplus -} -#endif diff --git a/src/gromacs/legacyheaders/viewit.h b/src/gromacs/legacyheaders/viewit.h index 8205e48cb2..507c33138c 100644 --- a/src/gromacs/legacyheaders/viewit.h +++ b/src/gromacs/legacyheaders/viewit.h @@ -37,6 +37,7 @@ #define _viewit_h #include "typedefs.h" +#include "../fileio/filenm.h" #ifdef __cplusplus extern "C" { diff --git a/src/gromacs/linearalgebra/mtxio.c b/src/gromacs/linearalgebra/mtxio.c index 5af8c9be47..142e872871 100644 --- a/src/gromacs/linearalgebra/mtxio.c +++ b/src/gromacs/linearalgebra/mtxio.c @@ -45,9 +45,9 @@ #include "gromacs/legacyheaders/copyrite.h" #include "gromacs/legacyheaders/gmx_fatal.h" -#include "gromacs/legacyheaders/gmxfio.h" +#include "gromacs/fileio/gmxfio.h" #include "gromacs/legacyheaders/smalloc.h" -#include "gromacs/legacyheaders/xdrf.h" +#include "gromacs/fileio/xdrf.h" #include "gromacs/linearalgebra/sparsematrix.h" diff --git a/src/gromacs/mdlib/clincs.c b/src/gromacs/mdlib/clincs.c index e44a913855..fd6041c7e4 100644 --- a/src/gromacs/mdlib/clincs.c +++ b/src/gromacs/mdlib/clincs.c @@ -51,7 +51,7 @@ #include "domdec.h" #include "partdec.h" #include "mtop_util.h" -#include "gmxfio.h" +#include "gromacs/fileio/gmxfio.h" #include "gmx_omp_nthreads.h" #include "gmx_omp.h" diff --git a/src/gromacs/mdlib/constr.c b/src/gromacs/mdlib/constr.c index 2fe584e553..695015bcd0 100644 --- a/src/gromacs/mdlib/constr.c +++ b/src/gromacs/mdlib/constr.c @@ -37,7 +37,7 @@ #include #endif -#include "confio.h" +#include "gromacs/fileio/confio.h" #include "constr.h" #include "copyrite.h" #include "invblock.h" @@ -50,11 +50,11 @@ #include "names.h" #include "txtdump.h" #include "domdec.h" -#include "pdbio.h" +#include "gromacs/fileio/pdbio.h" #include "partdec.h" #include "splitter.h" #include "mtop_util.h" -#include "gmxfio.h" +#include "gromacs/fileio/gmxfio.h" #include "macros.h" #include "gmx_omp_nthreads.h" diff --git a/src/gromacs/mdlib/domdec.c b/src/gromacs/mdlib/domdec.c index 160ad199ca..efcc62c20d 100644 --- a/src/gromacs/mdlib/domdec.c +++ b/src/gromacs/mdlib/domdec.c @@ -38,8 +38,8 @@ #include "constr.h" #include "mdatoms.h" #include "names.h" -#include "pdbio.h" -#include "futil.h" +#include "gromacs/fileio/pdbio.h" +#include "gromacs/fileio/futil.h" #include "force.h" #include "pme.h" #include "pull.h" @@ -49,7 +49,7 @@ #include "nsgrid.h" #include "shellfc.h" #include "mtop_util.h" -#include "gmxfio.h" +#include "gromacs/fileio/gmxfio.h" #include "gmx_ga2la.h" #include "gmx_sort.h" #include "macros.h" diff --git a/src/gromacs/mdlib/edsam.c b/src/gromacs/mdlib/edsam.c index 8a732d8706..e27b2bdc3d 100644 --- a/src/gromacs/mdlib/edsam.c +++ b/src/gromacs/mdlib/edsam.c @@ -42,7 +42,7 @@ #include "string2.h" #include "smalloc.h" #include "names.h" -#include "confio.h" +#include "gromacs/fileio/confio.h" #include "mvdata.h" #include "txtdump.h" #include "vec.h" @@ -55,7 +55,7 @@ #include "nrjac.h" #include "mtop_util.h" #include "edsam.h" -#include "gmxfio.h" +#include "gromacs/fileio/gmxfio.h" #include "xvgr.h" #include "groupcoord.h" diff --git a/src/gromacs/mdlib/ewald.c b/src/gromacs/mdlib/ewald.c index b8c37c1d33..5df5ecaee9 100644 --- a/src/gromacs/mdlib/ewald.c +++ b/src/gromacs/mdlib/ewald.c @@ -42,7 +42,7 @@ #include "vec.h" #include "gmxcomplex.h" #include "smalloc.h" -#include "futil.h" +#include "gromacs/fileio/futil.h" #include "gmx_fatal.h" #include "physics.h" #include "coulomb.h" diff --git a/src/gromacs/mdlib/expanded.c b/src/gromacs/mdlib/expanded.c index 91465b0963..51abb5d8c0 100644 --- a/src/gromacs/mdlib/expanded.c +++ b/src/gromacs/mdlib/expanded.c @@ -40,10 +40,10 @@ #include #include "typedefs.h" #include "string2.h" -#include "gmxfio.h" +#include "gromacs/fileio/gmxfio.h" #include "smalloc.h" #include "names.h" -#include "confio.h" +#include "gromacs/fileio/confio.h" #include "mvdata.h" #include "txtdump.h" #include "pbc.h" @@ -65,8 +65,8 @@ #include "calcmu.h" #include "constr.h" #include "xvgr.h" -#include "trnio.h" -#include "xtcio.h" +#include "gromacs/fileio/trnio.h" +#include "gromacs/fileio/xtcio.h" #include "gmx_random.h" #include "domdec.h" #include "partdec.h" diff --git a/src/gromacs/mdlib/genborn.c b/src/gromacs/mdlib/genborn.c index 7766dc08b6..ffe72ab86f 100644 --- a/src/gromacs/mdlib/genborn.c +++ b/src/gromacs/mdlib/genborn.c @@ -45,7 +45,7 @@ #include "genborn.h" #include "vec.h" #include "grompp.h" -#include "pdbio.h" +#include "gromacs/fileio/pdbio.h" #include "names.h" #include "physics.h" #include "partdec.h" diff --git a/src/gromacs/mdlib/genborn_sse2_double.c b/src/gromacs/mdlib/genborn_sse2_double.c index 27ed3b7b20..b6ebfbdd52 100644 --- a/src/gromacs/mdlib/genborn_sse2_double.c +++ b/src/gromacs/mdlib/genborn_sse2_double.c @@ -44,7 +44,7 @@ #include "genborn.h" #include "vec.h" #include "grompp.h" -#include "pdbio.h" +#include "gromacs/fileio/pdbio.h" #include "names.h" #include "physics.h" #include "domdec.h" diff --git a/src/gromacs/mdlib/genborn_sse2_single.c b/src/gromacs/mdlib/genborn_sse2_single.c index a04012efa5..d75ed2b298 100644 --- a/src/gromacs/mdlib/genborn_sse2_single.c +++ b/src/gromacs/mdlib/genborn_sse2_single.c @@ -43,7 +43,7 @@ #include "genborn.h" #include "vec.h" #include "grompp.h" -#include "pdbio.h" +#include "gromacs/fileio/pdbio.h" #include "names.h" #include "physics.h" #include "partdec.h" diff --git a/src/gromacs/mdlib/init.c b/src/gromacs/mdlib/init.c index 710789c354..1681cb5ac7 100644 --- a/src/gromacs/mdlib/init.c +++ b/src/gromacs/mdlib/init.c @@ -39,7 +39,7 @@ #include #include "typedefs.h" -#include "tpxio.h" +#include "gromacs/fileio/tpxio.h" #include "smalloc.h" #include "vec.h" #include "main.h" diff --git a/src/gromacs/mdlib/mdebin.c b/src/gromacs/mdlib/mdebin.c index e9491b838b..cd25c50709 100644 --- a/src/gromacs/mdlib/mdebin.c +++ b/src/gromacs/mdlib/mdebin.c @@ -44,7 +44,7 @@ #include "mdebin.h" #include "smalloc.h" #include "physics.h" -#include "enxio.h" +#include "gromacs/fileio/enxio.h" #include "vec.h" #include "disre.h" #include "main.h" @@ -54,7 +54,7 @@ #include "constr.h" #include "mtop_util.h" #include "xvgr.h" -#include "gmxfio.h" +#include "gromacs/fileio/gmxfio.h" #include "macros.h" #include "mdrun.h" #include "mdebin_bar.h" diff --git a/src/gromacs/mdlib/mdebin_bar.c b/src/gromacs/mdlib/mdebin_bar.c index 48169f3894..a1803f7af2 100644 --- a/src/gromacs/mdlib/mdebin_bar.c +++ b/src/gromacs/mdlib/mdebin_bar.c @@ -45,8 +45,8 @@ #include "gmx_fatal.h" #include "mdebin.h" #include "smalloc.h" -#include "enxio.h" -#include "gmxfio.h" +#include "gromacs/fileio/enxio.h" +#include "gromacs/fileio/gmxfio.h" #include "mdebin_bar.h" /* reset the delta_h list to prepare it for new values */ diff --git a/src/gromacs/mdlib/minimize.c b/src/gromacs/mdlib/minimize.c index cf67098ff4..ceace02872 100644 --- a/src/gromacs/mdlib/minimize.c +++ b/src/gromacs/mdlib/minimize.c @@ -43,7 +43,7 @@ #include "sysstuff.h" #include "string2.h" #include "network.h" -#include "confio.h" +#include "gromacs/fileio/confio.h" #include "smalloc.h" #include "nrnb.h" #include "main.h" @@ -66,12 +66,12 @@ #include "md_support.h" #include "domdec.h" #include "partdec.h" -#include "trnio.h" +#include "gromacs/fileio/trnio.h" #include "mdatoms.h" #include "ns.h" #include "gmx_wallcycle.h" #include "mtop_util.h" -#include "gmxfio.h" +#include "gromacs/fileio/gmxfio.h" #include "pme.h" #include "bondf.h" #include "gmx_omp_nthreads.h" @@ -80,6 +80,7 @@ #include "gromacs/linearalgebra/mtxio.h" #include "gromacs/linearalgebra/sparsematrix.h" +#include "gromacs/fileio/trajectory_writing.h" #include "gromacs/timing/walltime_accounting.h" typedef struct { diff --git a/src/gromacs/mdlib/nbnxn_search.c b/src/gromacs/mdlib/nbnxn_search.c index da6589001e..84cd9c3224 100644 --- a/src/gromacs/mdlib/nbnxn_search.c +++ b/src/gromacs/mdlib/nbnxn_search.c @@ -51,7 +51,7 @@ #include "nbnxn_atomdata.h" #include "nbnxn_search.h" #include "gmx_cyclecounter.h" -#include "gmxfio.h" +#include "gromacs/fileio/gmxfio.h" #include "gmx_omp_nthreads.h" #include "nrnb.h" diff --git a/src/gromacs/mdlib/nsgrid.c b/src/gromacs/mdlib/nsgrid.c index c73c8d7f8d..de760db851 100644 --- a/src/gromacs/mdlib/nsgrid.c +++ b/src/gromacs/mdlib/nsgrid.c @@ -53,8 +53,8 @@ #include "partdec.h" #include "pbc.h" #include -#include "futil.h" -#include "pdbio.h" +#include "gromacs/fileio/futil.h" +#include "gromacs/fileio/pdbio.h" /*********************************** * Grid Routines diff --git a/src/gromacs/mdlib/pme.c b/src/gromacs/mdlib/pme.c index 20ed264458..412b7170c0 100644 --- a/src/gromacs/mdlib/pme.c +++ b/src/gromacs/mdlib/pme.c @@ -72,7 +72,7 @@ #include "vec.h" #include "gmxcomplex.h" #include "smalloc.h" -#include "futil.h" +#include "gromacs/fileio/futil.h" #include "coulomb.h" #include "gmx_fatal.h" #include "pme.h" @@ -80,7 +80,7 @@ #include "physics.h" #include "nrnb.h" #include "gmx_wallcycle.h" -#include "pdbio.h" +#include "gromacs/fileio/pdbio.h" #include "gmx_cyclecounter.h" #include "gmx_omp.h" #include "macros.h" diff --git a/src/gromacs/mdlib/pull.c b/src/gromacs/mdlib/pull.c index 73bacb0e91..d5e97bccdb 100644 --- a/src/gromacs/mdlib/pull.c +++ b/src/gromacs/mdlib/pull.c @@ -41,14 +41,14 @@ #include #include #include -#include "futil.h" +#include "gromacs/fileio/futil.h" #include "index.h" #include "statutil.h" -#include "gmxfio.h" +#include "gromacs/fileio/gmxfio.h" #include "vec.h" #include "typedefs.h" #include "network.h" -#include "filenm.h" +#include "gromacs/fileio/filenm.h" #include #include "smalloc.h" #include "pull.h" diff --git a/src/gromacs/mdlib/pull_rotation.c b/src/gromacs/mdlib/pull_rotation.c index 9fc97282be..13e2825975 100644 --- a/src/gromacs/mdlib/pull_rotation.c +++ b/src/gromacs/mdlib/pull_rotation.c @@ -41,11 +41,11 @@ #include "domdec.h" #include "gmx_wallcycle.h" #include "gmx_cyclecounter.h" -#include "trnio.h" +#include "gromacs/fileio/trnio.h" #include "smalloc.h" #include "network.h" #include "pbc.h" -#include "futil.h" +#include "gromacs/fileio/futil.h" #include "mdrun.h" #include "txtdump.h" #include "names.h" @@ -55,7 +55,7 @@ #include "vec.h" #include "gmx_ga2la.h" #include "xvgr.h" -#include "gmxfio.h" +#include "gromacs/fileio/gmxfio.h" #include "groupcoord.h" #include "pull_rotation.h" #include "gmx_sort.h" diff --git a/src/gromacs/mdlib/pullutil.c b/src/gromacs/mdlib/pullutil.c index b42aaad2a8..1b50e5ffaa 100644 --- a/src/gromacs/mdlib/pullutil.c +++ b/src/gromacs/mdlib/pullutil.c @@ -40,7 +40,7 @@ #include #include "sysstuff.h" #include "princ.h" -#include "futil.h" +#include "gromacs/fileio/futil.h" #include "statutil.h" #include "vec.h" #include "smalloc.h" @@ -50,7 +50,7 @@ #include "macros.h" #include "symtab.h" #include "index.h" -#include "confio.h" +#include "gromacs/fileio/confio.h" #include "network.h" #include "pbc.h" #include "pull.h" diff --git a/src/gromacs/mdlib/qm_gamess.c b/src/gromacs/mdlib/qm_gamess.c index 21aded5d1d..2d446c694c 100644 --- a/src/gromacs/mdlib/qm_gamess.c +++ b/src/gromacs/mdlib/qm_gamess.c @@ -48,7 +48,7 @@ #include "vec.h" #include "force.h" #include "invblock.h" -#include "confio.h" +#include "gromacs/fileio/confio.h" #include "names.h" #include "network.h" #include "pbc.h" diff --git a/src/gromacs/mdlib/qm_gaussian.c b/src/gromacs/mdlib/qm_gaussian.c index 761b8ec875..440e59559d 100644 --- a/src/gromacs/mdlib/qm_gaussian.c +++ b/src/gromacs/mdlib/qm_gaussian.c @@ -48,7 +48,7 @@ #include "vec.h" #include "force.h" #include "invblock.h" -#include "confio.h" +#include "gromacs/fileio/confio.h" #include "names.h" #include "network.h" #include "pbc.h" diff --git a/src/gromacs/mdlib/qm_mopac.c b/src/gromacs/mdlib/qm_mopac.c index f3e4cf8884..59907d6715 100644 --- a/src/gromacs/mdlib/qm_mopac.c +++ b/src/gromacs/mdlib/qm_mopac.c @@ -48,7 +48,7 @@ #include "vec.h" #include "force.h" #include "invblock.h" -#include "confio.h" +#include "gromacs/fileio/confio.h" #include "names.h" #include "network.h" #include "pbc.h" diff --git a/src/gromacs/mdlib/qm_orca.c b/src/gromacs/mdlib/qm_orca.c index bd631a0498..4b191b5a2c 100644 --- a/src/gromacs/mdlib/qm_orca.c +++ b/src/gromacs/mdlib/qm_orca.c @@ -46,7 +46,7 @@ #include "vec.h" #include "force.h" #include "invblock.h" -#include "confio.h" +#include "gromacs/fileio/confio.h" #include "names.h" #include "network.h" #include "pbc.h" diff --git a/src/gromacs/mdlib/qmmm.c b/src/gromacs/mdlib/qmmm.c index ec67447875..480759b95b 100644 --- a/src/gromacs/mdlib/qmmm.c +++ b/src/gromacs/mdlib/qmmm.c @@ -46,7 +46,7 @@ #include "vec.h" #include "force.h" #include "invblock.h" -#include "confio.h" +#include "gromacs/fileio/confio.h" #include "names.h" #include "network.h" #include "pbc.h" diff --git a/src/gromacs/mdlib/sim_util.c b/src/gromacs/mdlib/sim_util.c index 3d77d2c314..9ee926ca11 100644 --- a/src/gromacs/mdlib/sim_util.c +++ b/src/gromacs/mdlib/sim_util.c @@ -44,10 +44,10 @@ #include #include "typedefs.h" #include "string2.h" -#include "gmxfio.h" +#include "gromacs/fileio/gmxfio.h" #include "smalloc.h" #include "names.h" -#include "confio.h" +#include "gromacs/fileio/confio.h" #include "mvdata.h" #include "txtdump.h" #include "pbc.h" @@ -70,8 +70,8 @@ #include "calcmu.h" #include "constr.h" #include "xvgr.h" -#include "trnio.h" -#include "xtcio.h" +#include "gromacs/fileio/trnio.h" +#include "gromacs/fileio/xtcio.h" #include "copyrite.h" #include "pull_rotation.h" #include "gmx_random.h" diff --git a/src/gromacs/mdlib/stat.c b/src/gromacs/mdlib/stat.c index 74e74f1907..8bd6595079 100644 --- a/src/gromacs/mdlib/stat.c +++ b/src/gromacs/mdlib/stat.c @@ -53,13 +53,13 @@ #include "force.h" #include "vcm.h" #include "smalloc.h" -#include "futil.h" +#include "gromacs/fileio/futil.h" #include "network.h" #include "rbin.h" #include "tgroup.h" -#include "xtcio.h" -#include "gmxfio.h" -#include "trnio.h" +#include "gromacs/fileio/xtcio.h" +#include "gromacs/fileio/gmxfio.h" +#include "gromacs/fileio/trnio.h" #include "statutil.h" #include "domdec.h" #include "partdec.h" @@ -429,313 +429,3 @@ int do_per_step(gmx_large_int_t step, gmx_large_int_t nstep) } } -static void moveit(t_commrec *cr, rvec xx[]) -{ - if (!xx) - { - return; - } - - move_rvecs(cr, FALSE, FALSE, xx, NULL, (cr->nnodes-cr->npmenodes)-1, NULL); -} - -gmx_mdoutf_t *init_mdoutf(int nfile, const t_filenm fnm[], int mdrun_flags, - const t_commrec *cr, const t_inputrec *ir, - const output_env_t oenv) -{ - gmx_mdoutf_t *of; - char filemode[3]; - gmx_bool bAppendFiles; - - snew(of, 1); - - of->fp_trn = NULL; - of->fp_ene = NULL; - of->fp_xtc = NULL; - of->fp_dhdl = NULL; - of->fp_field = NULL; - - of->eIntegrator = ir->eI; - of->bExpanded = ir->bExpanded; - of->elamstats = ir->expandedvals->elamstats; - of->simulation_part = ir->simulation_part; - - if (MASTER(cr)) - { - bAppendFiles = (mdrun_flags & MD_APPENDFILES); - - of->bKeepAndNumCPT = (mdrun_flags & MD_KEEPANDNUMCPT); - - sprintf(filemode, bAppendFiles ? "a+" : "w+"); - - if ((EI_DYNAMICS(ir->eI) || EI_ENERGY_MINIMIZATION(ir->eI)) -#ifndef GMX_FAHCORE - && - !(EI_DYNAMICS(ir->eI) && - ir->nstxout == 0 && - ir->nstvout == 0 && - ir->nstfout == 0) -#endif - ) - { - of->fp_trn = open_trn(ftp2fn(efTRN, nfile, fnm), filemode); - } - if (EI_DYNAMICS(ir->eI) && - ir->nstxtcout > 0) - { - of->fp_xtc = open_xtc(ftp2fn(efXTC, nfile, fnm), filemode); - of->xtc_prec = ir->xtcprec; - } - if (EI_DYNAMICS(ir->eI) || EI_ENERGY_MINIMIZATION(ir->eI)) - { - of->fp_ene = open_enx(ftp2fn(efEDR, nfile, fnm), filemode); - } - of->fn_cpt = opt2fn("-cpo", nfile, fnm); - - if ((ir->efep != efepNO || ir->bSimTemp) && ir->fepvals->nstdhdl > 0 && - (ir->fepvals->separate_dhdl_file == esepdhdlfileYES ) && - EI_DYNAMICS(ir->eI)) - { - if (bAppendFiles) - { - of->fp_dhdl = gmx_fio_fopen(opt2fn("-dhdl", nfile, fnm), filemode); - } - else - { - of->fp_dhdl = open_dhdl(opt2fn("-dhdl", nfile, fnm), ir, oenv); - } - } - - if (opt2bSet("-field", nfile, fnm) && - (ir->ex[XX].n || ir->ex[YY].n || ir->ex[ZZ].n)) - { - if (bAppendFiles) - { - of->fp_dhdl = gmx_fio_fopen(opt2fn("-field", nfile, fnm), - filemode); - } - else - { - of->fp_field = xvgropen(opt2fn("-field", nfile, fnm), - "Applied electric field", "Time (ps)", - "E (V/nm)", oenv); - } - } - } - - return of; -} - -void done_mdoutf(gmx_mdoutf_t *of) -{ - if (of->fp_ene != NULL) - { - close_enx(of->fp_ene); - } - if (of->fp_xtc) - { - close_xtc(of->fp_xtc); - } - if (of->fp_trn) - { - close_trn(of->fp_trn); - } - if (of->fp_dhdl != NULL) - { - gmx_fio_fclose(of->fp_dhdl); - } - if (of->fp_field != NULL) - { - gmx_fio_fclose(of->fp_field); - } - - sfree(of); -} - -void write_traj(FILE *fplog, t_commrec *cr, - gmx_mdoutf_t *of, - int mdof_flags, - gmx_mtop_t *top_global, - gmx_large_int_t step, double t, - t_state *state_local, t_state *state_global, - rvec *f_local, rvec *f_global, - int *n_xtc, rvec **x_xtc) -{ - int i, j; - gmx_groups_t *groups; - rvec *xxtc; - rvec *local_v; - rvec *global_v; - -#define MX(xvf) moveit(cr, xvf) - - /* MRS -- defining these variables is to manage the difference - * between half step and full step velocities, but there must be a better way . . . */ - - local_v = state_local->v; - global_v = state_global->v; - - if (DOMAINDECOMP(cr)) - { - if (mdof_flags & MDOF_CPT) - { - dd_collect_state(cr->dd, state_local, state_global); - } - else - { - if (mdof_flags & (MDOF_X | MDOF_XTC)) - { - dd_collect_vec(cr->dd, state_local, state_local->x, - state_global->x); - } - if (mdof_flags & MDOF_V) - { - dd_collect_vec(cr->dd, state_local, local_v, - global_v); - } - } - if (mdof_flags & MDOF_F) - { - dd_collect_vec(cr->dd, state_local, f_local, f_global); - } - } - else - { - if (mdof_flags & MDOF_CPT) - { - /* All pointers in state_local are equal to state_global, - * but we need to copy the non-pointer entries. - */ - state_global->lambda = state_local->lambda; - state_global->veta = state_local->veta; - state_global->vol0 = state_local->vol0; - copy_mat(state_local->box, state_global->box); - copy_mat(state_local->boxv, state_global->boxv); - copy_mat(state_local->svir_prev, state_global->svir_prev); - copy_mat(state_local->fvir_prev, state_global->fvir_prev); - copy_mat(state_local->pres_prev, state_global->pres_prev); - } - if (cr->nnodes > 1) - { - /* Particle decomposition, collect the data on the master node */ - if (mdof_flags & MDOF_CPT) - { - if (state_local->flags & (1<x); - } - if (state_local->flags & (1<v); - } - if (state_local->flags & (1<sd_X); - } - if (state_global->nrngi > 1) - { - if (state_local->flags & (1<ld_rng, - state_local->nrng*sizeof(state_local->ld_rng[0]), MPI_BYTE, - state_global->ld_rng, - state_local->nrng*sizeof(state_local->ld_rng[0]), MPI_BYTE, - MASTERRANK(cr), cr->mpi_comm_mygroup); -#endif - } - if (state_local->flags & (1<ld_rngi, - sizeof(state_local->ld_rngi[0]), MPI_BYTE, - state_global->ld_rngi, - sizeof(state_local->ld_rngi[0]), MPI_BYTE, - MASTERRANK(cr), cr->mpi_comm_mygroup); -#endif - } - } - } - else - { - if (mdof_flags & (MDOF_X | MDOF_XTC)) - { - MX(state_global->x); - } - if (mdof_flags & MDOF_V) - { - MX(global_v); - } - } - if (mdof_flags & MDOF_F) - { - MX(f_global); - } - } - } - - if (MASTER(cr)) - { - if (mdof_flags & MDOF_CPT) - { - write_checkpoint(of->fn_cpt, of->bKeepAndNumCPT, - fplog, cr, of->eIntegrator, of->simulation_part, - of->bExpanded, of->elamstats, step, t, state_global); - } - - if (mdof_flags & (MDOF_X | MDOF_V | MDOF_F)) - { - fwrite_trn(of->fp_trn, step, t, state_local->lambda[efptFEP], - state_local->box, top_global->natoms, - (mdof_flags & MDOF_X) ? state_global->x : NULL, - (mdof_flags & MDOF_V) ? global_v : NULL, - (mdof_flags & MDOF_F) ? f_global : NULL); - if (gmx_fio_flush(of->fp_trn) != 0) - { - gmx_file("Cannot write trajectory; maybe you are out of disk space?"); - } - gmx_fio_check_file_position(of->fp_trn); - } - if (mdof_flags & MDOF_XTC) - { - groups = &top_global->groups; - if (*n_xtc == -1) - { - *n_xtc = 0; - for (i = 0; (i < top_global->natoms); i++) - { - if (ggrpnr(groups, egcXTC, i) == 0) - { - (*n_xtc)++; - } - } - if (*n_xtc != top_global->natoms) - { - snew(*x_xtc, *n_xtc); - } - } - if (*n_xtc == top_global->natoms) - { - xxtc = state_global->x; - } - else - { - xxtc = *x_xtc; - j = 0; - for (i = 0; (i < top_global->natoms); i++) - { - if (ggrpnr(groups, egcXTC, i) == 0) - { - copy_rvec(state_global->x[i], xxtc[j++]); - } - } - } - if (write_xtc(of->fp_xtc, *n_xtc, step, t, - state_local->box, xxtc, of->xtc_prec) == 0) - { - gmx_fatal(FARGS, "XTC error - maybe you are out of disk space?"); - } - gmx_fio_check_file_position(of->fp_xtc); - } - } -} diff --git a/src/gromacs/mdlib/tables.c b/src/gromacs/mdlib/tables.c index 474e410490..2223af0177 100644 --- a/src/gromacs/mdlib/tables.c +++ b/src/gromacs/mdlib/tables.c @@ -43,14 +43,14 @@ #include "names.h" #include "smalloc.h" #include "gmx_fatal.h" -#include "futil.h" +#include "gromacs/fileio/futil.h" #include "xvgr.h" #include "vec.h" #include "main.h" #include "network.h" #include "physics.h" #include "force.h" -#include "gmxfio.h" +#include "gromacs/fileio/gmxfio.h" #include "macros.h" #include "tables.h" diff --git a/src/gromacs/mdlib/tgroup.c b/src/gromacs/mdlib/tgroup.c index 3aece8cc0e..24d15a9b02 100644 --- a/src/gromacs/mdlib/tgroup.c +++ b/src/gromacs/mdlib/tgroup.c @@ -42,7 +42,7 @@ #include "macros.h" #include "main.h" #include "smalloc.h" -#include "futil.h" +#include "gromacs/fileio/futil.h" #include "tgroup.h" #include "vec.h" #include "network.h" diff --git a/src/gromacs/mdlib/tpi.c b/src/gromacs/mdlib/tpi.c index 7666a24b7f..cdf55bbeb6 100644 --- a/src/gromacs/mdlib/tpi.c +++ b/src/gromacs/mdlib/tpi.c @@ -43,7 +43,7 @@ #include "sysstuff.h" #include "string2.h" #include "network.h" -#include "confio.h" +#include "gromacs/fileio/confio.h" #include "smalloc.h" #include "nrnb.h" #include "main.h" @@ -74,7 +74,8 @@ #include "ns.h" #include "gmx_wallcycle.h" #include "mtop_util.h" -#include "gmxfio.h" +#include "gromacs/fileio/gmxfio.h" +#include "gromacs/fileio/trxio.h" #include "pme.h" #include "gbutil.h" #include "gromacs/timing/walltime_accounting.h" diff --git a/src/gromacs/mdlib/update.c b/src/gromacs/mdlib/update.c index f720acf159..930044aa78 100644 --- a/src/gromacs/mdlib/update.c +++ b/src/gromacs/mdlib/update.c @@ -50,10 +50,10 @@ #include "macros.h" #include "vec.h" #include "main.h" -#include "confio.h" +#include "gromacs/fileio/confio.h" #include "update.h" #include "gmx_random.h" -#include "futil.h" +#include "gromacs/fileio/futil.h" #include "mshift.h" #include "tgroup.h" #include "force.h" diff --git a/src/gromacs/mdlib/wall.c b/src/gromacs/mdlib/wall.c index 789c35c1fd..32210f7dca 100644 --- a/src/gromacs/mdlib/wall.c +++ b/src/gromacs/mdlib/wall.c @@ -45,7 +45,7 @@ #include "macros.h" #include "smalloc.h" #include "force.h" -#include "filenm.h" +#include "gromacs/fileio/filenm.h" #include "nrnb.h" #include "vec.h" diff --git a/src/gromacs/mdlib/wnblist.c b/src/gromacs/mdlib/wnblist.c index ca4257bbb4..6ef7ed8b9b 100644 --- a/src/gromacs/mdlib/wnblist.c +++ b/src/gromacs/mdlib/wnblist.c @@ -46,10 +46,10 @@ #include "nrnb.h" #include "gmx_fatal.h" #include "macros.h" -#include "futil.h" +#include "gromacs/fileio/futil.h" #include "names.h" #include "domdec.h" -#include "gmxfio.h" +#include "gromacs/fileio/gmxfio.h" #define header "Neighborlist:" diff --git a/src/gromacs/onlinehelp/wman.cpp b/src/gromacs/onlinehelp/wman.cpp index ac09e16792..0967a0331c 100644 --- a/src/gromacs/onlinehelp/wman.cpp +++ b/src/gromacs/onlinehelp/wman.cpp @@ -44,7 +44,8 @@ #include "string2.h" #include "smalloc.h" #include "sysstuff.h" -#include "filenm.h" +#include "gromacs/fileio/filenm.h" +#include "gromacs/fileio/gmxfio.h" #include "macros.h" #include "statutil.h" #include "copyrite.h" diff --git a/src/gromacs/onlinehelp/wman.h b/src/gromacs/onlinehelp/wman.h index 4437408bd6..bd10a7c901 100644 --- a/src/gromacs/onlinehelp/wman.h +++ b/src/gromacs/onlinehelp/wman.h @@ -36,6 +36,7 @@ #define GMX_ONLINEHELP_WMAN_H #include "readinp.h" +#include "gromacs/fileio/filenm.h" #ifdef __cplusplus extern "C" { diff --git a/src/gromacs/options/filenameoption.cpp b/src/gromacs/options/filenameoption.cpp index 66c77a313b..4cd4a5ce42 100644 --- a/src/gromacs/options/filenameoption.cpp +++ b/src/gromacs/options/filenameoption.cpp @@ -45,7 +45,7 @@ #include #include -#include "gromacs/legacyheaders/filenm.h" +#include "gromacs/fileio/filenm.h" #include "gromacs/utility/file.h" #include "gromacs/utility/stringutil.h" diff --git a/src/gromacs/selection/parsetree.cpp b/src/gromacs/selection/parsetree.cpp index b98cbba819..7322ad828a 100644 --- a/src/gromacs/selection/parsetree.cpp +++ b/src/gromacs/selection/parsetree.cpp @@ -225,7 +225,7 @@ #include #include -#include "gromacs/legacyheaders/futil.h" +#include "gromacs/fileio/futil.h" #include "gromacs/legacyheaders/smalloc.h" #include "gromacs/legacyheaders/string2.h" diff --git a/src/gromacs/selection/tests/toputils.cpp b/src/gromacs/selection/tests/toputils.cpp index 36e8c97e9d..3693facba3 100644 --- a/src/gromacs/selection/tests/toputils.cpp +++ b/src/gromacs/selection/tests/toputils.cpp @@ -46,7 +46,8 @@ #include "gromacs/legacyheaders/smalloc.h" #include "gromacs/legacyheaders/statutil.h" #include "gromacs/legacyheaders/string2.h" -#include "gromacs/legacyheaders/tpxio.h" +#include "gromacs/fileio/tpxio.h" +#include "gromacs/fileio/trxio.h" #include "gromacs/legacyheaders/typedefs.h" #include "gromacs/legacyheaders/vec.h" diff --git a/src/gromacs/trajectoryanalysis/analysissettings.cpp b/src/gromacs/trajectoryanalysis/analysissettings.cpp index a0ef813c1c..e6b4798055 100644 --- a/src/gromacs/trajectoryanalysis/analysissettings.cpp +++ b/src/gromacs/trajectoryanalysis/analysissettings.cpp @@ -44,6 +44,7 @@ #include "gromacs/legacyheaders/smalloc.h" #include "gromacs/legacyheaders/statutil.h" #include "gromacs/legacyheaders/vec.h" +#include "gromacs/fileio/trxio.h" #include "gromacs/utility/exceptions.h" diff --git a/src/gromacs/trajectoryanalysis/modules/select.cpp b/src/gromacs/trajectoryanalysis/modules/select.cpp index 6fa093bea2..8fafa9df0d 100644 --- a/src/gromacs/trajectoryanalysis/modules/select.cpp +++ b/src/gromacs/trajectoryanalysis/modules/select.cpp @@ -49,7 +49,8 @@ #include #include -#include "gromacs/legacyheaders/gmxfio.h" +#include "gromacs/fileio/gmxfio.h" +#include "gromacs/fileio/trxio.h" #include "gromacs/legacyheaders/smalloc.h" #include "gromacs/legacyheaders/statutil.h" diff --git a/src/gromacs/trajectoryanalysis/runnercommon.cpp b/src/gromacs/trajectoryanalysis/runnercommon.cpp index 889df25daa..e8944b03f3 100644 --- a/src/gromacs/trajectoryanalysis/runnercommon.cpp +++ b/src/gromacs/trajectoryanalysis/runnercommon.cpp @@ -51,7 +51,9 @@ #include "gromacs/legacyheaders/rmpbc.h" #include "gromacs/legacyheaders/smalloc.h" #include "gromacs/legacyheaders/statutil.h" -#include "gromacs/legacyheaders/tpxio.h" +#include "gromacs/fileio/tpxio.h" +#include "gromacs/fileio/trxio.h" +#include "gromacs/legacyheaders/statutil.h" #include "gromacs/legacyheaders/vec.h" #include "gromacs/options/basicoptions.h" diff --git a/src/gromacs/trajectoryanalysis/runnercommon.h b/src/gromacs/trajectoryanalysis/runnercommon.h index 1fa91049b4..43d3108bc8 100644 --- a/src/gromacs/trajectoryanalysis/runnercommon.h +++ b/src/gromacs/trajectoryanalysis/runnercommon.h @@ -43,7 +43,7 @@ #define GMX_TRAJECTORYANALYSIS_RUNNERCOMMON_H #include "../legacyheaders/types/simple.h" -#include "../legacyheaders/types/trx.h" +#include "gromacs/fileio/trx.h" #include "../utility/common.h" diff --git a/src/gromacs/utility/file.cpp b/src/gromacs/utility/file.cpp index d14005e6b4..432cad04bc 100644 --- a/src/gromacs/utility/file.cpp +++ b/src/gromacs/utility/file.cpp @@ -49,7 +49,7 @@ #include #include -#include "gromacs/legacyheaders/futil.h" +#include "gromacs/fileio/futil.h" #include "gromacs/utility/exceptions.h" #include "gromacs/utility/gmxassert.h" diff --git a/src/gromacs/utility/programinfo.cpp b/src/gromacs/utility/programinfo.cpp index 499abba514..4355c6b1c3 100644 --- a/src/gromacs/utility/programinfo.cpp +++ b/src/gromacs/utility/programinfo.cpp @@ -54,7 +54,7 @@ #include -#include "gromacs/legacyheaders/futil.h" +#include "gromacs/fileio/futil.h" #include "gromacs/legacyheaders/thread_mpi/mutex.h" #include "gromacs/utility/exceptions.h" @@ -123,7 +123,7 @@ ProgramInfo::Impl::Impl(const char *realBinaryName, // Some places in the existing code expect to have DIR_SEPARATOR in all // input paths, but Windows may also give '/' (and does that, e.g., for // tests invoked through CTest). - // When removing this, remove also the #include "futil.h". + // When removing this, remove also the #include "gromacs/fileio/futil.h". if (DIR_SEPARATOR == '\\') { std::replace(fullInvokedProgram_.begin(), fullInvokedProgram_.end(), diff --git a/src/programs/gmx/g_protonate.c b/src/programs/gmx/g_protonate.c index c5fc90e91b..624b1819d5 100644 --- a/src/programs/gmx/g_protonate.c +++ b/src/programs/gmx/g_protonate.c @@ -42,9 +42,10 @@ #include "macros.h" #include "smalloc.h" #include "statutil.h" -#include "confio.h" +#include "gromacs/fileio/confio.h" #include "genhydro.h" -#include "tpxio.h" +#include "gromacs/fileio/tpxio.h" +#include "gromacs/fileio/trxio.h" #include "index.h" #include "vec.h" #include "hackblock.h" diff --git a/src/programs/gmx/g_x2top.c b/src/programs/gmx/g_x2top.c index 253edbf4c1..d86808f9d8 100644 --- a/src/programs/gmx/g_x2top.c +++ b/src/programs/gmx/g_x2top.c @@ -39,12 +39,12 @@ #include "maths.h" #include "macros.h" #include "bondf.h" -#include "gmxfio.h" +#include "gromacs/fileio/gmxfio.h" #include "string2.h" #include "smalloc.h" #include "strdb.h" #include "sysstuff.h" -#include "confio.h" +#include "gromacs/fileio/confio.h" #include "physics.h" #include "statutil.h" #include "vec.h" diff --git a/src/programs/gmx/gmxcheck.c b/src/programs/gmx/gmxcheck.c index 1850a042a5..87fc25b131 100644 --- a/src/programs/gmx/gmxcheck.c +++ b/src/programs/gmx/gmxcheck.c @@ -42,23 +42,24 @@ #include "main.h" #include "macros.h" #include -#include "futil.h" +#include "gromacs/fileio/futil.h" #include "statutil.h" #include "sysstuff.h" #include "txtdump.h" #include "gmx_fatal.h" -#include "gmxfio.h" -#include "trnio.h" -#include "xtcio.h" +#include "gromacs/fileio/gmxfio.h" +#include "gromacs/fileio/trnio.h" +#include "gromacs/fileio/xtcio.h" #include "atomprop.h" #include "vec.h" #include "pbc.h" #include "physics.h" #include "index.h" #include "smalloc.h" -#include "confio.h" -#include "enxio.h" -#include "tpxio.h" +#include "gromacs/fileio/confio.h" +#include "gromacs/fileio/enxio.h" +#include "gromacs/fileio/tpxio.h" +#include "gromacs/fileio/trxio.h" #include "names.h" #include "mtop_util.h" diff --git a/src/programs/gmx/gmxdump.c b/src/programs/gmx/gmxdump.c index 05f7fba037..6232cd1a7f 100644 --- a/src/programs/gmx/gmxdump.c +++ b/src/programs/gmx/gmxdump.c @@ -42,18 +42,18 @@ #include #include "main.h" #include "macros.h" -#include "futil.h" +#include "gromacs/fileio/futil.h" #include "statutil.h" #include "sysstuff.h" #include "txtdump.h" #include "gmx_fatal.h" -#include "xtcio.h" -#include "enxio.h" +#include "gromacs/fileio/xtcio.h" +#include "gromacs/fileio/enxio.h" #include "smalloc.h" #include "names.h" -#include "gmxfio.h" -#include "tpxio.h" -#include "trnio.h" +#include "gromacs/fileio/gmxfio.h" +#include "gromacs/fileio/tpxio.h" +#include "gromacs/fileio/trnio.h" #include "txtdump.h" #include "gmxcpp.h" #include "checkpoint.h" diff --git a/src/programs/gmx/grompp.c b/src/programs/gmx/grompp.c index 08fad61945..2a60d29ef1 100644 --- a/src/programs/gmx/grompp.c +++ b/src/programs/gmx/grompp.c @@ -50,14 +50,14 @@ #include "readir.h" #include "toputil.h" #include "topio.h" -#include "confio.h" +#include "gromacs/fileio/confio.h" #include "readir.h" #include "symtab.h" #include "names.h" #include "grompp.h" #include "random.h" #include "vec.h" -#include "futil.h" +#include "gromacs/fileio/futil.h" #include "statutil.h" #include "splitter.h" #include "sortwater.h" @@ -65,14 +65,15 @@ #include "gmx_fatal.h" #include "warninp.h" #include "index.h" -#include "gmxfio.h" -#include "trnio.h" -#include "tpxio.h" +#include "gromacs/fileio/gmxfio.h" +#include "gromacs/fileio/trnio.h" +#include "gromacs/fileio/tpxio.h" +#include "gromacs/fileio/trxio.h" #include "vsite_parm.h" #include "txtdump.h" #include "calcgrid.h" #include "add_par.h" -#include "enxio.h" +#include "gromacs/fileio/enxio.h" #include "perf_est.h" #include "compute_io.h" #include "gpp_atomtype.h" diff --git a/src/programs/gmx/hizzie.c b/src/programs/gmx/hizzie.c index f2f37fc6f6..a4b682d7a4 100644 --- a/src/programs/gmx/hizzie.c +++ b/src/programs/gmx/hizzie.c @@ -40,7 +40,7 @@ #include #include #include "typedefs.h" -#include "pdbio.h" +#include "gromacs/fileio/pdbio.h" #include "smalloc.h" #include "vec.h" #include "physics.h" diff --git a/src/programs/gmx/nm2type.c b/src/programs/gmx/nm2type.c index 5aeab36bbd..b8c1920c3c 100644 --- a/src/programs/gmx/nm2type.c +++ b/src/programs/gmx/nm2type.c @@ -43,7 +43,7 @@ #include "string2.h" #include "smalloc.h" #include "sysstuff.h" -#include "confio.h" +#include "gromacs/fileio/confio.h" #include "physics.h" #include "statutil.h" #include "vec.h" diff --git a/src/programs/gmx/pdb2gmx.c b/src/programs/gmx/pdb2gmx.c index 4f4545f6af..90f2abf3d8 100644 --- a/src/programs/gmx/pdb2gmx.c +++ b/src/programs/gmx/pdb2gmx.c @@ -41,17 +41,17 @@ #include #include "sysstuff.h" #include "typedefs.h" -#include "gmxfio.h" +#include "gromacs/fileio/gmxfio.h" #include "smalloc.h" #include "copyrite.h" #include "string2.h" -#include "confio.h" +#include "gromacs/fileio/confio.h" #include "symtab.h" #include "vec.h" #include "statutil.h" -#include "futil.h" +#include "gromacs/fileio/futil.h" #include "gmx_fatal.h" -#include "pdbio.h" +#include "gromacs/fileio/pdbio.h" #include "toputil.h" #include "h_db.h" #include "physics.h" diff --git a/src/programs/gmx/specbond.c b/src/programs/gmx/specbond.c index 9d0a937b69..85007eee38 100644 --- a/src/programs/gmx/specbond.c +++ b/src/programs/gmx/specbond.c @@ -39,7 +39,7 @@ #include #include #include "typedefs.h" -#include "pdbio.h" +#include "gromacs/fileio/pdbio.h" #include "strdb.h" #include "string2.h" #include "smalloc.h" diff --git a/src/programs/gmx/tomorse.c b/src/programs/gmx/tomorse.c index 708b18a824..5da5356434 100644 --- a/src/programs/gmx/tomorse.c +++ b/src/programs/gmx/tomorse.c @@ -43,7 +43,7 @@ #include "typedefs.h" #include "string2.h" #include "grompp.h" -#include "futil.h" +#include "gromacs/fileio/futil.h" #include "smalloc.h" #include "toputil.h" #include "gmx_fatal.h" diff --git a/src/programs/gmx/tpbcmp.c b/src/programs/gmx/tpbcmp.c index fd03f9ac11..7f1ea2f776 100644 --- a/src/programs/gmx/tpbcmp.c +++ b/src/programs/gmx/tpbcmp.c @@ -43,14 +43,15 @@ #include "main.h" #include "macros.h" #include "smalloc.h" -#include "futil.h" +#include "gromacs/fileio/futil.h" #include "statutil.h" #include "sysstuff.h" #include "txtdump.h" #include "gmx_fatal.h" #include "names.h" -#include "tpxio.h" -#include "enxio.h" +#include "gromacs/fileio/tpxio.h" +#include "gromacs/fileio/trxio.h" +#include "gromacs/fileio/enxio.h" #include "mtop_util.h" #include "string2.h" diff --git a/src/programs/gmx/tpbconv.c b/src/programs/gmx/tpbconv.c index f07eba1367..bc2a1eb66e 100644 --- a/src/programs/gmx/tpbconv.c +++ b/src/programs/gmx/tpbconv.c @@ -46,12 +46,12 @@ #include "macros.h" #include "names.h" #include "typedefs.h" -#include "tpxio.h" -#include "trnio.h" -#include "enxio.h" +#include "gromacs/fileio/tpxio.h" +#include "gromacs/fileio/trnio.h" +#include "gromacs/fileio/enxio.h" #include "readir.h" #include "statutil.h" -#include "futil.h" +#include "gromacs/fileio/futil.h" #include "vec.h" #include "mtop_util.h" #include "random.h" diff --git a/src/programs/gmx/xlate.c b/src/programs/gmx/xlate.c index d50f48850d..036b8a0ea4 100644 --- a/src/programs/gmx/xlate.c +++ b/src/programs/gmx/xlate.c @@ -45,7 +45,7 @@ #include "smalloc.h" #include "symtab.h" #include "index.h" -#include "futil.h" +#include "gromacs/fileio/futil.h" #include "fflibutil.h" #include "hackblock.h" #include "gmx_fatal.h" diff --git a/src/programs/mdrun/md.c b/src/programs/mdrun/md.c index 504a4ba514..b0d77e332d 100644 --- a/src/programs/mdrun/md.c +++ b/src/programs/mdrun/md.c @@ -49,12 +49,12 @@ #include "vsite.h" #include "update.h" #include "ns.h" -#include "trnio.h" -#include "xtcio.h" +#include "gromacs/fileio/trnio.h" +#include "gromacs/fileio/xtcio.h" #include "mdrun.h" #include "md_support.h" #include "md_logging.h" -#include "confio.h" +#include "gromacs/fileio/confio.h" #include "network.h" #include "pull.h" #include "xvgr.h" @@ -89,6 +89,8 @@ #include "nbnxn_cuda_data_mgmt.h" #include "gromacs/utility/gmxmpi.h" +#include "gromacs/fileio/trajectory_writing.h" +#include "gromacs/fileio/trxio.h" #include "gromacs/timing/walltime_accounting.h" #ifdef GMX_FAHCORE diff --git a/src/programs/mdrun/mdrun.cpp b/src/programs/mdrun/mdrun.cpp index f98dea1622..25b80d99a1 100644 --- a/src/programs/mdrun/mdrun.cpp +++ b/src/programs/mdrun/mdrun.cpp @@ -43,7 +43,7 @@ #include "gromacs/legacyheaders/checkpoint.h" #include "gromacs/legacyheaders/copyrite.h" -#include "gromacs/legacyheaders/filenm.h" +#include "gromacs/fileio/filenm.h" #include "gromacs/legacyheaders/gmx_fatal.h" #include "gromacs/legacyheaders/macros.h" #include "gromacs/legacyheaders/main.h" diff --git a/src/programs/mdrun/membed.c b/src/programs/mdrun/membed.c index a9468e8a9e..94ef5cd5f7 100644 --- a/src/programs/mdrun/membed.c +++ b/src/programs/mdrun/membed.c @@ -45,13 +45,13 @@ #include "statutil.h" #include "macros.h" #include "main.h" -#include "futil.h" +#include "gromacs/fileio/futil.h" #include "edsam.h" #include "index.h" #include "physics.h" #include "names.h" #include "mtop_util.h" -#include "tpxio.h" +#include "gromacs/fileio/tpxio.h" #include "string2.h" #include "membed.h" #include "pbc.h" diff --git a/src/programs/mdrun/runner.c b/src/programs/mdrun/runner.c index 5bac378eb4..3b3d98356a 100644 --- a/src/programs/mdrun/runner.c +++ b/src/programs/mdrun/runner.c @@ -70,7 +70,7 @@ #include "checkpoint.h" #include "mtop_util.h" #include "sighandler.h" -#include "tpxio.h" +#include "gromacs/fileio/tpxio.h" #include "txtdump.h" #include "gmx_detect_hardware.h" #include "gmx_omp_nthreads.h" diff --git a/src/programs/view/dialogs.cpp b/src/programs/view/dialogs.cpp index 4f6515bff4..c545c70f4b 100644 --- a/src/programs/view/dialogs.cpp +++ b/src/programs/view/dialogs.cpp @@ -47,7 +47,7 @@ #include "names.h" #include "nmol.h" #include "manager.h" -#include "futil.h" +#include "gromacs/fileio/futil.h" #include "gmx_fatal.h" #define MBFLAGS /* MB_APPLMODAL | */ MB_DONTSHOW diff --git a/src/programs/view/fgrid.cpp b/src/programs/view/fgrid.cpp index a8ca085246..7a6d3312f4 100644 --- a/src/programs/view/fgrid.cpp +++ b/src/programs/view/fgrid.cpp @@ -43,7 +43,7 @@ #include "string2.h" #include "smalloc.h" #include "fgrid.h" -#include "futil.h" +#include "gromacs/fileio/futil.h" static const char *type[] = { "button", "radiobuttons", "groupbox", "checkbox", diff --git a/src/programs/view/filter.cpp b/src/programs/view/filter.cpp index a9cec7e0b5..149736581a 100644 --- a/src/programs/view/filter.cpp +++ b/src/programs/view/filter.cpp @@ -38,7 +38,7 @@ #include #include "sysstuff.h" -#include "futil.h" +#include "gromacs/fileio/futil.h" #include "smalloc.h" #include "macros.h" #include "index.h" diff --git a/src/programs/view/manager.cpp b/src/programs/view/manager.cpp index 63e42164ee..2d17c958a7 100644 --- a/src/programs/view/manager.cpp +++ b/src/programs/view/manager.cpp @@ -42,13 +42,13 @@ #include #include #include -#include +#include "gromacs/fileio/tpxio.h" #include #include #include #include #include "manager.h" -#include "futil.h" +#include "gromacs/fileio/futil.h" #include "pbc.h" #include "nmol.h" #include "copyrite.h" diff --git a/src/programs/view/manager.h b/src/programs/view/manager.h index 4a15076490..717a470f94 100644 --- a/src/programs/view/manager.h +++ b/src/programs/view/manager.h @@ -45,6 +45,7 @@ #include "buttons.h" #include "statutil.h" #include "rmpbc.h" +#include "gromacs/fileio/trxio.h" /* Some window sizes */ #define EWIDTH 200 diff --git a/src/programs/view/view.cpp b/src/programs/view/view.cpp index b640e4dd3a..b5d0613d56 100644 --- a/src/programs/view/view.cpp +++ b/src/programs/view/view.cpp @@ -47,8 +47,8 @@ #include "string2.h" #include "statutil.h" #include "copyrite.h" -#include "confio.h" -#include "tpxio.h" +#include "gromacs/fileio/confio.h" +#include "gromacs/fileio/tpxio.h" #ifdef HAVE_X11 diff --git a/tests/CppCheck.cmake b/tests/CppCheck.cmake index 10ec04a830..2bf81cf212 100644 --- a/tests/CppCheck.cmake +++ b/tests/CppCheck.cmake @@ -86,7 +86,7 @@ if (CPPCHECK_EXECUTABLE AND UNIX) -D__cplusplus --suppress=variableScope --suppress=unnecessaryForwardDeclaration - --suppress=invalidscanf:src/gromacs/gmxlib/matio.cpp + --suppress=invalidscanf:src/gromacs/fileio/matio.cpp --suppress=invalidscanf:src/gromacs/gmxlib/xvgr.cpp --suppress=invalidscanf:src/gromacs/gmxpreprocess/pdb2top.cpp --suppress=*:src/gromacs/selection/scanner.cpp)