Converted gmxpreprocess to compile as C++
authorMark Abraham <mark.j.abraham@gmail.com>
Fri, 10 Jul 2015 11:31:10 +0000 (13:31 +0200)
committerGerrit Code Review <gerrit@gerrit.gromacs.org>
Tue, 14 Jul 2015 15:42:53 +0000 (17:42 +0200)
commitaf07072599f486eecab10a103964b58dc4d5e260
treee4f77cffe23d5a432ec42b5edb4e5f6935af5c24
parent5ef65c767e11c97eefeb759754286305e3ec8ce0
Converted gmxpreprocess to compile as C++

Used std:: math function and header, eliminated unused code, vars and
params, used some size_t variables when handling strings.

Added assertions for sqrt operations intended to work on integers that
are perfect squares.

Converted existing assert calls to GMX_ASSERT

Removed include guards from headers

Refactored some ter_db code to be clearer about how generic vs
specific termini are handled.

Made string parameter to _mod into const char *.

Noted TODOs for clean up required for pdb2gmx -merge

Change-Id: Ibe8b8c4b208a39325e6fe450a41d8521daa5d8f0
77 files changed:
src/gromacs/gmxpreprocess/CMakeLists.txt
src/gromacs/gmxpreprocess/add_par.cpp [moved from src/gromacs/gmxpreprocess/add_par.c with 96% similarity]
src/gromacs/gmxpreprocess/add_par.h
src/gromacs/gmxpreprocess/calch.cpp [moved from src/gromacs/gmxpreprocess/calch.c with 96% similarity]
src/gromacs/gmxpreprocess/calch.h
src/gromacs/gmxpreprocess/convparm.cpp [moved from src/gromacs/gmxpreprocess/convparm.c with 98% similarity]
src/gromacs/gmxpreprocess/convparm.h
src/gromacs/gmxpreprocess/fflibutil.h
src/gromacs/gmxpreprocess/gen_ad.cpp [moved from src/gromacs/gmxpreprocess/gen_ad.c with 97% similarity]
src/gromacs/gmxpreprocess/gen_ad.h
src/gromacs/gmxpreprocess/gen_maxwell_velocities.cpp [moved from src/gromacs/gmxpreprocess/gen_maxwell_velocities.c with 96% similarity]
src/gromacs/gmxpreprocess/gen_maxwell_velocities.h
src/gromacs/gmxpreprocess/gen_vsite.cpp [moved from src/gromacs/gmxpreprocess/gen_vsite.c with 97% similarity]
src/gromacs/gmxpreprocess/gen_vsite.h
src/gromacs/gmxpreprocess/genconf.cpp [moved from src/gromacs/gmxpreprocess/genconf.c with 100% similarity]
src/gromacs/gmxpreprocess/genconf.h
src/gromacs/gmxpreprocess/genhydro.cpp [moved from src/gromacs/gmxpreprocess/genhydro.c with 99% similarity]
src/gromacs/gmxpreprocess/genhydro.h
src/gromacs/gmxpreprocess/gmxcpp.cpp [moved from src/gromacs/gmxpreprocess/gmxcpp.c with 98% similarity]
src/gromacs/gmxpreprocess/gmxcpp.h
src/gromacs/gmxpreprocess/gpp_atomtype.cpp [moved from src/gromacs/gmxpreprocess/gpp_atomtype.c with 98% similarity]
src/gromacs/gmxpreprocess/gpp_atomtype.h
src/gromacs/gmxpreprocess/gpp_bond_atomtype.cpp [moved from src/gromacs/gmxpreprocess/gpp_bond_atomtype.c with 100% similarity]
src/gromacs/gmxpreprocess/gpp_bond_atomtype.h
src/gromacs/gmxpreprocess/gpp_nextnb.cpp [moved from src/gromacs/gmxpreprocess/gpp_nextnb.c with 99% similarity]
src/gromacs/gmxpreprocess/gpp_nextnb.h
src/gromacs/gmxpreprocess/grompp-impl.h
src/gromacs/gmxpreprocess/grompp.cpp [moved from src/gromacs/gmxpreprocess/grompp.c with 97% similarity]
src/gromacs/gmxpreprocess/grompp.h
src/gromacs/gmxpreprocess/h_db.cpp [moved from src/gromacs/gmxpreprocess/h_db.c with 97% similarity]
src/gromacs/gmxpreprocess/h_db.h
src/gromacs/gmxpreprocess/hackblock.cpp [moved from src/gromacs/gmxpreprocess/hackblock.c with 100% similarity]
src/gromacs/gmxpreprocess/hackblock.h
src/gromacs/gmxpreprocess/hizzie.cpp [moved from src/gromacs/gmxpreprocess/hizzie.c with 97% similarity]
src/gromacs/gmxpreprocess/hizzie.h
src/gromacs/gmxpreprocess/nm2type.cpp [moved from src/gromacs/gmxpreprocess/nm2type.c with 98% similarity]
src/gromacs/gmxpreprocess/nm2type.h
src/gromacs/gmxpreprocess/pdb2gmx.cpp [moved from src/gromacs/gmxpreprocess/pdb2gmx.c with 98% similarity]
src/gromacs/gmxpreprocess/pdb2gmx.h
src/gromacs/gmxpreprocess/pdb2top.cpp
src/gromacs/gmxpreprocess/pdb2top.h
src/gromacs/gmxpreprocess/pgutil.cpp [moved from src/gromacs/gmxpreprocess/pgutil.c with 100% similarity]
src/gromacs/gmxpreprocess/pgutil.h
src/gromacs/gmxpreprocess/read-conformation.h
src/gromacs/gmxpreprocess/readadress.cpp [moved from src/gromacs/gmxpreprocess/readadress.c with 98% similarity]
src/gromacs/gmxpreprocess/readir.cpp [moved from src/gromacs/gmxpreprocess/readir.c with 98% similarity]
src/gromacs/gmxpreprocess/readir.h
src/gromacs/gmxpreprocess/readpull.cpp [moved from src/gromacs/gmxpreprocess/readpull.c with 98% similarity]
src/gromacs/gmxpreprocess/readrot.cpp [moved from src/gromacs/gmxpreprocess/readrot.c with 99% similarity]
src/gromacs/gmxpreprocess/resall.cpp [moved from src/gromacs/gmxpreprocess/resall.c with 98% similarity]
src/gromacs/gmxpreprocess/resall.h
src/gromacs/gmxpreprocess/solvate.h
src/gromacs/gmxpreprocess/sortwater.cpp [moved from src/gromacs/gmxpreprocess/sortwater.c with 99% similarity]
src/gromacs/gmxpreprocess/sortwater.h
src/gromacs/gmxpreprocess/specbond.cpp [moved from src/gromacs/gmxpreprocess/specbond.c with 97% similarity]
src/gromacs/gmxpreprocess/specbond.h
src/gromacs/gmxpreprocess/ter_db.cpp [moved from src/gromacs/gmxpreprocess/ter_db.c with 91% similarity]
src/gromacs/gmxpreprocess/ter_db.h
src/gromacs/gmxpreprocess/tomorse.cpp [moved from src/gromacs/gmxpreprocess/tomorse.c with 98% similarity]
src/gromacs/gmxpreprocess/tomorse.h
src/gromacs/gmxpreprocess/topdirs.cpp [moved from src/gromacs/gmxpreprocess/topdirs.c with 100% similarity]
src/gromacs/gmxpreprocess/topdirs.h
src/gromacs/gmxpreprocess/topio.cpp [moved from src/gromacs/gmxpreprocess/topio.c with 99% similarity]
src/gromacs/gmxpreprocess/topio.h
src/gromacs/gmxpreprocess/toppush.cpp [moved from src/gromacs/gmxpreprocess/toppush.c with 97% similarity]
src/gromacs/gmxpreprocess/toppush.h
src/gromacs/gmxpreprocess/topshake.cpp [moved from src/gromacs/gmxpreprocess/topshake.c with 96% similarity]
src/gromacs/gmxpreprocess/topshake.h
src/gromacs/gmxpreprocess/toputil.cpp [moved from src/gromacs/gmxpreprocess/toputil.c with 96% similarity]
src/gromacs/gmxpreprocess/toputil.h
src/gromacs/gmxpreprocess/vsite_parm.cpp [moved from src/gromacs/gmxpreprocess/vsite_parm.c with 96% similarity]
src/gromacs/gmxpreprocess/vsite_parm.h
src/gromacs/gmxpreprocess/x2top.cpp [moved from src/gromacs/gmxpreprocess/x2top.c with 98% similarity]
src/gromacs/gmxpreprocess/x2top.h
src/gromacs/gmxpreprocess/xlate.cpp [moved from src/gromacs/gmxpreprocess/xlate.c with 99% similarity]
src/gromacs/gmxpreprocess/xlate.h
src/gromacs/math/vec.h