Create fileio module
authorMark Abraham <mark.j.abraham@gmail.com>
Tue, 17 Sep 2013 08:07:13 +0000 (10:07 +0200)
committerGerrit Code Review <gerrit@gerrit.gromacs.org>
Mon, 28 Oct 2013 17:36:13 +0000 (18:36 +0100)
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

265 files changed:
share/html/online/xtc.html
src/contrib/anaf.c
src/contrib/compnl.c
src/contrib/do_multiprot.c
src/contrib/do_shift.c
src/contrib/ehanal.c
src/contrib/ehdata.c
src/contrib/ehole.c
src/contrib/g_anavel.c
src/contrib/gmx_sdf.c
src/contrib/hexamer.c
src/contrib/hrefify.c
src/contrib/mkice.c
src/contrib/pmetest.c
src/contrib/test.c
src/contrib/testlr.c
src/contrib/testxml.c
src/gromacs/CMakeLists.txt
src/gromacs/analysisdata/modules/plot.cpp
src/gromacs/fileio/CMakeLists.txt [new file with mode: 0644]
src/gromacs/fileio/confio.c [moved from src/gromacs/gmxlib/confio.c with 97% similarity]
src/gromacs/fileio/confio.h [moved from src/gromacs/legacyheaders/confio.h with 66% similarity]
src/gromacs/fileio/enxio.c [moved from src/gromacs/gmxlib/enxio.c with 95% similarity]
src/gromacs/fileio/enxio.h [moved from src/gromacs/legacyheaders/enxio.h with 78% similarity]
src/gromacs/fileio/filenm.c [moved from src/gromacs/gmxlib/filenm.c with 91% similarity]
src/gromacs/fileio/filenm.h [moved from src/gromacs/legacyheaders/filenm.h with 60% similarity]
src/gromacs/fileio/futil.cpp [moved from src/gromacs/gmxlib/futil.cpp with 95% similarity]
src/gromacs/fileio/futil.h [moved from src/gromacs/legacyheaders/futil.h with 74% similarity]
src/gromacs/fileio/gmx_system_xdr.c [moved from src/gromacs/gmxlib/gmx_system_xdr.c with 92% similarity]
src/gromacs/fileio/gmx_system_xdr.h [moved from src/gromacs/legacyheaders/gmx_system_xdr.h with 82% similarity]
src/gromacs/fileio/gmxfio.c [moved from src/gromacs/gmxlib/gmxfio.c with 94% similarity]
src/gromacs/fileio/gmxfio.h [moved from src/gromacs/legacyheaders/gmxfio.h with 93% similarity]
src/gromacs/fileio/gmxfio_asc.c [moved from src/gromacs/gmxlib/gmxfio_asc.c with 88% similarity]
src/gromacs/fileio/gmxfio_bin.c [moved from src/gromacs/gmxlib/gmxfio_bin.c with 77% similarity]
src/gromacs/fileio/gmxfio_int.h [moved from src/gromacs/gmxlib/gmxfio_int.h with 70% similarity]
src/gromacs/fileio/gmxfio_rw.c [moved from src/gromacs/gmxlib/gmxfio_rw.c with 94% similarity]
src/gromacs/fileio/gmxfio_xdr.c [moved from src/gromacs/gmxlib/gmxfio_xdr.c with 85% similarity]
src/gromacs/fileio/libxdrf.c [moved from src/gromacs/gmxlib/libxdrf.c with 96% similarity]
src/gromacs/fileio/matio.cpp [moved from src/gromacs/gmxlib/matio.cpp with 95% similarity]
src/gromacs/fileio/matio.h [moved from src/gromacs/legacyheaders/matio.h with 71% similarity]
src/gromacs/fileio/mdoutf.c [new file with mode: 0644]
src/gromacs/fileio/mdoutf.h [new file with mode: 0644]
src/gromacs/fileio/pdbio.c [moved from src/gromacs/gmxlib/pdbio.c with 94% similarity]
src/gromacs/fileio/pdbio.h [moved from src/gromacs/legacyheaders/pdbio.h with 70% similarity]
src/gromacs/fileio/tpxio.c [moved from src/gromacs/gmxlib/tpxio.c with 98% similarity]
src/gromacs/fileio/tpxio.h [moved from src/gromacs/legacyheaders/tpxio.h with 74% similarity]
src/gromacs/fileio/trajectory_writing.c [moved from src/programs/mdrun/trajectory_writing.c with 74% similarity]
src/gromacs/fileio/trajectory_writing.h [new file with mode: 0644]
src/gromacs/fileio/trajectory_writing_low_level.c [new file with mode: 0644]
src/gromacs/fileio/trnio.c [moved from src/gromacs/gmxlib/trnio.c with 84% similarity]
src/gromacs/fileio/trnio.h [moved from src/gromacs/legacyheaders/trnio.h with 72% similarity]
src/gromacs/fileio/trx.h [moved from src/gromacs/legacyheaders/types/trx.h with 63% similarity]
src/gromacs/fileio/trxio.c [moved from src/gromacs/gmxlib/trxio.c with 92% similarity]
src/gromacs/fileio/trxio.h [new file with mode: 0644]
src/gromacs/fileio/vmdio.c [moved from src/gromacs/gmxlib/vmdio.c with 89% similarity]
src/gromacs/fileio/vmdio.h [new file with mode: 0644]
src/gromacs/fileio/xdrd.c [moved from src/gromacs/gmxlib/xdrd.c with 63% similarity]
src/gromacs/fileio/xdrf.h [moved from src/gromacs/legacyheaders/xdrf.h with 60% similarity]
src/gromacs/fileio/xtcio.c [moved from src/gromacs/gmxlib/xtcio.c with 78% similarity]
src/gromacs/fileio/xtcio.h [moved from src/gromacs/legacyheaders/xtcio.h with 50% similarity]
src/gromacs/gmxana/anadih.c
src/gromacs/gmxana/autocorr.c
src/gromacs/gmxana/cmat.c
src/gromacs/gmxana/eigio.c
src/gromacs/gmxana/expfit.c
src/gromacs/gmxana/gmx_anadock.c
src/gromacs/gmxana/gmx_anaeig.c
src/gromacs/gmxana/gmx_analyze.c
src/gromacs/gmxana/gmx_angle.c
src/gromacs/gmxana/gmx_bar.c
src/gromacs/gmxana/gmx_bundle.c
src/gromacs/gmxana/gmx_chi.c
src/gromacs/gmxana/gmx_cluster.c
src/gromacs/gmxana/gmx_clustsize.c
src/gromacs/gmxana/gmx_confrms.c
src/gromacs/gmxana/gmx_covar.c
src/gromacs/gmxana/gmx_current.c
src/gromacs/gmxana/gmx_density.c
src/gromacs/gmxana/gmx_densmap.c
src/gromacs/gmxana/gmx_densorder.cpp
src/gromacs/gmxana/gmx_dielectric.c
src/gromacs/gmxana/gmx_dipoles.cpp
src/gromacs/gmxana/gmx_disre.c
src/gromacs/gmxana/gmx_do_dssp.c
src/gromacs/gmxana/gmx_dos.c
src/gromacs/gmxana/gmx_dyecoupl.c
src/gromacs/gmxana/gmx_dyndom.c
src/gromacs/gmxana/gmx_editconf.c
src/gromacs/gmxana/gmx_eneconv.c
src/gromacs/gmxana/gmx_enemat.c
src/gromacs/gmxana/gmx_energy.c
src/gromacs/gmxana/gmx_filter.c
src/gromacs/gmxana/gmx_genbox.cpp
src/gromacs/gmxana/gmx_genconf.c
src/gromacs/gmxana/gmx_genion.c
src/gromacs/gmxana/gmx_genpr.c
src/gromacs/gmxana/gmx_gyrate.c
src/gromacs/gmxana/gmx_h2order.c
src/gromacs/gmxana/gmx_hbond.c
src/gromacs/gmxana/gmx_helix.c
src/gromacs/gmxana/gmx_helixorient.c
src/gromacs/gmxana/gmx_hydorder.c
src/gromacs/gmxana/gmx_kinetics.c
src/gromacs/gmxana/gmx_lie.c
src/gromacs/gmxana/gmx_make_edi.c
src/gromacs/gmxana/gmx_make_ndx.c
src/gromacs/gmxana/gmx_mdmat.c
src/gromacs/gmxana/gmx_mindist.c
src/gromacs/gmxana/gmx_mk_angndx.c
src/gromacs/gmxana/gmx_morph.c
src/gromacs/gmxana/gmx_msd.c
src/gromacs/gmxana/gmx_nmeig.c
src/gromacs/gmxana/gmx_nmens.c
src/gromacs/gmxana/gmx_nmtraj.c
src/gromacs/gmxana/gmx_order.c
src/gromacs/gmxana/gmx_pme_error.cpp
src/gromacs/gmxana/gmx_polystat.c
src/gromacs/gmxana/gmx_potential.c
src/gromacs/gmxana/gmx_principal.c
src/gromacs/gmxana/gmx_rama.c
src/gromacs/gmxana/gmx_rdf.c
src/gromacs/gmxana/gmx_rms.c
src/gromacs/gmxana/gmx_rmsdist.c
src/gromacs/gmxana/gmx_rmsf.c
src/gromacs/gmxana/gmx_rotacf.c
src/gromacs/gmxana/gmx_rotmat.c
src/gromacs/gmxana/gmx_saltbr.c
src/gromacs/gmxana/gmx_sans.c
src/gromacs/gmxana/gmx_sas.c
src/gromacs/gmxana/gmx_saxs.c
src/gromacs/gmxana/gmx_sham.c
src/gromacs/gmxana/gmx_sigeps.c
src/gromacs/gmxana/gmx_sorient.c
src/gromacs/gmxana/gmx_spatial.c
src/gromacs/gmxana/gmx_spol.c
src/gromacs/gmxana/gmx_tcaf.c
src/gromacs/gmxana/gmx_traj.c
src/gromacs/gmxana/gmx_trjcat.c
src/gromacs/gmxana/gmx_trjconv.c
src/gromacs/gmxana/gmx_trjorder.c
src/gromacs/gmxana/gmx_tune_pme.c
src/gromacs/gmxana/gmx_vanhove.c
src/gromacs/gmxana/gmx_velacc.c
src/gromacs/gmxana/gmx_wham.cpp
src/gromacs/gmxana/gmx_wheel.c
src/gromacs/gmxana/gmx_xpm2ps.c
src/gromacs/gmxana/nsfactor.c
src/gromacs/gmxana/powerspect.c
src/gromacs/gmxana/pp2shift.c
src/gromacs/gmxlib/atomprop.c
src/gromacs/gmxlib/checkpoint.c
src/gromacs/gmxlib/copyrite.cpp
src/gromacs/gmxlib/disre.c
src/gromacs/gmxlib/ewald_util.c
src/gromacs/gmxlib/gmx_fatal.c
src/gromacs/gmxlib/gmxcpp.c
src/gromacs/gmxlib/index.c
src/gromacs/gmxlib/main.cpp
src/gromacs/gmxlib/mshift.c
src/gromacs/gmxlib/nrama.c
src/gromacs/gmxlib/readinp.c
src/gromacs/gmxlib/rmpbc.c
src/gromacs/gmxlib/sfactor.c
src/gromacs/gmxlib/statutil.cpp
src/gromacs/gmxlib/strdb.c
src/gromacs/gmxlib/string2.c
src/gromacs/gmxlib/tcontrol.c
src/gromacs/gmxlib/viewit.c
src/gromacs/gmxlib/vmdio.h [deleted file]
src/gromacs/gmxlib/writeps.c
src/gromacs/gmxlib/xvgr.cpp
src/gromacs/gmxpreprocess/fflibutil.cpp
src/gromacs/gmxpreprocess/gen_ad.c
src/gromacs/gmxpreprocess/gen_vsite.c
src/gromacs/gmxpreprocess/genhydro.c
src/gromacs/gmxpreprocess/genhydro.h
src/gromacs/gmxpreprocess/h_db.c
src/gromacs/gmxpreprocess/pdb2top.cpp
src/gromacs/gmxpreprocess/readpull.c
src/gromacs/gmxpreprocess/readrot.c
src/gromacs/gmxpreprocess/resall.c
src/gromacs/gmxpreprocess/ter_db.c
src/gromacs/gmxpreprocess/topio.c
src/gromacs/legacyheaders/checkpoint.h
src/gromacs/legacyheaders/ebin.h
src/gromacs/legacyheaders/gstat.h
src/gromacs/legacyheaders/hackblock.h
src/gromacs/legacyheaders/main.h
src/gromacs/legacyheaders/mdebin.h
src/gromacs/legacyheaders/mdrun.h
src/gromacs/legacyheaders/nrama.h
src/gromacs/legacyheaders/sim_util.h
src/gromacs/legacyheaders/statutil.h
src/gromacs/legacyheaders/txtdump.h
src/gromacs/legacyheaders/typedefs.h
src/gromacs/legacyheaders/types/filenm.h [deleted file]
src/gromacs/legacyheaders/viewit.h
src/gromacs/linearalgebra/mtxio.c
src/gromacs/mdlib/clincs.c
src/gromacs/mdlib/constr.c
src/gromacs/mdlib/domdec.c
src/gromacs/mdlib/edsam.c
src/gromacs/mdlib/ewald.c
src/gromacs/mdlib/expanded.c
src/gromacs/mdlib/genborn.c
src/gromacs/mdlib/genborn_sse2_double.c
src/gromacs/mdlib/genborn_sse2_single.c
src/gromacs/mdlib/init.c
src/gromacs/mdlib/mdebin.c
src/gromacs/mdlib/mdebin_bar.c
src/gromacs/mdlib/minimize.c
src/gromacs/mdlib/nbnxn_search.c
src/gromacs/mdlib/nsgrid.c
src/gromacs/mdlib/pme.c
src/gromacs/mdlib/pull.c
src/gromacs/mdlib/pull_rotation.c
src/gromacs/mdlib/pullutil.c
src/gromacs/mdlib/qm_gamess.c
src/gromacs/mdlib/qm_gaussian.c
src/gromacs/mdlib/qm_mopac.c
src/gromacs/mdlib/qm_orca.c
src/gromacs/mdlib/qmmm.c
src/gromacs/mdlib/sim_util.c
src/gromacs/mdlib/stat.c
src/gromacs/mdlib/tables.c
src/gromacs/mdlib/tgroup.c
src/gromacs/mdlib/tpi.c
src/gromacs/mdlib/update.c
src/gromacs/mdlib/wall.c
src/gromacs/mdlib/wnblist.c
src/gromacs/onlinehelp/wman.cpp
src/gromacs/onlinehelp/wman.h
src/gromacs/options/filenameoption.cpp
src/gromacs/selection/parsetree.cpp
src/gromacs/selection/tests/toputils.cpp
src/gromacs/trajectoryanalysis/analysissettings.cpp
src/gromacs/trajectoryanalysis/modules/select.cpp
src/gromacs/trajectoryanalysis/runnercommon.cpp
src/gromacs/trajectoryanalysis/runnercommon.h
src/gromacs/utility/file.cpp
src/gromacs/utility/programinfo.cpp
src/programs/gmx/g_protonate.c
src/programs/gmx/g_x2top.c
src/programs/gmx/gmxcheck.c
src/programs/gmx/gmxdump.c
src/programs/gmx/grompp.c
src/programs/gmx/hizzie.c
src/programs/gmx/nm2type.c
src/programs/gmx/pdb2gmx.c
src/programs/gmx/specbond.c
src/programs/gmx/tomorse.c
src/programs/gmx/tpbcmp.c
src/programs/gmx/tpbconv.c
src/programs/gmx/xlate.c
src/programs/mdrun/md.c
src/programs/mdrun/mdrun.cpp
src/programs/mdrun/membed.c
src/programs/mdrun/runner.c
src/programs/view/dialogs.cpp
src/programs/view/fgrid.cpp
src/programs/view/filter.cpp
src/programs/view/manager.cpp
src/programs/view/manager.h
src/programs/view/view.cpp
tests/CppCheck.cmake

