forked from lijiext/lammps
add support for KSPACE
This commit is contained in:
parent
c07adac22d
commit
d5dcb3d329
|
@ -5,6 +5,9 @@ set(SOVERSION 0)
|
|||
set(LAMMPS_SOURCE_DIR ${CMAKE_SOURCE_DIR}/../src)
|
||||
set(LAMMPS_LIB_SOURCE_DIR ${CMAKE_SOURCE_DIR}/../lib)
|
||||
|
||||
# Cmake modules/macros are in a subdirectory to keep this file cleaner
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/Modules)
|
||||
|
||||
if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_C_FLAGS)
|
||||
#release comes with -O3 by default
|
||||
set(CMAKE_BUILD_TYPE Release CACHE STRING "Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel." FORCE)
|
||||
|
@ -37,11 +40,20 @@ find_package(UnixCommands)
|
|||
|
||||
option(CMAKE_VERBOSE_MAKEFILE "Verbose makefile" OFF)
|
||||
|
||||
set(PACKAGES ASPHERE REAX)
|
||||
set(PACKAGES ASPHERE KSPACE REAX)
|
||||
foreach(PKG ${PACKAGES})
|
||||
option(ENABLE_${PKG} "Build ${PKG} Package" OFF)
|
||||
endforeach()
|
||||
|
||||
if(ENABLE_KSPACE)
|
||||
find_package(FFTW3)
|
||||
if(FFTW3_FOUND)
|
||||
add_definitions(-DFFT_FFTW3)
|
||||
include_directories(${FFTW3_INCLUDE_DIRS})
|
||||
list(APPEND LAMMPS_LINK_LIBS ${FFTW3_LIBRARIES})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
find_package(JPEG)
|
||||
if(JPEG_FOUND)
|
||||
add_definitions(-DLAMMPS_JPEG)
|
||||
|
|
|
@ -82,6 +82,9 @@
|
|||
#include "fix_temp_csvr.h"
|
||||
#include "fix_temp_rescale.h"
|
||||
#include "fix_tmd.h"
|
||||
#ifdef ENABLE_KSPACE
|
||||
#include "fix_tune_kspace.h"
|
||||
#endif
|
||||
#include "fix_vector.h"
|
||||
#include "fix_viscous.h"
|
||||
#include "fix_wall_harmonic.h"
|
||||
|
|
|
@ -1 +1,13 @@
|
|||
#include "package.h"
|
||||
#ifdef ENABLE_KSPACE
|
||||
#include "ewald.h"
|
||||
#include "ewald_disp.h"
|
||||
#include "msm.h"
|
||||
#include "msm_cg.h"
|
||||
#include "pppm.h"
|
||||
#include "pppm_cg.h"
|
||||
#include "pppm_disp.h"
|
||||
#include "pppm_disp_tip4p.h"
|
||||
#include "pppm_stagger.h"
|
||||
#include "pppm_tip4p.h"
|
||||
#endif
|
||||
|
|
|
@ -2,12 +2,25 @@
|
|||
#include "pair_beck.h"
|
||||
#include "pair_born.h"
|
||||
#include "pair_born_coul_dsf.h"
|
||||
#ifdef ENABLE_KSPACE
|
||||
#include "pair_born_coul_long.h"
|
||||
#include "pair_born_coul_msm.h"
|
||||
#endif
|
||||
#include "pair_born_coul_wolf.h"
|
||||
#include "pair_buck.h"
|
||||
#include "pair_buck_coul_cut.h"
|
||||
#ifdef ENABLE_KSPACE
|
||||
#include "pair_buck_coul_long.h"
|
||||
#include "pair_buck_coul_msm.h"
|
||||
#include "pair_buck_long_coul_long.h"
|
||||
#endif
|
||||
#include "pair_coul_cut.h"
|
||||
#include "pair_coul_debye.h"
|
||||
#include "pair_coul_dsf.h"
|
||||
#ifdef ENABLE_KSPACE
|
||||
#include "pair_coul_long.h"
|
||||
#include "pair_coul_msm.h"
|
||||
#endif
|
||||
#include "pair_coul_streitz.h"
|
||||
#include "pair_coul_wolf.h"
|
||||
#include "pair_dpd.h"
|
||||
|
@ -22,14 +35,28 @@
|
|||
#include "pair_line_lj.h"
|
||||
#endif
|
||||
#include "pair_lj96_cut.h"
|
||||
#ifdef ENABLE_KSPACE
|
||||
#include "pair_lj_charmm_coul_long.h"
|
||||
#include "pair_lj_charmm_coul_msm.h"
|
||||
#include "pair_lj_charmmfsw_coul_long.h"
|
||||
#endif
|
||||
#include "pair_lj_cubic.h"
|
||||
#include "pair_lj_cut.h"
|
||||
#include "pair_lj_cut_coul_cut.h"
|
||||
#include "pair_lj_cut_coul_debye.h"
|
||||
#include "pair_lj_cut_coul_dsf.h"
|
||||
#ifdef ENABLE_KSPACE
|
||||
#include "pair_lj_cut_coul_long.h"
|
||||
#include "pair_lj_cut_coul_msm.h"
|
||||
#include "pair_lj_cut_tip4p_long.h"
|
||||
#endif
|
||||
#include "pair_lj_expand.h"
|
||||
#include "pair_lj_gromacs.h"
|
||||
#include "pair_lj_gromacs_coul_gromacs.h"
|
||||
#ifdef ENABLE_KSPACE
|
||||
#include "pair_lj_long_coul_long.h"
|
||||
#include "pair_lj_long_tip4p_long.h"
|
||||
#endif
|
||||
#include "pair_lj_smooth.h"
|
||||
#include "pair_lj_smooth_linear.h"
|
||||
#include "pair_mie_cut.h"
|
||||
|
@ -42,6 +69,9 @@
|
|||
#endif
|
||||
#include "pair_soft.h"
|
||||
#include "pair_table.h"
|
||||
#ifdef ENABLE_KSPACE
|
||||
#include "pair_tip4p_long.h"
|
||||
#endif
|
||||
#ifdef ENABLE_ASPHERE
|
||||
#include "pair_tri_lj.h"
|
||||
#endif
|
||||
|
|
|
@ -0,0 +1,25 @@
|
|||
# - Find fftw3
|
||||
# Find the native FFTW3 headers and libraries.
|
||||
#
|
||||
# FFTW3_INCLUDE_DIRS - where to find fftw3.h, etc.
|
||||
# FFTW3_LIBRARIES - List of libraries when using fftw3.
|
||||
# FFTW3_FOUND - True if fftw3 found.
|
||||
#
|
||||
|
||||
find_package(PkgConfig)
|
||||
|
||||
pkg_check_modules(PC_FFTW3 fftw3)
|
||||
find_path(FFTW3_INCLUDE_DIR fftw3.h HINTS ${PC_FFTW3_INCLUDE_DIRS})
|
||||
|
||||
find_library(FFTW3_LIBRARY NAMES fftw3 HINTS ${PC_FFTW3_LIBRARY_DIRS})
|
||||
|
||||
set(FFTW3_LIBRARIES ${FFTW3_LIBRARY})
|
||||
set(FFTW3_INCLUDE_DIRS ${FFTW3_INCLUDE_DIR})
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
# handle the QUIETLY and REQUIRED arguments and set FFTW3_FOUND to TRUE
|
||||
# if all listed variables are TRUE
|
||||
|
||||
find_package_handle_standard_args(FFTW3 DEFAULT_MSG FFTW3_LIBRARY FFTW3_INCLUDE_DIR)
|
||||
|
||||
mark_as_advanced(FFTW3_INCLUDE_DIR FFTW3_LIBRARY )
|
Loading…
Reference in New Issue