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)
commit8df8c14d75437fbfa5b8f29421d319cf1e94a5be
tree2e2dbc1e0dfa563b5ac8fa01081e029314cb2cc6
parent0b68bbb979ef95afe20f7297a84bec4ee1ba9608
Create fileio module

This patch contains only code motion. There are no functional code
changes. Moves lots of I/O code into src/gromacs/fileio. This means
lots of changes to avoid having everything as a compile-time dependency
of everything else because everything is pulled in via typedefs.h,
etc. Note that src/gromacs/legacyheaders/filenm.h and
src/gromacs/legacyheaders/types/filenm.h have been consolidated into
src/gromacs/fileio/filenm.h.

I/O code in files named stat*[ch] now lives in various new files in
fileio.

Files outside of the module now #include its header files in a proper
way, e.g. #include #include "../fileio/filenm.h" or
"gromacs/fileio/filenm.h" according to whether they are an installed
header, or not. Files within the module are blessed and do not need
that qualifier.

This module installs most of its headers (because they're almost all
inter-dependent; gmxfio_int.h is not installed because it is
only useful internally, vmdio.h is not installed because it
relies on a header from src/external)

Files in new module
* conform to preferred include-guard format.
* have up-to-date copyright headers thanks to Teemu's automatic
  script
* that are installed headers refer to other GROMACS include files via
  relative paths

Moves mdrun trajectory writing into wrapper function.

Removes small pieces of I/O code that was hiding behind "#if 0".

Some pieces of I/O code specific to the gmxpreprocess module have
remained there.

Moved a cppcheck suppression to follow matio.cpp to its new home.

Minor fix to xdrf.h logic, since it is now the subject of a CMake
test.

Refs #1292, #1193, #1137

Change-Id: I820036298d574966d596ab9e258ed8676e359184
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