Skip to content

Commit

Permalink
Merge 56ea9e9 into 61b137f
Browse files Browse the repository at this point in the history
  • Loading branch information
Iximiel authored May 18, 2023
2 parents 61b137f + 56ea9e9 commit 1cea136
Show file tree
Hide file tree
Showing 97 changed files with 1,871 additions and 9 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,4 @@ makefile.dep
/config.*
/autom4*
/stamp-h
build
29 changes: 29 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
cmake_minimum_required(VERSION 3.20.2)



project(Plumed2 LANGUAGES CXX)

set(PLUMED_VERSION_SHORT "2.10")
set(PLUMED_VERSION_LONG "2.10.0-dev")
#set(PLUMED_VERSION_GIT "23e754fd4-dirty")
execute_process(
COMMAND git describe --long --dirty --always
WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}
OUTPUT_VARIABLE PLUMED_VERSION_GIT
OUTPUT_STRIP_TRAILING_WHITESPACE
)
set(PLUMED_VERSION_MAJOR 2)
set(PLUMED_VERSION_MINOR 10)
set(PLUMED_VERSION_PATCH 0)
#as now CMake is only experimental, it can be useful if you use vscode or other
#IDE that have an interface with it, but we are not still confident that it is ready
#for installation purposes
set(CMAKE_SKIP_INSTALL_RULES YES)
option(risk_accepted "CMake is experimental use at your own risk" OFF)
if(NOT risk_accepted)
message(FATAL_ERROR "You must accept the risk to use the experimental cmake compilation: -Drisk_accepted=ON")
endif(NOT risk_accepted)


add_subdirectory(src)
1 change: 1 addition & 0 deletions src/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
!/s2cm
!/pytorch
!/membranefusion
!CMakeLists.txt

# And just ignore these files
*.xxd
Expand Down
344 changes: 344 additions & 0 deletions src/CMakeLists.txt

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions src/adjmat/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@
!/Makefile
!/README
!/module.type
!/CMakeLists.txt
37 changes: 37 additions & 0 deletions src/adjmat/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#the variable module_name is set up as a sugar to reduce "copy-paste" errors
set (module_name "adjmat")
#Note that the macros here require this directory added as a subdir of plumed/src
option(module_${module_name} "activate module ${module_name}" OFF)
ADDMODULETOKERNEL(${module_name}
ActionWithInputMatrix.cpp
AdjacencyMatrixBase.cpp
AdjacencyMatrixVessel.cpp
AlignedMatrixBase.cpp
ClusterAnalysisBase.cpp
ClusterDiameter.cpp
ClusterDistribution.cpp
ClusteringBase.cpp
ClusterProperties.cpp
ClusterSize.cpp
ClusterWithSurface.cpp
ContactAlignedMatrix.cpp
ContactMatrix.cpp
DFSClustering.cpp
DumpGraph.cpp
HbondMatrix.cpp
MatrixColumnSums.cpp
MatrixRowSums.cpp
OutputCluster.cpp
SMACMatrix.cpp
Sprint.cpp
TopologyMatrix.cpp
)
ADDMODULENEEDS(${module_name}
core tools vesselbase multicolvar
)
ADDMODULEDEPENDENCIES(${module_name}
#core #tools depends on
#tools #vesselbase depends on
#vesselbase # multicolvar depends on
multicolvar
)
1 change: 1 addition & 0 deletions src/analysis/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@
!/Makefile
!/README
!/module.type
!/CMakeLists.txt
35 changes: 35 additions & 0 deletions src/analysis/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#the variable module_name is set up as a sugar to reduce "copy-paste" errors
set (module_name "analysis")
#Note that the macros here require this directory added as a subdir of plumed/src
option(module_${module_name} "activate module ${module_name}" ON)
ADDMODULETOKERNEL(${module_name}
AnalysisBase.cpp
Average.cpp
AverageVessel.cpp
Committor.cpp
DataCollectionObject.cpp
EuclideanDissimilarityMatrix.cpp
FarthestPointSampling.cpp
Histogram.cpp
LandmarkSelectionBase.cpp
LandmarkStaged.cpp
OutputColvarFile.cpp
OutputPDBFile.cpp
PrintDissimilarityMatrix.cpp
ReadAnalysisFrames.cpp
ReadDissimilarityMatrix.cpp
ReselectLandmarks.cpp
SelectRandomFrames.cpp
SelectWithStride.cpp
WhamHistogram.cpp
WhamWeights.cpp
)
ADDMODULENEEDS(${module_name}
core tools reference vesselbase gridtools multicolvar bias
)
ADDMODULEDEPENDENCIES(${module_name}
reference #core
#TODO: resolve THIS circular dependency:
#vesselbase gridtools multicolvar# it does actually depend on them, but it is better to avid cyclic dependencies
bias #tools core
)
1 change: 1 addition & 0 deletions src/annfunc/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ core/**
deps/**
function/**
*.o
!/CMakeLists.txt
13 changes: 13 additions & 0 deletions src/annfunc/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#the variable module_name is set up as a sugar to reduce "copy-paste" errors
set (module_name "annfunc")
#Note that the macros here require this directory added as a subdir of plumed/src
option(module_${module_name} "activate module ${module_name}" OFF)
ADDMODULETOKERNEL(${module_name}
ANN.cpp
)
ADDMODULENEEDS(${module_name}
core function
)
ADDMODULEDEPENDENCIES(${module_name}
function #reference tools core lepton
)
42 changes: 42 additions & 0 deletions src/asmjit/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
#the variable module_name is set up as a sugar to reduce "copy-paste" errors
set (module_name "asmjit")
#Note that the macros here require this directory added as a subdir of plumed/src
set(module_${module_name} ON CACHE INTERNAL "always active module ${module_name}")
ADDMODULETOKERNEL(${module_name}
arch.cpp
assembler.cpp
codebuilder.cpp
codecompiler.cpp
codeemitter.cpp
codeholder.cpp
constpool.cpp
cpuinfo.cpp
func.cpp
globals.cpp
inst.cpp
logging.cpp
operand.cpp
osutils.cpp
regalloc.cpp
runtime.cpp
string.cpp
utils.cpp
vmem.cpp
x86assembler.cpp
x86builder.cpp
x86compiler.cpp
x86inst.cpp
x86instimpl.cpp
x86internal.cpp
x86logging.cpp
x86operand.cpp
x86operand_regs.cpp
x86regalloc.cpp
zone.cpp
)
ADDMODULENEEDS(${module_name}

)
ADDMODULEDEPENDENCIES(${module_name}

)
1 change: 1 addition & 0 deletions src/bias/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@
!/Makefile
!/README
!/module.type
!/CMakeLists.txt
29 changes: 29 additions & 0 deletions src/bias/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#the variable module_name is set up as a sugar to reduce "copy-paste" errors
set (module_name "bias")
#Note that the macros here require this directory added as a subdir of plumed/src
option(module_${module_name} "activate module ${module_name}" ON)
ADDMODULETOKERNEL(${module_name}
ABMD.cpp
Bias.cpp
BiasValue.cpp
ExtendedLagrangian.cpp
External.cpp
LWalls.cpp
MaxEnt.cpp
MetaD.cpp
MovingRestraint.cpp
PBMetaD.cpp
Restraint.cpp
ReweightBase.cpp
ReweightBias.cpp
ReweightMetad.cpp
ReweightTemperaturePressure.cpp
ReweightWham.cpp
UWalls.cpp
)
ADDMODULENEEDS(${module_name}
core tools
)
ADDMODULEDEPENDENCIES(${module_name}
core #tools
)
1 change: 1 addition & 0 deletions src/blas/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@
!/Makefile
!/README
!/module.type
!/CMakeLists.txt
65 changes: 65 additions & 0 deletions src/blas/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
#the variable module_name is set up as a sugar to reduce "copy-paste" errors
set (module_name "blas")
string(TOUPPER ${module_name} externalLib)
#Note that the macros here require this directory added as a subdir of plumed/src
set(module_${module_name} ON CACHE INTERNAL "always active module ${module_name}")
option(useExternal_${externalLib} "enable search for external ${externalLib}, default ON" ON)
ADDMODULETOKERNEL(${module_name}
blas.cpp
)
#ADDMODULENEEDS(${module_name}
#
#)

#include(FortranCInterface)
if (useExternal_${externalLib})
find_package(${externalLib})
endif (useExternal_${externalLib})

if (${externalLib}_FOUND)
target_compile_definitions(${module_name}
PUBLIC
__PLUMED_HAS_EXTERNAL_BLAS=1)
include(CheckSourceCompiles)
#From the manual:The check is only performed once, with the result cached in
#the variable named by <resultVar>. Every subsequent CMake run will re-use
#this cached value rather than performing the check again, even if the
#<code> changes. In order to force the check to be re-evaluated, the
#variable named by <resultVar> must be manually removed from the cache.
set(CMAKE_REQUIRED_LIBRARIES "BLAS::BLAS")
check_source_compiles(C #using C to not use extern "C"
"int main(void) {
double a,b,c,s;
srotg_(&a,&b,&c,&s);
}"
UnderscodeBlas)
check_source_compiles(C #using C to not use extern "C"
"int main(void) {
double a,b,c,s;
srotg(&a,&b,&c,&s);
}"
noUnderscodeBlas
)
unset(CMAKE_REQUIRED_LIBRARIES)

if(noUnderscodeBlas AND NOT UnderscodeBlas)
target_compile_definitions(${module_name}
PUBLIC
F77_NO_UNDERSCORE)
elseif(NOT noUnderscodeBlas AND NOT UnderscodeBlas)
message(WARNING "both srtog_ and srtog are not linkable")
elseif(noUnderscodeBlas AND UnderscodeBlas)
message(WARNING "both srtog_ and srtog are linkable")
endif(noUnderscodeBlas AND NOT UnderscodeBlas)

target_link_libraries(${module_name}
PUBLIC
${externalLib}::${externalLib})
else()
set(${externalLib}_FOUND OFF)
endif (${externalLib}_FOUND)
set (${externalLib}_FOUND ${externalLib}_FOUND PARENT_SCOPE)

# print_target_property(${module_name} COMPILE_OPTIONS)
# print_target_property(${module_name} COMPILE_DEFINITIONS)
# print_target_property(${module_name} INTERFACE_COMPILE_DEFINITIONS)
14 changes: 7 additions & 7 deletions src/blas/blas.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,22 +90,22 @@ Erik Lindahl, 2008-10-07.

#ifndef __PLUMED_BLAS_RETURNS_FLOAT
#define __PLUMED_BLAS_RETURNS_FLOAT float
#endif
#endif //ifndef __PLUMED_BLAS_RETURNS_FLOAT
#if ! defined (__PLUMED_HAS_EXTERNAL_BLAS)
#include "def_internal.h"
namespace PLMD{
namespace blas{
#else
namespace PLMD{
namespace blas{
}
}
}/*PLMD*/
}/*blas*/
#include "def_external.h"
extern "C"{
#endif
#endif //! defined (__PLUMED_HAS_EXTERNAL_BLAS)
#if 0
}
#endif
#endif //0