index 971d80c77081c2615702e9e78afe2334e14aacf8..25faf96f4e210acdba78f7f8ae60ded144083b42 100644 (file)
@@ -69,7 +69,7 @@ extern int write_xtc(XDR *xd,
                     matrix box,rvec *x,real prec);
 /* Write a frame to xtc file */
 </pre>
-To use the library function include <tt>"xtcio.h"</tt> 
+To use the library function include <tt>"gromacs/fileio/xtcio.h"</tt> 
 in your file and link with <tt>-lgmx.$(CPU)</tt>
 <p>
 
index d5d352959d82d07eeec327283bd607c616d66089..b2611d5e836a4a8c436b060088d5927511231970 100644 (file)
 #include <math.h>
 #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"
 
index 648a6c84706f2f262946261e6750115ffd45430e..d983eca6017d53e2e3114b7d87bb690f07dbbb30 100644 (file)
 #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"
 
index 3477e9e5a8c79d3a903787fcda4f861336bfaaff..127cd43b3a8ced78e38a517626c40ecb91949d4b 100644 (file)
 #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; 
index 7b4fa42802ea8f61d965584be244d005c77ea765..a6a06ab79105e7410d722ce40d6eda6a38fde7b6 100644 (file)
 #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)
 {
index 264afb8de76e98fa032289799ff95db3714f2ee7..e7662de6de4a8f4126316b30ff92937e1d9da259 100644 (file)
 #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)
 {
index 2b5c6400631dc9eafbf878694e51660009117527..d1e8b571f6fd081561807d4a3dcfc05b05017e3d 100644 (file)
@@ -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"
 
index a6817d423622b6e1f0a017ebc258f3a60a7652b7..a9b33e5da63db5e1d537662a15a888fc52c0863b 100644 (file)
@@ -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"
index eb7656c65b4a0444a50d9616d88296df77374b07..cd00f75cd1712079e445edd2e854b51d200c43ab 100644 (file)
 #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[])
 {
index 62f66a9e47f0aeb394eb7c2f798d622d247605c5..4679657883753253a735ab9abdb818414dbe5532 100644 (file)
 #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"
 
 
index 2a264c113ac18e150e954c565dfa24e5f3c832aa..e0a35f3e5a0b008d98f60c3dcf5be6208dfd5cf2 100644 (file)
@@ -39,8 +39,8 @@
 #include <math.h>
 #include <string.h>
 #include <ctype.h>
-#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"
index d9d02944c967e65aac011ed4c23ac94776493bdc..51158cce2f6e08424d28609297877e60b2fb5ffb 100644 (file)
 #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)
index f9ee5bf48e25df27606744137cd8493a115da73a..c07ae87868b0e44af0268f1f24942918632aa3d8 100644 (file)
@@ -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"
 #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
index 4c248be8fc89d4b4d7fcd6bfeefe53304906aa78..0db918ca843c5c8a1d3aa6ab3aa75ded1310cd99 100644 (file)
@@ -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"
index 1f88caa1b0182f0f8efaf53ad083a88e65430f2f..8b28c3a37e96b1d5a40ab9f109d265debdcad769 100644 (file)
@@ -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)
 {
index 86fc1d4d28df9c804dd21abc9c3ef2567be956d7..ed92684790ea0371f0f27148a7bbaa28956ed591 100644 (file)
@@ -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"
index e1d1bdbdcb4e72da78116483c2d72b97aa4fc187..3c742b44d53b6de77db1196460deda18157c7893 100644 (file)
@@ -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[])
 {
index 32a82ff0f259b8ff03c33c7aabdc890573e70f18..3b40dbc374d1653514512b6ae5f59155d09d6f96 100644 (file)
@@ -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)
index 7b07ae11674328257a5d3cf82d937c4123bcc908..da30bc44f2f4d086117db8e4c581333723d854c5 100644 (file)
@@ -49,7 +49,7 @@
 
 #include <boost/shared_ptr.hpp>
 
-#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 (file)
index 0000000..bf84268
--- /dev/null
@@ -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)
similarity index 97%
rename from src/gromacs/gmxlib/confio.c
rename to src/gromacs/fileio/confio.c
index 8159c7442fe3973a045d16c8d05dea5f4896a562..4cd8a4bdfe3bf361f5d7ba76a57bffd40bc23715 100644 (file)
@@ -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 <config.h>
@@ -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"
similarity index 66%
rename from src/gromacs/legacyheaders/confio.h
rename to src/gromacs/fileio/confio.h
index 04900a88ca148ecf19587eef4fdf1b4b4a27fac4..b1d37770d8d43bfab0b6ed8a7be8d4b6961b24c1 100644 (file)
@@ -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 */
similarity index 95%
rename from src/gromacs/gmxlib/enxio.c
rename to src/gromacs/fileio/enxio.c
index a297697d7174a81d2656ae9eb98a3d7bb17ddc81..ba9b0c8f9d7c00e7fa6b858cfbc525c9cde97fd7 100644 (file)
@@ -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 <config.h>
@@ -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;
similarity index 78%
rename from src/gromacs/legacyheaders/enxio.h
rename to src/gromacs/fileio/enxio.h
index 529ac63a1bf0360a8364a032cd2b799b7ee48090..6a7b27505db4282aa1c1bf3a7dbc8a1cb166a6d4 100644 (file)
@@ -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 */
similarity index 91%
rename from src/gromacs/gmxlib/filenm.c
rename to src/gromacs/fileio/filenm.c
index 1f96cc160f3f3874e4fe65e0416f8f277cfebf8e..f51ea4e50cd965a45b7a6cdfeffce82f16a341f5 100644 (file)
@@ -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 <config.h>
 #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);
similarity index 60%
rename from src/gromacs/legacyheaders/filenm.h
rename to src/gromacs/fileio/filenm.h
index dd708e4e768dbaad5af7efa1615581aa7bf4772b..49725e7e32e0a2694df54f79ceb5f2ce79bc21d2 100644 (file)
@@ -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"
 
 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 */
similarity index 95%
rename from src/gromacs/gmxlib/futil.cpp
rename to src/gromacs/fileio/futil.cpp
index a1fb7aa930093b99bb233a324b5bf7092a3dd6f1..8f571e12bf8f545d09b3a5e836332dbcd39882dd 100644 (file)
@@ -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 <config.h>
similarity index 74%
rename from src/gromacs/legacyheaders/futil.h
rename to src/gromacs/fileio/futil.h
index 23fe9946b8ae83f08ea7b27066ac3d6c1ea2edd2..8e644085a0f8a4f133a2aec34045ccf0730553ae 100644 (file)
@@ -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 <stdio.h>
-#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 */
similarity index 92%
rename from src/gromacs/gmxlib/gmx_system_xdr.c
rename to src/gromacs/fileio/gmx_system_xdr.c
index 71b6abd5879f9cff0db214519e8bc01cfdeae873..00155532e84aafa340b5453530b62f2a7928631a 100644 (file)
@@ -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 <config.h>
similarity index 82%
rename from src/gromacs/legacyheaders/gmx_system_xdr.h
rename to src/gromacs/fileio/gmx_system_xdr.h
index e096ed63f7093fb8f89c5a2bedf63fe9f8d6ba9f..23e156bec7eb487375a8950afacc98d5435abdee 100644 (file)
@@ -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 <limits.h>
 #include <stdio.h>
@@ -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 */
similarity index 94%
rename from src/gromacs/gmxlib/gmxfio.c
rename to src/gromacs/fileio/gmxfio.c
index d8d3110461989a8e23eeee3d573d187a4ec16cfb..700c84c2bea3181c55bc4bcfc45a018263268d39 100644 (file)
@@ -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 <config.h>
similarity index 93%
rename from src/gromacs/legacyheaders/gmxfio.h
rename to src/gromacs/fileio/gmxfio.h
index ac612cec68cbb025ec1c6c352f8f4571dccc9c37..ed8d354247191e434fa73489e7d847a6690530f7 100644 (file)
@@ -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 <stdio.h>
 #include "sysstuff.h"
similarity index 88%
rename from src/gromacs/gmxlib/gmxfio_asc.c
rename to src/gromacs/fileio/gmxfio_asc.c
index 33ac9f5d813eac387bf6f46a80e36b03e5367315..c02cab30c5ff0228b4d262a3f652b6326cb98bd8 100644 (file)
@@ -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.
  */
 
 
similarity index 77%
rename from src/gromacs/gmxlib/gmxfio_bin.c
rename to src/gromacs/fileio/gmxfio_bin.c
index 72e5bb3a76ba2ea02c4f7bc62a4717cb01d036a8..cf50e0fdc48c71ebc8cacf5915c71606c83bf041 100644 (file)
@@ -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 <config.h>
similarity index 70%
rename from src/gromacs/gmxlib/gmxfio_int.h
rename to src/gromacs/fileio/gmxfio_int.h
index 91fc7930c78ad14bb926e7a3d3e6c2bcde1dc455..9a8f069c903b223afd57f13de9a54f88b24577be 100644 (file)
@@ -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
similarity index 94%
rename from src/gromacs/gmxlib/gmxfio_rw.c
rename to src/gromacs/fileio/gmxfio_rw.c
index 3fade5a428c17f89a94f8e06904918a44524eb36..6a66545c9b577c017f993dfe9360b7afe0f728e9 100644 (file)
@@ -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 <config.h>
similarity index 85%
rename from src/gromacs/gmxlib/gmxfio_xdr.c
rename to src/gromacs/fileio/gmxfio_xdr.c
index 35a04b26b2115a800ab1f68dc503473948e22134..da24d2a74890c9369fd4cc9741a33185eecd8cc4 100644 (file)
@@ -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 <config.h>
similarity index 96%
rename from src/gromacs/gmxlib/libxdrf.c
rename to src/gromacs/fileio/libxdrf.c
index 38d97680e286afac452c8f3c62b1c55cbc849543..60dba86d0136d4079b0cadbed72ea0ae26e24a0a 100644 (file)
@@ -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 <config.h>
 #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
 
similarity index 95%
rename from src/gromacs/gmxlib/matio.cpp
rename to src/gromacs/fileio/matio.cpp
index ef8b1e79686a85a19ee249bf5ab2785d0dcf0b25..cdd1f6ba86058de94f30e2f28db05607b993424f 100644 (file)
@@ -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 <config.h>
similarity index 71%
rename from src/gromacs/legacyheaders/matio.h
rename to src/gromacs/fileio/matio.h
index bb71968ea4a441582730b08e2c4b1fb6136c29db..b2547c229d3d05a2014a7349869ecc2898bc5743 100644 (file)
@@ -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 (file)
index 0000000..e636ddf
--- /dev/null
@@ -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 (file)
index 0000000..fab17b9
--- /dev/null
@@ -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 <stdio.h>
+#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 */
similarity index 94%
rename from src/gromacs/gmxlib/pdbio.c
rename to src/gromacs/fileio/pdbio.c
index e97ca13796003e5570b83ecd73cde81c89785ecf..099bb3ca76efc1833deaaceac9198ae8ebb9ec93 100644 (file)
@@ -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 <config.h>
similarity index 70%
rename from src/gromacs/legacyheaders/pdbio.h
rename to src/gromacs/fileio/pdbio.h
index fda43124fe2fa49dcf4d702b8bfd6f1520e83d92..18745d2c87b8971da088822ea34f2bb2ae94dbfa 100644 (file)
@@ -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 */
similarity index 98%
rename from src/gromacs/gmxlib/tpxio.c
rename to src/gromacs/fileio/tpxio.c
index 2999c66b23b7c031cf01a9ce7c7e40e52d570af5..f319075b4bf0864c403b9b59ba73b33b15c0396d 100644 (file)
@@ -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 <config.h>
similarity index 74%
rename from src/gromacs/legacyheaders/tpxio.h
rename to src/gromacs/fileio/tpxio.h
index 4be410b030d60db3ad7a689970cec8a6160572ad..0e64f3b0706231e29e9f3c0c2982490cc0fecb07 100644 (file)
@@ -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
similarity index 74%
rename from src/programs/mdrun/trajectory_writing.c
rename to src/gromacs/fileio/trajectory_writing.c
index abf0c61c3c0d10e74602967d4eead943c01d1885..1f8c73dc86d3875b88246d84afe60a89943e833c 100644 (file)
@@ -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 <config.h>
@@ -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 (file)
index 0000000..2fa803a
--- /dev/null
@@ -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 <stdio.h>
+#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 (file)
index 0000000..764b961
--- /dev/null
@@ -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<<estX))
+                {
+                    MX(state_global->x);
+                }
+                if (state_local->flags & (1<<estV))
+                {
+                    MX(state_global->v);
+                }
+                if (state_local->flags & (1<<estSDX))
+                {
+                    MX(state_global->sd_X);
+                }
+                if (state_global->nrngi > 1)
+                {
+                    if (state_local->flags & (1<<estLD_RNG))
+                    {
+#ifdef GMX_MPI
+                        MPI_Gather(state_local->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<<estLD_RNGI))
+                    {
+#ifdef GMX_MPI
+                        MPI_Gather(state_local->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);
+        }
+    }
+}
similarity index 84%
rename from src/gromacs/gmxlib/trnio.c
rename to src/gromacs/fileio/trnio.c
index c8784a53770b64cfb118d6daa6984784bce66378..23e76ea4a5c5ce3e2a8db2a74d9b4483b2755e49 100644 (file)
@@ -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 <config.h>
similarity index 72%
rename from src/gromacs/legacyheaders/trnio.h
rename to src/gromacs/fileio/trnio.h
index 2d6bfbb49711450f1d8830adc22c7defb04ab7c4..c5ae63e453790a716eb2d9ce007367ad3e1466d4 100644 (file)
@@ -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
similarity index 63%
rename from src/gromacs/legacyheaders/types/trx.h
rename to src/gromacs/fileio/trx.h
index 1358234e2868a9721eeab7c0678f9b82ce882b85..479f8d6a05a8664daf792b1ac0e075efb0e7eca0 100644 (file)
@@ -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.
  * 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" {
similarity index 92%
rename from src/gromacs/gmxlib/trxio.c
rename to src/gromacs/fileio/trxio.c
index 367c2b121002ad508004f53168165544d247f943..17baacab638fe25fddc44acdab964e2b89e91e16 100644 (file)
@@ -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 <config.h>
 #endif
 #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 (file)
index 0000000..b5ba5bb
--- /dev/null
@@ -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 t<tbegin or t MOD dt = t0,
+ *          0 if tbegin <= t <=tend+margin,
+ *          1 if t>tend
+ * 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 t<tbegin,
+ *          0 if tbegin <= t <=tend,
+ *          1 if t>tend
+ */
+
+
+
+
+
+/* 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
similarity index 89%
rename from src/gromacs/gmxlib/vmdio.c
rename to src/gromacs/fileio/vmdio.c
index b27e02ae694c18189964db552d83bb237d626388..15b6f80b137ee37fe9f115fba2d20636b7246eff 100644 (file)
@@ -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 <config.h>
 #endif
diff --git a/src/gromacs/fileio/vmdio.h b/src/gromacs/fileio/vmdio.h
new file mode 100644 (file)
index 0000000..05d4e8a
--- /dev/null
@@ -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_ */
similarity index 63%
rename from src/gromacs/gmxlib/xdrd.c
rename to src/gromacs/fileio/xdrd.c
index 17468835570dd09d4bd29cc4e25ff15144b24761..8da1b6af2ff1f2d7fca921c94a49de65eccdfdd5 100644 (file)
@@ -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 <config.h>
similarity index 60%
rename from src/gromacs/legacyheaders/xdrf.h
rename to src/gromacs/fileio/xdrf.h
index 2fa3c659521b2f2311881199ca06df668832ca6c..1edafcc1ec918792d263548a348e5c9b330eba2a 100644 (file)
@@ -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 <stdio.h>
-#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 <rpc/rpc.h>
similarity index 78%
rename from src/gromacs/gmxlib/xtcio.c
rename to src/gromacs/fileio/xtcio.c
index 2e1d7d6204f975271c2297c30324dc8d63a43e18..039e1020a8c7a1c1a476ef15f606e2f52467685c 100644 (file)
@@ -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 <config.h>
similarity index 50%
rename from src/gromacs/legacyheaders/xtcio.h
rename to src/gromacs/fileio/xtcio.h
index 15a157784eff82a29c7a11121ef0f4d30eed7310..c21e7e8e25719271ff7e7389bc5e7965a0d5de40 100644 (file)
@@ -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"
 
