Commit ab41f844 authored by John Chodera (MSKCC)'s avatar John Chodera (MSKCC)
Browse files

Removed fiels that didn't below.

parent 36e01b67
# ---------------------------------------------------------------------- # CMAKE generated file: DO NOT EDIT!
# Makefile for OpenMM Preview Release 4 workshop "hello world" examples. # Generated by "Unix Makefiles" Generator, CMake Version 2.8
# August 18, 2009
# See https://simtk.org/home/openmm. # Default target executed when no arguments are given to make.
# ---------------------------------------------------------------------- default_target: all
# This assumes you have gcc compilers for whatever language you are .PHONY : default_target
# using: g++ for C++ and C, gfortran for Fortran 95.
# #=============================================================================
# For the C and Fortran examples, we're depending on your version of # Special targets provided by cmake.
# OpenMM to have been built with the automatically-generated API
# wrappers. # Disable implicit rules so canonical targets will work.
# .SUFFIXES:
# This has had only minimal testing, although it has been known to
# work. It is likely to work fine for C and C++. For Fortran, you # Remove some rules from gmake that .SUFFIXES does not remove.
# may need to add some of the C/C++ libraries: SUFFIXES =
# -lc -lm -lstdc++ (or -lstdc++.6) -lgcc -lgcc_s
# but this wasn't required for these examples on Centos 5.2 using .SUFFIXES: .hpux_make_needs_suffix_list
# gcc 4.1.2.
# Suppress display of executed commands.
# Check whether this is the right capitalization for your install directory. $(VERBOSE).SILENT:
OpenMM_INSTALL_DIR=/usr/local/openmm
CFLAGS = -g # A target that is always out of date.
FFLAGS = -g -ffree-line-length-none cmake_force:
.PHONY : cmake_force
# Extra libraries required when gfortran links with a C++ module.
# If this doesn't work, look in /usr/lib to #=============================================================================
# see what versions of libstdc++.so you have and try different # Set environment variables for the build.
# versions.
FCPPLIBS = -lstdc++ # The shell in which to execute make rules.
SHELL = /bin/sh
LIB_DIR=$(OpenMM_INSTALL_DIR)/lib
INCLUDE_DIR=$(OpenMM_INSTALL_DIR)/include # The CMake executable.
LIBS= -lOpenMM CMAKE_COMMAND = /opt/local/bin/cmake
ALL_CPP_EXAMPLES = HelloArgon HelloSodiumChloride HelloEthane HelloWaterBox # The command to remove a file.
ALL_C_EXAMPLES = HelloArgonInC HelloSodiumChlorideInC RM = /opt/local/bin/cmake -E remove -f
ALL_F95_EXAMPLES = HelloArgonInFortran HelloSodiumChlorideInFortran
# Escaping for special characters.
ALL_PROGS = $(ALL_CPP_EXAMPLES) $(ALL_C_EXAMPLES) $(ALL_F95_EXAMPLES) EQUALS = =
default: HelloArgon # The program to use to edit the cache.
CMAKE_EDIT_COMMAND = /opt/local/bin/ccmake
all : $(ALL_PROGS)
# The top-level source directory on which CMake was run.
# Treat all .cpp source files the same way. CMAKE_SOURCE_DIR = /Users/choderaj/code/openmm/openmm.jchodera
.cpp :
g++ $(CFLAGS) -I$(INCLUDE_DIR) $< -L$(LIB_DIR) $(LIBS) -o $* # The top-level build directory on which CMake was run.
CMAKE_BINARY_DIR = /Users/choderaj/code/openmm/openmm.jchodera
HelloArgonInC: HelloArgonInC.c
g++ $(CFLAGS) -I$(INCLUDE_DIR) HelloArgonInC.c \ #=============================================================================
-L$(LIB_DIR) $(LIBS) -o HelloArgonInC # Targets provided globally by CMake.
HelloSodiumChlorideInC: HelloSodiumChlorideInC.c # Special rule for the target edit_cache
g++ $(CFLAGS) -I$(INCLUDE_DIR) HelloSodiumChlorideInC.c \ edit_cache:
-L$(LIB_DIR) $(LIBS) -o HelloSodiumChlorideInC @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake cache editor..."
/opt/local/bin/ccmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)
HelloArgonInFortran: HelloArgonInFortran.f90 openmm.mod .PHONY : edit_cache
gfortran $(FFLAGS) HelloArgonInFortran.f90 \
-I$(INCLUDE_DIR) -L$(LIB_DIR) $(LIBS) $(FCPPLIBS) -o HelloArgonInFortran # Special rule for the target edit_cache
edit_cache/fast: edit_cache
HelloSodiumChlorideInFortran: HelloSodiumChlorideInFortran.f90 openmm.mod .PHONY : edit_cache/fast
gfortran $(FFLAGS) HelloSodiumChlorideInFortran.f90 \
-I$(INCLUDE_DIR) -L$(LIB_DIR) $(LIBS) $(FCPPLIBS) -o HelloSodiumChlorideInFortran # Special rule for the target install
install: preinstall
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..."
# Build Fortran 95 Module file /opt/local/bin/cmake -P cmake_install.cmake
openmm.mod: .PHONY : install
gfortran -c $(FFLAGS) $(INCLUDE_DIR)/OpenMMFortranModule.f90
# Special rule for the target install
clean : install/fast: preinstall/fast
rm $(ALL_PROGS) *.o *.mod *.obj *.exe @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..."
/opt/local/bin/cmake -P cmake_install.cmake
.PHONY : install/fast
# Special rule for the target install/local
install/local: preinstall
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing only the local directory..."
/opt/local/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake
.PHONY : install/local
# Special rule for the target install/local
install/local/fast: install/local
.PHONY : install/local/fast
# Special rule for the target install/strip
install/strip: preinstall
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing the project stripped..."
/opt/local/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake
.PHONY : install/strip
# Special rule for the target install/strip
install/strip/fast: install/strip
.PHONY : install/strip/fast
# Special rule for the target list_install_components
list_install_components:
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Available install components are: \"Unspecified\""
.PHONY : list_install_components
# Special rule for the target list_install_components
list_install_components/fast: list_install_components
.PHONY : list_install_components/fast
# Special rule for the target rebuild_cache
rebuild_cache:
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..."
/opt/local/bin/cmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)
.PHONY : rebuild_cache
# Special rule for the target rebuild_cache
rebuild_cache/fast: rebuild_cache
.PHONY : rebuild_cache/fast
# Special rule for the target test
test:
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running tests..."
/opt/local/bin/ctest --force-new-ctest-process $(ARGS)
.PHONY : test
# Special rule for the target test
test/fast: test
.PHONY : test/fast
# The main all target
all: cmake_check_build_system
cd /Users/choderaj/code/openmm/openmm.jchodera && $(CMAKE_COMMAND) -E cmake_progress_start /Users/choderaj/code/openmm/openmm.jchodera/CMakeFiles /Users/choderaj/code/openmm/openmm.jchodera/examples/CMakeFiles/progress.marks
cd /Users/choderaj/code/openmm/openmm.jchodera && $(MAKE) -f CMakeFiles/Makefile2 examples/all
$(CMAKE_COMMAND) -E cmake_progress_start /Users/choderaj/code/openmm/openmm.jchodera/CMakeFiles 0
.PHONY : all
# The main clean target
clean:
cd /Users/choderaj/code/openmm/openmm.jchodera && $(MAKE) -f CMakeFiles/Makefile2 examples/clean
.PHONY : clean
# The main clean target
clean/fast: clean
.PHONY : clean/fast
# Prepare targets for installation.
preinstall: all
cd /Users/choderaj/code/openmm/openmm.jchodera && $(MAKE) -f CMakeFiles/Makefile2 examples/preinstall
.PHONY : preinstall
# Prepare targets for installation.
preinstall/fast:
cd /Users/choderaj/code/openmm/openmm.jchodera && $(MAKE) -f CMakeFiles/Makefile2 examples/preinstall
.PHONY : preinstall/fast
# clear depends
depend:
cd /Users/choderaj/code/openmm/openmm.jchodera && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1
.PHONY : depend
# Convenience name for target.
examples/CMakeFiles/HelloArgon.dir/rule:
cd /Users/choderaj/code/openmm/openmm.jchodera && $(MAKE) -f CMakeFiles/Makefile2 examples/CMakeFiles/HelloArgon.dir/rule
.PHONY : examples/CMakeFiles/HelloArgon.dir/rule
# Convenience name for target.
HelloArgon: examples/CMakeFiles/HelloArgon.dir/rule
.PHONY : HelloArgon
# fast build rule for target.
HelloArgon/fast:
cd /Users/choderaj/code/openmm/openmm.jchodera && $(MAKE) -f examples/CMakeFiles/HelloArgon.dir/build.make examples/CMakeFiles/HelloArgon.dir/build
.PHONY : HelloArgon/fast
# Convenience name for target.
examples/CMakeFiles/HelloArgonInC.dir/rule:
cd /Users/choderaj/code/openmm/openmm.jchodera && $(MAKE) -f CMakeFiles/Makefile2 examples/CMakeFiles/HelloArgonInC.dir/rule
.PHONY : examples/CMakeFiles/HelloArgonInC.dir/rule
# Convenience name for target.
HelloArgonInC: examples/CMakeFiles/HelloArgonInC.dir/rule
.PHONY : HelloArgonInC
# fast build rule for target.
HelloArgonInC/fast:
cd /Users/choderaj/code/openmm/openmm.jchodera && $(MAKE) -f examples/CMakeFiles/HelloArgonInC.dir/build.make examples/CMakeFiles/HelloArgonInC.dir/build
.PHONY : HelloArgonInC/fast
# Convenience name for target.
examples/CMakeFiles/HelloEthane.dir/rule:
cd /Users/choderaj/code/openmm/openmm.jchodera && $(MAKE) -f CMakeFiles/Makefile2 examples/CMakeFiles/HelloEthane.dir/rule
.PHONY : examples/CMakeFiles/HelloEthane.dir/rule
# Convenience name for target.
HelloEthane: examples/CMakeFiles/HelloEthane.dir/rule
.PHONY : HelloEthane
# fast build rule for target.
HelloEthane/fast:
cd /Users/choderaj/code/openmm/openmm.jchodera && $(MAKE) -f examples/CMakeFiles/HelloEthane.dir/build.make examples/CMakeFiles/HelloEthane.dir/build
.PHONY : HelloEthane/fast
# Convenience name for target.
examples/CMakeFiles/HelloSodiumChloride.dir/rule:
cd /Users/choderaj/code/openmm/openmm.jchodera && $(MAKE) -f CMakeFiles/Makefile2 examples/CMakeFiles/HelloSodiumChloride.dir/rule
.PHONY : examples/CMakeFiles/HelloSodiumChloride.dir/rule
# Convenience name for target.
HelloSodiumChloride: examples/CMakeFiles/HelloSodiumChloride.dir/rule
.PHONY : HelloSodiumChloride
# fast build rule for target.
HelloSodiumChloride/fast:
cd /Users/choderaj/code/openmm/openmm.jchodera && $(MAKE) -f examples/CMakeFiles/HelloSodiumChloride.dir/build.make examples/CMakeFiles/HelloSodiumChloride.dir/build
.PHONY : HelloSodiumChloride/fast
# Convenience name for target.
examples/CMakeFiles/HelloSodiumChlorideInC.dir/rule:
cd /Users/choderaj/code/openmm/openmm.jchodera && $(MAKE) -f CMakeFiles/Makefile2 examples/CMakeFiles/HelloSodiumChlorideInC.dir/rule
.PHONY : examples/CMakeFiles/HelloSodiumChlorideInC.dir/rule
# Convenience name for target.
HelloSodiumChlorideInC: examples/CMakeFiles/HelloSodiumChlorideInC.dir/rule
.PHONY : HelloSodiumChlorideInC
# fast build rule for target.
HelloSodiumChlorideInC/fast:
cd /Users/choderaj/code/openmm/openmm.jchodera && $(MAKE) -f examples/CMakeFiles/HelloSodiumChlorideInC.dir/build.make examples/CMakeFiles/HelloSodiumChlorideInC.dir/build
.PHONY : HelloSodiumChlorideInC/fast
# Convenience name for target.
examples/CMakeFiles/HelloWaterBox.dir/rule:
cd /Users/choderaj/code/openmm/openmm.jchodera && $(MAKE) -f CMakeFiles/Makefile2 examples/CMakeFiles/HelloWaterBox.dir/rule
.PHONY : examples/CMakeFiles/HelloWaterBox.dir/rule
# Convenience name for target.
HelloWaterBox: examples/CMakeFiles/HelloWaterBox.dir/rule
.PHONY : HelloWaterBox
# fast build rule for target.
HelloWaterBox/fast:
cd /Users/choderaj/code/openmm/openmm.jchodera && $(MAKE) -f examples/CMakeFiles/HelloWaterBox.dir/build.make examples/CMakeFiles/HelloWaterBox.dir/build
.PHONY : HelloWaterBox/fast
Empty.o: Empty.cpp.o
.PHONY : Empty.o
# target to build an object file
Empty.cpp.o:
cd /Users/choderaj/code/openmm/openmm.jchodera && $(MAKE) -f examples/CMakeFiles/HelloArgonInC.dir/build.make examples/CMakeFiles/HelloArgonInC.dir/Empty.cpp.o
cd /Users/choderaj/code/openmm/openmm.jchodera && $(MAKE) -f examples/CMakeFiles/HelloSodiumChlorideInC.dir/build.make examples/CMakeFiles/HelloSodiumChlorideInC.dir/Empty.cpp.o
.PHONY : Empty.cpp.o
Empty.i: Empty.cpp.i
.PHONY : Empty.i
# target to preprocess a source file
Empty.cpp.i:
cd /Users/choderaj/code/openmm/openmm.jchodera && $(MAKE) -f examples/CMakeFiles/HelloArgonInC.dir/build.make examples/CMakeFiles/HelloArgonInC.dir/Empty.cpp.i
cd /Users/choderaj/code/openmm/openmm.jchodera && $(MAKE) -f examples/CMakeFiles/HelloSodiumChlorideInC.dir/build.make examples/CMakeFiles/HelloSodiumChlorideInC.dir/Empty.cpp.i
.PHONY : Empty.cpp.i
Empty.s: Empty.cpp.s
.PHONY : Empty.s
# target to generate assembly for a file
Empty.cpp.s:
cd /Users/choderaj/code/openmm/openmm.jchodera && $(MAKE) -f examples/CMakeFiles/HelloArgonInC.dir/build.make examples/CMakeFiles/HelloArgonInC.dir/Empty.cpp.s
cd /Users/choderaj/code/openmm/openmm.jchodera && $(MAKE) -f examples/CMakeFiles/HelloSodiumChlorideInC.dir/build.make examples/CMakeFiles/HelloSodiumChlorideInC.dir/Empty.cpp.s
.PHONY : Empty.cpp.s
HelloArgon.o: HelloArgon.cpp.o
.PHONY : HelloArgon.o
# target to build an object file
HelloArgon.cpp.o:
cd /Users/choderaj/code/openmm/openmm.jchodera && $(MAKE) -f examples/CMakeFiles/HelloArgon.dir/build.make examples/CMakeFiles/HelloArgon.dir/HelloArgon.cpp.o
.PHONY : HelloArgon.cpp.o
HelloArgon.i: HelloArgon.cpp.i
.PHONY : HelloArgon.i
# target to preprocess a source file
HelloArgon.cpp.i:
cd /Users/choderaj/code/openmm/openmm.jchodera && $(MAKE) -f examples/CMakeFiles/HelloArgon.dir/build.make examples/CMakeFiles/HelloArgon.dir/HelloArgon.cpp.i
.PHONY : HelloArgon.cpp.i
HelloArgon.s: HelloArgon.cpp.s
.PHONY : HelloArgon.s
# target to generate assembly for a file
HelloArgon.cpp.s:
cd /Users/choderaj/code/openmm/openmm.jchodera && $(MAKE) -f examples/CMakeFiles/HelloArgon.dir/build.make examples/CMakeFiles/HelloArgon.dir/HelloArgon.cpp.s
.PHONY : HelloArgon.cpp.s
HelloArgonInC.o: HelloArgonInC.c.o
.PHONY : HelloArgonInC.o
# target to build an object file
HelloArgonInC.c.o:
cd /Users/choderaj/code/openmm/openmm.jchodera && $(MAKE) -f examples/CMakeFiles/HelloArgonInC.dir/build.make examples/CMakeFiles/HelloArgonInC.dir/HelloArgonInC.c.o
.PHONY : HelloArgonInC.c.o
HelloArgonInC.i: HelloArgonInC.c.i
.PHONY : HelloArgonInC.i
# target to preprocess a source file
HelloArgonInC.c.i:
cd /Users/choderaj/code/openmm/openmm.jchodera && $(MAKE) -f examples/CMakeFiles/HelloArgonInC.dir/build.make examples/CMakeFiles/HelloArgonInC.dir/HelloArgonInC.c.i
.PHONY : HelloArgonInC.c.i
HelloArgonInC.s: HelloArgonInC.c.s
.PHONY : HelloArgonInC.s
# target to generate assembly for a file
HelloArgonInC.c.s:
cd /Users/choderaj/code/openmm/openmm.jchodera && $(MAKE) -f examples/CMakeFiles/HelloArgonInC.dir/build.make examples/CMakeFiles/HelloArgonInC.dir/HelloArgonInC.c.s
.PHONY : HelloArgonInC.c.s
HelloEthane.o: HelloEthane.cpp.o
.PHONY : HelloEthane.o
# target to build an object file
HelloEthane.cpp.o:
cd /Users/choderaj/code/openmm/openmm.jchodera && $(MAKE) -f examples/CMakeFiles/HelloEthane.dir/build.make examples/CMakeFiles/HelloEthane.dir/HelloEthane.cpp.o
.PHONY : HelloEthane.cpp.o
HelloEthane.i: HelloEthane.cpp.i
.PHONY : HelloEthane.i
# target to preprocess a source file
HelloEthane.cpp.i:
cd /Users/choderaj/code/openmm/openmm.jchodera && $(MAKE) -f examples/CMakeFiles/HelloEthane.dir/build.make examples/CMakeFiles/HelloEthane.dir/HelloEthane.cpp.i
.PHONY : HelloEthane.cpp.i
HelloEthane.s: HelloEthane.cpp.s
.PHONY : HelloEthane.s
# target to generate assembly for a file
HelloEthane.cpp.s:
cd /Users/choderaj/code/openmm/openmm.jchodera && $(MAKE) -f examples/CMakeFiles/HelloEthane.dir/build.make examples/CMakeFiles/HelloEthane.dir/HelloEthane.cpp.s
.PHONY : HelloEthane.cpp.s
HelloSodiumChloride.o: HelloSodiumChloride.cpp.o
.PHONY : HelloSodiumChloride.o
# target to build an object file
HelloSodiumChloride.cpp.o:
cd /Users/choderaj/code/openmm/openmm.jchodera && $(MAKE) -f examples/CMakeFiles/HelloSodiumChloride.dir/build.make examples/CMakeFiles/HelloSodiumChloride.dir/HelloSodiumChloride.cpp.o
.PHONY : HelloSodiumChloride.cpp.o
HelloSodiumChloride.i: HelloSodiumChloride.cpp.i
.PHONY : HelloSodiumChloride.i
# target to preprocess a source file
HelloSodiumChloride.cpp.i:
cd /Users/choderaj/code/openmm/openmm.jchodera && $(MAKE) -f examples/CMakeFiles/HelloSodiumChloride.dir/build.make examples/CMakeFiles/HelloSodiumChloride.dir/HelloSodiumChloride.cpp.i
.PHONY : HelloSodiumChloride.cpp.i
HelloSodiumChloride.s: HelloSodiumChloride.cpp.s
.PHONY : HelloSodiumChloride.s
# target to generate assembly for a file
HelloSodiumChloride.cpp.s:
cd /Users/choderaj/code/openmm/openmm.jchodera && $(MAKE) -f examples/CMakeFiles/HelloSodiumChloride.dir/build.make examples/CMakeFiles/HelloSodiumChloride.dir/HelloSodiumChloride.cpp.s
.PHONY : HelloSodiumChloride.cpp.s
HelloSodiumChlorideInC.o: HelloSodiumChlorideInC.c.o
.PHONY : HelloSodiumChlorideInC.o
# target to build an object file
HelloSodiumChlorideInC.c.o:
cd /Users/choderaj/code/openmm/openmm.jchodera && $(MAKE) -f examples/CMakeFiles/HelloSodiumChlorideInC.dir/build.make examples/CMakeFiles/HelloSodiumChlorideInC.dir/HelloSodiumChlorideInC.c.o
.PHONY : HelloSodiumChlorideInC.c.o
HelloSodiumChlorideInC.i: HelloSodiumChlorideInC.c.i
.PHONY : HelloSodiumChlorideInC.i
# target to preprocess a source file
HelloSodiumChlorideInC.c.i:
cd /Users/choderaj/code/openmm/openmm.jchodera && $(MAKE) -f examples/CMakeFiles/HelloSodiumChlorideInC.dir/build.make examples/CMakeFiles/HelloSodiumChlorideInC.dir/HelloSodiumChlorideInC.c.i
.PHONY : HelloSodiumChlorideInC.c.i
HelloSodiumChlorideInC.s: HelloSodiumChlorideInC.c.s
.PHONY : HelloSodiumChlorideInC.s
# target to generate assembly for a file
HelloSodiumChlorideInC.c.s:
cd /Users/choderaj/code/openmm/openmm.jchodera && $(MAKE) -f examples/CMakeFiles/HelloSodiumChlorideInC.dir/build.make examples/CMakeFiles/HelloSodiumChlorideInC.dir/HelloSodiumChlorideInC.c.s
.PHONY : HelloSodiumChlorideInC.c.s
HelloWaterBox.o: HelloWaterBox.cpp.o
.PHONY : HelloWaterBox.o
# target to build an object file
HelloWaterBox.cpp.o:
cd /Users/choderaj/code/openmm/openmm.jchodera && $(MAKE) -f examples/CMakeFiles/HelloWaterBox.dir/build.make examples/CMakeFiles/HelloWaterBox.dir/HelloWaterBox.cpp.o
.PHONY : HelloWaterBox.cpp.o
HelloWaterBox.i: HelloWaterBox.cpp.i
.PHONY : HelloWaterBox.i
# target to preprocess a source file
HelloWaterBox.cpp.i:
cd /Users/choderaj/code/openmm/openmm.jchodera && $(MAKE) -f examples/CMakeFiles/HelloWaterBox.dir/build.make examples/CMakeFiles/HelloWaterBox.dir/HelloWaterBox.cpp.i
.PHONY : HelloWaterBox.cpp.i
HelloWaterBox.s: HelloWaterBox.cpp.s
.PHONY : HelloWaterBox.s
# target to generate assembly for a file
HelloWaterBox.cpp.s:
cd /Users/choderaj/code/openmm/openmm.jchodera && $(MAKE) -f examples/CMakeFiles/HelloWaterBox.dir/build.make examples/CMakeFiles/HelloWaterBox.dir/HelloWaterBox.cpp.s
.PHONY : HelloWaterBox.cpp.s
# Help Target
help:
@echo "The following are some of the valid targets for this Makefile:"
@echo "... all (the default if no target is provided)"
@echo "... clean"
@echo "... depend"
@echo "... HelloArgon"
@echo "... HelloArgonInC"
@echo "... HelloEthane"
@echo "... HelloSodiumChloride"
@echo "... HelloSodiumChlorideInC"
@echo "... HelloWaterBox"
@echo "... edit_cache"
@echo "... install"
@echo "... install/local"
@echo "... install/strip"
@echo "... list_install_components"
@echo "... rebuild_cache"
@echo "... test"
@echo "... Empty.o"
@echo "... Empty.i"
@echo "... Empty.s"
@echo "... HelloArgon.o"
@echo "... HelloArgon.i"
@echo "... HelloArgon.s"
@echo "... HelloArgonInC.o"
@echo "... HelloArgonInC.i"
@echo "... HelloArgonInC.s"
@echo "... HelloEthane.o"
@echo "... HelloEthane.i"
@echo "... HelloEthane.s"
@echo "... HelloSodiumChloride.o"
@echo "... HelloSodiumChloride.i"
@echo "... HelloSodiumChloride.s"
@echo "... HelloSodiumChlorideInC.o"
@echo "... HelloSodiumChlorideInC.i"
@echo "... HelloSodiumChlorideInC.s"
@echo "... HelloWaterBox.o"
@echo "... HelloWaterBox.i"
@echo "... HelloWaterBox.s"
.PHONY : help
#=============================================================================
# Special targets to cleanup operation of make.
# Special rule to run CMake to check the build system integrity.
# No rule that depends on this can have commands that come from listfiles
# because they might be regenerated.
cmake_check_build_system:
cd /Users/choderaj/code/openmm/openmm.jchodera && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0
.PHONY : cmake_check_build_system
#ifndef OPENMM_CUSTOMNONBONDEDFORCE_H_
#define OPENMM_CUSTOMNONBONDEDFORCE_H_
/* -------------------------------------------------------------------------- *
* OpenMM *
* -------------------------------------------------------------------------- *
* This is part of the OpenMM molecular simulation toolkit originating from *
* Simbios, the NIH National Center for Physics-Based Simulation of *
* Biological Structures at Stanford, funded under the NIH Roadmap for *
* Medical Research, grant U54 GM072970. See https://simtk.org. *
* *
* Portions copyright (c) 2008-2014 Stanford University and the Authors. *
* Authors: Peter Eastman *
* Contributors: *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the "Software"), *
* to deal in the Software without restriction, including without limitation *
* the rights to use, copy, modify, merge, publish, distribute, sublicense, *
* and/or sell copies of the Software, and to permit persons to whom the *
* Software is furnished to do so, subject to the following conditions: *
* *
* The above copyright notice and this permission notice shall be included in *
* all copies or substantial portions of the Software. *
* *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR *
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, *
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL *
* THE AUTHORS, CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE *
* USE OR OTHER DEALINGS IN THE SOFTWARE. *
* -------------------------------------------------------------------------- */
#include "TabulatedFunction.h"
#include "Force.h"
#include "Vec3.h"
#include <map>
#include <set>
#include <utility>
#include <vector>
#include "internal/windowsExport.h"
namespace OpenMM {
/**
* This class implements nonbonded interactions between particles. Unlike NonbondedForce, the functional form
* of the interaction is completely customizable, and may involve arbitrary algebraic expressions and tabulated
* functions. It may depend on the distance between particles, as well as on arbitrary global and
* per-particle parameters. It also optionally supports periodic boundary conditions and cutoffs for long range interactions.
*
* To use this class, create a CustomNonbondedForce object, passing an algebraic expression to the constructor
* that defines the interaction energy between each pair of particles. The expression may depend on r, the distance
* between the particles, as well as on any parameters you choose. Then call addPerParticleParameter() to define per-particle
* parameters, and addGlobalParameter() to define global parameters. The values of per-particle parameters are specified as
* part of the system definition, while values of global parameters may be modified during a simulation by calling Context::setParameter().
*
* Next, call addParticle() once for each particle in the System to set the values of its per-particle parameters.
* The number of particles for which you set parameters must be exactly equal to the number of particles in the
* System, or else an exception will be thrown when you try to create a Context. After a particle has been added,
* you can modify its parameters by calling setParticleParameters(). This will have no effect on Contexts that already exist
* unless you call updateParametersInContext().
*
* CustomNonbondedForce also lets you specify "exclusions", particular pairs of particles whose interactions should be
* omitted from force and energy calculations. This is most often used for particles that are bonded to each other.
*
* As an example, the following code creates a CustomNonbondedForce that implements a 12-6 Lennard-Jones potential:
*
* <tt>CustomNonbondedForce* force = new CustomNonbondedForce("4*epsilon*((sigma/r)^12-(sigma/r)^6); sigma=0.5*(sigma1+sigma2); epsilon=sqrt(epsilon1*epsilon2)");</tt>
*
* This force depends on two parameters: sigma and epsilon. The following code defines these as per-particle parameters:
*
* <tt><pre>
* force->addPerParticleParameter("sigma");
* force->addPerParticleParameter("epsilon");
* </pre></tt>
*
* The expression <i>must</i> be symmetric with respect to the two particles. It typically will only be evaluated once
* for each pair of particles, and no guarantee is made about which particle will be identified as "particle 1". In the
* above example, the energy only depends on the products sigma1*sigma2 and epsilon1*epsilon2, both of which are unchanged
* if the labels 1 and 2 are reversed. In contrast, if it depended on the difference sigma1-sigma2, the results would
* be undefined, because reversing the labels 1 and 2 would change the energy.
*
* CustomNonbondedForce can operate in two modes. By default, it computes the interaction of every particle in the System
* with every other particle. Alternatively, you can restrict it to only a subset of particle pairs. To do this, specify
* one or more "interaction groups". An interaction group consists of two sets of particles that should interact with
* each other. Every particle in the first set interacts with every particle in the second set. For example, you might use
* this feature to compute a solute-solvent interaction energy, while omitting all interactions between two solute atoms
* or two solvent atoms.
*
* To create an interaction group, call addInteractionGroup(). You may add as many interaction groups as you want.
* Be aware of the following:
*
* <ul>
* <li>Exclusions are still taken into account, so the interactions between excluded pairs are omitted.</li>
* <li>Likewise, a particle will never interact with itself, even if it appears in both sets of an interaction group.</li>
* <li>If a particle pair appears in two different interaction groups, its interaction will be computed twice. This is
* sometimes useful, but be aware of it so you do not accidentally create unwanted duplicate interactions.</li>
* <li>If you do not add any interaction groups to a CustomNonbondedForce, it operates in the default mode where every
* particle interacts with every other particle.</li>
* </ul>
*
* When using a cutoff, by default the interaction is sharply truncated at the cutoff distance.
* Optionally you can instead use a switching function to make the interaction smoothly go to zero over a finite
* distance range. To enable this, call setUseSwitchingFunction(). You must also call setSwitchingDistance()
* to specify the distance at which the interaction should begin to decrease. The switching distance must be
* less than the cutoff distance. Of course, you could also incorporate the switching function directly into your
* energy expression, but there are several advantages to keeping it separate. It makes your energy expression simpler
* to write and understand. It allows you to use the same energy expression with or without a cutoff. Also, when using
* a long range correction (see below), separating out the switching function allows the correction to be calculated
* more accurately.
*
* Another optional feature of this class is to add a contribution to the energy which approximates the effect of all
* interactions beyond the cutoff in a periodic system. When running a simulation at constant pressure, this can improve
* the quality of the result. Call setUseLongRangeCorrection() to enable it.
*
* Computing the long range correction takes negligible work in each time step, but it does require an expensive precomputation
* at the start of the simulation. Furthermore, that precomputation must be repeated every time a global parameter changes
* (or when you modify per-particle parameters by calling updateParametersInContext()). This means that if parameters change
* frequently, the long range correction can be very slow. For this reason, it is disabled by default.
*
* Expressions may involve the operators + (add), - (subtract), * (multiply), / (divide), and ^ (power), and the following
* functions: sqrt, exp, log, sin, cos, sec, csc, tan, cot, asin, acos, atan, sinh, cosh, tanh, erf, erfc, min, max, abs, step, delta. All trigonometric functions
* are defined in radians, and log is the natural logarithm. step(x) = 0 if x is less than 0, 1 otherwise. delta(x) = 1 if x is 0, 0 otherwise. The names of per-particle parameters
* have the suffix "1" or "2" appended to them to indicate the values for the two interacting particles. As seen in the above example,
* the expression may also involve intermediate quantities that are defined following the main expression, using ";" as a separator.
*
* In addition, you can call addTabulatedFunction() to define a new function based on tabulated values. You specify the function by
* creating a TabulatedFunction object. That function can then appear in the expression.
*/
class OPENMM_EXPORT CustomNonbondedForce : public Force {
public:
/**
* This is an enumeration of the different methods that may be used for handling long range nonbonded forces.
*/
enum NonbondedMethod {
/**
* No cutoff is applied to nonbonded interactions. The full set of N^2 interactions is computed exactly.
* This necessarily means that periodic boundary conditions cannot be used. This is the default.
*/
NoCutoff = 0,
/**
* Interactions beyond the cutoff distance are ignored.
*/
CutoffNonPeriodic = 1,
/**
* Periodic boundary conditions are used, so that each particle interacts only with the nearest periodic copy of
* each other particle. Interactions beyond the cutoff distance are ignored.
*/
CutoffPeriodic = 2,
};
/**
* Create a CustomNonbondedForce.
*
* @param energy an algebraic expression giving the interaction energy between two particles as a function
* of r, the distance between them, as well as any global and per-particle parameters
*/
explicit CustomNonbondedForce(const std::string& energy);
~CustomNonbondedForce();
/**
* Get the number of particles for which force field parameters have been defined.
*/
int getNumParticles() const {
return particles.size();
}
/**
* Get the number of particle pairs whose interactions should be excluded.
*/
int getNumExclusions() const {
return exclusions.size();
}
/**
* Get the number of per-particle parameters that the interaction depends on.
*/
int getNumPerParticleParameters() const {
return parameters.size();
}
/**
* Get the number of global parameters that the interaction depends on.
*/
int getNumGlobalParameters() const {
return globalParameters.size();
}
/**
* Get the number of tabulated functions that have been defined.
*/
int getNumTabulatedFunctions() const {
return functions.size();
}
/**
* Get the number of tabulated functions that have been defined.
*
* @deprecated This method exists only for backward compatibility. Use getNumTabulatedFunctions() instead.
*/
int getNumFunctions() const {
return functions.size();
}
/**
* Get the number of interaction groups that have been defined.
*/
int getNumInteractionGroups() const {
return interactionGroups.size();
}
/**
* Get the algebraic expression that gives the interaction energy between two particles
*/
const std::string& getEnergyFunction() const;
/**
* Set the algebraic expression that gives the interaction energy between two particles
*/
void setEnergyFunction(const std::string& energy);
/**
* Get the method used for handling long range nonbonded interactions.
*/
NonbondedMethod getNonbondedMethod() const;
/**
* Set the method used for handling long range nonbonded interactions.
*/
void setNonbondedMethod(NonbondedMethod method);
/**
* Get the cutoff distance (in nm) being used for nonbonded interactions. If the NonbondedMethod in use
* is NoCutoff, this value will have no effect.
*
* @return the cutoff distance, measured in nm
*/
double getCutoffDistance() const;
/**
* Set the cutoff distance (in nm) being used for nonbonded interactions. If the NonbondedMethod in use
* is NoCutoff, this value will have no effect.
*
* @param distance the cutoff distance, measured in nm
*/
void setCutoffDistance(double distance);
/**
* Get whether a switching function is applied to the interaction. If the nonbonded method is set
* to NoCutoff, this option is ignored.
*/
bool getUseSwitchingFunction() const;
/**
* Set whether a switching function is applied to the interaction. If the nonbonded method is set
* to NoCutoff, this option is ignored.
*/
void setUseSwitchingFunction(bool use);
/**
* Get the distance at which the switching function begins to reduce the interaction. This must be
* less than the cutoff distance.
*/
double getSwitchingDistance() const;
/**
* Set the distance at which the switching function begins to reduce the interaction. This must be
* less than the cutoff distance.
*/
void setSwitchingDistance(double distance);
/**
* Get whether to add a correction to the energy to compensate for the cutoff and switching function.
* This has no effect if periodic boundary conditions are not used.
*/
bool getUseLongRangeCorrection() const;
/**
* Set whether to add a correction to the energy to compensate for the cutoff and switching function.
* This has no effect if periodic boundary conditions are not used.
*/
void setUseLongRangeCorrection(bool use);
/**
* Add a new per-particle parameter that the interaction may depend on.
*
* @param name the name of the parameter
* @return the index of the parameter that was added
*/
int addPerParticleParameter(const std::string& name);
/**
* Get the name of a per-particle parameter.
*
* @param index the index of the parameter for which to get the name
* @return the parameter name
*/
const std::string& getPerParticleParameterName(int index) const;
/**
* Set the name of a per-particle parameter.
*
* @param index the index of the parameter for which to set the name
* @param name the name of the parameter
*/
void setPerParticleParameterName(int index, const std::string& name);
/**
* Add a new global parameter that the interaction may depend on.
*
* @param name the name of the parameter
* @param defaultValue the default value of the parameter
* @return the index of the parameter that was added
*/
int addGlobalParameter(const std::string& name, double defaultValue);
/**
* Get the name of a global parameter.
*
* @param index the index of the parameter for which to get the name
* @return the parameter name
*/
const std::string& getGlobalParameterName(int index) const;
/**
* Set the name of a global parameter.
*
* @param index the index of the parameter for which to set the name
* @param name the name of the parameter
*/
void setGlobalParameterName(int index, const std::string& name);
/**
* Get the default value of a global parameter.
*
* @param index the index of the parameter for which to get the default value
* @return the parameter default value
*/
double getGlobalParameterDefaultValue(int index) const;
/**
* Set the default value of a global parameter.
*
* @param index the index of the parameter for which to set the default value
* @param name the default value of the parameter
*/
void setGlobalParameterDefaultValue(int index, double defaultValue);
/**
* Add the nonbonded force parameters for a particle. This should be called once for each particle
* in the System. When it is called for the i'th time, it specifies the parameters for the i'th particle.
*
* @param parameters the list of parameters for the new particle
* @return the index of the particle that was added
*/
int addParticle(const std::vector<double>& parameters);
/**
* Get the nonbonded force parameters for a particle.
*
* @param index the index of the particle for which to get parameters
* @param parameters the list of parameters for the specified particle
*/
void getParticleParameters(int index, std::vector<double>& parameters) const;
/**
* Set the nonbonded force parameters for a particle.
*
* @param index the index of the particle for which to set parameters
* @param parameters the list of parameters for the specified particle
*/
void setParticleParameters(int index, const std::vector<double>& parameters);
/**
* Add a particle pair to the list of interactions that should be excluded.
*
* @param particle1 the index of the first particle in the pair
* @param particle2 the index of the second particle in the pair
* @return the index of the exclusion that was added
*/
int addExclusion(int particle1, int particle2);
/**
* Get the particles in a pair whose interaction should be excluded.
*
* @param index the index of the exclusion for which to get particle indices
* @param particle1 the index of the first particle in the pair
* @param particle2 the index of the second particle in the pair
*/
void getExclusionParticles(int index, int& particle1, int& particle2) const;
/**
* Set the particles in a pair whose interaction should be excluded.
*
* @param index the index of the exclusion for which to set particle indices
* @param particle1 the index of the first particle in the pair
* @param particle2 the index of the second particle in the pair
*/
void setExclusionParticles(int index, int particle1, int particle2);
/**
* Add a tabulated function that may appear in the energy expression.
*
* @param name the name of the function as it appears in expressions
* @param function a TabulatedFunction object defining the function. The TabulatedFunction
* should have been created on the heap with the "new" operator. The
* Force takes over ownership of it, and deletes it when the Force itself is deleted.
* @return the index of the function that was added
*/
int addTabulatedFunction(const std::string& name, TabulatedFunction* function);
/**
* Get a const reference to a tabulated function that may appear in the energy expression.
*
* @param index the index of the function to get
* @return the TabulatedFunction object defining the function
*/
const TabulatedFunction& getTabulatedFunction(int index) const;
/**
* Get a reference to a tabulated function that may appear in the energy expression.
*
* @param index the index of the function to get
* @return the TabulatedFunction object defining the function
*/
TabulatedFunction& getTabulatedFunction(int index);
/**
* Get the name of a tabulated function that may appear in the energy expression.
*
* @param index the index of the function to get
* @return the name of the function as it appears in expressions
*/
const std::string& getTabulatedFunctionName(int index) const;
/**
* Add a tabulated function that may appear in the energy expression.
*
* @deprecated This method exists only for backward compatibility. Use addTabulatedFunction() instead.
*/
int addFunction(const std::string& name, const std::vector<double>& values, double min, double max);
/**
* Get the parameters for a tabulated function that may appear in the energy expression.
*
* @deprecated This method exists only for backward compatibility. Use getTabulatedFunctionParameters() instead.
* If the specified function is not a Continuous1DFunction, this throws an exception.
*/
void getFunctionParameters(int index, std::string& name, std::vector<double>& values, double& min, double& max) const;
/**
* Set the parameters for a tabulated function that may appear in the energy expression.
*
* @deprecated This method exists only for backward compatibility. Use setTabulatedFunctionParameters() instead.
* If the specified function is not a Continuous1DFunction, this throws an exception.
*/
void setFunctionParameters(int index, const std::string& name, const std::vector<double>& values, double min, double max);
/**
* Add an interaction group. An interaction will be computed between every particle in set1 and every particle in set2.
*
* @param set1 the first set of particles forming the interaction group
* @param set2 the second set of particles forming the interaction group
* @return the index of the interaction group that was added
*/
int addInteractionGroup(const std::set<int>& set1, const std::set<int>& set2);
/**
* Get the parameters for an interaction group.
*
* @param index the index of the interaction group for which to get parameters
* @param set1 the first set of particles forming the interaction group
* @param set2 the second set of particles forming the interaction group
*/
void getInteractionGroupParameters(int index, std::set<int>& set1, std::set<int>& set2) const;
/**
* Set the parameters for an interaction group.
*
* @param index the index of the interaction group for which to set parameters
* @param set1 the first set of particles forming the interaction group
* @param set2 the second set of particles forming the interaction group
*/
void setInteractionGroupParameters(int index, const std::set<int>& set1, const std::set<int>& set2);
/**
* Update the per-particle parameters in a Context to match those stored in this Force object. This method provides
* an efficient method to update certain parameters in an existing Context without needing to reinitialize it.
* Simply call setParticleParameters() to modify this object's parameters, then call updateParametersInContext()
* to copy them over to the Context.
*
* This method has several limitations. The only information it updates is the values of per-particle parameters.
* All other aspects of the Force (the energy function, nonbonded method, cutoff distance, etc.) are unaffected and can
* only be changed by reinitializing the Context. Also, this method cannot be used to add new particles, only to change
* the parameters of existing ones.
*/
void updateParametersInContext(Context& context);
protected:
ForceImpl* createImpl() const;
private:
class ParticleInfo;
class PerParticleParameterInfo;
class GlobalParameterInfo;
class ExclusionInfo;
class FunctionInfo;
class InteractionGroupInfo;
NonbondedMethod nonbondedMethod;
double cutoffDistance, switchingDistance;
bool useSwitchingFunction, useLongRangeCorrection;
std::string energyExpression;
std::vector<PerParticleParameterInfo> parameters;
std::vector<GlobalParameterInfo> globalParameters;
std::vector<ParticleInfo> particles;
std::vector<ExclusionInfo> exclusions;
std::vector<FunctionInfo> functions;
std::vector<InteractionGroupInfo> interactionGroups;
};
/**
* This is an internal class used to record information about a particle.
* @private
*/
class CustomNonbondedForce::ParticleInfo {
public:
std::vector<double> parameters;
ParticleInfo() {
}
ParticleInfo(const std::vector<double>& parameters) : parameters(parameters) {
}
};
/**
* This is an internal class used to record information about a per-particle parameter.
* @private
*/
class CustomNonbondedForce::PerParticleParameterInfo {
public:
std::string name;
PerParticleParameterInfo() {
}
PerParticleParameterInfo(const std::string& name) : name(name) {
}
};
/**
* This is an internal class used to record information about a global parameter.
* @private
*/
class CustomNonbondedForce::GlobalParameterInfo {
public:
std::string name;
double defaultValue;
GlobalParameterInfo() {
}
GlobalParameterInfo(const std::string& name, double defaultValue) : name(name), defaultValue(defaultValue) {
}
};
/**
* This is an internal class used to record information about an exclusion.
* @private
*/
class CustomNonbondedForce::ExclusionInfo {
public:
int particle1, particle2;
ExclusionInfo() {
particle1 = particle2 = -1;
}
ExclusionInfo(int particle1, int particle2) :
particle1(particle1), particle2(particle2) {
}
};
/**
* This is an internal class used to record information about a tabulated function.
* @private
*/
class CustomNonbondedForce::FunctionInfo {
public:
std::string name;
TabulatedFunction* function;
FunctionInfo() {
}
FunctionInfo(const std::string& name, TabulatedFunction* function) : name(name), function(function) {
}
};
/**
* This is an internal class used to record information about an interaction group.
* @private
*/
class CustomNonbondedForce::InteractionGroupInfo {
public:
std::set<int> set1, set2;
InteractionGroupInfo() {
}
InteractionGroupInfo(const std::set<int>& set1, const std::set<int>& set2) :
set1(set1), set2(set2) {
}
};
} // namespace OpenMM
#endif /*OPENMM_CUSTOMNONBONDEDFORCE_H_*/
...@@ -49,6 +49,8 @@ void OPENMM_EXPORT throwException(const char* file, int line, const std::string& ...@@ -49,6 +49,8 @@ void OPENMM_EXPORT throwException(const char* file, int line, const std::string&
#define ASSERT(cond) {if (!(cond)) throwException(__FILE__, __LINE__, "");}; #define ASSERT(cond) {if (!(cond)) throwException(__FILE__, __LINE__, "");};
#define ASSERT_EQUAL(expected, found) {if (!((expected) == (found))) {std::stringstream details; details << "Expected "<<(expected)<<", found "<<(found); throwException(__FILE__, __LINE__, details.str());}}; #define ASSERT_EQUAL(expected, found) {if (!((expected) == (found))) {std::stringstream details; details << "Expected "<<(expected)<<", found "<<(found); throwException(__FILE__, __LINE__, details.str());}};
#define ASSERT_EQUAL_CONTAINERS(expected, found) {if (!((expected) == (found))) {std::stringstream details; details << "Containers not equal"; throwException(__FILE__, __LINE__, details.str());}};
#define ASSERT_EQUAL_TOL(expected, found, tol) {double _scale_ = std::abs(expected) > 1.0 ? std::abs(expected) : 1.0; if (!(std::abs((expected)-(found))/_scale_ <= (tol))) {std::stringstream details; details << "Expected "<<(expected)<<", found "<<(found); throwException(__FILE__, __LINE__, details.str());}}; #define ASSERT_EQUAL_TOL(expected, found, tol) {double _scale_ = std::abs(expected) > 1.0 ? std::abs(expected) : 1.0; if (!(std::abs((expected)-(found))/_scale_ <= (tol))) {std::stringstream details; details << "Expected "<<(expected)<<", found "<<(found); throwException(__FILE__, __LINE__, details.str());}};
......
...@@ -103,9 +103,9 @@ void* CustomNonbondedForceProxy::deserialize(const SerializationNode& node) cons ...@@ -103,9 +103,9 @@ void* CustomNonbondedForceProxy::deserialize(const SerializationNode& node) cons
CustomNonbondedForce* force = new CustomNonbondedForce(node.getStringProperty("energy")); CustomNonbondedForce* force = new CustomNonbondedForce(node.getStringProperty("energy"));
force->setNonbondedMethod((CustomNonbondedForce::NonbondedMethod) node.getIntProperty("method")); force->setNonbondedMethod((CustomNonbondedForce::NonbondedMethod) node.getIntProperty("method"));
force->setCutoffDistance(node.getDoubleProperty("cutoff")); force->setCutoffDistance(node.getDoubleProperty("cutoff"));
force->setUseSwitchingFunction(node.getBoolProperty("useSwitchingFunction")); force->setUseSwitchingFunction(node.getBoolProperty("useSwitchingFunction", false));
force->setSwitchingDistance(node.getDoubleProperty("switchingDistance")); force->setSwitchingDistance(node.getDoubleProperty("switchingDistance", -1.0));
force->setUseLongRangeCorrection(node.getBoolProperty("useLongRangeCorrection")); force->setUseLongRangeCorrection(node.getBoolProperty("useLongRangeCorrection", false));
const SerializationNode& perParticleParams = node.getChildNode("PerParticleParameters"); const SerializationNode& perParticleParams = node.getChildNode("PerParticleParameters");
for (int i = 0; i < (int) perParticleParams.getChildren().size(); i++) { for (int i = 0; i < (int) perParticleParams.getChildren().size(); i++) {
const SerializationNode& parameter = perParticleParams.getChildren()[i]; const SerializationNode& parameter = perParticleParams.getChildren()[i];
...@@ -149,8 +149,10 @@ void* CustomNonbondedForceProxy::deserialize(const SerializationNode& node) cons ...@@ -149,8 +149,10 @@ void* CustomNonbondedForceProxy::deserialize(const SerializationNode& node) cons
force->addTabulatedFunction(function.getStringProperty("name"), new Continuous1DFunction(values, function.getDoubleProperty("min"), function.getDoubleProperty("max"))); force->addTabulatedFunction(function.getStringProperty("name"), new Continuous1DFunction(values, function.getDoubleProperty("min"), function.getDoubleProperty("max")));
} }
} }
const SerializationNode& interactionGroups = node.getChildNode("InteractionGroups"); // Look for interaction group definitions in a backward-compatible way.
for (int i = 0; i < (int) interactionGroups.getChildren().size(); i++) { try {
const SerializationNode& interactionGroups = node.getChildNode("InteractionGroups");
for (int i = 0; i < (int) interactionGroups.getChildren().size(); i++) {
const SerializationNode& interactionGroup = interactionGroups.getChildren()[i]; const SerializationNode& interactionGroup = interactionGroups.getChildren()[i];
// Get set 1. // Get set 1.
const SerializationNode& set1node = interactionGroup.getChildNode("Set1"); const SerializationNode& set1node = interactionGroup.getChildNode("Set1");
...@@ -163,6 +165,9 @@ void* CustomNonbondedForceProxy::deserialize(const SerializationNode& node) cons ...@@ -163,6 +165,9 @@ void* CustomNonbondedForceProxy::deserialize(const SerializationNode& node) cons
for (int j = 0; j < (int) set2node.getChildren().size(); j++) for (int j = 0; j < (int) set2node.getChildren().size(); j++)
set2.insert(set2node.getChildren()[j].getIntProperty("index")); set2.insert(set2node.getChildren()[j].getIntProperty("index"));
force->addInteractionGroup(set1, set2); force->addInteractionGroup(set1, set2);
}
} catch (exception &e) {
// Do nothing, since we have to assume that InteractionGroups is not present and allow for this possibility.
} }
return force; return force;
} }
......
...@@ -80,20 +80,20 @@ void* NonbondedForceProxy::deserialize(const SerializationNode& node) const { ...@@ -80,20 +80,20 @@ void* NonbondedForceProxy::deserialize(const SerializationNode& node) const {
NonbondedForce* force = new NonbondedForce(); NonbondedForce* force = new NonbondedForce();
try { try {
force->setNonbondedMethod((NonbondedForce::NonbondedMethod) node.getIntProperty("method")); force->setNonbondedMethod((NonbondedForce::NonbondedMethod) node.getIntProperty("method"));
force->setCutoffDistance(node.getDoubleProperty("cutoff")); force->setCutoffDistance(node.getDoubleProperty("cutoff", 1.0));
force->setUseSwitchingFunction(node.getDoubleProperty("useSwitchingFunction")); force->setUseSwitchingFunction(node.getDoubleProperty("useSwitchingFunction", false));
force->setSwitchingDistance(node.getDoubleProperty("switchingDistance")); force->setSwitchingDistance(node.getDoubleProperty("switchingDistance", -1.0));
force->setEwaldErrorTolerance(node.getDoubleProperty("ewaldTolerance")); force->setEwaldErrorTolerance(node.getDoubleProperty("ewaldTolerance", 5e-4));
force->setReactionFieldDielectric(node.getDoubleProperty("rfDielectric")); force->setReactionFieldDielectric(node.getDoubleProperty("rfDielectric", 78.3));
force->setUseDispersionCorrection(node.getIntProperty("dispersionCorrection")); force->setUseDispersionCorrection(node.getIntProperty("dispersionCorrection",true));
double alpha; double alpha;
int nx, ny, nz; int nx, ny, nz;
alpha = node.getDoubleProperty("alpha"); alpha = node.getDoubleProperty("alpha", 0.0);
nx = node.getIntProperty("nx"); nx = node.getIntProperty("nx", 0);
ny = node.getIntProperty("ny"); ny = node.getIntProperty("ny", 0);
nz = node.getIntProperty("nz"); nz = node.getIntProperty("nz", 0);
force->setPMEParameters(alpha, nx, ny, nz); force->setPMEParameters(alpha, nx, ny, nz);
force->setReciprocalSpaceForceGroup(node.getIntProperty("recipForceGroup")); force->setReciprocalSpaceForceGroup(node.getIntProperty("recipForceGroup", -1));
const SerializationNode& particles = node.getChildNode("Particles"); const SerializationNode& particles = node.getChildNode("Particles");
for (int i = 0; i < (int) particles.getChildren().size(); i++) { for (int i = 0; i < (int) particles.getChildren().size(); i++) {
const SerializationNode& particle = particles.getChildren()[i]; const SerializationNode& particle = particles.getChildren()[i];
......
...@@ -517,7 +517,7 @@ QUIET = NO ...@@ -517,7 +517,7 @@ QUIET = NO
# generated by doxygen. Possible values are YES and NO. If left blank # generated by doxygen. Possible values are YES and NO. If left blank
# NO is used. # NO is used.
WARNINGS = YES WARNINGS = NO
# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings # If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings
# for undocumented members. If EXTRACT_ALL is set to YES then this flag will # for undocumented members. If EXTRACT_ALL is set to YES then this flag will
...@@ -530,7 +530,7 @@ WARN_IF_UNDOCUMENTED = NO ...@@ -530,7 +530,7 @@ WARN_IF_UNDOCUMENTED = NO
# parameters in a documented function, or documenting parameters that # parameters in a documented function, or documenting parameters that
# don't exist or using markup commands wrongly. # don't exist or using markup commands wrongly.
WARN_IF_DOC_ERROR = YES WARN_IF_DOC_ERROR = NO
# This WARN_NO_PARAMDOC option can be abled to get warnings for # This WARN_NO_PARAMDOC option can be abled to get warnings for
# functions that are documented, but have no documentation for their parameters # functions that are documented, but have no documentation for their parameters
...@@ -564,8 +564,14 @@ WARN_LOGFILE = ...@@ -564,8 +564,14 @@ WARN_LOGFILE =
# directories like "/usr/src/myproject". Separate the files or directories # directories like "/usr/src/myproject". Separate the files or directories
# with spaces. # with spaces.
INPUT = "$(OPENMM_INCLUDE_PATH)/OpenMM.h" \ INPUT = "/Users/choderaj/code/openmm/openmm.jchodera/openmmapi" \
"$(OPENMM_INCLUDE_PATH)/openmm" "/Users/choderaj/code/openmm/openmm.jchodera/olla/include/openmm/Platform.h" \
"/Users/choderaj/code/openmm/openmm.jchodera/serialization/include/openmm/serialization/SerializationNode.h" \
"/Users/choderaj/code/openmm/openmm.jchodera/serialization/include/openmm/serialization/SerializationProxy.h" \
"/Users/choderaj/code/openmm/openmm.jchodera/serialization/include/openmm/serialization/XmlSerializer.h" \
"/Users/choderaj/code/openmm/openmm.jchodera/plugins/amoeba/openmmapi" \
"/Users/choderaj/code/openmm/openmm.jchodera/plugins/rpmd/openmmapi" \
"/Users/choderaj/code/openmm/openmm.jchodera/plugins/drude/openmmapi"
# This tag can be used to specify the character encoding of the source files # This tag can be used to specify the character encoding of the source files
# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is # that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is
...@@ -594,7 +600,7 @@ RECURSIVE = YES ...@@ -594,7 +600,7 @@ RECURSIVE = YES
# excluded from the INPUT source files. This way you can easily exclude a # excluded from the INPUT source files. This way you can easily exclude a
# subdirectory from a directory tree whose root is specified with the INPUT tag. # subdirectory from a directory tree whose root is specified with the INPUT tag.
EXCLUDE = EXCLUDE = *Impl.h
# The EXCLUDE_SYMLINKS tag can be used select whether or not files or # The EXCLUDE_SYMLINKS tag can be used select whether or not files or
# directories that are symbolic links (a Unix filesystem feature) are excluded # directories that are symbolic links (a Unix filesystem feature) are excluded
...@@ -608,11 +614,15 @@ EXCLUDE_SYMLINKS = NO ...@@ -608,11 +614,15 @@ EXCLUDE_SYMLINKS = NO
# against the file with absolute path, so to exclude all test directories # against the file with absolute path, so to exclude all test directories
# for example use the pattern */test/* # for example use the pattern */test/*
#EXCLUDE_PATTERNS = */tests/* \
# */src/* \
# */.svn/*
EXCLUDE_PATTERNS = */tests/* \ EXCLUDE_PATTERNS = */tests/* \
*/.svn/* */openmmapi/src/* \
*/internal/* \
*/.svn/* \
*amoebaKernels.h \
*DrudeKernels.h \
*RpmdKernels.h \
*OpenMMFortranModule.f90 \
*OpenMMCWrapper.h
# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names # The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
# (namespaces, classes, functions, etc.) that should be excluded from the # (namespaces, classes, functions, etc.) that should be excluded from the
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment