ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/OpenMD/trunk/CMakeLists.txt
Revision: 2012
Committed: Wed Aug 13 17:18:37 2014 UTC (10 years, 9 months ago) by gezelter
Content type: text/plain
File size: 28557 byte(s)
Log Message:
Added mdShrink utility

File Contents

# Content
1 # Top level cmake script for OpenMD.
2 project(OpenMD CXX)
3 cmake_minimum_required(VERSION 2.8.5)
4
5 SET(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules")
6
7 if (NOT CMAKE_BUILD_TYPE)
8 set(CMAKE_BUILD_TYPE "Release")
9 endif()
10
11 IF(WIN32)
12 ADD_DEFINITIONS(/D _CRT_SECURE_NO_WARNINGS)
13 ENDIF(WIN32)
14
15 find_package(MPI)
16 if (NOT MPI_CXX_FOUND)
17 message(STATUS "========== OpenMD Parallel Information ==========")
18 message(STATUS )
19 message(STATUS "No MPI compiler found. Perhaps you want to set one explicitly?")
20 message(STATUS "To override the default compiler, set the environment variable")
21 message(STATUS " export CXX=/full/path/to/mpic++")
22 message(STATUS "in bash or ksh or sh. In csh or tcsh, use:")
23 message(STATUS " setenv CXX /full/path/to/mpic++")
24 message(STATUS "before running the cmake command.")
25 message(STATUS )
26 message(STATUS "=================================================")
27 endif()
28 IF ( MPI_CXX_FOUND )
29 INCLUDE_DIRECTORIES(${MPI_CXX_INCLUDE_PATH})
30 ENDIF()
31
32 include(CheckCXXCompilerFlag)
33 include(CheckIncludeFileCXX)
34 include(CheckCXXSymbolExists)
35
36 # OpenMD version number.
37 set (VERSION_MAJOR "2")
38 set (VERSION_MINOR "2")
39 set (VERSION_TINY "0")
40 option(SINGLE_PRECISION "Build Single precision (float) version" OFF)
41
42 IF(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
43 IF(WIN32)
44 SET(CMAKE_INSTALL_PREFIX "C:/Program Files (x86)/openmd"
45 CACHE PATH "OpenMD install prefix" FORCE)
46 ELSE(WIN32)
47 SET(CMAKE_INSTALL_PREFIX "/usr/local/openmd"
48 CACHE PATH "OpenMD install prefix" FORCE)
49 ENDIF(WIN32)
50 ENDIF(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
51 ADD_DEFINITIONS( -DFRC_PATH=${CMAKE_INSTALL_PREFIX}/forceFields )
52
53 # ---------- Setup output Directories -------------------------
54 SET (CMAKE_LIBRARY_OUTPUT_DIRECTORY
55 ${PROJECT_BINARY_DIR}/lib
56 CACHE PATH
57 "Single directory for all shared libraries"
58 )
59 # --------- Setup the Executable output Directory -------------
60 SET (CMAKE_RUNTIME_OUTPUT_DIRECTORY
61 ${PROJECT_BINARY_DIR}/bin
62 CACHE PATH
63 "Single directory for all Executables."
64 )
65 # --------- Setup the static library directory -------------
66 SET (CMAKE_ARCHIVE_OUTPUT_DIRECTORY
67 ${PROJECT_BINARY_DIR}/lib
68 CACHE PATH
69 "Single directory for all static libraries."
70 )
71
72 FIND_PACKAGE(Subversion)
73 IF ( Subversion_FOUND AND EXISTS ${PROJECT_SOURCE_DIR}/.svn )
74 Subversion_WC_INFO(${PROJECT_SOURCE_DIR} Project)
75 MESSAGE(STATUS "Current revision is ${Project_WC_REVISION}")
76 Subversion_WC_LOG(${PROJECT_SOURCE_DIR} Project)
77 SET(SVN_REV ${Project_WC_REVISION})
78 SET(GENERATELOGS "${PROJECT_SOURCE_DIR}/doc/svn2cl")
79 ADD_CUSTOM_TARGET(ChangeLog
80 COMMAND ${GENERATELOGS} "--group-by-day" "--include-rev"
81 "--linelen=78" "--output=${PROJECT_BINARY_DIR}/ChangeLog" "${PROJECT_SOURCE_DIR}"
82 )
83 ELSE()
84 SET(SVN_REV Release)
85 ENDIF()
86
87 check_include_file_cxx(conio.h HAVE_CONIO_H)
88 check_cxx_symbol_exists(strncasecmp "string.h" HAVE_STRNCASECMP)
89
90 # Optional libraries: If we can find these, we will build with them
91 # Look for OpenBabel libraries
92 find_package(OpenBabel2)
93 IF(OPENBABEL2_FOUND)
94 SET(USE_OPENBABEL)
95 include_directories(${OPENBABEL2_INCLUDE_DIR})
96 # link libraries are added only for targets that need them.
97 ELSE(OPENBABEL2_FOUND)
98 MESSAGE(STATUS "No OpenBabel found - will not build atom2md")
99 ENDIF(OPENBABEL2_FOUND)
100
101 find_package(Eigen3)
102 if(EIGEN3_FOUND)
103 add_definitions(-DHAVE_EIGEN -DHAVE_EIGEN3)
104 include_directories(${EIGEN3_INCLUDE_DIR})
105 else()
106 find_package(Eigen2) # find and setup Eigen2
107 if(EIGEN2_FOUND)
108 add_definitions (-DHAVE_EIGEN)
109 include_directories(${EIGEN2_INCLUDE_DIR})
110 endif()
111 endif()
112
113 #Look for QHULL Libraries
114 SET(QHULL_USE_STATIC 1)
115 find_package(Qhull)
116 IF(QHULL_FOUND)
117 SET(HAVE_QHULL 1)
118 include_directories(${QHULL_INCLUDE_DIR})
119 LINK_LIBRARIES(${QHULL_LIBRARIES})
120 ELSE(QHULL_FOUND)
121 MESSAGE(STATUS "No Qhull found - will be missing some features")
122 ENDIF(QHULL_FOUND)
123
124 # zlib stuff
125 find_package(ZLIB)
126 if(ZLIB_FOUND)
127 SET(HAVE_LIBZ 1)
128 add_definitions(-DHAVE_LIBZ)
129 include_directories(${ZLIB_INCLUDE_DIR})
130 LINK_LIBRARIES(${ZLIB_LIBRARIES})
131 ELSE(ZLIB_FOUND)
132 MESSAGE(STATUS "No zlib found - will be missing compressed dump files")
133 endif(ZLIB_FOUND)
134
135 #FFTW3
136 IF(SINGLE_PRECISION)
137 find_package(FFTW3 COMPONENTS single)
138 else()
139 find_package(FFTW3 COMPONENTS double)
140 endif(SINGLE_PRECISION)
141 if (FFTW3_FOUND)
142 include_directories (${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} ${FFTW3_INCLUDE_DIR})
143 SET(HAVE_LIBFFTW 1)
144 SET(HAVE_FFTW3_H 1)
145 INCLUDE_DIRECTORIES(${FFTW3_INCLUDE_DIR})
146 LINK_LIBRARIES(${FFTW3_LIBRARIES})
147 ELSE(FFTW3_FOUND)
148 MESSAGE(STATUS "No fftw3 found - will be missing some analysis modules")
149 endif (FFTW3_FOUND)
150
151
152 # add a target to generate API documentation with Doxygen
153 find_package(Doxygen)
154 if(DOXYGEN_FOUND)
155 configure_file("${CMAKE_CURRENT_SOURCE_DIR}/doc/Doxyfile.in" "${CMAKE_CURRENT_BINARY_DIR}/doc/Doxyfile" @ONLY)
156 add_custom_target(doc
157 ${DOXYGEN_EXECUTABLE} "${CMAKE_CURRENT_BINARY_DIR}/doc/Doxyfile"
158 WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/doc"
159 COMMENT "Generating API documentation with Doxygen" VERBATIM
160 )
161 endif(DOXYGEN_FOUND)
162
163 FIND_PACKAGE(Perl)
164 IF(PERL_FOUND)
165 SET(PERL ${PERL_EXECUTABLE})
166 ELSE(PERL_FOUND)
167 MESSAGE(STATUS "Failed to find perl - some scripts will not be made")
168 ENDIF(PERL_FOUND)
169
170 SET(PERL_INSTALLDIRS "site" CACHE STRING "Perl installation
171 locations")
172
173 FIND_PACKAGE(PythonInterp)
174 IF(PYTHON_EXECUTABLE)
175 SET(PYTHON ${PYTHON_EXECUTABLE})
176 ELSE(PYTHON_EXECUTABLE)
177 MESSAGE(STATUS "Failed to find python - some scripts will not be made")
178 ENDIF(PYTHON_EXECUTABLE)
179
180 configure_file (
181 "${PROJECT_SOURCE_DIR}/src/config.h.cmake"
182 "${PROJECT_BINARY_DIR}/config.h"
183 )
184 configure_file(
185 "${PROJECT_SOURCE_DIR}/src/utils/Revision.cpp.in"
186 "${PROJECT_BINARY_DIR}/Revision.cpp"
187 )
188
189 include_directories("${PROJECT_BINARY_DIR}" "${PROJECT_SOURCE_DIR}/src")
190
191 #Add executables for build
192 set (PROGRAMS
193 openmd
194 openmd_MPI
195 Dump2XYZ
196 simpleBuilder
197 StaticProps
198 DynamicProps
199 randomBuilder
200 nanoparticleBuilder
201 thermalizer
202 recenter
203 atom2md
204 Hydro)
205
206 set(SOURCE
207 "${PROJECT_BINARY_DIR}/Revision.cpp"
208 src/antlr/ANTLRUtil.cpp
209 src/antlr/ASTFactory.cpp
210 src/antlr/ASTNULLType.cpp
211 src/antlr/ASTRefCount.cpp
212 src/antlr/BaseAST.cpp
213 src/antlr/BitSet.cpp
214 src/antlr/CommonAST.cpp
215 src/antlr/CommonASTWithHiddenTokens.cpp
216 src/antlr/CommonHiddenStreamToken.cpp
217 src/antlr/CommonToken.cpp
218 src/antlr/LLkParser.cpp
219 src/antlr/MismatchedCharException.cpp
220 src/antlr/MismatchedTokenException.cpp
221 src/antlr/NoViableAltException.cpp
222 src/antlr/NoViableAltForCharException.cpp
223 src/antlr/Parser.cpp
224 src/antlr/RecognitionException.cpp
225 src/antlr/String.cpp
226 src/antlr/Token.cpp
227 src/antlr/TokenRefCount.cpp
228 src/antlr/TokenStreamBasicFilter.cpp
229 src/antlr/TokenStreamHiddenTokenFilter.cpp
230 src/antlr/TokenStreamRewriteEngine.cpp
231 src/antlr/TokenStreamSelector.cpp
232 src/antlr/TreeParser.cpp
233 src/brains/BlockSnapshotManager.cpp
234 src/brains/DataStorage.cpp
235 src/brains/ForceField.cpp
236 src/brains/MoleculeCreator.cpp
237 src/brains/PairList.cpp
238 src/brains/Register.cpp
239 src/brains/SimSnapshotManager.cpp
240 src/brains/Snapshot.cpp
241 src/brains/Stats.cpp
242 src/constraints/Shake.cpp
243 src/constraints/Rattle.cpp
244 src/hydrodynamics/Ellipsoid.cpp
245 src/hydrodynamics/HydroProp.cpp
246 src/hydrodynamics/Sphere.cpp
247 src/integrators/DLM.cpp
248 src/flucq/FluctuatingChargeLangevin.cpp
249 src/flucq/FluctuatingChargeParameters.cpp
250 src/flucq/FluctuatingChargeNVT.cpp
251 src/flucq/FluctuatingChargePropagator.cpp
252 src/integrators/Integrator.cpp
253 src/integrators/IntegratorFactory.cpp
254 src/integrators/LangevinDynamics.cpp
255 src/integrators/LDForceManager.cpp
256 src/integrators/NgammaT.cpp
257 src/integrators/NPA.cpp
258 src/integrators/NPAT.cpp
259 src/integrators/NPrT.cpp
260 src/integrators/NPT.cpp
261 src/integrators/NPTf.cpp
262 src/integrators/NPTi.cpp
263 src/integrators/NPTsz.cpp
264 src/integrators/NPTxyz.cpp
265 src/integrators/NVE.cpp
266 src/integrators/NVT.cpp
267 src/integrators/VelocityVerletIntegrator.cpp
268 src/io/AtomTypesSectionParser.cpp
269 src/io/BaseAtomTypesSectionParser.cpp
270 src/io/BendTypesSectionParser.cpp
271 src/io/BondTypesSectionParser.cpp
272 src/io/ChargeAtomTypesSectionParser.cpp
273 src/io/DirectionalAtomTypesSectionParser.cpp
274 src/io/EAMAtomTypesSectionParser.cpp
275 src/io/FluctuatingChargeAtomTypesSectionParser.cpp
276 src/io/ForceFieldOptions.cpp
277 src/io/GayBerneAtomTypesSectionParser.cpp
278 src/io/Globals.cpp
279 src/io/InversionTypesSectionParser.cpp
280 src/io/LennardJonesAtomTypesSectionParser.cpp
281 src/io/MultipoleAtomTypesSectionParser.cpp
282 src/io/NonBondedInteractionsSectionParser.cpp
283 src/io/OptionSectionParser.cpp
284 src/io/ParamConstraint.cpp
285 src/io/PolarizableAtomTypesSectionParser.cpp
286 src/io/SCAtomTypesSectionParser.cpp
287 src/io/SectionParser.cpp
288 src/io/SectionParserManager.cpp
289 src/io/ShapeAtomTypesSectionParser.cpp
290 src/io/StickyAtomTypesSectionParser.cpp
291 src/io/StickyPowerAtomTypesSectionParser.cpp
292 src/io/TorsionTypesSectionParser.cpp
293 src/io/ZConsReader.cpp
294 src/lattice/CubicLattice.cpp
295 src/lattice/FCCLattice.cpp
296 src/lattice/Lattice.cpp
297 src/lattice/LatticeFactory.cpp
298 src/lattice/shapedLattice.cpp
299 src/math/ChebyshevT.cpp
300 src/math/ChebyshevU.cpp
301 src/math/CubicSpline.cpp
302 src/math/LegendrePolynomial.cpp
303 src/math/RealSphericalHarmonic.cpp
304 src/math/RMSD.cpp
305 src/math/SeqRandNumGen.cpp
306 src/math/SphericalHarmonic.cpp
307 src/math/Wigner3jm.cpp
308 src/mdParser/FilenameObserver.cpp
309 src/optimization/OptimizationFactory.cpp
310 src/optimization/Armijo.cpp
311 src/optimization/BFGS.cpp
312 src/optimization/ConjugateGradient.cpp
313 src/optimization/Constraint.cpp
314 src/optimization/EndCriteria.cpp
315 src/optimization/LineSearch.cpp
316 src/optimization/LineSearchBasedMethod.cpp
317 src/optimization/SteepestDescent.cpp
318 src/optimization/PotentialEnergyObjectiveFunction.cpp
319 src/optimization/MinimizerParameters.cpp
320 src/nonbonded/EAM.cpp
321 src/nonbonded/GB.cpp
322 src/nonbonded/InteractionManager.cpp
323 src/nonbonded/LJ.cpp
324 src/nonbonded/MAW.cpp
325 src/nonbonded/Morse.cpp
326 src/nonbonded/RepulsivePower.cpp
327 src/nonbonded/SC.cpp
328 src/nonbonded/Sticky.cpp
329 src/nonbonded/SwitchingFunction.cpp
330 src/primitives/Atom.cpp
331 src/primitives/Bend.cpp
332 src/primitives/DirectionalAtom.cpp
333 src/primitives/GhostBend.cpp
334 src/primitives/GhostTorsion.cpp
335 src/primitives/Inversion.cpp
336 src/primitives/Molecule.cpp
337 src/primitives/RigidBody.cpp
338 src/primitives/StuntDouble.cpp
339 src/primitives/ShortRangeInteraction.cpp
340 src/primitives/Torsion.cpp
341 src/primitives/UreyBradleyBend.cpp
342 src/perturbations/ElectricField.cpp
343 src/restraints/MolecularRestraint.cpp
344 src/restraints/ObjectRestraint.cpp
345 src/selection/HullFinder.cpp
346 src/selection/IndexFinder.cpp
347 src/selection/NameFinder.cpp
348 src/selection/SelectionCompiler.cpp
349 src/selection/SelectionEvaluator.cpp
350 src/selection/SelectionManager.cpp
351 src/selection/SelectionToken.cpp
352 src/selection/TokenMap.cpp
353 src/selection/SelectionSet.cpp
354 src/types/AtomStamp.cpp
355 src/types/AtomType.cpp
356 src/types/BendStamp.cpp
357 src/types/BondStamp.cpp
358 src/types/CharmmTorsionType.cpp
359 src/types/Component.cpp
360 src/types/ConstraintStamp.cpp
361 src/types/CutoffGroupStamp.cpp
362 src/types/DirectionalAdapter.cpp
363 src/types/EAMAdapter.cpp
364 src/types/FixedChargeAdapter.cpp
365 src/types/FluctuatingChargeAdapter.cpp
366 src/types/FragmentStamp.cpp
367 src/types/GayBerneAdapter.cpp
368 src/types/ImproperCosineInversionType.cpp
369 src/types/InversionStamp.cpp
370 src/types/LennardJonesAdapter.cpp
371 src/types/MoleculeStamp.cpp
372 src/types/MultipoleAdapter.cpp
373 src/types/NonBondedInteractionType.cpp
374 src/types/PolarizableAdapter.cpp
375 src/types/RestraintStamp.cpp
376 src/types/RigidBodyStamp.cpp
377 src/types/ShapeAtomType.cpp
378 src/types/StickyAdapter.cpp
379 src/types/SuttonChenAdapter.cpp
380 src/types/TorsionStamp.cpp
381 src/types/ZconsStamp.cpp
382 src/utils/ElementsTable.cpp
383 src/utils/MoLocator.cpp
384 src/utils/PropertyMap.cpp
385 src/utils/StringTokenizer.cpp
386 src/utils/StringUtils.cpp
387 src/utils/Trim.cpp
388 src/utils/Utility.cpp
389 src/utils/wildcards.cpp
390 src/visitors/AtomNameVisitor.cpp
391 src/visitors/AtomVisitor.cpp
392 src/visitors/CompositeVisitor.cpp
393 src/visitors/LipidTransVisitor.cpp
394 src/visitors/OtherVisitor.cpp
395 src/visitors/ReplacementVisitor.cpp
396 src/visitors/RigidBodyVisitor.cpp
397 src/visitors/ZconsVisitor.cpp
398 src/rnemd/RNEMDParameters.cpp
399 src/clusters/Icosahedron.cpp
400 src/clusters/Decahedron.cpp
401 )
402
403 set( PARALLEL_SOURCE
404 src/antlr/CharBuffer.cpp
405 src/antlr/CharScanner.cpp
406 src/antlr/InputBuffer.cpp
407 src/antlr/TokenBuffer.cpp
408 src/mdParser/MDLexer.cpp
409 src/mdParser/MDParser.cpp
410 src/mdParser/MDTreeParser.cpp
411 src/brains/ForceManager.cpp
412 src/brains/SimCreator.cpp
413 src/brains/SimInfo.cpp
414 src/brains/Thermo.cpp
415 src/constraints/ZconstraintForceManager.cpp
416 src/flucq/FluctuatingChargeConstraints.cpp
417 src/flucq/FluctuatingChargeObjectiveFunction.cpp
418 src/flucq/FluctuatingChargeForces.cpp
419 src/integrators/LangevinHullForceManager.cpp
420 src/rnemd/RNEMD.cpp
421 src/integrators/Velocitizer.cpp
422 src/io/ConstraintWriter.cpp
423 src/io/DumpReader.cpp
424 src/io/DumpWriter.cpp
425 src/io/RestReader.cpp
426 src/io/RestWriter.cpp
427 src/io/StatWriter.cpp
428 src/io/ZConsWriter.cpp
429 src/io/ifstrstream.cpp
430 src/math/ParallelRandNumGen.cpp
431 src/nonbonded/Electrostatic.cpp
432 src/parallel/ForceDecomposition.cpp
433 src/parallel/ForceMatrixDecomposition.cpp
434 src/restraints/RestraintForceManager.cpp
435 src/restraints/ThermoIntegrationForceManager.cpp
436 src/selection/DistanceFinder.cpp
437 src/utils/ProgressBar.cpp
438 src/utils/simError.cpp
439 src/utils/OpenMDBitSet.cpp
440 src/optimization/Problem.cpp
441 )
442
443 IF(ZLIB_FOUND)
444 set(ZLIB_SOURCE
445 src/io/gzstream.cpp
446 )
447 ENDIF(ZLIB_FOUND)
448
449 IF(QHULL_FOUND)
450 set(QHULL_SOURCE
451 src/integrators/LangevinHullDynamics.cpp
452 src/math/Triangle.cpp
453 )
454 set(QHULL_PARALLEL_SOURCE
455 src/integrators/LangevinHullForceManager.cpp
456 src/math/ConvexHull.cpp
457 src/math/AlphaHull.cpp
458 )
459 ENDIF(QHULL_FOUND)
460
461 IF(WIN32)
462 set(GETOPT_SOURCE
463 src/utils/wingetopt.cpp
464 )
465 ENDIF(WIN32)
466
467 add_library(openmd_core STATIC ${SOURCE} ${QHULL_SOURCE} ${ZLIB_SOURCE} )
468 add_library(openmd_single STATIC ${PARALLEL_SOURCE} ${QHULL_PARALLEL_SOURCE} )
469
470 IF(MPI_FOUND)
471 add_library(openmd_parallel STATIC ${PARALLEL_SOURCE} ${QHULL_PARALLEL_SOURCE} )
472 set_target_properties(openmd_parallel PROPERTIES
473 COMPILE_DEFINITIONS IS_MPI
474 )
475 ENDIF(MPI_FOUND)
476
477 add_executable(openmd src/applications/openmd/openmd.cpp)
478 target_link_libraries(openmd openmd_single openmd_core openmd_single openmd_core)
479
480 if (MPI_FOUND)
481 add_executable(openmd_MPI src/applications/openmd/openmd.cpp)
482 set_target_properties(openmd_MPI PROPERTIES
483 COMPILE_DEFINITIONS IS_MPI
484 )
485 target_link_libraries(openmd_MPI openmd_parallel openmd_core openmd_parallel openmd_core)
486 INSTALL(TARGETS
487 openmd_parallel openmd_MPI
488 RUNTIME DESTINATION bin PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
489 LIBRARY DESTINATION lib PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
490 ARCHIVE DESTINATION lib PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
491 )
492 ENDIF (MPI_FOUND)
493
494 set (DUMP2XYZSOURCE
495 src/applications/dump2Xyz/Dump2XYZ.cpp
496 src/applications/dump2Xyz/Dump2XYZCmd.cpp
497 )
498
499 set (DYNAMICPROPSSOURCE
500 src/applications/dynamicProps/ActionCorrFunc.cpp
501 src/applications/dynamicProps/CrossTimeCorrFunc.cpp
502 src/applications/dynamicProps/DipoleCorrFunc.cpp
503 src/applications/dynamicProps/DirectionalRCorrFunc.cpp
504 src/applications/dynamicProps/DynamicProps.cpp
505 src/applications/dynamicProps/EnergyCorrFunc.cpp
506 src/applications/dynamicProps/FrameTimeCorrFunc.cpp
507 src/applications/dynamicProps/FreqFlucCorrFunc.cpp
508 src/applications/dynamicProps/LegendreCorrFunc.cpp
509 src/applications/dynamicProps/LegendreCorrFuncZ.cpp
510 src/applications/dynamicProps/cOHz.cpp
511 src/applications/dynamicProps/MomentumCorrFunc.cpp
512 src/applications/dynamicProps/ParticleTimeCorrFunc.cpp
513 src/applications/dynamicProps/InteractionTimeCorrFunc.cpp
514 src/applications/dynamicProps/RadialRCorrFunc.cpp
515 src/applications/dynamicProps/RCorrFunc.cpp
516 src/applications/dynamicProps/SelectionCorrFunc.cpp
517 src/applications/dynamicProps/StressCorrFunc.cpp
518 src/applications/dynamicProps/SystemDipoleCorrFunc.cpp
519 src/applications/dynamicProps/ThetaCorrFunc.cpp
520 src/applications/dynamicProps/TimeCorrFunc.cpp
521 src/applications/dynamicProps/VCorrFunc.cpp
522 src/applications/dynamicProps/BondCorrFunc.cpp
523 src/applications/dynamicProps/DynamicPropsCmd.cpp
524 )
525
526 set (HYDROSOURCE
527 src/applications/hydrodynamics/AnalyticalModel.cpp
528 src/applications/hydrodynamics/ApproximationModel.cpp
529 src/applications/hydrodynamics/BeadModel.cpp
530 src/applications/hydrodynamics/CompositeShape.cpp
531 src/applications/hydrodynamics/Hydro.cpp
532 src/applications/hydrodynamics/HydrodynamicsModel.cpp
533 src/applications/hydrodynamics/HydrodynamicsModelFactory.cpp
534 src/applications/hydrodynamics/RoughShell.cpp
535 src/applications/hydrodynamics/ShapeBuilder.cpp
536 src/applications/hydrodynamics/HydroCmd.cpp
537 )
538
539 set (STATICPROPSSOURCE
540 src/applications/staticProps/AngleR.cpp
541 src/applications/staticProps/BondAngleDistribution.cpp
542 src/applications/staticProps/BondOrderParameter.cpp
543 src/applications/staticProps/BOPofR.cpp
544 src/applications/staticProps/DensityPlot.cpp
545 src/applications/staticProps/GofAngle2.cpp
546 src/applications/staticProps/GofR.cpp
547 src/applications/staticProps/GofRAngle.cpp
548 src/applications/staticProps/GofRZ.cpp
549 src/applications/staticProps/GofXyz.cpp
550 src/applications/staticProps/GofZ.cpp
551 src/applications/staticProps/Hxy.cpp
552 src/applications/staticProps/MultipoleSum.cpp
553 src/applications/staticProps/NanoLength.cpp
554 src/applications/staticProps/NanoVolume.cpp
555 src/applications/staticProps/NitrileFrequencyMap.cpp
556 src/applications/staticProps/ObjectCount.cpp
557 src/applications/staticProps/P2OrderParameter.cpp
558 src/applications/staticProps/pAngle.cpp
559 src/applications/staticProps/RadialDistrFunc.cpp
560 src/applications/staticProps/RhoR.cpp
561 src/applications/staticProps/RhoZ.cpp
562 src/applications/staticProps/RippleOP.cpp
563 src/applications/staticProps/RNEMDStats.cpp
564 src/applications/staticProps/SCDOrderParameter.cpp
565 src/applications/staticProps/SpatialStatistics.cpp
566 src/applications/staticProps/StaticProps.cpp
567 src/applications/staticProps/TetrahedralityParam.cpp
568 src/applications/staticProps/TetrahedralityParamZ.cpp
569 src/applications/staticProps/TwoDGofR.cpp
570 src/applications/staticProps/StaticPropsCmd.cpp
571 )
572
573 set (NANOPARTICLEBUILDERSOURCE
574 src/applications/nanoparticleBuilder/nanoparticleBuilder.cpp
575 src/applications/nanoparticleBuilder/shapedLatticeSpherical.cpp
576 src/applications/nanoparticleBuilder/nanoparticleBuilderCmd.cpp
577 )
578
579 set (NANORODBUILDERSOURCE
580 src/applications/nanoparticleBuilder/nanorodBuilder.cpp
581 src/applications/nanoparticleBuilder/shapedLatticeRod.cpp
582 src/applications/nanoparticleBuilder/shapedLatticeEllipsoid.cpp
583 src/applications/nanoparticleBuilder/nanorodBuilderCmd.cpp
584 )
585
586 set (NANOROD_PENTBUILDERSOURCE
587 src/applications/nanoparticleBuilder/nanorod_pentBuilder.cpp
588 src/applications/nanoparticleBuilder/nanorod_pentBuilderCmd.cpp
589 src/applications/nanoparticleBuilder/shapedLatticePentRod.cpp
590 )
591
592 set (ICOSAHEDRALBUILDERSOURCE
593 src/applications/nanoparticleBuilder/icosahedralBuilder.cpp
594 src/applications/nanoparticleBuilder/icosahedralBuilderCmd.cpp
595 )
596
597 set (RANDOMBUILDERSOURCE
598 src/applications/randomBuilder/randomBuilder.cpp
599 src/applications/randomBuilder/randomBuilderCmd.cpp
600 )
601
602 set(SIMPLEBUILDERSOURCE
603 src/applications/simpleBuilder/simpleBuilder.cpp
604 src/applications/simpleBuilder/simpleBuilderCmd.cpp
605 )
606
607 set(THERMALIZERSOURCE
608 src/applications/thermalizer/thermalizer.cpp
609 src/applications/thermalizer/thermalizerCmd.cpp
610 )
611
612 set(RECENTERSOURCE
613 src/applications/recenter/recenter.cpp
614 src/applications/recenter/recenterCmd.cpp
615 )
616
617 add_executable(Dump2XYZ ${DUMP2XYZSOURCE} ${GETOPT_SOURCE})
618 target_link_libraries(Dump2XYZ openmd_single openmd_core openmd_single openmd_core)
619 add_executable(DynamicProps ${DYNAMICPROPSSOURCE} ${GETOPT_SOURCE})
620 target_link_libraries(DynamicProps openmd_single openmd_core openmd_single openmd_core)
621 add_executable(Hydro ${HYDROSOURCE} ${GETOPT_SOURCE})
622 target_link_libraries(Hydro openmd_single openmd_core openmd_single openmd_core)
623 add_executable(StaticProps ${STATICPROPSSOURCE} ${GETOPT_SOURCE})
624 target_link_libraries(StaticProps openmd_single openmd_core openmd_single openmd_core)
625 add_executable(nanoparticleBuilder ${NANOPARTICLEBUILDERSOURCE} ${GETOPT_SOURCE})
626 target_link_libraries(nanoparticleBuilder openmd_single openmd_core openmd_single openmd_core openmd_single)
627 add_executable(nanorodBuilder ${NANORODBUILDERSOURCE} ${GETOPT_SOURCE})
628 target_link_libraries(nanorodBuilder openmd_single openmd_core openmd_single openmd_core openmd_single)
629 add_executable(nanorod_pentBuilder ${NANOROD_PENTBUILDERSOURCE} ${GETOPT_SOURCE})
630 target_link_libraries(nanorod_pentBuilder openmd_single openmd_core openmd_single openmd_core openmd_single)
631 add_executable(icosahedralBuilder ${ICOSAHEDRALBUILDERSOURCE} ${GETOPT_SOURCE})
632 target_link_libraries(icosahedralBuilder openmd_single openmd_core openmd_single openmd_core openmd_single)
633 add_executable(randomBuilder ${RANDOMBUILDERSOURCE} ${GETOPT_SOURCE})
634 target_link_libraries(randomBuilder openmd_single openmd_core openmd_single openmd_core openmd_single)
635 add_executable(simpleBuilder ${SIMPLEBUILDERSOURCE} ${GETOPT_SOURCE})
636 target_link_libraries(simpleBuilder openmd_single openmd_core openmd_single openmd_core openmd_single)
637 add_executable(thermalizer ${THERMALIZERSOURCE} ${GETOPT_SOURCE})
638 target_link_libraries(thermalizer openmd_single openmd_core openmd_single openmd_core openmd_single)
639 add_executable(recenter ${RECENTERSOURCE} ${GETOPT_SOURCE})
640 target_link_libraries(recenter openmd_single openmd_core openmd_single openmd_core openmd_single)
641
642 if (OPENBABEL2_FOUND)
643 set (ATOM2MDSOURCE
644 src/applications/atom2md/atom2md.cpp
645 src/applications/atom2md/openmdformat.cpp
646 )
647 add_executable(atom2md ${ATOM2MDSOURCE} ${GETOPT_SOURCE})
648 target_link_libraries(atom2md openmd_single openmd_core openmd_single openmd_core ${OPENBABEL2_LIBRARIES})
649 INSTALL(TARGETS atom2md RUNTIME DESTINATION bin
650 PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
651 ENDIF (OPENBABEL2_FOUND)
652
653
654 set(PY_FILES
655 src/applications/hydrodynamics/diffExplainer
656 src/applications/utilities/affineScale
657 src/applications/utilities/dumpConverter
658 src/applications/utilities/md-solvator
659 src/applications/utilities/md2md
660 src/applications/utilities/mdSplit
661 src/applications/utilities/mdShrink
662 src/applications/utilities/principalAxisCalculator
663 src/applications/utilities/stat2thcond
664 src/applications/utilities/stat2visco
665 src/applications/utilities/stat2dielectric
666 src/applications/utilities/waterRotator
667 src/applications/utilities/waterReplacer
668 )
669
670 IF(PYTHON_EXECUTABLE)
671 IF(WIN32)
672 SET(PYEXT ".py")
673 ELSE(WIN32)
674 SET(PYEXT "")
675 ENDIF(WIN32)
676
677 foreach(PY_FILE ${PY_FILES})
678 GET_FILENAME_COMPONENT(filename "${PY_FILE}" NAME)
679 CONFIGURE_FILE(${PY_FILE}
680 "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${filename}${PYEXT}" @ONLY)
681 INSTALL(FILES "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${filename}${PYEXT}"
682 DESTINATION bin
683 PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
684 endforeach(PY_FILE)
685 ENDIF(PYTHON_EXECUTABLE)
686
687 set(PERL_FILES
688 src/applications/utilities/solvator
689 src/applications/utilities/waterBoxer
690 )
691
692 IF(PERL_FOUND)
693 IF(WIN32)
694 SET(PLEXT ".PL")
695 ELSE(WIN32)
696 SET(PLEXT "")
697 ENDIF(WIN32)
698
699 foreach(PERL_FILE ${PERL_FILES})
700 GET_FILENAME_COMPONENT(filename "${PERL_FILE}" NAME)
701 configure_file(${PERL_FILE} "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${filename}${PLEXT}" @ONLY)
702 INSTALL(FILES "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${filename}${PLEXT}"
703 DESTINATION bin
704 PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
705
706 endforeach(PERL_FILE)
707 ENDIF(PERL_FOUND)
708
709
710 INSTALL(FILES AUTHORS LICENSE README INSTALL DESTINATION .
711 PERMISSIONS OWNER_READ GROUP_READ WORLD_READ)
712 INSTALL(TARGETS
713 openmd_core
714 openmd_single
715 openmd
716 Dump2XYZ
717 simpleBuilder
718 StaticProps
719 DynamicProps
720 randomBuilder
721 nanoparticleBuilder
722 nanorodBuilder
723 nanorod_pentBuilder
724 icosahedralBuilder
725 thermalizer
726 recenter
727 Hydro
728 RUNTIME DESTINATION bin PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
729 LIBRARY DESTINATION lib PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
730 ARCHIVE DESTINATION lib PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
731 )
732
733 install(DIRECTORY forceFields/
734 DESTINATION forceFields
735 DIRECTORY_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
736 PATTERN ".svn" EXCLUDE
737 PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ)
738 install(DIRECTORY samples/
739 DESTINATION samples
740 DIRECTORY_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
741 PATTERN ".svn" EXCLUDE
742 PATTERN "*.dump" EXCLUDE
743 PATTERN "*.stat" EXCLUDE
744 PATTERN "*.eor" EXCLUDE
745 PATTERN "*.rnemd" EXCLUDE
746 PATTERN "*.fz" EXCLUDE
747 PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ)
748
749 configure_file( samples/builders/runMe.in
750 "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/runMe" @ONLY)
751 INSTALL(FILES "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/runMe"
752 DESTINATION samples/builders
753 PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
754
755
756 INSTALL(FILES "${CMAKE_CURRENT_SOURCE_DIR}/doc/OpenMDmanual.pdf"
757 DESTINATION doc
758 PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ)
759
760 message( STATUS)
761 message( STATUS "========== OpenMD Build Information ==========")
762 message( STATUS "Current revision ........... = ${SVN_REV}")
763 message( STATUS "CMAKE_SYSTEM ............... = ${CMAKE_SYSTEM}")
764 message( STATUS "==============================================")
765 message( STATUS "CMAKE_BUILD_TYPE ........... = ${CMAKE_BUILD_TYPE}")
766 message( STATUS "CMAKE_INSTALL_PREFIX ....... = ${CMAKE_INSTALL_PREFIX}")
767 message( STATUS "Build as SINGLE_PRECISION .. = ${SINGLE_PRECISION}")
768 message( STATUS "CMAKE_CXX_COMPILER ......... = ${CMAKE_CXX_COMPILER}")
769 message( STATUS "MPI_CXX_COMPILER ........... = ${MPI_CXX_COMPILER}")
770 message( STATUS "MPI_CXX_INCLUDE_PATH ....... = ${MPI_CXX_INCLUDE_PATH}")
771 message( STATUS "MPI_CXX_LIBRARIES .......... = ${MPI_CXX_LIBRARIES}")
772 message( STATUS "OPENBABEL2_ROOT ............ = ${OPENBABEL2_ROOT}")
773 message( STATUS "OPENBABEL2_INCLUDE_DIR ..... = ${OPENBABEL2_INCLUDE_DIR}")
774 message( STATUS "OPENBABEL2_LIBRARIES ....... = ${OPENBABEL2_LIBRARIES}")
775 message( STATUS "QHULL_ROOT ................. = ${QHULL_ROOT}")
776 message( STATUS "QHULL_INCLUDE_DIR .......... = ${QHULL_INCLUDE_DIR}")
777 message( STATUS "QHULL_LIBRARIES ............ = ${QHULL_LIBRARIES}")
778 message( STATUS "ZLIB_ROOT .................. = ${ZLIB_ROOT}")
779 message( STATUS "ZLIB_INCLUDE_DIR ........... = ${ZLIB_INCLUDE_DIR}")
780 message( STATUS "ZLIB_LIBRARIES ............. = ${ZLIB_LIBRARIES}")
781 message( STATUS "FFTW3_ROOT ................. = ${FFTW3_ROOT}")
782 message( STATUS "FFTW3_INCLUDE_DIR .......... = ${FFTW3_INCLUDE_DIR}")
783 message( STATUS "FFTW3_LIBRARIES ............ = ${FFTW3_LIBRARIES}")
784 message( STATUS "PERL_EXECUTABLE ............ = ${PERL_EXECUTABLE}")
785 message( STATUS "PYTHON_EXECUTABLE .......... = ${PYTHON_EXECUTABLE}")
786 message( STATUS "DOXYGEN_EXECUTABLE ......... = ${DOXYGEN_EXECUTABLE}")
787 message( STATUS )
788 message( STATUS "To override these options, add -D{OPTION_NAME}=... to the cmake command" )
789 message( STATUS "Particularly useful defines are for:")
790 message( STATUS )
791 message( STATUS " -DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX} (where OpenMD will be installed)")
792 message( STATUS " -DOPENBABEL2_ROOT=/path/to/openbabel")
793 message( STATUS " -DQHULL_ROOT=/path/to/qhull")
794 message( STATUS " -DFFTW3_ROOT=/path/to/fftw3")
795 message( STATUS )
796 IF(WIN32)
797 message( STATUS "To build and install OpenMD, enter: ")
798 message( STATUS " msbuild /m ALL_BUILD.vcxproj /p:Configuration=${CMAKE_BUILD_TYPE}")
799 message( STATUS "followed by:")
800 message( STATUS " msbuild /m INSTALL.vcxproj /p:Configuration=${CMAKE_BUILD_TYPE}")
801 ELSE(WIN32)
802 message( STATUS "To build and install OpenMD, enter \"make\" and \"make install\"")
803 ENDIF(WIN32)
804 message( STATUS )
805
806 # build a CPack driven installer package
807 IF(NOT DEFINED CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS)
808 SET(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS ON)
809 ENDIF()
810 include (InstallRequiredSystemLibraries)
811 set (CPACK_RESOURCE_FILE_LICENSE
812 "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE")
813 set (CPACK_PACKAGE_VERSION_MAJOR "${VERSION_MAJOR}")
814 set (CPACK_PACKAGE_VERSION_MINOR "${VERSION_MINOR}")
815 include (CPack)