index 667cb216196f25576ec7f223d2a6dba1f98b1836..2377ebd8ac11219416257e0da402e984a4ee2e23 100644 (file)
@@ -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[],
index 6ddced10883cf898b884614efe8d414929ae2a57..a93f9a7e06a05c3882f86a841dd28a684ace3d84 100644 (file)
@@ -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"
index 788d4e791d2c8b53d4b235c6d33e5a51f4f32f1a..baf258018d45e42b3366175616978aad45181b6c 100644 (file)
@@ -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)
 {
index 677281a39ae3258622378972ff222cda64a7c99a..6fa683843aaf124c8d766ab26aa9df3119ad2f94 100644 (file)
 #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,
index 504ef0656a42b017db19709b4c22884a5f963cd2..d72498ac650a98b1640fba98e9104965c355b9dc 100644 (file)
@@ -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"
index d49ab00c68625dedb77ba99fb220f6146de69d8a..534c2768a230adc99e393139e7b2e3a2e7b37a80 100644 (file)
@@ -39,9 +39,9 @@
 #include <config.h>
 #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"
index 27b1cc6305ec00d57180ae684a90d209eb4a5d64..277992d4440b396ac775e9c0692773c7b91170c1 100644 (file)
 #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"
index 21c3dd48a6b5663f1580b61fdc7ab17ebd7b493c..d778559aa1c2c0b5a25f262308cf7dd603c99f7a 100644 (file)
@@ -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"
index 91f817d690ec4535c1cbb316f82ecc830beb5ec8..54455820a33ed7260357102d9b8551ea9754db36 100644 (file)
@@ -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"
 
 
index 6d3abc6a7ba3c92e5e177858a888b6e7585327e7..8a04a8267b33db0821701d197d53e63c7ff603d7 100644 (file)
 #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"
index 95edc2c30f6e1fc9057cea66128094f32fe90613..cc2ec9a149ec68872a519de29aa85fa39f4d6789 100644 (file)
 #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"
 
index 7b3c07ac9e0f3575b0f0899dde482337db35baf8..02a751cac4b8449e407938d714bf39fcaaf7aa2e 100644 (file)
 #include <stdio.h>
 #include <math.h>
 
-#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 <string.h>
 #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)
index fa94b9095aac0090d32229d2a172c721b672e0a6..35532439827573302bf0ae8f6a154586024a1555 100644 (file)
@@ -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"
 #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"
 
index ee15ee3e2f0f2535a01a0681dcba8950fc4cf1d5..d09ce185c60102bdf72833eced668edb3e09c248 100644 (file)
 #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"
 
index 532764c3fe883c361e945a307bca80296625af69..d0ceeece24a0e2e437b9d41d3d56ccd173a30cf3 100644 (file)
 #include <config.h>
 #endif
 
-#include "filenm.h"
+#include "gromacs/fileio/filenm.h"
 #include "smalloc.h"
 #include "macros.h"
 #include <math.h>
 #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"
index 3826abc60a0cbd6b5d68229bd67e3f8eed218143..bd9d49b28e0f0b5b0b19ac36e645a1b136280052 100644 (file)
 #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"
 
index 4a76624e0e659abc9a965c03c400adc3bb9eb4be..4255a31a6599c5b8f8ab4d50bdd4d09e72c3c118 100644 (file)
@@ -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"
index 5b9a4915368c0f07299965d102b14b2f3f20883d..543f3d32232e2324a5d7f8526e7f2145a81473bc 100644 (file)
 #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"
index 98660f7762f923299de9d368907a195874b227a3..47925674eeaa24fed85536088da60c20126c1d2c 100644 (file)
@@ -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"
 #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"
 
index dda8676a1860a4e235ffdffb6a9f271d2fd0978e..72c9877c1f58b17be34169c10caeeeb6b6b1360e 100644 (file)
 #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"
index 244bfe555decb6b17f69936438cf05eeed8e070e..7b83d08bf6b7abacd49922a17352eb861fb06420 100644 (file)
@@ -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"
index e45dab8597313be69a118d416a7a4c8f4588046e..c214d0576620c78d7b3c419f7b834da6dcffba7d 100644 (file)
@@ -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"
 #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"
index 297fa89e47766de44527b5c562a104aa0afb416d..fe8b6f4b79e14bec3fce8bc4523975d65ef50a27 100644 (file)
@@ -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"
 #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"
 
index a92ab9ef73dd4e299f2002a29d0ea63ee15e9434..472af731f1a91a700f3177a5f62e7dad08609824 100644 (file)
 #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"
 
 
index f2989b126ea99b7f988ae8bf78319ffded1dbead..830a3d0537c0ed9bc4fa9186e8be565d24ed34ca 100644 (file)
 #include <stdio.h>
 #include <math.h>
 
-#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
index 9941f8ed776af5b0daaeac794a072cbcab8fdae4..53382de9a98b79b9765778bd7040c3dff5bbcf13 100644 (file)
  *
  * For more info, check our website at http://www.gromacs.org
  */
-#include <copyrite.h>
-#include <filenm.h>
-#include <macros.h>
-#include <pbc.h>
-#include <smalloc.h>
-#include <statutil.h>
-#include <vec.h>
-#include <xvgr.h>
+#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[])
index 807370f2ef7a280f17928c57e144fba15bc75910..e2fbf960757b2239b5300897e0260f35db7c43ac 100644 (file)
 #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,
index 1927f9c49af07976c3b7ebe1ea26b5fe1f93edf4..ee138ae7223dcff41c648ecea82096905959b315 100644 (file)
@@ -40,8 +40,8 @@
 #include <math.h>
 #include <string.h>
 #include <ctype.h>
-#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"
index 37da1c0079e02f94aab8bb7092c1ec26794e3ef2..24d9eede79f4feb5c0a82a076a297edcdf9be5bc 100644 (file)
 #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
index 25c5e376175dac425d1c5bdb29ff455cd18625d1..7c9efe6b85270f12fa06e21b2353377180005cb7 100644 (file)
 #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)
index 46d04b2121fdf6317baaa957bd65257586e3aeb3..16d185daea2c3830527b60b57655139fdd26751a 100644 (file)
@@ -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"
index 20538b46bb944b6842f58e79fd42e2ebef219d49..dd8bd10f7c3f3a5ba44170dc2840ed65b8ad764f 100644 (file)
@@ -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"
index 0e6be00592a84241eedb0fa6e7d271d24239ca52..13d60ecd5ace1ad7ecce40da88318e0fe3199139 100644 (file)
 #include "smalloc.h"
 #include "string2.h"
 #include "physics.h"
-#include "confio.h"
+#include "gromacs/fileio/confio.h"
 #include "txtdump.h"
 #include <math.h>
 #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"
index 4bf1f507a005b27633c45b260878cf859b28c791..a9e9b5377780f88869f3a7be28f64ae25dd9c81e 100644 (file)
@@ -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)
index 7a4b3e5e89000c68982082ad8317f9efb673ec45..a5b85c9cbb0badf2ecfaaa3fb7dd40e568301f6f 100644 (file)
 #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"
index 798546a27ea2cecea176b020ff2c09ba11960fc3..c4ef377c02d55567f895c6ed8cec8080ac1efeaf 100644 (file)
@@ -42,8 +42,8 @@
 #include <string.h>
 #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"
index a9d3c15faf72422ba8439b0cbaf974995f45c562..8b5f3784676e51c5804ffd4eeec5c4d94e252a09 100644 (file)
@@ -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"
 
index 0ee3aa1c7c9a5c09dfec0de4459211f7be299e61..e519b09eabc0300b6b2386a0945d6c12bfc7fbff 100644 (file)
 #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"
 
 
 /****************************************************************************/
index 92ea501334d53b7fcb6331e02026b0a4bf127018..15336ee971fb23b083084a504c6401840d1a48f2 100644 (file)
@@ -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"
index dbb3145f0c33d24efea11a8cb12603209b725d5a..56f4c5975633bdab8931b89202438cd4a38334b3 100644 (file)
 
 #include <math.h>
 
-#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"
index 9ce31d19f8de754c2c67766bcd62c348d7c3c096..31364688f017250540bb4f9923266d5494a8374e 100644 (file)
 #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[])
index 838cf022f01dc1ffb3a9e35b1f88d21c6e3c5a63..678dd35de55097ee870897aee4f4f695d79e4708 100644 (file)
 #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"
 
index 143ec322e8c78375f2718a3c52b5b5cad9b9d63b..11f17df1080dcfbd34c04c5c15a161675a6058fa 100644 (file)
@@ -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"
index 304bb1ea2b14c80e49ecd9440788fa31db9b892f..7e5eaeda31402ed1c7db5007e2df637928097eb9 100644 (file)
 #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 {
index 58eb419be49ca6d9889e89cc230fb234eb818f66..41b7144a2ae5915dac38097d4374fc1757edfe1e 100644 (file)
 #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"
index 213d573ebda1888249ed09b9fceb0ebee4c98c5b..dc4818cd6c8016434e75fc3452a6f97f5a10f962 100644 (file)
 #include <ctype.h>
 #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"
index 53b9bc1761f53f6b3c62b64a5fb7236c8409a030..157304abc07822efa881583ef7c9cb715968e3a8 100644 (file)
 #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"
index ea7077c102fbcf9a657b2ab5c676fd43bc0cdf4c..1654f5d76b0afba77f5334494b718cb0852de6e6 100644 (file)
 #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"
 
 
index 1860751d2d99f8f6072bfea916a4809f5f5106eb..55bb768f05a13218823ffa4fce53839fdbf2e39d 100644 (file)
@@ -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)
 {
index dc568deea6d8d4434102fac6eca619a86d01b4fa..9e8145fe5510abf0ace1529977f48c1c18bbd13c 100644 (file)
 #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[],
index f0b94dd16c3204f30c0c76867203063a0046deb2..92afde099edd566e9aabcb4ca5bdb7a79c06c81d 100644 (file)
 #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"
 
 
index 536dece1e163f371fec66ab9163158f685a75fc9..63cb2aff8e4eb07cc15e33c52ace25717b20d677 100644 (file)
@@ -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"
index b5c4904ae4adbc343e843f905f6f700e79d97546..5500f29518371e9fd223568d14d773495ebddc40 100644 (file)
 #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"
index c6f24fb6f5d1a9f49ee914233afc5f8e64e0e081..7f1dd598f950718e184e894d19b9db693938fa99 100644 (file)
 #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"
index 2a094df2423b224dd904ed7da73122b3c164aa05..5860fb6f6207a10bca592b62ea79588b9d7be16c 100644 (file)
 #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"
 
index e863973145049fd02a9a67b6f95b180b1d324a6e..aa6fbf076aa37f0beca1615923ca003cc983a521 100644 (file)
@@ -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"
index 28934ff562f0a04079d5b74bc07d3008706cb0e2..00880db0c4ea6d6c74e405fedcf00aba6ac630da 100644 (file)
@@ -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"
 
index 64c8f6e48472f6ee0cae95917588ceee26d588d9..530d8a83818ecba59b12734fa74fc7af7e19547b 100644 (file)
 #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
index 8fe808599f35ef27bd972aeb53a914a0a7ba55e8..634bfab69272f1a424f8f4a7ea63f0580770bec3 100644 (file)
@@ -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"
 
index 5b6b70e7dd2587ff977c6eaa5e6ed36e95621179..9329ddf20e7f3da777bf1ba31202d02f95e8e974 100644 (file)
@@ -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"
index e01a23474fb5bdd2f77d474957730a881b83bf1c..418dc6d2c601ff17920e72fb6c4760cc58d936cf 100644 (file)
 #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"
 
index 58e04506dc841fb34d853540205daa0bb75883cf..eb83a075df7fc7ff5063b02587ff50f4dae4a67f 100644 (file)
 #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"
index 39d175bbf930444173612a3bdcf64f7456533bcc..54270efa1a96bdbfa66770c15b0e35a05ef74cb9 100644 (file)
@@ -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"
 
 
index 60bae5129206ba25882befb2bc83a5721d302b78..9db04ee3386747fdf33312f837d764a4b391af52 100644 (file)
 #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"
index 7d74838d9f2d1d09c72d2e2794bf57d3a1a11150..00107b08a917607d732ee85652309009bc4aab26 100644 (file)
@@ -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[])
index 4b5d7217fa8ce8e7099aa47f90210155a6812e38..d09769eee7880f6ad414ac0d00bb2e8d5879e45f 100644 (file)
 #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"
 
index e9448a49dd455f61f31356c696cceb390f57a6f6..55520825ba908424729d6c5fb547b10b9669ed25 100644 (file)
 #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"
index dd7961d7fbf177c52045a1798c4f7f9c0e3de02f..46c6ec774b916a4dbec4f0ec30b524c16822548e 100644 (file)
 #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"
index 311de78bb4599157c2b42387e7528123bd0e0df6..df615299bca7403dc68bf4eadea72d81ab903546 100644 (file)
 #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"
 
 
index 811620a7dc8d38af78eefc9021d4f2b655d8cf17..2d440115ab176126a0f353265628c4b209801b86 100644 (file)
@@ -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"
index a7e0315f3fb9f4beb61dd0520bb9fb2c1b325d92..43dacb32873c0fcc9c9284840617bd83f33f6932 100644 (file)
 #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"
 
 