/* Double precision versions */
double
Expand Down Expand Up @@ -245,9 +245,9 @@ int
}
#if ! defined (__PLUMED_HAS_EXTERNAL_BLAS)
}
#endif
#endif //! defined (__PLUMED_HAS_EXTERNAL_BLAS)

/*! \endcond */

#endif /* GMX_BLAS_H */
#endif
#endif //__PLUMED_blas_blas_h
2 changes: 1 addition & 1 deletion src/blas/def_external.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,4 @@ Erik Lindahl, 2008-10-07.
#define plumed_blas_strmv PLUMED_BLAS_F77_FUNC(strmv,STRMV)
#define plumed_blas_strsm PLUMED_BLAS_F77_FUNC(strsm,STRSM)
#define plumed_blas_isamax PLUMED_BLAS_F77_FUNC(isamax,ISAMAX)
#endif
#endif //__PLUMED_blas_def_external_h
2 changes: 1 addition & 1 deletion src/blas/def_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -94,4 +94,4 @@ Erik Lindahl, 2008-10-07.
#define plumed_blas_strsm PLMD::blas::PLUMED_BLAS_F77_FUNC(strsm,STRSM)
/** \ingroup internal-blas */
#define plumed_blas_isamax PLMD::blas::PLUMED_BLAS_F77_FUNC(isamax,ISAMAX)
#endif
#endif //__PLUMED_blas_def_internal_h
1 change: 1 addition & 0 deletions src/cltools/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@
!/README
!/module.type
!/*.sh
!/CMakeLists.txt
Loading

0 comments on commit 1cea136

Please sign in to comment.