From b7de260fa0c5f0feb8d2a3eb71aabbcc274f0d67 Mon Sep 17 00:00:00 2001 From: Giovanni Bussi <giovanni.bussi@gmail.com> Date: Mon, 10 Dec 2012 11:35:39 +0100 Subject: [PATCH] Rearranged colvar, function, bias --- src/bias/.gitignore | 9 +++++++++ src/bias/ActionRegister.h | 1 + src/{core => bias}/Bias.cpp | 1 - src/{core => bias}/Bias.h | 6 +++--- src/{core => bias}/BiasExternal.cpp | 0 src/{core => bias}/BiasLWalls.cpp | 0 src/{core => bias}/BiasMetaD.cpp | 6 +++--- src/{core => bias}/BiasMovingRestraint.cpp | 0 src/{core => bias}/BiasRatchet.cpp | 0 src/{core => bias}/BiasRestraint.cpp | 0 src/{core => bias}/BiasUWalls.cpp | 0 src/{core => bias}/BiasValue.cpp | 0 src/bias/Makefile | 5 +++++ src/bias/module.type | 1 + src/colvar/.gitignore | 9 +++++++++ src/colvar/ActionRegister.h | 1 + src/colvar/Colvar.h | 1 + src/{core => colvar}/ColvarAngle.cpp | 0 src/{core => colvar}/ColvarContactMap.cpp | 0 src/{core => colvar}/ColvarCoordination.cpp | 0 src/{core => colvar}/ColvarDRMSD.cpp | 4 ++-- src/{core => colvar}/ColvarDipole.cpp | 0 src/{core => colvar}/ColvarDistance.cpp | 0 src/{core => colvar}/ColvarEnergy.cpp | 4 ++-- src/{core => colvar}/ColvarGyration.cpp | 2 +- src/{core => colvar}/ColvarPathMSD.cpp | 1 + src/{core => colvar}/ColvarPathMSDBase.cpp | 4 +++- src/{core => colvar}/ColvarPathMSDBase.h | 2 -- src/{core => colvar}/ColvarPropertyMap.cpp | 1 + src/{core => colvar}/ColvarRMSD.cpp | 4 ++-- src/{core => colvar}/ColvarTemplate.cpp | 0 src/{core => colvar}/ColvarTorsion.cpp | 0 src/{core => colvar}/ColvarVolume.cpp | 0 src/colvar/Makefile | 5 +++++ src/colvar/module.type | 1 + src/function/ActionRegister.h | 1 + src/{core => function}/Function.cpp | 0 src/{core => function}/Function.h | 4 ++-- src/{core => function}/FunctionCombine.cpp | 2 +- src/{core => function}/FunctionFuncPathMSD.cpp | 0 src/{core => function}/FunctionMatheval.cpp | 0 src/{core => function}/FunctionPiecewise.cpp | 2 +- src/{core => function}/FunctionSort.cpp | 0 src/{core => function}/FunctionTarget.cpp | 6 +++--- src/function/Makefile | 5 +++++ src/function/core | 1 + src/function/module.type | 1 + src/function/tools | 1 + 48 files changed, 67 insertions(+), 24 deletions(-) create mode 100644 src/bias/.gitignore create mode 100644 src/bias/ActionRegister.h rename src/{core => bias}/Bias.cpp (98%) rename src/{core => bias}/Bias.h (94%) rename src/{core => bias}/BiasExternal.cpp (100%) rename src/{core => bias}/BiasLWalls.cpp (100%) rename src/{core => bias}/BiasMetaD.cpp (99%) rename src/{core => bias}/BiasMovingRestraint.cpp (100%) rename src/{core => bias}/BiasRatchet.cpp (100%) rename src/{core => bias}/BiasRestraint.cpp (100%) rename src/{core => bias}/BiasUWalls.cpp (100%) rename src/{core => bias}/BiasValue.cpp (100%) create mode 100644 src/bias/Makefile create mode 100644 src/bias/module.type create mode 100644 src/colvar/.gitignore create mode 100644 src/colvar/ActionRegister.h create mode 100644 src/colvar/Colvar.h rename src/{core => colvar}/ColvarAngle.cpp (100%) rename src/{core => colvar}/ColvarContactMap.cpp (100%) rename src/{core => colvar}/ColvarCoordination.cpp (100%) rename src/{core => colvar}/ColvarDRMSD.cpp (99%) rename src/{core => colvar}/ColvarDipole.cpp (100%) rename src/{core => colvar}/ColvarDistance.cpp (100%) rename src/{core => colvar}/ColvarEnergy.cpp (97%) rename src/{core => colvar}/ColvarGyration.cpp (99%) rename src/{core => colvar}/ColvarPathMSD.cpp (99%) rename src/{core => colvar}/ColvarPathMSDBase.cpp (99%) rename src/{core => colvar}/ColvarPathMSDBase.h (98%) rename src/{core => colvar}/ColvarPropertyMap.cpp (99%) rename src/{core => colvar}/ColvarRMSD.cpp (99%) rename src/{core => colvar}/ColvarTemplate.cpp (100%) rename src/{core => colvar}/ColvarTorsion.cpp (100%) rename src/{core => colvar}/ColvarVolume.cpp (100%) create mode 100644 src/colvar/Makefile create mode 100644 src/colvar/module.type create mode 100644 src/function/ActionRegister.h rename src/{core => function}/Function.cpp (100%) rename src/{core => function}/Function.h (96%) rename src/{core => function}/FunctionCombine.cpp (100%) rename src/{core => function}/FunctionFuncPathMSD.cpp (100%) rename src/{core => function}/FunctionMatheval.cpp (100%) rename src/{core => function}/FunctionPiecewise.cpp (99%) rename src/{core => function}/FunctionSort.cpp (100%) rename src/{core => function}/FunctionTarget.cpp (97%) create mode 100644 src/function/Makefile create mode 120000 src/function/core create mode 100644 src/function/module.type create mode 120000 src/function/tools diff --git a/src/bias/.gitignore b/src/bias/.gitignore new file mode 100644 index 000000000..488855233 --- /dev/null +++ b/src/bias/.gitignore @@ -0,0 +1,9 @@ +/* +# in this directory, only accept source, Makefile and README +!/.gitignore +!/*.c +!/*.cpp +!/*.h +!/Makefile +!/README +!/module.type diff --git a/src/bias/ActionRegister.h b/src/bias/ActionRegister.h new file mode 100644 index 000000000..732046c8f --- /dev/null +++ b/src/bias/ActionRegister.h @@ -0,0 +1 @@ +#include "core/ActionRegister.h" diff --git a/src/core/Bias.cpp b/src/bias/Bias.cpp similarity index 98% rename from src/core/Bias.cpp rename to src/bias/Bias.cpp index 1a0864a78..0e38ed5af 100644 --- a/src/core/Bias.cpp +++ b/src/bias/Bias.cpp @@ -20,7 +20,6 @@ along with plumed. If not, see <http://www.gnu.org/licenses/>. +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */ #include "Bias.h" -#include "Colvar.h" using namespace PLMD; using namespace std; diff --git a/src/core/Bias.h b/src/bias/Bias.h similarity index 94% rename from src/core/Bias.h rename to src/bias/Bias.h index 00321cf0a..68f126135 100644 --- a/src/core/Bias.h +++ b/src/bias/Bias.h @@ -22,9 +22,9 @@ #ifndef __PLUMED_Bias_h #define __PLUMED_Bias_h -#include "ActionPilot.h" -#include "ActionWithValue.h" -#include "ActionWithArguments.h" +#include "core/ActionPilot.h" +#include "core/ActionWithValue.h" +#include "core/ActionWithArguments.h" #define PLUMED_BIAS_INIT(ao) Action(ao),Bias(ao) diff --git a/src/core/BiasExternal.cpp b/src/bias/BiasExternal.cpp similarity index 100% rename from src/core/BiasExternal.cpp rename to src/bias/BiasExternal.cpp diff --git a/src/core/BiasLWalls.cpp b/src/bias/BiasLWalls.cpp similarity index 100% rename from src/core/BiasLWalls.cpp rename to src/bias/BiasLWalls.cpp diff --git a/src/core/BiasMetaD.cpp b/src/bias/BiasMetaD.cpp similarity index 99% rename from src/core/BiasMetaD.cpp rename to src/bias/BiasMetaD.cpp index c397daff5..141a888b6 100644 --- a/src/core/BiasMetaD.cpp +++ b/src/bias/BiasMetaD.cpp @@ -22,10 +22,10 @@ #include "Bias.h" #include "ActionRegister.h" #include "tools/Grid.h" -#include "PlumedMain.h" -#include "Atoms.h" +#include "core/PlumedMain.h" +#include "core/Atoms.h" #include "tools/PlumedException.h" -#include "FlexibleBin.h" +#include "core/FlexibleBin.h" #include "tools/Matrix.h" #include "tools/Random.h" #include <string> diff --git a/src/core/BiasMovingRestraint.cpp b/src/bias/BiasMovingRestraint.cpp similarity index 100% rename from src/core/BiasMovingRestraint.cpp rename to src/bias/BiasMovingRestraint.cpp diff --git a/src/core/BiasRatchet.cpp b/src/bias/BiasRatchet.cpp similarity index 100% rename from src/core/BiasRatchet.cpp rename to src/bias/BiasRatchet.cpp diff --git a/src/core/BiasRestraint.cpp b/src/bias/BiasRestraint.cpp similarity index 100% rename from src/core/BiasRestraint.cpp rename to src/bias/BiasRestraint.cpp diff --git a/src/core/BiasUWalls.cpp b/src/bias/BiasUWalls.cpp similarity index 100% rename from src/core/BiasUWalls.cpp rename to src/bias/BiasUWalls.cpp diff --git a/src/core/BiasValue.cpp b/src/bias/BiasValue.cpp similarity index 100% rename from src/core/BiasValue.cpp rename to src/bias/BiasValue.cpp diff --git a/src/bias/Makefile b/src/bias/Makefile new file mode 100644 index 000000000..43a7e5620 --- /dev/null +++ b/src/bias/Makefile @@ -0,0 +1,5 @@ +USE=core tools +BUILDAFTER=config + +#generic makefile +include ../maketools/make.module diff --git a/src/bias/module.type b/src/bias/module.type new file mode 100644 index 000000000..fc25731b6 --- /dev/null +++ b/src/bias/module.type @@ -0,0 +1 @@ +default-on diff --git a/src/colvar/.gitignore b/src/colvar/.gitignore new file mode 100644 index 000000000..488855233 --- /dev/null +++ b/src/colvar/.gitignore @@ -0,0 +1,9 @@ +/* +# in this directory, only accept source, Makefile and README +!/.gitignore +!/*.c +!/*.cpp +!/*.h +!/Makefile +!/README +!/module.type diff --git a/src/colvar/ActionRegister.h b/src/colvar/ActionRegister.h new file mode 100644 index 000000000..732046c8f --- /dev/null +++ b/src/colvar/ActionRegister.h @@ -0,0 +1 @@ +#include "core/ActionRegister.h" diff --git a/src/colvar/Colvar.h b/src/colvar/Colvar.h new file mode 100644 index 000000000..fab079d4d --- /dev/null +++ b/src/colvar/Colvar.h @@ -0,0 +1 @@ +#include "core/Colvar.h" diff --git a/src/core/ColvarAngle.cpp b/src/colvar/ColvarAngle.cpp similarity index 100% rename from src/core/ColvarAngle.cpp rename to src/colvar/ColvarAngle.cpp diff --git a/src/core/ColvarContactMap.cpp b/src/colvar/ColvarContactMap.cpp similarity index 100% rename from src/core/ColvarContactMap.cpp rename to src/colvar/ColvarContactMap.cpp diff --git a/src/core/ColvarCoordination.cpp b/src/colvar/ColvarCoordination.cpp similarity index 100% rename from src/core/ColvarCoordination.cpp rename to src/colvar/ColvarCoordination.cpp diff --git a/src/core/ColvarDRMSD.cpp b/src/colvar/ColvarDRMSD.cpp similarity index 99% rename from src/core/ColvarDRMSD.cpp rename to src/colvar/ColvarDRMSD.cpp index 577ef0c5b..8b08e17e9 100644 --- a/src/core/ColvarDRMSD.cpp +++ b/src/colvar/ColvarDRMSD.cpp @@ -20,11 +20,11 @@ along with plumed. If not, see <http://www.gnu.org/licenses/>. +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */ #include "Colvar.h" -#include "PlumedMain.h" +#include "core/PlumedMain.h" #include "ActionRegister.h" #include "tools/PDB.h" #include "tools/DRMSD.h" -#include "Atoms.h" +#include "core/Atoms.h" using namespace std; diff --git a/src/core/ColvarDipole.cpp b/src/colvar/ColvarDipole.cpp similarity index 100% rename from src/core/ColvarDipole.cpp rename to src/colvar/ColvarDipole.cpp diff --git a/src/core/ColvarDistance.cpp b/src/colvar/ColvarDistance.cpp similarity index 100% rename from src/core/ColvarDistance.cpp rename to src/colvar/ColvarDistance.cpp diff --git a/src/core/ColvarEnergy.cpp b/src/colvar/ColvarEnergy.cpp similarity index 97% rename from src/core/ColvarEnergy.cpp rename to src/colvar/ColvarEnergy.cpp index 2b0b295e5..b07a314db 100644 --- a/src/core/ColvarEnergy.cpp +++ b/src/colvar/ColvarEnergy.cpp @@ -21,8 +21,8 @@ +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */ #include "Colvar.h" #include "ActionRegister.h" -#include "PlumedMain.h" -#include "Atoms.h" +#include "core/PlumedMain.h" +#include "core/Atoms.h" #include <string> #include <cmath> diff --git a/src/core/ColvarGyration.cpp b/src/colvar/ColvarGyration.cpp similarity index 99% rename from src/core/ColvarGyration.cpp rename to src/colvar/ColvarGyration.cpp index dfa0a39ee..566a5829b 100644 --- a/src/core/ColvarGyration.cpp +++ b/src/colvar/ColvarGyration.cpp @@ -21,7 +21,7 @@ +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */ #include "Colvar.h" #include "ActionRegister.h" -#include "PlumedMain.h" +#include "core/PlumedMain.h" #include "tools/Matrix.h" #include <string> diff --git a/src/core/ColvarPathMSD.cpp b/src/colvar/ColvarPathMSD.cpp similarity index 99% rename from src/core/ColvarPathMSD.cpp rename to src/colvar/ColvarPathMSD.cpp index f057f0fd7..4ca4bf0f0 100644 --- a/src/core/ColvarPathMSD.cpp +++ b/src/colvar/ColvarPathMSD.cpp @@ -20,6 +20,7 @@ along with plumed. If not, see <http://www.gnu.org/licenses/>. +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */ #include "ColvarPathMSDBase.h" +#include "core/PlumedMain.h" using namespace std; diff --git a/src/core/ColvarPathMSDBase.cpp b/src/colvar/ColvarPathMSDBase.cpp similarity index 99% rename from src/core/ColvarPathMSDBase.cpp rename to src/colvar/ColvarPathMSDBase.cpp index 38400d4cd..7c291ddca 100644 --- a/src/core/ColvarPathMSDBase.cpp +++ b/src/colvar/ColvarPathMSDBase.cpp @@ -25,13 +25,15 @@ #include "ColvarPathMSDBase.h" #include "ActionRegister.h" +#include "core/PlumedMain.h" + #include <string> #include <cstring> #include <cassert> #include <iostream> #include "tools/PDB.h" #include "tools/RMSD.h" -#include "Atoms.h" +#include "core/Atoms.h" #include "tools/Tools.h" using namespace std; diff --git a/src/core/ColvarPathMSDBase.h b/src/colvar/ColvarPathMSDBase.h similarity index 98% rename from src/core/ColvarPathMSDBase.h rename to src/colvar/ColvarPathMSDBase.h index cb2764fc6..eb514bda0 100644 --- a/src/core/ColvarPathMSDBase.h +++ b/src/colvar/ColvarPathMSDBase.h @@ -25,7 +25,6 @@ #include <cmath> -#include "PlumedMain.h" #include "Colvar.h" #include "ActionRegister.h" @@ -35,7 +34,6 @@ #include <iostream> #include "tools/PDB.h" #include "tools/RMSD.h" -#include "Atoms.h" #include "tools/Tools.h" using namespace std; diff --git a/src/core/ColvarPropertyMap.cpp b/src/colvar/ColvarPropertyMap.cpp similarity index 99% rename from src/core/ColvarPropertyMap.cpp rename to src/colvar/ColvarPropertyMap.cpp index 8d3bebf9c..8007cd8ce 100644 --- a/src/core/ColvarPropertyMap.cpp +++ b/src/colvar/ColvarPropertyMap.cpp @@ -20,6 +20,7 @@ along with plumed. If not, see <http://www.gnu.org/licenses/>. +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */ #include "ColvarPathMSDBase.h" +#include "core/PlumedMain.h" using namespace std; diff --git a/src/core/ColvarRMSD.cpp b/src/colvar/ColvarRMSD.cpp similarity index 99% rename from src/core/ColvarRMSD.cpp rename to src/colvar/ColvarRMSD.cpp index 28d5397e6..6b3b801cb 100644 --- a/src/core/ColvarRMSD.cpp +++ b/src/colvar/ColvarRMSD.cpp @@ -20,11 +20,11 @@ along with plumed. If not, see <http://www.gnu.org/licenses/>. +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */ #include "Colvar.h" -#include "PlumedMain.h" +#include "core/PlumedMain.h" #include "ActionRegister.h" #include "tools/PDB.h" #include "tools/RMSD.h" -#include "Atoms.h" +#include "core/Atoms.h" using namespace std; diff --git a/src/core/ColvarTemplate.cpp b/src/colvar/ColvarTemplate.cpp similarity index 100% rename from src/core/ColvarTemplate.cpp rename to src/colvar/ColvarTemplate.cpp diff --git a/src/core/ColvarTorsion.cpp b/src/colvar/ColvarTorsion.cpp similarity index 100% rename from src/core/ColvarTorsion.cpp rename to src/colvar/ColvarTorsion.cpp diff --git a/src/core/ColvarVolume.cpp b/src/colvar/ColvarVolume.cpp similarity index 100% rename from src/core/ColvarVolume.cpp rename to src/colvar/ColvarVolume.cpp diff --git a/src/colvar/Makefile b/src/colvar/Makefile new file mode 100644 index 000000000..43a7e5620 --- /dev/null +++ b/src/colvar/Makefile @@ -0,0 +1,5 @@ +USE=core tools +BUILDAFTER=config + +#generic makefile +include ../maketools/make.module diff --git a/src/colvar/module.type b/src/colvar/module.type new file mode 100644 index 000000000..fc25731b6 --- /dev/null +++ b/src/colvar/module.type @@ -0,0 +1 @@ +default-on diff --git a/src/function/ActionRegister.h b/src/function/ActionRegister.h new file mode 100644 index 000000000..732046c8f --- /dev/null +++ b/src/function/ActionRegister.h @@ -0,0 +1 @@ +#include "core/ActionRegister.h" diff --git a/src/core/Function.cpp b/src/function/Function.cpp similarity index 100% rename from src/core/Function.cpp rename to src/function/Function.cpp diff --git a/src/core/Function.h b/src/function/Function.h similarity index 96% rename from src/core/Function.h rename to src/function/Function.h index 7af89b2f5..2ed50420a 100644 --- a/src/core/Function.h +++ b/src/function/Function.h @@ -22,8 +22,8 @@ #ifndef __PLUMED_Function_h #define __PLUMED_Function_h -#include "ActionWithValue.h" -#include "ActionWithArguments.h" +#include "core/ActionWithValue.h" +#include "core/ActionWithArguments.h" namespace PLMD{ diff --git a/src/core/FunctionCombine.cpp b/src/function/FunctionCombine.cpp similarity index 100% rename from src/core/FunctionCombine.cpp rename to src/function/FunctionCombine.cpp index 4e4fb0f31..59eb6df39 100644 --- a/src/core/FunctionCombine.cpp +++ b/src/function/FunctionCombine.cpp @@ -19,8 +19,8 @@ You should have received a copy of the GNU Lesser General Public License along with plumed. If not, see <http://www.gnu.org/licenses/>. +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */ -#include "ActionRegister.h" #include "Function.h" +#include "ActionRegister.h" #include <cmath> #include <cassert> diff --git a/src/core/FunctionFuncPathMSD.cpp b/src/function/FunctionFuncPathMSD.cpp similarity index 100% rename from src/core/FunctionFuncPathMSD.cpp rename to src/function/FunctionFuncPathMSD.cpp diff --git a/src/core/FunctionMatheval.cpp b/src/function/FunctionMatheval.cpp similarity index 100% rename from src/core/FunctionMatheval.cpp rename to src/function/FunctionMatheval.cpp diff --git a/src/core/FunctionPiecewise.cpp b/src/function/FunctionPiecewise.cpp similarity index 99% rename from src/core/FunctionPiecewise.cpp rename to src/function/FunctionPiecewise.cpp index 7006ab2e6..d054ab12a 100644 --- a/src/core/FunctionPiecewise.cpp +++ b/src/function/FunctionPiecewise.cpp @@ -19,7 +19,7 @@ You should have received a copy of the GNU Lesser General Public License along with plumed. If not, see <http://www.gnu.org/licenses/>. +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */ -#include "ActionRegister.h" +#include "core/ActionRegister.h" #include "Function.h" #include <cmath> diff --git a/src/core/FunctionSort.cpp b/src/function/FunctionSort.cpp similarity index 100% rename from src/core/FunctionSort.cpp rename to src/function/FunctionSort.cpp diff --git a/src/core/FunctionTarget.cpp b/src/function/FunctionTarget.cpp similarity index 97% rename from src/core/FunctionTarget.cpp rename to src/function/FunctionTarget.cpp index 2a3f2dee7..d8b085fcf 100644 --- a/src/core/FunctionTarget.cpp +++ b/src/function/FunctionTarget.cpp @@ -20,11 +20,11 @@ along with plumed. If not, see <http://www.gnu.org/licenses/>. +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */ #include "Function.h" -#include "PlumedMain.h" #include "ActionRegister.h" #include "tools/PDB.h" -#include "TargetDist.h" -#include "Atoms.h" +#include "core/TargetDist.h" +#include "core/Atoms.h" +#include "core/PlumedMain.h" using namespace std; diff --git a/src/function/Makefile b/src/function/Makefile new file mode 100644 index 000000000..43a7e5620 --- /dev/null +++ b/src/function/Makefile @@ -0,0 +1,5 @@ +USE=core tools +BUILDAFTER=config + +#generic makefile +include ../maketools/make.module diff --git a/src/function/core b/src/function/core new file mode 120000 index 000000000..c73d9e17d --- /dev/null +++ b/src/function/core @@ -0,0 +1 @@ +../core \ No newline at end of file diff --git a/src/function/module.type b/src/function/module.type new file mode 100644 index 000000000..fc25731b6 --- /dev/null +++ b/src/function/module.type @@ -0,0 +1 @@ +default-on diff --git a/src/function/tools b/src/function/tools new file mode 120000 index 000000000..4887d6e0c --- /dev/null +++ b/src/function/tools @@ -0,0 +1 @@ +../tools \ No newline at end of file -- GitLab