index f3514be61f12a69eeb620d48c2db1f967da4ecde..7e4d850b7979a016cd259925a032e04f3b43e5a1 100644 (file)
@@ -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)
 {
index d23d071dfdd964d2b9478348f956600116bfe771..77f2a3237cfe5d342dd74ad530b99bfc20a8f8a4 100644 (file)
@@ -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"
 
 
index e5c3c75d2165c2395ff0d6f740695c0793a7fcbf..de0706e38bbcd15b0462ea1d33e45cd1b23925c1 100644 (file)
@@ -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 <math.h>
 #include "index.h"
 #include "pbc.h"
index 6a55642908f342bdeb928467a3a6849699bbe1bc..71b2c7c29b184f3ea872873890f2d3fdcf1266d6 100644 (file)
@@ -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"
 
index a2f1079371cb13e5f81ac4ae79b5d99ef998b68f..dedf26baa5b11e95a047c29fb4643397ba0f7651 100644 (file)
@@ -38,9 +38,9 @@
 #include <stdio.h>
 
 #include <math.h>
-#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
index b119fbc74974966b859f135a1ce48b471fd6cd1d..42b73e2caa519364585cb74e31956e719903e98b 100644 (file)
 #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"
 
 
index 9aeffd36cd6b834f5e00a4681b033aaed8c6d83d..1850cb1a14e78aebeebcde52b661307bf534eb32 100644 (file)
 #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
index 9b3e515688fd7b52ea21a13d3c3977aae8ba760b..bdee05c3a4fbf6b44bb7d3cd8980cf7fe49a2e0b 100644 (file)
 #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"
index fa2faee6fc7c72b8ee56734ba67afeb6a9c4eeed..9ea317fc41f972d00b53d2644261d25d4413f3c2 100644 (file)
@@ -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 {
index 04b9119a3c4b81aafa34e92296faa6db9dee35b6..97d3dfd7789e2ad75597272d650e2548d22f0848 100644 (file)
@@ -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"
index f8eecbef5c8ebd6857a1b95981af15d9a98ac6a9..77ba1f51ac5e6dea9a31c09b319cc2f02d32a1a2 100644 (file)
 #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"
 
 
index d1ed3da32ea1b77537ccc5fd09e7403a4cf0c405..9f24f0e8c2fa412adb7286ef016e2cffb04b6330 100644 (file)
@@ -38,9 +38,9 @@
 #include <stdio.h>
 #include <math.h>
 
-#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)
 {
index 66432762cc84cc0fd8d50d6125f4daa55364f27c..9ec7dad037ac916d6f737dc9ef62b82275f8fc6a 100644 (file)
@@ -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"
index ad0eb202545a06b0d4a4982eb58e4028327e7e12..8e08d17a20c697c702bb273267f091eac7878769 100644 (file)
@@ -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"
index b0420a11f5f0aaf6b40e892e874006bc4056f39b..2346c0de4df3f5af728efab9608e8f88689bcbaa 100644 (file)
 #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
index 8b1c6869fe65c7dda8ae61913f50bffec23618bb..b4dc3f2166034e944f33efe6edb736661e37c624 100644 (file)
@@ -38,7 +38,7 @@
 
 #include <ctype.h>
 #include <string.h>
-#include "futil.h"
+#include "gromacs/fileio/futil.h"
 #include "gmx_random.h"
 #include "smalloc.h"
 #include "sysstuff.h"
index eea8ad883809b6b04799dcdaae876ced18fb8c83..6b276b711a454a6217774383fa3d10e8be03316d 100644 (file)
@@ -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"
 
index 8a0d4f639fceda1a0ea98bf45104340aede8c5bc..895f3b2e42d471d04a77cb590eb5d7b9adcac251 100644 (file)
 #include <stdlib.h>
 #include <math.h>
 #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"
 
index 21bb2a94b76aa87da48b09002dfcbddeea0ddb34..bd59cb6f30ae96cc437fe995a46f37a3fab9f849 100644 (file)
@@ -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"
index eb4f8e0e987570b04c5e65064bf42b1e8f2462e3..bb263c4f28a4ea5da8eb2727ed4c93a84d06ba70 100644 (file)
 #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 <fcntl.h>
 
index 99229e00529ada12fed1ee71e0ba6fc1ff29a119..2369081992d1a151c0efc2c0c2b20f3e54058aae 100644 (file)
@@ -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"
index b3ab78184bd44dcf746b66d38004aaa8b38c8dbe..ad4e54aa3a5f6a4a04089508b914b96ceb6e6ab1 100644 (file)
@@ -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"
index 4b6b790d52a6d8c8ea5dda9a3e8f8350006ed6e1..cce16bed752d5db943498024e501e01b53770ce3 100644 (file)
@@ -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"
index d86e196a0dd3b294befe71b06c26f72fdf4a94f1..6fa091f196e55a12992c22b49cfaaad5bec55e3f 100644 (file)
@@ -42,7 +42,7 @@
 #include <errno.h>
 #include <stdarg.h>
 #include <string.h>
-#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"
 
index a0253ea74fd94690c0b20fab50676a130f1dc4a3..b3cc3fa06e09e4c7a1afa71bda9656067fecdb1a 100644 (file)
@@ -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"
index 5c8492490f5beff91e7e6a73bd24c7f1aa146fdb..c7f9c98014be4ab8cc1619845a2652d08dab9194 100644 (file)
 #include <assert.h>
 #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"
 
 
 
index 55f4c2525c35ebd365ff9d570473dda6fce072fe..c3a5f66cd6d8fc058c9f9338cfd90d6f32ee5afa 100644 (file)
@@ -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"
 
index 5eb8bd641d85d295354ccd988db3e12db537d0f6..e8f5c96a26d616fa84a3dcdb296d3b0ce888f570 100644 (file)
@@ -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"
index c5bab6f30f09c0e2c3ce2681b4065fc55810dd66..4bf5f2dd059d283ef66f65f880faebcc6edc2563 100644 (file)
@@ -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"
index 96f5be0affe927cdcc6f4178715d754928fe1e48..23345f5b20e6a0c7b403ba1aedf6ec9b7c75b12f 100644 (file)
 #include <stdlib.h>
 #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"
index 0a251ba5806cae7a6fdfcc378d5ebcd7abbee181..4545df1298b29b7963e2485d9b31904a9e091cfb 100644 (file)
@@ -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 {
index 574bd3c49fa520a6f5fbc7d702e73bd5b8d78320..8c4cbf91639687d540e94d6ec3a70bcc53466fdb 100644 (file)
 #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"
 
index b70df1d25697a2bc0240b862c3f1e72ea4d811d1..1755369e9dc5a550dfc6e855431c3e9695f58aad 100644 (file)
 #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)
index 9012f0ec393dbfd2cd811bf2e036471889c9421f..54d018f4b156fc720b638350e17362f120827fed 100644 (file)
@@ -39,7 +39,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include "string2.h"
-#include "futil.h"
+#include "gromacs/fileio/futil.h"
 #include "smalloc.h"
 #include "gmx_fatal.h"
 #include "strdb.h"
index 1fba7cef9a065f7a0b946061518427d12ab92d83..246a5b75f69500f5d1a5065bd9f2d2d091ef1783 100644 (file)
@@ -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)
 {
index 7befe045ed328c780beffe3dd78177ca46466840..7b53634baa609f69fe5c14361bf055a4f2ad14dd 100644 (file)
  * And Hey:
  * GROningen Mixture of Alchemy and Childrens' Stories
  */
+#include "gromacs/legacyheaders/statutil.h"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
 
 #include "typedefs.h"
-#include "statutil.h"
 #include "gmx_fatal.h"
 
 #ifdef GMX_THREAD_MPI
index c2244de20edb56dd2476a6d745cb27de9ccc72ef..3e7d351d0b2b2734f4faf747f35766074c86a769 100644 (file)
@@ -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 (file)
index 166b8b3..0000000
+++ /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_ */
index 68d3c366aff8430b39edf3b115c4e34dba6a4070..343f054d26c757ae455f472757b953c4866e5ad7 100644 (file)
 #endif
 
 #include <stdio.h>
-#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",
index 39d08cafb95922ec4a34b98376af8b7636fde3d5..3f847f9b3826ecfe0b401ccccd4825432219f910 100644 (file)
 
 #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"
index 2b8a7088e310c19cbba7bb9f5a567247aa13b9cd..cd8e2dec6c42308792dc0403df082234ac11f7a7 100644 (file)
@@ -45,7 +45,7 @@
 #include <fcntl.h>
 #include "sysstuff.h"
 #include "string2.h"
-#include "futil.h"
+#include "gromacs/fileio/futil.h"
 #include "network.h"
 #include "gmx_fatal.h"
 #include "smalloc.h"
index 9d039961b78b053403eb47a1cbd54be999a3ae57..c51603611e73d7457a86faa9dcad9b149715ebc0 100644 (file)
@@ -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"
index ea9f64930936429d7240cbb187361a5f3ae4113d..e9d1558f1d6e4693bb88a5bd2fa64d90b5581294 100644 (file)
@@ -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"
index 71de6714a75f203bd6939257b1f46cf02fee6512..ec20baa3493b5465cf392ef3f9f2003885042ddf 100644 (file)
 #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"
index bf78eb795ad9cb7beb25d08012606324c948a54c..c44412edbbc56368dde1a7515035222901e26216 100644 (file)
@@ -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[],
index c3b10f6e2fa6af2e3deebc7debeab7ecdc4afd69..606ac4cb329aa00dbec9894498772228197c1ae2 100644 (file)
 #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"
index 971755755e40bd80d5804f9bfcef60356c6a9c4b..f138b62552e606ccc0e783bb52b804d34f89624d 100644 (file)
@@ -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"
index 6fa075400b596c52fdd5164422a10bbd68398b72..0b2c2f985ff337a8a0f77d70158f3f5d3603af62 100644 (file)
@@ -40,7 +40,7 @@
 #include <stdlib.h>
 #include "sysstuff.h"
 #include "princ.h"
-#include "futil.h"
+#include "gromacs/fileio/futil.h"
 #include "statutil.h"
 #include "vec.h"
 #include "smalloc.h"
index ca05f8c3eb796b72b87f4cf280a90711d31d794e..1f9837e9c31537ae1027bc2732f18dceccce6758 100644 (file)
@@ -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:"};
index 667a4be35a72522ec9e9b9ec5546bd2ae2138467..5c5fbfcb0538eefaee09aa57457128c713d2c920 100644 (file)
@@ -41,7 +41,7 @@
 #include <ctype.h>
 #include "string2.h"
 #include "strdb.h"
-#include "futil.h"
+#include "gromacs/fileio/futil.h"
 #include "smalloc.h"
 #include "gmx_fatal.h"
 #include "symtab.h"
index 88ec7168f98c54125243c474421068a38aafcd0e..342b27c6d8a9ba4376ac2c43ed958bf785a8dc3e 100644 (file)
@@ -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"
 
 
index 263e4c4775702950f26e351fbe8b51c1977e90ad..7cd2bc23d2b62cc9689f5ab45d3892a725c73d54 100644 (file)
 #include <ctype.h>
 #include <assert.h>
 
-#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"
index 38115e85beec3c3facb2450d0880ec3d71e283f8..40df46de2a223f1cb1d8561aa4f5f72780d6ea90 100644 (file)
@@ -38,7 +38,8 @@
 
 
 #include "typedefs.h"
-#include "gmxfio.h"
+#include "../fileio/gmxfio.h"
+#include "../fileio/filenm.h"
 
 #ifdef __cplusplus
 extern "C" {
index 6581b3d1ebbfe28014c40ea67b90feef62b3fc89..c57cb316c73cd0b34c17ce6418249447e7bc94d7 100644 (file)
@@ -38,7 +38,7 @@
 
 #include "sysstuff.h"
 #include "typedefs.h"
-#include "enxio.h"
+#include "../fileio/enxio.h"
 
 #ifdef __cplusplus
 extern "C" {
index bc0ecd8a8acbaefaf0b65151acd11e1ebc77f388..ee5e6e9aec48ad47e2a6c76b350c0beed6aaf592 100644 (file)
@@ -40,6 +40,7 @@
 #include "statutil.h"
 #include "mshift.h"
 #include "rmpbc.h"
+#include "index.h"
 
 #ifdef __cplusplus
 extern "C" {
index 74971ae523a9c82bf81ae3d82212a5c8e58f15f8..8a5a1532c30f0f9e18fb038bfb4683a645c5fbfe 100644 (file)
@@ -37,7 +37,7 @@
 #define _hackblock_h
 
 #include "typedefs.h"
-#include "pdbio.h"
+#include "../fileio/pdbio.h"
 #include "grompp.h"
 #include "gpp_atomtype.h"
 
index cce5d48b5b9fe524db41370b2203e8fc846d9245..73c717f2c6360a427ab30adf705c2d9d42b2f218 100644 (file)
@@ -39,6 +39,7 @@
 
 #include <stdio.h>
 #include "network.h"
+#include "../fileio/filenm.h"
 
 #ifdef __cplusplus
 extern "C" {
index 315376436ff32e2f87511fc12d4a2317985c289e..932bbf7aa94fa7d2d477a676d8d1c3730522eb4c 100644 (file)
@@ -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
index ed921d344038c787f5d438e41ef2e4cb46c18e71..26214a6cc7aea1c428aec42bbf70095d07cb8548 100644 (file)
@@ -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
index 8c2bc3333e1bc1d65361a8341831303af09676ef..e2faa90d8d1f92038bdbceeae9108401e152ae7a 100644 (file)
@@ -39,6 +39,7 @@
 #include "typedefs.h"
 #include "statutil.h"
 #include "mshift.h"
+#include "../fileio/trxio.h"
 
 #ifdef __cplusplus
 extern "C" {
index 7c943fe41f0a4f7b47ffcd789d5b90a7d1cc7d5a..ab5d8f253490338a7b1ef27c40033c124ec28bc6 100644 (file)
 #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 */
 
index a2a8a446aa1dd5a02ff1006dd240924b94f7c640..6bd9dbab6dc58d9b60b1276df44bf2af8c1b4b20 100644 (file)
 #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 t<tbegin or t MOD dt = t0,
- *          0 if tbegin <= t <=tend+margin,
- *          1 if t>tend
- * 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 t<tbegin,
- *          0 if tbegin <= t <=tend,
- *          1 if t>tend
- */
-
-
-
-
-
-/* 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
  *****************************************************/
index 3d42710fe0b53927dfdb33b3a6da931c0d4eacee..01aa9273a9423dffb31e0ce115b70ba65f736602 100644 (file)
@@ -39,7 +39,7 @@
 
 #include <stdio.h>
 #include "typedefs.h"
-#include "tpxio.h"
+#include "../fileio/tpxio.h"
 
 #ifdef __cplusplus
 extern "C" {
index 25820cda9ef546de4c2ae1a42c886f6272d65822..d3963b3db7c0e65416358d48ed5db38ceb2f993a 100644 (file)
@@ -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 (file)
index ea6aadc..0000000
+++ /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
index 8205e48cb2b33d3b2c92fd27313404b1b6fe3c26..507c33138c0b9438f59b70f8bd6a4f23e77f9947 100644 (file)
@@ -37,6 +37,7 @@
 #define _viewit_h
 
 #include "typedefs.h"
+#include "../fileio/filenm.h"
 
 #ifdef __cplusplus
 extern "C" {
index 5af8c9be473ff04c7593beb15b57b8f4f1dce527..142e8728715fee93211538906879db47f90529b9 100644 (file)
@@ -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"
 
 
index e44a91385567b8e1960e95d94474fb6ad5ca8e4c..fd6041c7e4c5403c27251bc2a874447f5d296c72 100644 (file)
@@ -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"
 
index 2fe584e5539d92ea18799537570663df9ade344c..695015bcd0cd1c67f08dd0cfb381d22bd0df1fa3 100644 (file)
@@ -37,7 +37,7 @@
 #include <config.h>
 #endif
 
-#include "confio.h"
+#include "gromacs/fileio/confio.h"
 #include "constr.h"
 #include "copyrite.h"
 #include "invblock.h"
 #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"
 
index 160ad199ca4dc2b3d6dc3d108144bc615272d806..efcc62c20daa643f8fff64f96deab6b5d6717d57 100644 (file)
@@ -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"
index 8a732d8706029e4c5538a638d2f539359fd7e34a..e27b2bdc3d58c45f3a2bc29d961b83694685d0d7 100644 (file)
@@ -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"
 
index b8c37c1d33aeb7e816c963d7769f50665cb97191..5df5ecaee93892829f1f118f4206ac4affd36d9f 100644 (file)
@@ -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"
index 91465b0963f47c29e23cd3c27275233fe3c26594..51abb5d8c02d1bb7f30b166f230418655238d88a 100644 (file)
 #include <math.h>
 #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"
index 7766dc08b67d34712718c1c32352980384c6a942..ffe72ab86f2eb77bfcd588ea50397858e67cc96c 100644 (file)
@@ -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"
index 27ed3b7b20d1789b3f94c66fbed502130bc3157d..b6ebfbdd5210dd651cc6e01d6dec208837d2b5b9 100644 (file)
@@ -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"
index a04012efa5e6eeac3aa427a224e256859c3a1074..d75ed2b298c0ce564fde12ced8d92866207f882b 100644 (file)
@@ -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"
index 710789c354ed6d09f0dd010fcb897e15312009a9..1681cb5ac71e02545b684667c5bd8b3a0893bccb 100644 (file)
@@ -39,7 +39,7 @@
 
 #include <stdio.h>
 #include "typedefs.h"
-#include "tpxio.h"
+#include "gromacs/fileio/tpxio.h"
 #include "smalloc.h"
 #include "vec.h"
 #include "main.h"
index e9491b838b574c00d2db62e80427602dbb5a04aa..cd25c50709cb7a4c64f25e2376c01dc1b668e6d9 100644 (file)
@@ -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"
index 48169f3894fa52736b86aabe9701d23a2147ca12..a1803f7af22fdaa43cce5401962c11d95df2edef 100644 (file)
@@ -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 */
index cf67098ff4e520c19ee30c45db2f914b7d30ada6..ceace02872852bba54c563b1fbb1e8142fdc4bf3 100644 (file)
@@ -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"
 #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 {
index da6589001e83a69fd1d625f78b9635e45d911476..84cd9c322465d4d165e85f852d73ad1aa6f5626f 100644 (file)
@@ -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"
 
index c73c8d7f8d2f749858bd393ee90e9ba9eb4f88a0..de760db8514fa31ac752d439cc5b8813c81f0115 100644 (file)
@@ -53,8 +53,8 @@
 #include "partdec.h"
 #include "pbc.h"
 #include <stdio.h>
-#include "futil.h"
-#include "pdbio.h"
+#include "gromacs/fileio/futil.h"
+#include "gromacs/fileio/pdbio.h"
 
 /***********************************
  *         Grid Routines
index 20ed26445847e4ffd259baec4f6a95e943514f5c..412b7170c0324eb89c0c28c985c38621000b864c 100644 (file)
@@ -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"
index 73bacb0e911782377552297a3b1bc43473175670..d5e97bccdb35cac5f033d49fa31141d04136dadd 100644 (file)
 #include <math.h>
 #include <stdio.h>
 #include <stdlib.h>
-#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 <string.h>
 #include "smalloc.h"
 #include "pull.h"
index 9fc97282be1eccad91f37dbcc93411eaad99cde1..13e2825975d674fadcaa1b4ae0551eed8945b209 100644 (file)
 #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"
index b42aaad2a84ddaac7bbbde0a938c8f54eb8ff1d5..1b50e5ffaa3ddc05e3df3bacef37825da5c73580 100644 (file)
@@ -40,7 +40,7 @@
 #include <stdlib.h>
 #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"
index 21aded5d1d03dbfe71d16b93f03cfad133af5d58..2d446c694c4470b9ad28bb4c4ce4934ca094f7ae 100644 (file)
@@ -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"
index 761b8ec875966c8e1d88ea5308da40158c99902c..440e59559d31eba68dc88225e2b790d34e003849 100644 (file)
@@ -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"
index f3e4cf8884599525009ddae6ea2ad283db189bed..59907d671539e755e2c560e87765cb89e541e7e6 100644 (file)
@@ -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"
index bd631a0498986292401c0b9bdc808aa51acc00aa..4b191b5a2ca35165eb79ea74e3b705e070a1150c 100644 (file)
@@ -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"
index ec67447875ea0577430981eb6619670e13a34656..480759b95b8e0bb4014a6a89c638112d8edea054 100644 (file)
@@ -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"
index 3d77d2c314d3f2dbbfe967a44c94040ecf5d8678..9ee926ca111a4542873958f70c9d4118420552cb 100644 (file)
 #include <math.h>
 #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"
index 74e74f1907372c9131799317e523a814c4730f78..8bd6595079b87b2b2f41a9c00b11a93352334471 100644 (file)
 #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<<estX))
-                {
-                    MX(state_global->x);
-                }
-                if (state_local->flags & (1<<estV))
-                {
-                    MX(state_global->v);
-                }
-                if (state_local->flags & (1<<estSDX))
-                {
-                    MX(state_global->sd_X);
-                }
-                if (state_global->nrngi > 1)
-                {
-                    if (state_local->flags & (1<<estLD_RNG))
-                    {
-#ifdef GMX_MPI
-                        MPI_Gather(state_local->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<<estLD_RNGI))
-                    {
-#ifdef GMX_MPI
-                        MPI_Gather(state_local->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);
-        }
-    }
-}
index 474e41049019cdeee8ae09e9d55a55df2a0a81f4..2223af0177c5880dc15e6938624e8f10f8fdead4 100644 (file)
 #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"
 
index 3aece8cc0e0166cb5c9a232e094a5d19c36b6dd5..24d15a9b027d12b768d3bc8f8a3a5a4f8084bfa7 100644 (file)
@@ -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"
index 7666a24b7f89c18a91a445d4ce429cdd185e4274..cdf55bbeb657d40ba067c664f077dd0e4b56532a 100644 (file)
@@ -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"
index f720acf1593737e58a2b69335b9c6b8366625f6e..930044aa78e2d93e4ffad22029fa857ae59687cd 100644 (file)
 #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"
index 789c35c1fd1003bd72580c4e5ced3e4bcdfbe1eb..32210f7dca70cb9b0b06493907e57b659351bbd3 100644 (file)
@@ -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"
 
index ca4257bbb4ed199104e24439868f1c8e8946e70d..6ef7ed8b9bc98820ac049a369e8854374960b326 100644 (file)
 #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:"
 
index ac09e16792db6ac13dd80ed3388e1ecc9f1d160b..0967a0331cb9f12f54e11355dbbf427252fe439a 100644 (file)
@@ -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"
index 4437408bd66230f84015ad2d0a54f7aa68a76cd6..bd10a7c901501517cdf37989acdd09736e2eeb09 100644 (file)
@@ -36,6 +36,7 @@
 #define GMX_ONLINEHELP_WMAN_H
 
 #include "readinp.h"
+#include "gromacs/fileio/filenm.h"
 
 #ifdef __cplusplus
 extern "C" {
index 66c77a313b49fb78736221f6e1ec1acdd69a3615..4cd4a5ce42db948f4c2d081300fc8facb24e169a 100644 (file)
@@ -45,7 +45,7 @@
 #include <string>
 #include <vector>
 
-#include "gromacs/legacyheaders/filenm.h"
+#include "gromacs/fileio/filenm.h"
 
 #include "gromacs/utility/file.h"
 #include "gromacs/utility/stringutil.h"
index b98cbba819d6618519dba2d48c0f8957a13aad18..7322ad828a6f8853bbdfda3b968581e9f5fa9d08 100644 (file)
 #include <boost/exception_ptr.hpp>
 #include <boost/shared_ptr.hpp>
 
-#include "gromacs/legacyheaders/futil.h"
+#include "gromacs/fileio/futil.h"
 #include "gromacs/legacyheaders/smalloc.h"
 #include "gromacs/legacyheaders/string2.h"
 
index 36e8c97e9dc5c0f6952d9ebe9354491d95a2942b..3693facba315161577653e11350b56a5a3134af3 100644 (file)
@@ -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"
 
index a0ef813c1cc81bf06365c49b50a8f5ed7a203249..e6b4798055dfdd5afa5d763dfdd5b8b1de55cb0a 100644 (file)
@@ -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"
 
index 6fa093bea2c4ced023aed6a82b56e1e887ceb36b..8fafa9df0d433ff6d5536808a3903181c936f0d9 100644 (file)
@@ -49,7 +49,8 @@
 #include <string>
 #include <vector>
 
-#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"
 
index 889df25daa4f9b755bea55be54380ff3f457d5bd..e8944b03f3534e98b7430871bafa2af4d8a27556 100644 (file)
@@ -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"
index 1fa91049b44f4a5515f10351902f13a202bf3da4..43d3108bc86686319a600615c2e47672a6af345c 100644 (file)
@@ -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"
 
index d14005e6b48a7059b97132fc843c9488cd5fc721..432cad04bc0c150c4bde9a1a15f1943543ab3ab0 100644 (file)
@@ -49,7 +49,7 @@
 #include <string>
 #include <vector>
 
-#include "gromacs/legacyheaders/futil.h"
+#include "gromacs/fileio/futil.h"
 
 #include "gromacs/utility/exceptions.h"
 #include "gromacs/utility/gmxassert.h"
index 499abba514f71029e182d0501d73671491a9f16c..4355c6b1c3c0e5d89e39f81a525b91574efdd5c2 100644 (file)
@@ -54,7 +54,7 @@
 
 #include <boost/scoped_ptr.hpp>
 
-#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(),
index c5fc90e91b64e5d2e5c227c1974cf42143b63b03..624b1819d5ebf224003d5d8c23bcb6102914a7fb 100644 (file)
 #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"
index 253edbf4c17516aafaeb95889a3d62eb7688979d..d86808f9d8fbb1d9b7f40d159eba46ab1b6ae3fb 100644 (file)
 #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"
index 1850a042a56d5c768baf1975dd7edb5c48b4e5d0..87fc25b13197f1b568cbe8dace73b1c99cb22349 100644 (file)
 #include "main.h"
 #include "macros.h"
 #include <math.h>
-#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"
 
index 05f7fba03797aa65cba5d5b312d25a98d8a98e85..6232cd1a7fe4592d76a4f2cbed0b5fd6341ca0d1 100644 (file)
 #include <assert.h>
 #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"
index 08fad6194519baaf9019817b805638ed358e730e..2a60d29ef1c72cd36f5870ef576b2340b06b913b 100644 (file)
 #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"
 #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"
index f2f37fc6f6625f0a3cce3f64bfae690768000aec..a4b682d7a49f2915888cc3f61d9157014d81e510 100644 (file)
@@ -40,7 +40,7 @@
 #include <stdio.h>
 #include <string.h>
 #include "typedefs.h"
-#include "pdbio.h"
+#include "gromacs/fileio/pdbio.h"
 #include "smalloc.h"
 #include "vec.h"
 #include "physics.h"
index 5aeab36bbdbcb7c8576806380067dec42b87e697..b8c1920c3ce3db114ff8259a30a5a3c73eb900db 100644 (file)
@@ -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"
index 4f4545f6af31cd807c2e2f0657cf59a59746d204..90f2abf3d8cf1e17cd82cf56e0d0cfe410ff15fc 100644 (file)
 #include <ctype.h>
 #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"
index 9d0a937b69aaee05cbc9d9fce6880bb272762079..85007eee3839dd1c1a8dd81e85ec82bb618bac7a 100644 (file)
@@ -39,7 +39,7 @@
 #include <ctype.h>
 #include <math.h>
 #include "typedefs.h"
-#include "pdbio.h"
+#include "gromacs/fileio/pdbio.h"
 #include "strdb.h"
 #include "string2.h"
 #include "smalloc.h"
index 708b18a824f361e0eac00af162bc664810175273..5da5356434b009c0963a852877f431539cf91604 100644 (file)
@@ -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"
index fd03f9ac11d3754337b800ed545dc3ef5c017de6..7f1ea2f77655bbccca32b94c562d497e053fceb9 100644 (file)
 #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"
 
index f07eba136703e57b7609e76594a7c8967abf7db7..bc2a1eb66e3475cfae956777a556102a84c13d72 100644 (file)
 #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"
index d50f48850ddc085eb28663a6d5728bb3d0ae4228..036b8a0ea4cda3fa69d0f64e0a36cddcf452237f 100644 (file)
@@ -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"
index 504a4ba51410e2f85706439d24ec8626f90b09f8..b0d77e332d4f22d88054979b19152bdab39d7e54 100644 (file)
 #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
index f98dea1622a941268f53c987a6d12f6c26019ede..25b80d99a19409b9b4a6e45d725a6b2001c1ca09 100644 (file)
@@ -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"
index a9468e8a9e6539d54c50c40d31378c88569b8934..94ef5cd5f794632bf5d92f3f7e265e594ab37128 100644 (file)
 #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"
index 5bac378eb4038b5f3f3963d18950e241f3b0f381..3b3d98356aae458f2dfe78d74ef72c918d952dac 100644 (file)
@@ -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"
index 4f6515bff4e6fc084ca639e3642f99fb5a3e31d9..c545c70f4bfb819b5c1d38867e904ca1154063b8 100644 (file)
@@ -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
index a8ca08524671a2c7fd5a0526e2c30f9efdafe2e9..7a6d3312f4c5f892eb8958aff6e38ad8b69d7ebe 100644 (file)
@@ -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",
index a9cec7e0b51bfdc99d08d5ea51cd86b7bffae332..149736581a84d1f8d5d4f8282fa26b8d19bc73be 100644 (file)
@@ -38,7 +38,7 @@
 
 #include <string.h>
 #include "sysstuff.h"
-#include "futil.h"
+#include "gromacs/fileio/futil.h"
 #include "smalloc.h"
 #include "macros.h"
 #include "index.h"
index 63e42164eea9089198c802a2b874ec01368ced4b..2d17c958a7377449b7d1d0aac97a1ed7e631902d 100644 (file)
 #include <ctype.h>
 #include <typedefs.h>
 #include <smalloc.h>
-#include <tpxio.h>
+#include "gromacs/fileio/tpxio.h"
 #include <macros.h>
 #include <maths.h>
 #include <atomprop.h>
 #include <names.h>
 #include "manager.h"
-#include "futil.h"
+#include "gromacs/fileio/futil.h"
 #include "pbc.h"
 #include "nmol.h"
 #include "copyrite.h"
index 4a150764900083bb8fe6c4cfc55d67dd20b72269..717a470f94d0ef3bd0d29eaef9e0feb7e56287c0 100644 (file)
@@ -45,6 +45,7 @@
 #include "buttons.h"
 #include "statutil.h"
 #include "rmpbc.h"
+#include "gromacs/fileio/trxio.h"
 
 /* Some window sizes */
 #define EWIDTH      200
index b640e4dd3abc9f8f9ad5bad9bec7eca8b3b5f3a0..b5d0613d564d0249952ea5816ef0dc2156a11060 100644 (file)
@@ -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
 
index 10ec04a8307ae505569992b5462abaf84d1c3184..2bf81cf21222b05b850646f3ffbd518f176d55b8 100644 (file)
@@ -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)