doxygen-doc
.project
.cproject
+CMakeLists.txt.user
-Current developers:
+Current lead developers:
David van der Spoel <spoel@gromacs.org>
Berk Hess <hess@gromacs.org>
Erik Lindahl <lindahl@gromacs.org>
-A full list of Gromacs contributors
-is available at http://www.gromacs.org
+A full list of Gromacs contributors is available at http://www.gromacs.org/About_Gromacs/People
-cmake_minimum_required(VERSION 2.6)
+cmake_minimum_required(VERSION 2.8)
project(Gromacs)
include(Dart)
# machine with no git.
#
# NOTE: when releasing the "-dev" suffix needs to be stripped off!
-set(PROJECT_VERSION "4.5.4-dev")
+set(PROJECT_VERSION "4.6-dev")
set(CUSTOM_VERSION_STRING ""
CACHE STRING "Custom version string (if empty, use hard-coded default)")
mark_as_advanced(CUSTOM_VERSION_STRING)
set(SOVERSION 6)
# It is a bit irritating, but this has to be set separately for now!
SET(CPACK_PACKAGE_VERSION_MAJOR "4")
-SET(CPACK_PACKAGE_VERSION_MINOR "5")
-SET(CPACK_PACKAGE_VERSION_PATCH "4")
+SET(CPACK_PACKAGE_VERSION_MINOR "6")
+#SET(CPACK_PACKAGE_VERSION_PATCH "0")
# Cmake modules/macros are in a subdirectory to keep this file cleaner
########################################################################
include(CheckCSourceCompiles) # for gmxTestMPI_IN_PLACE
if(GMX_MPI)
- MESSAGE(WARNING "
- There are known problems with some MPI implementations:
- OpenMPI version < 1.4.1
- MVAPICH2 version <= 1.4.1 *")
if(GMX_THREADS)
#message(FATAL_ERROR "Thread-based parallelization conflicts with MPI.")
set(GMX_THREADS OFF CACHE BOOL
"Thread-based parallelization conflicts with MPI." FORCE)
endif(GMX_THREADS)
- find_package(MPI)
+
+ # Work-around for Cray MPI
+ TRY_COMPILE(MPI_FOUND ${CMAKE_BINARY_DIR}
+ "${CMAKE_SOURCE_DIR}/cmake/TestMPI.c"
+ COMPILE_DEFINITIONS )
+ if(NOT MPI_FOUND)
+ # search for normal MPI installations
+ find_package(MPI)
+ endif(NOT MPI_FOUND)
+
if(MPI_FOUND)
set(GROMACS_C_FLAGS ${GROMACS_FLAGS} ${MPI_COMPILE_FLAGS})
set(GROMACS_LINKER_FLAGS ${GROMACS_LINKER_FLAGS} ${MPI_LINK_FLAGS})
include_directories(${MPI_INCLUDE_PATH})
list(APPEND GMX_EXTRA_LIBRARIES ${MPI_LIBRARIES})
- add_definitions( -DMPI ) #for FAHCORE
+ if(GMX_FAHCORE)
+ add_definitions( -DMPI ) #for FAHCORE
+ endif(GMX_FAHCORE)
include(gmxTestMPI_IN_PLACE)
if (GMX_MPI_IN_PLACE)
gmx_test_mpi_in_place(MPI_IN_PLACE_EXISTS)
endif (GMX_MPI_IN_PLACE)
+
+ # test for unsuitable versions of OpenMPI
+ exec_program(${MPIEXEC}
+ ARGS --version
+ OUTPUT_VARIABLE MPI_TYPE
+ RETURN_VALUE MPI_EXEC_RETURN)
+ if(MPI_EXEC_RETURN EQUAL 0)
+ if(MPI_TYPE MATCHES "Open MPI|OpenRTE")
+ string(REGEX MATCH "[0-9]+\\.[0-9]*\\.?[0-9]*" MPI_VERSION ${MPI_TYPE})
+ if(MPI_VERSION VERSION_LESS "1.4.1")
+ MESSAGE(WARNING "
+ There are known problems with OpenMPI version < 1.4.1.
+ Please consider updating your OpenMPI.")
+ endif(MPI_VERSION VERSION_LESS "1.4.1")
+ unset(MPI_VERSION)
+ else(MPI_TYPE MATCHES "Open MPI|OpenRTE")
+ # This is not OpenMPI, so give the old generic warning message
+ MESSAGE(WARNING "
+ There are known problems with some MPI implementations:
+ MVAPICH2 version <= 1.4.1
+ Please consider updating your MPI if applicable.")
+ endif(MPI_TYPE MATCHES "Open MPI|OpenRTE")
+ unset(MPI_TYPE)
+ endif(MPI_EXEC_RETURN EQUAL 0)
else(MPI_FOUND)
message(FATAL_ERROR "MPI support requested, but no MPI compiler found.")
endif(MPI_FOUND)
if(EXISTS "${CMAKE_SOURCE_DIR}/.git")
if(USE_VERSION_H)
# We need at least git v1.5.1 be able to parse git's date output. If not
- # fund or the version is too small, we can't generate version information.
- find_package(Git 1.5.1)
- # this should at some point become VERSION_LESS
- if(NOT Git_FOUND OR Git_VERSION STRLESS "1.5.1")
- message("No compatible git version found, won't be able to generate proper development version information.")
- set(USE_VERSION_H OFF)
+ # found or the version is too small, we can't generate version information.
+ find_package(Git)
+
+ # Find out the git version
+ if(GIT_FOUND AND NOT GIT_VERSION)
+ execute_process(COMMAND ${GIT_EXECUTABLE} "--version"
+ OUTPUT_VARIABLE _exec_out
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+ string(REGEX REPLACE "git version (.*)" "\\1" GIT_VERSION ${_exec_out})
+ set(GIT_VERSION ${GIT_VERSION} CACHE STRING "Git version")
+ mark_as_advanced(GIT_VERSION)
+ endif()
+
+ if(NOT GIT_FOUND OR GIT_VERSION VERSION_LESS "1.5.1")
+ message("No compatible git version found, won't be able to generate proper development version information.")
+ set(USE_VERSION_H OFF)
endif()
endif()
else()
check_function_exists(fseeko HAVE_FSEEKO)
include(gmxTestSignal)
-gmx_test_retsigtype(RETSIGTYPE)
gmx_test_sigusr1(HAVE_SIGUSR1)
include(gmxTestInline)
# turn on SSE if supported with reasonable defaults.
if (${GMX_ACCELERATION} STREQUAL "auto" AND NOT GMX_OPENMM)
- if(CMAKE_SYSTEM_PROCESSOR MATCHES "^(i.86|x86|x64|x86_64|AMD64|amd64)")
+ if(CMAKE_SYSTEM_PROCESSOR MATCHES "^(i.86|x86|x64|x86_64|AMD64|amd64)" OR CYGWIN)
set(GMX_ACCELERATION "SSE" CACHE STRING "Accelerated kernels. Pick one of: auto, none, SSE, BlueGene, Power6, ia64, altivec, fortran" FORCE)
set(GMX_X11 OFF CACHE BOOL "X11 not compatible with BlueGene, disabled!" FORCE)
set(GMX_THREADS OFF CACHE BOOL "Threads not compatible with BlueGene, disabled!" FORCE)
set(GMX_MPI ON CACHE BOOL "Use MPI on BlueGene" FORCE)
- set(GMX_EXTERNAL_BLAS TRUE CACHE BOOL "Use MASSV for BLAS on BlueGene" FORCE)
- set(GMX_EXTERNAL_LAPACK TRUE CACHE BOOL "Use MASSV for LAPACK on BlueGene" FORCE)
- list(APPEND GMX_EXTRA_LIBRARIES massv)
elseif(${GMX_ACCELERATION} STREQUAL "POWER6")
set(GMX_POWER6 1)
set(GMX_SOFTWARE_INVSQRT OFF CACHE BOOL "Do not use software reciprocal square root on Power6" FORCE)
if(prefix)
set(prefix "${prefix} ##")
endif(prefix)
+ if(suffix)
+ set(suffix "## ${suffix}")
+ if(extrasuffix)
+ set(extrasuffix "${suffix}${extrasuffix}")
+ endif(extrasuffix)
+ else(suffix)
+ if(extrasuffix)
+ # Don't know if this is needed, but it can't hurt
+ set(extrasuffix "## ${extrasuffix}")
+ endif(extrasuffix)
+ endif(suffix)
if(isupper)
- set(F77_FUNCDEF "${prefix} NAME ## ${suffix}")
- set(F77_FUNCDEF_ "${prefix} NAME ## ${suffix}${extrasuffix}")
+ set(F77_FUNCDEF "${prefix} NAME ${suffix}")
+ set(F77_FUNCDEF_ "${prefix} NAME ${extrasuffix}")
else(isupper)
- set(F77_FUNCDEF "${prefix} name ## ${suffix}")
- set(F77_FUNCDEF_ "${prefix} name ## ${suffix}${extrasuffix}")
+ set(F77_FUNCDEF "${prefix} name ${suffix}")
+ set(F77_FUNCDEF_ "${prefix} name ${extrasuffix}")
endif(isupper)
else(GMX_FORTRAN OR GMX_POWER6)
set(F77_FUNCDEF "name ## _")
set(GMX_EXTERNAL_BLAS TRUE CACHE BOOL "Use external BLAS instead of built-in")
set(GMX_EXTERNAL_LAPACK TRUE CACHE BOOL "Use external LAPACK instead of built-in")
else(HAVE_MKL OR ACCELERATE_FRAMEWORK)
- set(GMX_EXTERNAL_BLAS FALSE CACHE BOOL "Use external LAPACK instead of built-in")
+ set(GMX_EXTERNAL_BLAS FALSE CACHE BOOL "Use external BLAS instead of built-in")
set(GMX_EXTERNAL_LAPACK FALSE CACHE BOOL "Use external LAPACK instead of built-in")
if(GMX_EXTERNAL_BLAS)
#FindBLAS needs Fortran
enable_language(Fortran)
- find_package(BLAS REQUIRED)
- list(APPEND GMX_EXTRA_LIBRARIES ${BLAS_LIBRARIES})
+ if (GMX_BLAS_USER)
+ list(APPEND GMX_EXTRA_LIBRARIES ${GMX_BLAS_USER})
+ else(GMX_BLAS_USER)
+ find_package(BLAS REQUIRED)
+ list(APPEND GMX_EXTRA_LIBRARIES ${BLAS_LIBRARIES})
+ endif(GMX_BLAS_USER)
endif(GMX_EXTERNAL_BLAS)
if(GMX_EXTERNAL_LAPACK)
#FindLAPACK needs Fortran
enable_language(Fortran)
- find_package(LAPACK REQUIRED)
- list(APPEND GMX_EXTRA_LIBRARIES ${LAPACK_LIBRARIES})
+ if (GMX_LAPACK_USER)
+ list(APPEND GMX_EXTRA_LIBRARIES ${GMX_LAPACK_USER})
+ else(GMX_LAPACK_USER)
+ find_package(LAPACK REQUIRED)
+ list(APPEND GMX_EXTRA_LIBRARIES ${LAPACK_LIBRARIES})
+ endif(GMX_LAPACK_USER)
endif(GMX_EXTERNAL_LAPACK)
endif(HAVE_MKL OR ACCELERATE_FRAMEWORK)
mark_as_advanced(GMX_EXTERNAL_LAPACK)
--- /dev/null
+SET(CTEST_PROJECT_NAME "Gromacs")
+SET(CTEST_NIGHTLY_START_TIME "00:00:00 EST")
+
+IF(NOT DEFINED CTEST_DROP_METHOD)
+ SET(CTEST_DROP_METHOD "http")
+ENDIF(NOT DEFINED CTEST_DROP_METHOD)
+
+IF(CTEST_DROP_METHOD STREQUAL "http")
+ SET(CTEST_DROP_SITE "cdash.gromacs.org")
+ SET(CTEST_DROP_LOCATION "/submit.php?project=Gromacs")
+ SET(CTEST_DROP_SITE_CDASH TRUE)
+ENDIF(CTEST_DROP_METHOD STREQUAL "http")
+
+++ /dev/null
-
- Welcome to GROMACS!
-
-*Note*: Detailed, step-by-step installation instructions
-are available on the website
-http://www.gromacs.org/Downloads/Installation_Instructions.
-
-*Note*: If you want to use CMake for building look at INSTALL.cmake.
-
-
-
-You will probably have to download and install FFTW the first
-time you install GROMACS - our configuration script will check it!
-
-
-* SHORT INSTRUCTIONS FOR THE IMPATIENT:
-
-GROMACS uses a standard autoconf script and makefiles created
-by automake, like most GNU programs. This means your normal
-installation actions are limited to:
-
-./configure
-make
-make install
-
-That's it! Most compiler flags and required libraries are checked
-automatically by configure, and it will tell you if something is
-missing. The default installation location is /usr/local/gromacs
-(change it with --prefix).
-
-
-
-* INSTALLING FFTW:
-
-The FFTW library has been removed from the distribution since it
-is not part of our package, but it is very easy to install separately
-if it is not already present. Download the source code from
-http://www.fftw.org , or get it from http://www.gromacs.org .
-
-Read the FFTW installation instructions for details. In short, to
-install the single precision library under /usr/local type
-
-./configure --enable-float
-
-and then type
-
-make
-make install
-
-Note that in contrast to GROMACS, FFTW defaults to double. Even
-if you don't think you'll need it's a good idea to install the
-double precision libraries too, once and for all. Clean your
-build by issuing
-
-make distclean
-
-and then type
-
-./configure --enable-type-prefix
-make
-make install
-
-Your double precision FFTW files will have a "d" prefix.
-
-(It is possible to compile a crippled GROMACS without FFTW, but we
-strongly discourage it - check the configure options for details)
-
-
-
-* FFTW OR OTHER LIBRARIES IN NON-STANDARD LOCATIONS:
-
-If you install FFTW in your homedirectory or some other place where
-it isn't found automatically (not all systems search /usr/local)
-by the compiler you should set the environment variables before
-executing configure. Assume we configured and installed FFTW with
---prefix=/home/erik/fftw. If your shell is tcsh, you set
-
-setenv CPPFLAGS -I/home/erik/fftw/include
-setenv LDFLAGS -L/home/erik/fftw/lib
-
-or, if you are using a bash shell:
-
-export CPPFLAGS=-I/home/erik/fftw/include
-export LDFLAGS=-L/home/erik/fftw/lib
-
-...and then you run the Gromacs configure script. Similarly, if you
-don't like the compilers configure selects, just set them with
-the variables CC and/or F77 (MPICC for an MPI compiler).
-
-Don't use LDFLAGS to add extra libraries! Put them in LIBS instead, e.g.
-
-setenv LIBS "-lstuff" to add libstuff at the linking stage.
-
-
-Once installed, you can link the Gromacs executables to e.g.
-/usr/local/bin if you want all users to have them in their path.
-
-
-
-* SPECIAL OPTIONS; FORTRAN, ASSEMBLY AND PARALLEL GROMACS WITH MPI:
-
-Typing ./configure --help will give you some options like compiling
-for parallel runs using MPI. Not all architecture use the fast
-fortran loops per default, so if you know you have a fast fortan
-compiler you should check that option. It won't have much effect
-for modern x86 boxes though, since these use assembly innerloops.
-
-To compile the assembly loops you need a reasonably recent version
-of binutils. The configuration script checks it - pick up a later
-version at www.gromacs.org if yours is too old. Don't disable
-the assembly loops unless you absolutely have to...
-
-
-For instance, if you want to compile only the mdrun executable
-with parallel MPI support:
-
-make clean
-./configure --enable-mpi
-make mdrun
-make install-mdrun
-
-If you want to keep your non-mpi mdrun instead of overwriting
-it, you can append a suffix with --program-suffix="_mpi":
-If you only want to create the MPI version of the entire package
-you can just issue the normal make commands. The mdrun-only
-installation can also be useful to have e.g. a general version
-of gromacs for analysis in the main binary directory, and then
-subdirectories with only an optimized mdrun for each cpu.
-
-You can find more installation information on the GROMACS homepage
-if you have any problems, and don't hesitate to contact us if you
-find any bugs in the configuration. The architecture names have
-been expanded and are almost identical to the GNU ones, but where
-it is possible we have added an extra level with more detailed
-processor specifications to enable higher optimization. If you
-have a very heterogeneous environment it might be a good idea
-to compile a full non-optimized version in the main directory,
-and then just optimized versions of mdrun in the processor
-subdirectories!
-
-
-
-* VPATH BUILDS:
-
-If you want to do development on several architectures, you should
-use a version of make that support VPATH (we suggest GNU make)
-and create a new directory to contain the object files for this
-architecture (e.g. i686-pc-linux-gnu/obj). Then run configure from this
-new directory (../../configure) - you might have to make distclean first.
-This way you keep all your object files (speeds up compiles) and
-change architecture by switching to a different object directory.
-
-
-
-* ARE YOU STILL HAVING PROBLEMS?
-
-Post it to the GROMACS mailing lists. We read these on a regular basis,
-and in many cases another user might already be familiar with the
-task you're trying to perform!
-
-
-
- Good luck compiling and running!
-
- THE GROMACS CREW
-
- gromacs@gromacs.org
-
-
-
----------------------------------------------------------------------
-
-These are the generic install instructions from autoconf:
-
- The `configure' shell script attempts to guess correct values for
-various system-dependent variables used during compilation. It uses
-those values to create a `Makefile' in each directory of the package.
-It may also create one or more `.h' files containing system-dependent
-definitions. Finally, it creates a shell script `config.status' that
-you can run in the future to recreate the current configuration, a file
-`config.cache' that saves the results of its tests to speed up
-reconfiguring, and a file `config.log' containing compiler output
-(useful mainly for debugging `configure').
-
- If you need to do unusual things to compile the package, please try
-to figure out how `configure' could check whether to do them, and mail
-diffs or instructions to the address given in the `README' so they can
-be considered for the next release. If at some point `config.cache'
-contains results you don't want to keep, you may remove or edit it.
-
- The file `configure.in' is used to create `configure' by a program
-called `autoconf'. You only need `configure.in' if you want to change
-it or regenerate `configure' using a newer version of `autoconf'.
-
-The simplest way to compile this package is:
-
- 1. `cd' to the directory containing the package's source code and type
- `./configure' to configure the package for your system. If you're
- using `csh' on an old version of System V, you might need to type
- `sh ./configure' instead to prevent `csh' from trying to execute
- `configure' itself.
-
- Running `configure' takes awhile. While running, it prints some
- messages telling which features it is checking for.
-
- 2. Type `make' to compile the package.
-
- 3. Optionally, type `make check' to run any self-tests that come with
- the package.
-
- 4. Type `make install' to install the programs and any data files and
- documentation.
-
- 5. You can remove the program binaries and object files from the
- source code directory by typing `make clean'. To also remove the
- files that `configure' created (so you can compile the package for
- a different kind of computer), type `make distclean'. There is
- also a `make maintainer-clean' target, but that is intended mainly
- for the package's developers. If you use it, you may have to get
- all sorts of other programs in order to regenerate files that came
- with the distribution.
-
-Compilers and Options
-=====================
-
- Some systems require unusual options for compilation or linking that
-the `configure' script does not know about. You can give `configure'
-initial values for variables by setting them in the environment. Using
-a Bourne-compatible shell, you can do that on the command line like
-this:
- CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
-
-Or on systems that have the `env' program, you can do it like this:
- env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
-
-Compiling For Multiple Architectures
-====================================
-
- You can compile the package for more than one kind of computer at the
-same time, by placing the object files for each architecture in their
-own directory. To do this, you must use a version of `make' that
-supports the `VPATH' variable, such as GNU `make'. `cd' to the
-directory where you want the object files and executables to go and run
-the `configure' script. `configure' automatically checks for the
-source code in the directory that `configure' is in and in `..'.
-
- If you have to use a `make' that does not supports the `VPATH'
-variable, you have to compile the package for one architecture at a time
-in the source code directory. After you have installed the package for
-one architecture, use `make distclean' before reconfiguring for another
-architecture.
-
-Installation Names
-==================
-
- By default, `make install' will install the package's files in
-`/usr/local/bin', `/usr/local/man', etc. You can specify an
-installation prefix other than `/usr/local' by giving `configure' the
-option `--prefix=PATH'.
-
- You can specify separate installation prefixes for
-architecture-specific files and architecture-independent files. If you
-give `configure' the option `--exec-prefix=PATH', the package will use
-PATH as the prefix for installing programs and libraries.
-Documentation and other data files will still use the regular prefix.
-
- In addition, if you use an unusual directory layout you can give
-options like `--bindir=PATH' to specify different values for particular
-kinds of files. Run `configure --help' for a list of the directories
-you can set and what kinds of files go in them.
-
- If the package supports it, you can cause programs to be installed
-with an extra prefix or suffix on their names by giving `configure' the
-option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
-
-Optional Features
-=================
-
- Some packages pay attention to `--enable-FEATURE' options to
-`configure', where FEATURE indicates an optional part of the package.
-They may also pay attention to `--with-PACKAGE' options, where PACKAGE
-is something like `gnu-as' or `x' (for the X Window System). The
-`README' should mention any `--enable-' and `--with-' options that the
-package recognizes.
-
- For packages that use the X Window System, `configure' can usually
-find the X include and library files automatically, but if it doesn't,
-you can use the `configure' options `--x-includes=DIR' and
-`--x-libraries=DIR' to specify their locations.
-
-Specifying the System Type
-==========================
-
- There may be some features `configure' can not figure out
-automatically, but needs to determine by the type of host the package
-will run on. Usually `configure' can figure that out, but if it prints
-a message saying it can not guess the host type, give it the
-`--host=TYPE' option. TYPE can either be a short name for the system
-type, such as `sun4', or a canonical name with three fields:
- CPU-COMPANY-SYSTEM
-
-See the file `config.sub' for the possible values of each field. If
-`config.sub' isn't included in this package, then this package doesn't
-need to know the host type.
-
- If you are building compiler tools for cross-compiling, you can also
-use the `--target=TYPE' option to select the type of system they will
-produce code for and the `--build=TYPE' option to select the type of
-system on which you are compiling the package.
-
-Sharing Defaults
-================
-
- If you want to set default values for `configure' scripts to share,
-you can create a site shell script called `config.site' that gives
-default values for variables like `CC', `cache_file', and `prefix'.
-`configure' looks for `PREFIX/share/config.site' if it exists, then
-`PREFIX/etc/config.site' if it exists. Or, you can set the
-`CONFIG_SITE' environment variable to the location of the site script.
-A warning: not all `configure' scripts look for a site script.
-
-Operation Controls
-==================
-
- `configure' recognizes the following options to control how it
-operates.
-
-`--cache-file=FILE'
- Use and save the results of the tests in FILE instead of
- `./config.cache'. Set FILE to `/dev/null' to disable caching, for
- debugging `configure'.
-
-`--help'
- Print a summary of the options to `configure', and exit.
-
-`--quiet'
-`--silent'
-`-q'
- Do not print messages saying which checks are being made. To
- suppress all normal output, redirect it to `/dev/null' (any error
- messages will still be shown).
-
-`--srcdir=DIR'
- Look for the package's source code in directory DIR. Usually
- `configure' can determine that directory automatically.
-
-`--version'
- Print the version of Autoconf used to generate the `configure'
- script, and exit.
-
-`configure' also accepts some other, not widely useful, options.
-
Welcome to the official version of GROMACS!
If you are familiar with unix, it should be fairly trivial to compile and
-install GROMACS. Installation instructions are available in the INSTALL.*
-files (there is one for automake users, INSTALL.automake and one for cmake
-users, INSTALL.cmake). A more extended step-by-step guide can be found
-on our website http://www.gromacs.org .
+install GROMACS. Installation instructions for CMake are available in the
+INSTALL.* files (the use of autotools is no longer available). A more
+extended step-by-step guide can be found on our website http://www.gromacs.org.
Of course we will do our utmost to help you with any problems, but PLEASE
READ THE INSTALLATION INSTRUCTIONS BEFORE CONTACTING US!
There are also several other online resources available from the homepage,
-and special information for developers. We recommend all users to subscribe
-at least to the gmx-announce list - there is almost no traffic at all, but
-you get notice of new versions or severe bugs, and it gives us a possibility
-to keep track of the number of users since no signature is required anymore.
+and special information for developers.
If you are a developer, or change the source for any other reason, check
-out http://www.gromacs.org/developer for details on using automake & autoconf!
+out http://www.gromacs.org/Developer_Zone.
* * * * *
Good luck with your simulations!
The GROMACS Crew
-
-
-
-
-
-
--- /dev/null
+#!/bin/sh -x
+if [ -n "${CMakeVersion}" ] ; then
+ export PATH=$HOME/tools/cmake-${CMakeVersion}/bin:$PATH
+fi
+CC=gcc-${CompilerVersion} CXX=g++-${CompilerVersion} cmake -D GMX_DOUBLE=${GMX_DOUBLE} -D GMX_MPI=${GMX_MPI} -D GMX_OPENMP=${GMX_OPENMP} -DGMX_DEFAULT_SUFFIX=off -DCMAKE_BUILD_TYPE=Debug . &&
+make &&
+ctest -D ExperimentalTest -V
--- /dev/null
+REM Requires Windows SDK and CMake to be in the path
+REM Run Windows SDK SetEnv script
+SetEnv && ^
+cmake -G "Visual Studio 10 Win64" -D GMX_DOUBLE=%GMX_DOUBLE% -D GMX_MPI=%GMX_MPI% -D GMX_OPENMP=%GMX_OPENMP% -DGMX_DEFAULT_SUFFIX=off -DCMAKE_BUILD_TYPE=Debug . && ^
+msbuild All_Build.vcxproj && ^
+ctest -D ExperimentalTest -C Debug -V
+++ /dev/null
-# - Find BLAS library
-# This module finds an installed fortran library that implements the BLAS
-# linear-algebra interface (see http://www.netlib.org/blas/).
-# The list of libraries searched for is taken
-# from the autoconf macro file, acx_blas.m4 (distributed at
-# http://ac-archive.sourceforge.net/ac-archive/acx_blas.html).
-#
-# This module sets the following variables:
-# BLAS_FOUND - set to true if a library implementing the BLAS interface
-# is found
-# BLAS_LINKER_FLAGS - uncached list of required linker flags (excluding -l
-# and -L).
-# BLAS_LIBRARIES - uncached list of libraries (using full path name) to
-# link against to use BLAS
-# BLAS95_LIBRARIES - uncached list of libraries (using full path name)
-# to link against to use BLAS95 interface
-# BLAS95_FOUND - set to true if a library implementing the BLAS f95 interface
-# is found
-# BLA_STATIC if set on this determines what kind of linkage we do (static)
-# BLA_VENDOR if set checks only the specified vendor, if not set checks
-# all the possibilities
-# BLA_F95 if set on tries to find the f95 interfaces for BLAS/LAPACK
-##########
-### List of vendors (BLA_VENDOR) valid in this module
-## ATLAS, PhiPACK,CXML,DXML,SunPerf,SCSL,SGIMATH,IBMESSL,Intel10_32 (intel mkl v10 32 bit),Intel10_64lp (intel mkl v10 64 bit,lp thread model, lp64 model),
-## Intel( older versions of mkl 32 and 64 bit), ACML,Apple, NAS, Generic
-# C/CXX should be enabled to use Intel mkl
-
-#=============================================================================
-# Copyright 2007-2009 Kitware, Inc.
-#
-# Distributed under the OSI-approved BSD License (the "License");
-# see accompanying file Copyright.txt for details.
-#
-# This software is distributed WITHOUT ANY WARRANTY; without even the
-# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the License for more information.
-#=============================================================================
-# (To distributed this file outside of CMake, substitute the full
-# License text for the above reference.)
-
-get_property(_LANGUAGES_ GLOBAL PROPERTY ENABLED_LANGUAGES)
-if(NOT _LANGUAGES_ MATCHES Fortran)
- if(BLAS_FIND_REQUIRED)
- message(FATAL_ERROR "FindBLAS is Fortran-only so Fortran must be enabled.")
- else(BLAS_FIND_REQUIRED)
- message(STATUS "Looking for BLAS... - NOT found (Fortran not enabled)") #
- return()
- endif(BLAS_FIND_REQUIRED)
-endif(NOT _LANGUAGES_ MATCHES Fortran)
-
-include(CheckFortranFunctionExists)
-
-macro(Check_Fortran_Libraries LIBRARIES _prefix _name _flags _list _threads)
-# This macro checks for the existence of the combination of fortran libraries
-# given by _list. If the combination is found, this macro checks (using the
-# Check_Fortran_Function_Exists macro) whether can link against that library
-# combination using the name of a routine given by _name using the linker
-# flags given by _flags. If the combination of libraries is found and passes
-# the link test, LIBRARIES is set to the list of complete library paths that
-# have been found. Otherwise, LIBRARIES is set to FALSE.
-
-# N.B. _prefix is the prefix applied to the names of all cached variables that
-# are generated internally and marked advanced by this macro.
-
-set(_libraries_work TRUE)
-set(${LIBRARIES})
-set(_combined_name)
-foreach(_library ${_list})
- set(_combined_name ${_combined_name}_${_library})
-
- if(_libraries_work)
- if ( WIN32 )
- if(BLA_STATIC)
- set(CMAKE_FIND_LIBRARY_SUFFIXES ".lib;.dll")
- endif(BLA_STATIC)
- find_library(${_prefix}_${_library}_LIBRARY
- NAMES ${_library}
- PATHS ENV LIB
- )
- endif ( WIN32 )
-
- if ( APPLE )
- if(BLA_STATIC)
- set(CMAKE_FIND_LIBRARY_SUFFIXES ".lib;.dll")
- endif(BLA_STATIC)
- find_library(${_prefix}_${_library}_LIBRARY
- NAMES ${_library}
- PATHS /usr/local/lib /usr/lib /usr/local/lib64 /usr/lib64 ENV DYLD_LIBRARY_PATH
- )
-
- else ( APPLE )
- if(BLA_STATIC)
- set(CMAKE_FIND_LIBRARY_SUFFIXES ".a;.so")
- endif(BLA_STATIC)
- find_library(${_prefix}_${_library}_LIBRARY
- NAMES ${_library}
- PATHS /usr/local/lib /usr/lib /usr/local/lib64 /usr/lib64 ENV LD_LIBRARY_PATH
- )
- endif( APPLE )
- mark_as_advanced(${_prefix}_${_library}_LIBRARY)
- set(${LIBRARIES} ${${LIBRARIES}} ${${_prefix}_${_library}_LIBRARY})
- set(_libraries_work ${${_prefix}_${_library}_LIBRARY})
- endif(_libraries_work)
-endforeach(_library ${_list})
-if(_libraries_work)
- # Test this combination of libraries.
- set(CMAKE_REQUIRED_LIBRARIES ${_flags} ${${LIBRARIES}} ${_threads})
-# message("DEBUG: CMAKE_REQUIRED_LIBRARIES = ${CMAKE_REQUIRED_LIBRARIES}")
- check_fortran_function_exists(${_name} ${_prefix}${_combined_name}_WORKS)
- set(CMAKE_REQUIRED_LIBRARIES)
- mark_as_advanced(${_prefix}${_combined_name}_WORKS)
- set(_libraries_work ${${_prefix}${_combined_name}_WORKS})
-endif(_libraries_work)
-if(NOT _libraries_work)
- set(${LIBRARIES} FALSE)
-endif(NOT _libraries_work)
-#message("DEBUG: ${LIBRARIES} = ${${LIBRARIES}}")
-endmacro(Check_Fortran_Libraries)
-
-set(BLAS_LINKER_FLAGS)
-set(BLAS_LIBRARIES)
-set(BLAS95_LIBRARIES)
-if ($ENV{BLA_VENDOR} MATCHES ".+")
- set(BLA_VENDOR $ENV{BLA_VENDOR})
-else ($ENV{BLA_VENDOR} MATCHES ".+")
- if(NOT BLA_VENDOR)
- set(BLA_VENDOR "All")
- endif(NOT BLA_VENDOR)
-endif ($ENV{BLA_VENDOR} MATCHES ".+")
-
-if (BLA_VENDOR STREQUAL "ATLAS" OR BLA_VENDOR STREQUAL "All")
- if(NOT BLAS_LIBRARIES)
- # BLAS in ATLAS library? (http://math-atlas.sourceforge.net/)
- check_fortran_libraries(
- BLAS_LIBRARIES
- BLAS
- cblas_dgemm
- ""
- "cblas;f77blas;atlas"
- ""
- )
- endif(NOT BLAS_LIBRARIES)
-endif (BLA_VENDOR STREQUAL "ATLAS" OR BLA_VENDOR STREQUAL "All")
-
-# BLAS in PhiPACK libraries? (requires generic BLAS lib, too)
-if (BLA_VENDOR STREQUAL "PhiPACK" OR BLA_VENDOR STREQUAL "All")
- if(NOT BLAS_LIBRARIES)
- check_fortran_libraries(
- BLAS_LIBRARIES
- BLAS
- sgemm
- ""
- "sgemm;dgemm;blas"
- ""
- )
- endif(NOT BLAS_LIBRARIES)
-endif (BLA_VENDOR STREQUAL "PhiPACK" OR BLA_VENDOR STREQUAL "All")
-
-# BLAS in Alpha CXML library?
-if (BLA_VENDOR STREQUAL "CXML" OR BLA_VENDOR STREQUAL "All")
- if(NOT BLAS_LIBRARIES)
- check_fortran_libraries(
- BLAS_LIBRARIES
- BLAS
- sgemm
- ""
- "cxml"
- ""
- )
- endif(NOT BLAS_LIBRARIES)
-endif (BLA_VENDOR STREQUAL "CXML" OR BLA_VENDOR STREQUAL "All")
-
-# BLAS in Alpha DXML library? (now called CXML, see above)
-if (BLA_VENDOR STREQUAL "DXML" OR BLA_VENDOR STREQUAL "All")
- if(NOT BLAS_LIBRARIES)
- check_fortran_libraries(
- BLAS_LIBRARIES
- BLAS
- sgemm
- ""
- "dxml"
- ""
- )
- endif(NOT BLAS_LIBRARIES)
-endif (BLA_VENDOR STREQUAL "DXML" OR BLA_VENDOR STREQUAL "All")
-
-# BLAS in Sun Performance library?
-if (BLA_VENDOR STREQUAL "SunPerf" OR BLA_VENDOR STREQUAL "All")
- if(NOT BLAS_LIBRARIES)
- check_fortran_libraries(
- BLAS_LIBRARIES
- BLAS
- sgemm
- "-xlic_lib=sunperf"
- "sunperf;sunmath"
- ""
- )
- if(BLAS_LIBRARIES)
- set(BLAS_LINKER_FLAGS "-xlic_lib=sunperf")
- endif(BLAS_LIBRARIES)
- endif(NOT BLAS_LIBRARIES)
-endif (BLA_VENDOR STREQUAL "SunPerf" OR BLA_VENDOR STREQUAL "All")
-
-# BLAS in SCSL library? (SGI/Cray Scientific Library)
-if (BLA_VENDOR STREQUAL "SCSL" OR BLA_VENDOR STREQUAL "All")
- if(NOT BLAS_LIBRARIES)
- check_fortran_libraries(
- BLAS_LIBRARIES
- BLAS
- sgemm
- ""
- "scsl"
- ""
- )
- endif(NOT BLAS_LIBRARIES)
-endif (BLA_VENDOR STREQUAL "SCSL" OR BLA_VENDOR STREQUAL "All")
-
-# BLAS in SGIMATH library?
-if (BLA_VENDOR STREQUAL "SGIMATH" OR BLA_VENDOR STREQUAL "All")
- if(NOT BLAS_LIBRARIES)
- check_fortran_libraries(
- BLAS_LIBRARIES
- BLAS
- sgemm
- ""
- "complib.sgimath"
- ""
- )
- endif(NOT BLAS_LIBRARIES)
-endif (BLA_VENDOR STREQUAL "SGIMATH" OR BLA_VENDOR STREQUAL "All")
-
-# BLAS in IBM ESSL library? (requires generic BLAS lib, too)
-if (BLA_VENDOR STREQUAL "IBMESSL" OR BLA_VENDOR STREQUAL "All")
- if(NOT BLAS_LIBRARIES)
- check_fortran_libraries(
- BLAS_LIBRARIES
- BLAS
- sgemm
- ""
- "essl;blas"
- ""
- )
- endif(NOT BLAS_LIBRARIES)
-endif (BLA_VENDOR STREQUAL "IBMESSL" OR BLA_VENDOR STREQUAL "All")
-
-#BLAS in acml library?
-if (BLA_VENDOR STREQUAL "ACML" OR BLA_VENDOR STREQUAL "All")
- if(NOT BLAS_LIBRARIES)
- check_fortran_libraries(
- BLAS_LIBRARIES
- BLAS
- sgemm
- ""
- "acml"
- ""
- )
- endif(NOT BLAS_LIBRARIES)
-endif (BLA_VENDOR STREQUAL "ACML" OR BLA_VENDOR STREQUAL "All")
-
-# Apple BLAS library?
-if (BLA_VENDOR STREQUAL "Apple" OR BLA_VENDOR STREQUAL "All")
-if(NOT BLAS_LIBRARIES)
- check_fortran_libraries(
- BLAS_LIBRARIES
- BLAS
- cblas_dgemm
- ""
- "Accelerate"
- ""
- )
- endif(NOT BLAS_LIBRARIES)
-endif (BLA_VENDOR STREQUAL "Apple" OR BLA_VENDOR STREQUAL "All")
-
-if (BLA_VENDOR STREQUAL "NAS" OR BLA_VENDOR STREQUAL "All")
- if ( NOT BLAS_LIBRARIES )
- check_fortran_libraries(
- BLAS_LIBRARIES
- BLAS
- cblas_dgemm
- ""
- "vecLib"
- ""
- )
- endif ( NOT BLAS_LIBRARIES )
-endif (BLA_VENDOR STREQUAL "NAS" OR BLA_VENDOR STREQUAL "All")
-# Generic BLAS library?
-if (BLA_VENDOR STREQUAL "Generic" OR BLA_VENDOR STREQUAL "All")
- if(NOT BLAS_LIBRARIES)
- check_fortran_libraries(
- BLAS_LIBRARIES
- BLAS
- sgemm
- ""
- "blas"
- ""
- )
- endif(NOT BLAS_LIBRARIES)
-endif (BLA_VENDOR STREQUAL "Generic" OR BLA_VENDOR STREQUAL "All")
-
-#BLAS in intel mkl 10 library? (em64t 64bit)
-if (BLA_VENDOR MATCHES "Intel*" OR BLA_VENDOR STREQUAL "All")
- if (_LANGUAGES_ MATCHES C OR _LANGUAGES_ MATCHES CXX)
- if(BLAS_FIND_QUIETLY OR NOT BLAS_FIND_REQUIRED)
- find_package(Threads)
- else(BLAS_FIND_QUIETLY OR NOT BLAS_FIND_REQUIRED)
- find_package(Threads REQUIRED)
- endif(BLAS_FIND_QUIETLY OR NOT BLAS_FIND_REQUIRED)
- if (WIN32)
- if(BLA_F95)
- if(NOT BLAS95_LIBRARIES)
- check_fortran_libraries(
- BLAS95_LIBRARIES
- BLAS
- sgemm
- ""
- "mkl_blas95;mkl_intel_c;mkl_intel_thread;mkl_core;libguide40"
- ""
- )
- endif(NOT BLAS95_LIBRARIES)
- else(BLA_F95)
- if(NOT BLAS_LIBRARIES)
- check_fortran_libraries(
- BLAS_LIBRARIES
- BLAS
- SGEMM
- ""
- "mkl_c_dll;mkl_intel_thread_dll;mkl_core_dll;libguide40"
- ""
- )
- endif(NOT BLAS_LIBRARIES)
- endif(BLA_F95)
- else(WIN32)
- if (BLA_VENDOR STREQUAL "Intel10_32" OR BLA_VENDOR STREQUAL "All")
- if(BLA_F95)
- if(NOT BLAS95_LIBRARIES)
- check_fortran_libraries(
- BLAS95_LIBRARIES
- BLAS
- sgemm
- ""
- "mkl_blas95;mkl_intel;mkl_intel_thread;mkl_core;guide"
- "${CMAKE_THREAD_LIBS_INIT}"
- )
- endif(NOT BLAS95_LIBRARIES)
- else(BLA_F95)
- if(NOT BLAS_LIBRARIES)
- check_fortran_libraries(
- BLAS_LIBRARIES
- BLAS
- sgemm
- ""
- "mkl_intel;mkl_intel_thread;mkl_core;guide"
- "${CMAKE_THREAD_LIBS_INIT}"
- )
- endif(NOT BLAS_LIBRARIES)
- endif(BLA_F95)
- endif (BLA_VENDOR STREQUAL "Intel10_32" OR BLA_VENDOR STREQUAL "All")
- if (BLA_VENDOR STREQUAL "Intel10_64lp" OR BLA_VENDOR STREQUAL "All")
- if(BLA_F95)
- if(NOT BLAS95_LIBRARIES)
- check_fortran_libraries(
- BLAS95_LIBRARIES
- BLAS
- sgemm
- ""
- "mkl_blas95;mkl_intel_lp64;mkl_intel_thread;mkl_core;guide"
- "${CMAKE_THREAD_LIBS_INIT}"
- )
- endif(NOT BLAS95_LIBRARIES)
- else(BLA_F95)
- if(NOT BLAS_LIBRARIES)
- check_fortran_libraries(
- BLAS_LIBRARIES
- BLAS
- sgemm
- ""
- "mkl_intel_lp64;mkl_intel_thread;mkl_core;guide"
- "${CMAKE_THREAD_LIBS_INIT}"
- )
- endif(NOT BLAS_LIBRARIES)
- endif(BLA_F95)
- endif (BLA_VENDOR STREQUAL "Intel10_64lp" OR BLA_VENDOR STREQUAL "All")
- endif (WIN32)
- #older vesions of intel mkl libs
- # BLAS in intel mkl library? (shared)
- if(NOT BLAS_LIBRARIES)
- check_fortran_libraries(
- BLAS_LIBRARIES
- BLAS
- sgemm
- ""
- "mkl;guide"
- "${CMAKE_THREAD_LIBS_INIT}"
- )
- endif(NOT BLAS_LIBRARIES)
- #BLAS in intel mkl library? (static, 32bit)
- if(NOT BLAS_LIBRARIES)
- check_fortran_libraries(
- BLAS_LIBRARIES
- BLAS
- sgemm
- ""
- "mkl_ia32;guide"
- "${CMAKE_THREAD_LIBS_INIT}"
- )
- endif(NOT BLAS_LIBRARIES)
- #BLAS in intel mkl library? (static, em64t 64bit)
- if(NOT BLAS_LIBRARIES)
- check_fortran_libraries(
- BLAS_LIBRARIES
- BLAS
- sgemm
- ""
- "mkl_em64t;guide"
- "${CMAKE_THREAD_LIBS_INIT}"
- )
- endif(NOT BLAS_LIBRARIES)
- endif (_LANGUAGES_ MATCHES C OR _LANGUAGES_ MATCHES CXX)
-endif (BLA_VENDOR MATCHES "Intel*" OR BLA_VENDOR STREQUAL "All")
-
-
-if(BLA_F95)
- if(BLAS95_LIBRARIES)
- set(BLAS95_FOUND TRUE)
- else(BLAS95_LIBRARIES)
- set(BLAS95_FOUND FALSE)
- endif(BLAS95_LIBRARIES)
-
- if(NOT BLAS_FIND_QUIETLY)
- if(BLAS95_FOUND)
- message(STATUS "A library with BLAS95 API found.")
- else(BLAS95_FOUND)
- if(BLAS_FIND_REQUIRED)
- message(FATAL_ERROR
- "A required library with BLAS95 API not found. Please specify library location.")
- else(BLAS_FIND_REQUIRED)
- message(STATUS
- "A library with BLAS95 API not found. Please specify library location.")
- endif(BLAS_FIND_REQUIRED)
- endif(BLAS95_FOUND)
- endif(NOT BLAS_FIND_QUIETLY)
- set(BLAS_FOUND TRUE)
- set(BLAS_LIBRARIES "${BLAS95_LIBRARIES}")
-else(BLA_F95)
- if(BLAS_LIBRARIES)
- set(BLAS_FOUND TRUE)
- else(BLAS_LIBRARIES)
- set(BLAS_FOUND FALSE)
- endif(BLAS_LIBRARIES)
-
- if(NOT BLAS_FIND_QUIETLY)
- if(BLAS_FOUND)
- message(STATUS "A library with BLAS API found.")
- else(BLAS_FOUND)
- if(BLAS_FIND_REQUIRED)
- message(FATAL_ERROR
- "A required library with BLAS API not found. Please specify library location."
- )
- else(BLAS_FIND_REQUIRED)
- message(STATUS
- "A library with BLAS API not found. Please specify library location."
- )
- endif(BLAS_FIND_REQUIRED)
- endif(BLAS_FOUND)
- endif(NOT BLAS_FIND_QUIETLY)
-endif(BLA_F95)
+++ /dev/null
-# - Tools for building CUDA C files: libraries and build dependencies.
-# This script locates the NVIDIA CUDA C tools. It should work on linux, windows,
-# and mac and should be reasonably up to date with CUDA C releases.
-#
-# This script makes use of the standard find_package arguments of <VERSION>,
-# REQUIRED and QUIET. CUDA_FOUND will report if an acceptable version of CUDA
-# was found.
-#
-# The script will prompt the user to specify CUDA_TOOLKIT_ROOT_DIR if the prefix
-# cannot be determined by the location of nvcc in the system path and REQUIRED
-# is specified to find_package(). To use a different installed version of the
-# toolkit set the environment variable CUDA_BIN_PATH before running cmake
-# (e.g. CUDA_BIN_PATH=/usr/local/cuda1.0 instead of the default /usr/local/cuda)
-# or set CUDA_TOOLKIT_ROOT_DIR after configuring. If you change the value of
-# CUDA_TOOLKIT_ROOT_DIR, various components that depend on the path will be
-# relocated.
-#
-# It might be necessary to set CUDA_TOOLKIT_ROOT_DIR manually on certain
-# platforms, or to use a cuda runtime not installed in the default location. In
-# newer versions of the toolkit the cuda library is included with the graphics
-# driver- be sure that the driver version matches what is needed by the cuda
-# runtime version.
-#
-# The following variables affect the behavior of the macros in the script (in
-# alphebetical order). Note that any of these flags can be changed multiple
-# times in the same directory before calling CUDA_ADD_EXECUTABLE,
-# CUDA_ADD_LIBRARY, CUDA_COMPILE, CUDA_COMPILE_PTX or CUDA_WRAP_SRCS.
-#
-# CUDA_64_BIT_DEVICE_CODE (Default matches host bit size)
-# -- Set to ON to compile for 64 bit device code, OFF for 32 bit device code.
-# Note that making this different from the host code when generating object
-# or C files from CUDA code just won't work, because size_t gets defined by
-# nvcc in the generated source. If you compile to PTX and then load the
-# file yourself, you can mix bit sizes between device and host.
-#
-# CUDA_ATTACH_VS_BUILD_RULE_TO_CUDA_FILE (Default ON)
-# -- Set to ON if you want the custom build rule to be attached to the source
-# file in Visual Studio. Turn OFF if you add the same cuda file to multiple
-# targets.
-#
-# This allows the user to build the target from the CUDA file; however, bad
-# things can happen if the CUDA source file is added to multiple targets.
-# When performing parallel builds it is possible for the custom build
-# command to be run more than once and in parallel causing cryptic build
-# errors. VS runs the rules for every source file in the target, and a
-# source can have only one rule no matter how many projects it is added to.
-# When the rule is run from multiple targets race conditions can occur on
-# the generated file. Eventually everything will get built, but if the user
-# is unaware of this behavior, there may be confusion. It would be nice if
-# this script could detect the reuse of source files across multiple targets
-# and turn the option off for the user, but no good solution could be found.
-#
-# CUDA_BUILD_CUBIN (Default OFF)
-# -- Set to ON to enable and extra compilation pass with the -cubin option in
-# Device mode. The output is parsed and register, shared memory usage is
-# printed during build.
-#
-# CUDA_BUILD_EMULATION (Default OFF for device mode)
-# -- Set to ON for Emulation mode. -D_DEVICEEMU is defined for CUDA C files
-# when CUDA_BUILD_EMULATION is TRUE.
-#
-# CUDA_GENERATED_OUTPUT_DIR (Default CMAKE_CURRENT_BINARY_DIR)
-# -- Set to the path you wish to have the generated files placed. If it is
-# blank output files will be placed in CMAKE_CURRENT_BINARY_DIR.
-# Intermediate files will always be placed in
-# CMAKE_CURRENT_BINARY_DIR/CMakeFiles.
-#
-# CUDA_HOST_COMPILATION_CPP (Default ON)
-# -- Set to OFF for C compilation of host code.
-#
-# CUDA_NVCC_FLAGS
-# CUDA_NVCC_FLAGS_<CONFIG>
-# -- Additional NVCC command line arguments. NOTE: multiple arguments must be
-# semi-colon delimited (e.g. --compiler-options;-Wall)
-#
-# CUDA_PROPAGATE_HOST_FLAGS (Default ON)
-# -- Set to ON to propagate CMAKE_{C,CXX}_FLAGS and their configuration
-# dependent counterparts (e.g. CMAKE_C_FLAGS_DEBUG) automatically to the
-# host compiler through nvcc's -Xcompiler flag. This helps make the
-# generated host code match the rest of the system better. Sometimes
-# certain flags give nvcc problems, and this will help you turn the flag
-# propagation off. This does not affect the flags supplied directly to nvcc
-# via CUDA_NVCC_FLAGS or through the OPTION flags specified through
-# CUDA_ADD_LIBRARY, CUDA_ADD_EXECUTABLE, or CUDA_WRAP_SRCS. Flags used for
-# shared library compilation are not affected by this flag.
-#
-# CUDA_VERBOSE_BUILD (Default OFF)
-# -- Set to ON to see all the commands used when building the CUDA file. When
-# using a Makefile generator the value defaults to VERBOSE (run make
-# VERBOSE=1 to see output), although setting CUDA_VERBOSE_BUILD to ON will
-# always print the output.
-#
-# The script creates the following macros (in alphebetical order):
-#
-# CUDA_ADD_CUFFT_TO_TARGET( cuda_target )
-# -- Adds the cufft library to the target (can be any target). Handles whether
-# you are in emulation mode or not.
-#
-# CUDA_ADD_CUBLAS_TO_TARGET( cuda_target )
-# -- Adds the cublas library to the target (can be any target). Handles
-# whether you are in emulation mode or not.
-#
-# CUDA_ADD_EXECUTABLE( cuda_target file0 file1 ...
-# [WIN32] [MACOSX_BUNDLE] [EXCLUDE_FROM_ALL] [OPTIONS ...] )
-# -- Creates an executable "cuda_target" which is made up of the files
-# specified. All of the non CUDA C files are compiled using the standard
-# build rules specified by CMAKE and the cuda files are compiled to object
-# files using nvcc and the host compiler. In addition CUDA_INCLUDE_DIRS is
-# added automatically to include_directories(). Some standard CMake target
-# calls can be used on the target after calling this macro
-# (e.g. set_target_properties and target_link_libraries), but setting
-# properties that adjust compilation flags will not affect code compiled by
-# nvcc. Such flags should be modified before calling CUDA_ADD_EXECUTABLE,
-# CUDA_ADD_LIBRARY or CUDA_WRAP_SRCS.
-#
-# CUDA_ADD_LIBRARY( cuda_target file0 file1 ...
-# [STATIC | SHARED | MODULE] [EXCLUDE_FROM_ALL] [OPTIONS ...] )
-# -- Same as CUDA_ADD_EXECUTABLE except that a library is created.
-#
-# CUDA_BUILD_CLEAN_TARGET()
-# -- Creates a convience target that deletes all the dependency files
-# generated. You should make clean after running this target to ensure the
-# dependency files get regenerated.
-#
-# CUDA_COMPILE( generated_files file0 file1 ... [STATIC | SHARED | MODULE]
-# [OPTIONS ...] )
-# -- Returns a list of generated files from the input source files to be used
-# with ADD_LIBRARY or ADD_EXECUTABLE.
-#
-# CUDA_COMPILE_PTX( generated_files file0 file1 ... [OPTIONS ...] )
-# -- Returns a list of PTX files generated from the input source files.
-#
-# CUDA_INCLUDE_DIRECTORIES( path0 path1 ... )
-# -- Sets the directories that should be passed to nvcc
-# (e.g. nvcc -Ipath0 -Ipath1 ... ). These paths usually contain other .cu
-# files.
-#
-# CUDA_WRAP_SRCS ( cuda_target format generated_files file0 file1 ...
-# [STATIC | SHARED | MODULE] [OPTIONS ...] )
-# -- This is where all the magic happens. CUDA_ADD_EXECUTABLE,
-# CUDA_ADD_LIBRARY, CUDA_COMPILE, and CUDA_COMPILE_PTX all call this
-# function under the hood.
-#
-# Given the list of files (file0 file1 ... fileN) this macro generates
-# custom commands that generate either PTX or linkable objects (use "PTX" or
-# "OBJ" for the format argument to switch). Files that don't end with .cu
-# or have the HEADER_FILE_ONLY property are ignored.
-#
-# The arguments passed in after OPTIONS are extra command line options to
-# give to nvcc. You can also specify per configuration options by
-# specifying the name of the configuration followed by the options. General
-# options must preceed configuration specific options. Not all
-# configurations need to be specified, only the ones provided will be used.
-#
-# OPTIONS -DFLAG=2 "-DFLAG_OTHER=space in flag"
-# DEBUG -g
-# RELEASE --use_fast_math
-# RELWITHDEBINFO --use_fast_math;-g
-# MINSIZEREL --use_fast_math
-#
-# For certain configurations (namely VS generating object files with
-# CUDA_ATTACH_VS_BUILD_RULE_TO_CUDA_FILE set to ON), no generated file will
-# be produced for the given cuda file. This is because when you add the
-# cuda file to Visual Studio it knows that this file produces an object file
-# and will link in the resulting object file automatically.
-#
-# This script will also generate a separate cmake script that is used at
-# build time to invoke nvcc. This is for serveral reasons.
-#
-# 1. nvcc can return negative numbers as return values which confuses
-# Visual Studio into thinking that the command succeeded. The script now
-# checks the error codes and produces errors when there was a problem.
-#
-# 2. nvcc has been known to not delete incomplete results when it
-# encounters problems. This confuses build systems into thinking the
-# target was generated when in fact an unusable file exists. The script
-# now deletes the output files if there was an error.
-#
-# 3. By putting all the options that affect the build into a file and then
-# make the build rule dependent on the file, the output files will be
-# regenerated when the options change.
-#
-# This script also looks at optional arguments STATIC, SHARED, or MODULE to
-# determine when to target the object compilation for a shared library.
-# BUILD_SHARED_LIBS is ignored in CUDA_WRAP_SRCS, but it is respected in
-# CUDA_ADD_LIBRARY. On some systems special flags are added for building
-# objects intended for shared libraries. A preprocessor macro,
-# <target_name>_EXPORTS is defined when a shared library compilation is
-# detected.
-#
-# Flags passed into add_definitions with -D or /D are passed along to nvcc.
-#
-# The script defines the following variables:
-#
-# CUDA_VERSION_MAJOR -- The major version of cuda as reported by nvcc.
-# CUDA_VERSION_MINOR -- The minor version.
-# CUDA_VERSION
-# CUDA_VERSION_STRING -- CUDA_VERSION_MAJOR.CUDA_VERSION_MINOR
-#
-# CUDA_TOOLKIT_ROOT_DIR -- Path to the CUDA Toolkit (defined if not set).
-# CUDA_SDK_ROOT_DIR -- Path to the CUDA SDK. Use this to find files in the
-# SDK. This script will not directly support finding
-# specific libraries or headers, as that isn't
-# supported by NVIDIA. If you want to change
-# libraries when the path changes see the
-# FindCUDA.cmake script for an example of how to clear
-# these variables. There are also examples of how to
-# use the CUDA_SDK_ROOT_DIR to locate headers or
-# libraries, if you so choose (at your own risk).
-# CUDA_INCLUDE_DIRS -- Include directory for cuda headers. Added automatically
-# for CUDA_ADD_EXECUTABLE and CUDA_ADD_LIBRARY.
-# CUDA_LIBRARIES -- Cuda RT library.
-# CUDA_CUFFT_LIBRARIES -- Device or emulation library for the Cuda FFT
-# implementation (alternative to:
-# CUDA_ADD_CUFFT_TO_TARGET macro)
-# CUDA_CUBLAS_LIBRARIES -- Device or emulation library for the Cuda BLAS
-# implementation (alterative to:
-# CUDA_ADD_CUBLAS_TO_TARGET macro).
-#
-#
-# James Bigler, NVIDIA Corp (nvidia.com - jbigler)
-# Abe Stephens, SCI Institute -- http://www.sci.utah.edu/~abe/FindCuda.html
-#
-# Copyright (c) 2008 - 2009 NVIDIA Corporation. All rights reserved.
-#
-# Copyright (c) 2007-2009
-# Scientific Computing and Imaging Institute, University of Utah
-#
-# This code is licensed under the MIT License. See the FindCUDA.cmake script
-# for the text of the license.
-
-# The MIT License
-#
-# License for the specific language governing rights and limitations under
-# 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 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.
-#
-###############################################################################
-
-# FindCUDA.cmake
-
-# We need to have at least this version to support the VERSION_LESS argument to 'if' (2.6.2) and unset (2.6.3)
-cmake_policy(PUSH)
-cmake_minimum_required(VERSION 2.6.3)
-cmake_policy(POP)
-
-# This macro helps us find the location of helper files we will need the full path to
-macro(CUDA_FIND_HELPER_FILE _name _extension)
- set(_full_name "${_name}.${_extension}")
- # CMAKE_CURRENT_LIST_FILE contains the full path to the file currently being
- # processed. Using this variable, we can pull out the current path, and
- # provide a way to get access to the other files we need local to here.
- get_filename_component(CMAKE_CURRENT_LIST_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
- find_file(CUDA_${_name} ${_full_name} PATHS ${CMAKE_CURRENT_LIST_DIR}/FindCUDA NO_DEFAULT_PATH)
- if(NOT CUDA_${_name})
- set(error_message "${_full_name} not found in CMAKE_MODULE_PATH")
- if(CUDA_FIND_REQUIRED)
- message(FATAL_ERROR "${error_message}")
- else(CUDA_FIND_REQUIRED)
- if(NOT CUDA_FIND_QUIETLY)
- message(STATUS "${error_message}")
- endif(NOT CUDA_FIND_QUIETLY)
- endif(CUDA_FIND_REQUIRED)
- endif(NOT CUDA_${_name})
- # Set this variable as internal, so the user isn't bugged with it.
- set(CUDA_${_name} ${CUDA_${_name}} CACHE INTERNAL "Location of ${_full_name}" FORCE)
-endmacro(CUDA_FIND_HELPER_FILE)
-
-#####################################################################
-## CUDA_INCLUDE_NVCC_DEPENDENCIES
-##
-
-# So we want to try and include the dependency file if it exists. If
-# it doesn't exist then we need to create an empty one, so we can
-# include it.
-
-# If it does exist, then we need to check to see if all the files it
-# depends on exist. If they don't then we should clear the dependency
-# file and regenerate it later. This covers the case where a header
-# file has disappeared or moved.
-
-macro(CUDA_INCLUDE_NVCC_DEPENDENCIES dependency_file)
- set(CUDA_NVCC_DEPEND)
- set(CUDA_NVCC_DEPEND_REGENERATE FALSE)
-
-
- # Include the dependency file. Create it first if it doesn't exist . The
- # INCLUDE puts a dependency that will force CMake to rerun and bring in the
- # new info when it changes. DO NOT REMOVE THIS (as I did and spent a few
- # hours figuring out why it didn't work.
- if(NOT EXISTS ${dependency_file})
- file(WRITE ${dependency_file} "#FindCUDA.cmake generated file. Do not edit.\n")
- endif()
- # Always include this file to force CMake to run again next
- # invocation and rebuild the dependencies.
- #message("including dependency_file = ${dependency_file}")
- include(${dependency_file})
-
- # Now we need to verify the existence of all the included files
- # here. If they aren't there we need to just blank this variable and
- # make the file regenerate again.
-# if(DEFINED CUDA_NVCC_DEPEND)
-# message("CUDA_NVCC_DEPEND set")
-# else()
-# message("CUDA_NVCC_DEPEND NOT set")
-# endif()
- if(CUDA_NVCC_DEPEND)
- #message("CUDA_NVCC_DEPEND true")
- foreach(f ${CUDA_NVCC_DEPEND})
- #message("searching for ${f}")
- if(NOT EXISTS ${f})
- #message("file ${f} not found")
- set(CUDA_NVCC_DEPEND_REGENERATE TRUE)
- endif()
- endforeach(f)
- else(CUDA_NVCC_DEPEND)
- #message("CUDA_NVCC_DEPEND false")
- # No dependencies, so regenerate the file.
- set(CUDA_NVCC_DEPEND_REGENERATE TRUE)
- endif(CUDA_NVCC_DEPEND)
-
- #message("CUDA_NVCC_DEPEND_REGENERATE = ${CUDA_NVCC_DEPEND_REGENERATE}")
- # No incoming dependencies, so we need to generate them. Make the
- # output depend on the dependency file itself, which should cause the
- # rule to re-run.
- if(CUDA_NVCC_DEPEND_REGENERATE)
- file(WRITE ${dependency_file} "#FindCUDA.cmake generated file. Do not edit.\n")
- endif(CUDA_NVCC_DEPEND_REGENERATE)
-
-endmacro(CUDA_INCLUDE_NVCC_DEPENDENCIES)
-
-###############################################################################
-###############################################################################
-# Setup variables' defaults
-###############################################################################
-###############################################################################
-
-# Allow the user to specify if the device code is supposed to be 32 or 64 bit.
-if(CMAKE_SIZEOF_VOID_P EQUAL 8)
- set(CUDA_64_BIT_DEVICE_CODE_DEFAULT ON)
-else()
- set(CUDA_64_BIT_DEVICE_CODE_DEFAULT OFF)
-endif()
-option(CUDA_64_BIT_DEVICE_CODE "Compile device code in 64 bit mode" ${CUDA_64_BIT_DEVICE_CODE_DEFAULT})
-
-# Attach the build rule to the source file in VS. This option
-option(CUDA_ATTACH_VS_BUILD_RULE_TO_CUDA_FILE "Attach the build rule to the CUDA source file. Enable only when the CUDA source file is added to at most one target." ON)
-
-# Prints out extra information about the cuda file during compilation
-option(CUDA_BUILD_CUBIN "Generate and parse .cubin files in Device mode." OFF)
-
-# Set whether we are using emulation or device mode.
-option(CUDA_BUILD_EMULATION "Build in Emulation mode" OFF)
-
-# Where to put the generated output.
-set(CUDA_GENERATED_OUTPUT_DIR "" CACHE PATH "Directory to put all the output files. If blank it will default to the CMAKE_CURRENT_BINARY_DIR")
-
-# Parse HOST_COMPILATION mode.
-option(CUDA_HOST_COMPILATION_CPP "Generated file extension" ON)
-
-# Extra user settable flags
-set(CUDA_NVCC_FLAGS "" CACHE STRING "Semi-colon delimit multiple arguments.")
-
-# Propagate the host flags to the host compiler via -Xcompiler
-option(CUDA_PROPAGATE_HOST_FLAGS "Propage C/CXX_FLAGS and friends to the host compiler via -Xcompile" ON)
-
-# Specifies whether the commands used when compiling the .cu file will be printed out.
-option(CUDA_VERBOSE_BUILD "Print out the commands run while compiling the CUDA source file. With the Makefile generator this defaults to VERBOSE variable specified on the command line, but can be forced on with this option." OFF)
-
-mark_as_advanced(
- CUDA_64_BIT_DEVICE_CODE
- CUDA_ATTACH_VS_BUILD_RULE_TO_CUDA_FILE
- CUDA_GENERATED_OUTPUT_DIR
- CUDA_HOST_COMPILATION_CPP
- CUDA_NVCC_FLAGS
- CUDA_PROPAGATE_HOST_FLAGS
- )
-
-# Makefile and similar generators don't define CMAKE_CONFIGURATION_TYPES, so we
-# need to add another entry for the CMAKE_BUILD_TYPE. We also need to add the
-# standerd set of 4 build types (Debug, MinSizeRel, Release, and RelWithDebInfo)
-# for completeness. We need run this loop in order to accomodate the addition
-# of extra configuration types. Duplicate entries will be removed by
-# REMOVE_DUPLICATES.
-set(CUDA_configuration_types ${CMAKE_CONFIGURATION_TYPES} ${CMAKE_BUILD_TYPE} Debug MinSizeRel Release RelWithDebInfo)
-list(REMOVE_DUPLICATES CUDA_configuration_types)
-foreach(config ${CUDA_configuration_types})
- string(TOUPPER ${config} config_upper)
- set(CUDA_NVCC_FLAGS_${config_upper} "" CACHE STRING "Semi-colon delimit multiple arguments.")
- mark_as_advanced(CUDA_NVCC_FLAGS_${config_upper})
-endforeach()
-
-###############################################################################
-###############################################################################
-# Locate CUDA, Set Build Type, etc.
-###############################################################################
-###############################################################################
-
-# Check to see if the CUDA_TOOLKIT_ROOT_DIR and CUDA_SDK_ROOT_DIR have changed,
-# if they have then clear the cache variables, so that will be detected again.
-if(NOT "${CUDA_TOOLKIT_ROOT_DIR}" STREQUAL "${CUDA_TOOLKIT_ROOT_DIR_INTERNAL}")
- unset(CUDA_NVCC_EXECUTABLE CACHE)
- unset(CUDA_VERSION CACHE)
- unset(CUDA_TOOLKIT_INCLUDE CACHE)
- unset(CUDA_CUDART_LIBRARY CACHE)
- if(CUDA_VERSION VERSION_EQUAL "3.0")
- # This only existed in the 3.0 version of the CUDA toolkit
- unset(CUDA_CUDARTEMU_LIBRARY CACHE)
- endif()
- unset(CUDA_CUDA_LIBRARY CACHE)
- unset(CUDA_cublas_LIBRARY CACHE)
- unset(CUDA_cublasemu_LIBRARY CACHE)
- unset(CUDA_cufft_LIBRARY CACHE)
- unset(CUDA_cufftemu_LIBRARY CACHE)
-endif()
-
-if(NOT "${CUDA_SDK_ROOT_DIR}" STREQUAL "${CUDA_SDK_ROOT_DIR_INTERNAL}")
- # No specific variables to catch. Use this kind of code before calling
- # find_package(CUDA) to clean up any variables that may depend on this path.
-
- # unset(MY_SPECIAL_CUDA_SDK_INCLUDE_DIR CACHE)
- # unset(MY_SPECIAL_CUDA_SDK_LIBRARY CACHE)
-endif()
-
-# Search for the cuda distribution.
-if(NOT CUDA_TOOLKIT_ROOT_DIR)
-
- # Search in the CUDA_BIN_PATH first.
- find_path(CUDA_TOOLKIT_ROOT_DIR
- NAMES nvcc nvcc.exe
- PATHS ENV CUDA_BIN_PATH
- DOC "Toolkit location."
- NO_DEFAULT_PATH
- )
- # Now search default paths
- find_path(CUDA_TOOLKIT_ROOT_DIR
- NAMES nvcc nvcc.exe
- PATHS /usr/local/bin
- /usr/local/cuda/bin
- DOC "Toolkit location."
- )
-
- if (CUDA_TOOLKIT_ROOT_DIR)
- string(REGEX REPLACE "[/\\\\]?bin[64]*[/\\\\]?$" "" CUDA_TOOLKIT_ROOT_DIR ${CUDA_TOOLKIT_ROOT_DIR})
- # We need to force this back into the cache.
- set(CUDA_TOOLKIT_ROOT_DIR ${CUDA_TOOLKIT_ROOT_DIR} CACHE PATH "Toolkit location." FORCE)
- endif(CUDA_TOOLKIT_ROOT_DIR)
- if (NOT EXISTS ${CUDA_TOOLKIT_ROOT_DIR})
- if(CUDA_FIND_REQUIRED)
- message(FATAL_ERROR "Specify CUDA_TOOLKIT_ROOT_DIR")
- elseif(NOT CUDA_FIND_QUIETLY)
- message("CUDA_TOOLKIT_ROOT_DIR not found or specified")
- endif()
- endif (NOT EXISTS ${CUDA_TOOLKIT_ROOT_DIR})
-endif (NOT CUDA_TOOLKIT_ROOT_DIR)
-
-# CUDA_NVCC_EXECUTABLE
-find_program(CUDA_NVCC_EXECUTABLE
- NAMES nvcc
- PATHS "${CUDA_TOOLKIT_ROOT_DIR}/bin"
- "${CUDA_TOOLKIT_ROOT_DIR}/bin64"
- ENV CUDA_BIN_PATH
- NO_DEFAULT_PATH
- )
-# Search default search paths, after we search our own set of paths.
-find_program(CUDA_NVCC_EXECUTABLE nvcc)
-mark_as_advanced(CUDA_NVCC_EXECUTABLE)
-
-if(CUDA_NVCC_EXECUTABLE AND NOT CUDA_VERSION)
- # Compute the version.
- execute_process (COMMAND ${CUDA_NVCC_EXECUTABLE} "--version" OUTPUT_VARIABLE NVCC_OUT)
- string(REGEX REPLACE ".*release ([0-9]+)\\.([0-9]+).*" "\\1" CUDA_VERSION_MAJOR ${NVCC_OUT})
- string(REGEX REPLACE ".*release ([0-9]+)\\.([0-9]+).*" "\\2" CUDA_VERSION_MINOR ${NVCC_OUT})
- set(CUDA_VERSION "${CUDA_VERSION_MAJOR}.${CUDA_VERSION_MINOR}" CACHE STRING "Version of CUDA as computed from nvcc.")
- mark_as_advanced(CUDA_VERSION)
-else()
- # Need to set these based off of the cached value
- string(REGEX REPLACE "([0-9]+)\\.([0-9]+).*" "\\1" CUDA_VERSION_MAJOR "${CUDA_VERSION}")
- string(REGEX REPLACE "([0-9]+)\\.([0-9]+).*" "\\2" CUDA_VERSION_MINOR "${CUDA_VERSION}")
-endif()
-
-# Always set this convenience variable
-set(CUDA_VERSION_STRING "${CUDA_VERSION}")
-
-# Here we need to determine if the version we found is acceptable. We will
-# assume that is unless CUDA_FIND_VERSION_EXACT or CUDA_FIND_VERSION is
-# specified. The presence of either of these options checks the version
-# string and signals if the version is acceptable or not.
-set(_cuda_version_acceptable TRUE)
-#
-if(CUDA_FIND_VERSION_EXACT AND NOT CUDA_VERSION VERSION_EQUAL CUDA_FIND_VERSION)
- set(_cuda_version_acceptable FALSE)
-endif()
-#
-if(CUDA_FIND_VERSION AND CUDA_VERSION VERSION_LESS CUDA_FIND_VERSION)
- set(_cuda_version_acceptable FALSE)
-endif()
-#
-if(NOT _cuda_version_acceptable)
- set(_cuda_error_message "Requested CUDA version ${CUDA_FIND_VERSION}, but found unacceptable version ${CUDA_VERSION}")
- if(CUDA_FIND_REQUIRED)
- message("${_cuda_error_message}")
- elseif(NOT CUDA_FIND_QUIETLY)
- message("${_cuda_error_message}")
- endif()
-endif()
-
-# CUDA_TOOLKIT_INCLUDE
-find_path(CUDA_TOOLKIT_INCLUDE
- device_functions.h # Header included in toolkit
- PATHS "${CUDA_TOOLKIT_ROOT_DIR}/include"
- ENV CUDA_INC_PATH
- NO_DEFAULT_PATH
- )
-# Search default search paths, after we search our own set of paths.
-find_path(CUDA_TOOLKIT_INCLUDE device_functions.h)
-mark_as_advanced(CUDA_TOOLKIT_INCLUDE)
-
-# Set the user list of include dir to nothing to initialize it.
-set (CUDA_NVCC_INCLUDE_ARGS_USER "")
-set (CUDA_INCLUDE_DIRS ${CUDA_TOOLKIT_INCLUDE})
-
-macro(FIND_LIBRARY_LOCAL_FIRST _var _names _doc)
- if(CMAKE_SIZEOF_VOID_P EQUAL 8)
- set(_cuda_64bit_lib_dir "${CUDA_TOOLKIT_ROOT_DIR}/lib64")
- endif()
- find_library(${_var}
- NAMES ${_names}
- PATHS ${_cuda_64bit_lib_dir}
- "${CUDA_TOOLKIT_ROOT_DIR}/lib"
- ENV CUDA_LIB_PATH
- DOC ${_doc}
- NO_DEFAULT_PATH
- )
- # Search default search paths, after we search our own set of paths.
- find_library(${_var} NAMES ${_names} DOC ${_doc})
-endmacro()
-
-# CUDA_LIBRARIES
-find_library_local_first(CUDA_CUDART_LIBRARY cudart "\"cudart\" library")
-if(CUDA_VERSION VERSION_EQUAL "3.0")
- # The cudartemu library only existed for the 3.0 version of CUDA.
- find_library_local_first(CUDA_CUDARTEMU_LIBRARY cudartemu "\"cudartemu\" library")
- mark_as_advanced(
- CUDA_CUDARTEMU_LIBRARY
- )
-endif()
-# If we are using emulation mode and we found the cudartemu library then use
-# that one instead of cudart.
-if(CUDA_BUILD_EMULATION AND CUDA_CUDARTEMU_LIBRARY)
- set(CUDA_LIBRARIES ${CUDA_CUDARTEMU_LIBRARY})
-else()
- set(CUDA_LIBRARIES ${CUDA_CUDART_LIBRARY})
-endif()
-if(APPLE)
- # We need to add the path to cudart to the linker using rpath, since the
- # library name for the cuda libraries is prepended with @rpath.
- if(CUDA_BUILD_EMULATION AND CUDA_CUDARTEMU_LIBRARY)
- get_filename_component(_cuda_path_to_cudart "${CUDA_CUDARTEMU_LIBRARY}" PATH)
- else()
- get_filename_component(_cuda_path_to_cudart "${CUDA_CUDART_LIBRARY}" PATH)
- endif()
- if(_cuda_path_to_cudart)
- list(APPEND CUDA_LIBRARIES -Wl,-rpath "-Wl,${_cuda_path_to_cudart}")
- endif()
-endif()
-
-# 1.1 toolkit on linux doesn't appear to have a separate library on
-# some platforms.
-find_library_local_first(CUDA_CUDA_LIBRARY cuda "\"cuda\" library (older versions only).")
-
-# Add cuda library to the link line only if it is found.
-if (CUDA_CUDA_LIBRARY)
- set(CUDA_LIBRARIES ${CUDA_LIBRARIES} ${CUDA_CUDA_LIBRARY})
-endif(CUDA_CUDA_LIBRARY)
-
-mark_as_advanced(
- CUDA_CUDA_LIBRARY
- CUDA_CUDART_LIBRARY
- )
-
-#######################
-# Look for some of the toolkit helper libraries
-macro(FIND_CUDA_HELPER_LIBS _name)
- find_library_local_first(CUDA_${_name}_LIBRARY ${_name} "\"${_name}\" library")
- mark_as_advanced(CUDA_${_name}_LIBRARY)
-endmacro(FIND_CUDA_HELPER_LIBS)
-
-# Search for cufft and cublas libraries.
-find_cuda_helper_libs(cufftemu)
-find_cuda_helper_libs(cublasemu)
-find_cuda_helper_libs(cufft)
-find_cuda_helper_libs(cublas)
-
-if (CUDA_BUILD_EMULATION)
- set(CUDA_CUFFT_LIBRARIES ${CUDA_cufftemu_LIBRARY})
- set(CUDA_CUBLAS_LIBRARIES ${CUDA_cublasemu_LIBRARY})
-else()
- set(CUDA_CUFFT_LIBRARIES ${CUDA_cufft_LIBRARY})
- set(CUDA_CUBLAS_LIBRARIES ${CUDA_cublas_LIBRARY})
-endif()
-
-########################
-# Look for the SDK stuff
-find_path(CUDA_SDK_ROOT_DIR common/inc/cutil.h
- "$ENV{NVSDKCUDA_ROOT}"
- "[HKEY_LOCAL_MACHINE\\SOFTWARE\\NVIDIA Corporation\\Installed Products\\NVIDIA SDK 10\\Compute;InstallDir]"
- "/Developer/GPU\ Computing/C"
- )
-
-# Keep the CUDA_SDK_ROOT_DIR first in order to be able to override the
-# environment variables.
-set(CUDA_SDK_SEARCH_PATH
- "${CUDA_SDK_ROOT_DIR}"
- "${CUDA_TOOLKIT_ROOT_DIR}/local/NVSDK0.2"
- "${CUDA_TOOLKIT_ROOT_DIR}/NVSDK0.2"
- "${CUDA_TOOLKIT_ROOT_DIR}/NV_CUDA_SDK"
- "$ENV{HOME}/NVIDIA_CUDA_SDK"
- "$ENV{HOME}/NVIDIA_CUDA_SDK_MACOSX"
- "/Developer/CUDA"
- )
-
-# Example of how to find an include file from the CUDA_SDK_ROOT_DIR
-
-# find_path(CUDA_CUT_INCLUDE_DIR
-# cutil.h
-# PATHS ${CUDA_SDK_SEARCH_PATH}
-# PATH_SUFFIXES "common/inc"
-# DOC "Location of cutil.h"
-# NO_DEFAULT_PATH
-# )
-# # Now search system paths
-# find_path(CUDA_CUT_INCLUDE_DIR cutil.h DOC "Location of cutil.h")
-
-# mark_as_advanced(CUDA_CUT_INCLUDE_DIR)
-
-
-# Example of how to find a library in the CUDA_SDK_ROOT_DIR
-
-# # cutil library is called cutil64 for 64 bit builds on windows. We don't want
-# # to get these confused, so we are setting the name based on the word size of
-# # the build.
-
-# if(CMAKE_SIZEOF_VOID_P EQUAL 8)
-# set(cuda_cutil_name cutil64)
-# else(CMAKE_SIZEOF_VOID_P EQUAL 8)
-# set(cuda_cutil_name cutil32)
-# endif(CMAKE_SIZEOF_VOID_P EQUAL 8)
-
-# find_library(CUDA_CUT_LIBRARY
-# NAMES cutil ${cuda_cutil_name}
-# PATHS ${CUDA_SDK_SEARCH_PATH}
-# # The new version of the sdk shows up in common/lib, but the old one is in lib
-# PATH_SUFFIXES "common/lib" "lib"
-# DOC "Location of cutil library"
-# NO_DEFAULT_PATH
-# )
-# # Now search system paths
-# find_library(CUDA_CUT_LIBRARY NAMES cutil ${cuda_cutil_name} DOC "Location of cutil library")
-# mark_as_advanced(CUDA_CUT_LIBRARY)
-# set(CUDA_CUT_LIBRARIES ${CUDA_CUT_LIBRARY})
-
-
-
-#############################
-# Check for required components
-set(CUDA_FOUND TRUE)
-
-set(CUDA_TOOLKIT_ROOT_DIR_INTERNAL "${CUDA_TOOLKIT_ROOT_DIR}" CACHE INTERNAL
- "This is the value of the last time CUDA_TOOLKIT_ROOT_DIR was set successfully." FORCE)
-set(CUDA_SDK_ROOT_DIR_INTERNAL "${CUDA_SDK_ROOT_DIR}" CACHE INTERNAL
- "This is the value of the last time CUDA_SDK_ROOT_DIR was set successfully." FORCE)
-
-include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(CUDA DEFAULT_MSG
- CUDA_TOOLKIT_ROOT_DIR
- CUDA_NVCC_EXECUTABLE
- CUDA_INCLUDE_DIRS
- CUDA_CUDART_LIBRARY
- _cuda_version_acceptable
- )
-
-
-
-###############################################################################
-###############################################################################
-# Macros
-###############################################################################
-###############################################################################
-
-###############################################################################
-# Add include directories to pass to the nvcc command.
-macro(CUDA_INCLUDE_DIRECTORIES)
- foreach(dir ${ARGN})
- list(APPEND CUDA_NVCC_INCLUDE_ARGS_USER "-I${dir}")
- endforeach(dir ${ARGN})
-endmacro(CUDA_INCLUDE_DIRECTORIES)
-
-
-##############################################################################
-cuda_find_helper_file(parse_cubin cmake)
-cuda_find_helper_file(make2cmake cmake)
-cuda_find_helper_file(run_nvcc cmake)
-
-##############################################################################
-# Separate the OPTIONS out from the sources
-#
-macro(CUDA_GET_SOURCES_AND_OPTIONS _sources _cmake_options _options)
- set( ${_sources} )
- set( ${_cmake_options} )
- set( ${_options} )
- set( _found_options FALSE )
- foreach(arg ${ARGN})
- if(arg STREQUAL "OPTIONS")
- set( _found_options TRUE )
- elseif(
- arg STREQUAL "WIN32" OR
- arg STREQUAL "MACOSX_BUNDLE" OR
- arg STREQUAL "EXCLUDE_FROM_ALL" OR
- arg STREQUAL "STATIC" OR
- arg STREQUAL "SHARED" OR
- arg STREQUAL "MODULE"
- )
- list(APPEND ${_cmake_options} "${arg}")
- else()
- if ( _found_options )
- list(APPEND ${_options} "${arg}")
- else()
- # Assume this is a file
- list(APPEND ${_sources} "${arg}")
- endif()
- endif()
- endforeach()
-endmacro()
-
-##############################################################################
-# Parse the OPTIONS from ARGN and set the variables prefixed by _option_prefix
-#
-macro(CUDA_PARSE_NVCC_OPTIONS _option_prefix)
- set( _found_config )
- foreach(arg ${ARGN})
- # Determine if we are dealing with a perconfiguration flag
- foreach(config ${CUDA_configuration_types})
- string(TOUPPER ${config} config_upper)
- if (arg STREQUAL "${config_upper}")
- set( _found_config _${arg})
- # Set arg to nothing to keep it from being processed further
- set( arg )
- endif()
- endforeach()
-
- if ( arg )
- list(APPEND ${_option_prefix}${_found_config} "${arg}")
- endif()
- endforeach()
-endmacro()
-
-##############################################################################
-# Helper to add the include directory for CUDA only once
-function(CUDA_ADD_CUDA_INCLUDE_ONCE)
- get_directory_property(_include_directories INCLUDE_DIRECTORIES)
- set(_add TRUE)
- if(_include_directories)
- foreach(dir ${_include_directories})
- if("${dir}" STREQUAL "${CUDA_INCLUDE_DIRS}")
- set(_add FALSE)
- endif()
- endforeach()
- endif()
- if(_add)
- include_directories(${CUDA_INCLUDE_DIRS})
- endif()
-endfunction()
-
-function(CUDA_BUILD_SHARED_LIBRARY shared_flag)
- set(cmake_args ${ARGN})
- # If SHARED, MODULE, or STATIC aren't already in the list of arguments, then
- # add SHARED or STATIC based on the value of BUILD_SHARED_LIBS.
- list(FIND cmake_args SHARED _cuda_found_SHARED)
- list(FIND cmake_args MODULE _cuda_found_MODULE)
- list(FIND cmake_args STATIC _cuda_found_STATIC)
- if( _cuda_found_SHARED GREATER -1 OR
- _cuda_found_MODULE GREATER -1 OR
- _cuda_found_STATIC GREATER -1)
- set(_cuda_build_shared_libs)
- else()
- if (BUILD_SHARED_LIBS)
- set(_cuda_build_shared_libs SHARED)
- else()
- set(_cuda_build_shared_libs STATIC)
- endif()
- endif()
- set(${shared_flag} ${_cuda_build_shared_libs} PARENT_SCOPE)
-endfunction()
-
-##############################################################################
-# This helper macro populates the following variables and setups up custom
-# commands and targets to invoke the nvcc compiler to generate C or PTX source
-# dependant upon the format parameter. The compiler is invoked once with -M
-# to generate a dependency file and a second time with -cuda or -ptx to generate
-# a .cpp or .ptx file.
-# INPUT:
-# cuda_target - Target name
-# format - PTX or OBJ
-# FILE1 .. FILEN - The remaining arguments are the sources to be wrapped.
-# OPTIONS - Extra options to NVCC
-# OUTPUT:
-# generated_files - List of generated files
-##############################################################################
-##############################################################################
-
-macro(CUDA_WRAP_SRCS cuda_target format generated_files)
-
- if( ${format} MATCHES "PTX" )
- set( compile_to_ptx ON )
- elseif( ${format} MATCHES "OBJ")
- set( compile_to_ptx OFF )
- else()
- message( FATAL_ERROR "Invalid format flag passed to CUDA_WRAP_SRCS: '${format}'. Use OBJ or PTX.")
- endif()
-
- # Set up all the command line flags here, so that they can be overriden on a per target basis.
-
- set(nvcc_flags "")
-
- # Emulation if the card isn't present.
- if (CUDA_BUILD_EMULATION)
- # Emulation.
- set(nvcc_flags ${nvcc_flags} --device-emulation -D_DEVICEEMU -g)
- else(CUDA_BUILD_EMULATION)
- # Device mode. No flags necessary.
- endif(CUDA_BUILD_EMULATION)
-
- if(CUDA_HOST_COMPILATION_CPP)
- set(CUDA_C_OR_CXX CXX)
- else(CUDA_HOST_COMPILATION_CPP)
- if(CUDA_VERSION VERSION_LESS "3.0")
- set(nvcc_flags ${nvcc_flags} --host-compilation C)
- else()
- message(WARNING "--host-compilation flag is deprecated in CUDA version >= 3.0. Removing --host-compilation C flag" )
- endif()
- set(CUDA_C_OR_CXX C)
- endif(CUDA_HOST_COMPILATION_CPP)
-
- set(generated_extension ${CMAKE_${CUDA_C_OR_CXX}_OUTPUT_EXTENSION})
-
- if(CUDA_64_BIT_DEVICE_CODE)
- set(nvcc_flags ${nvcc_flags} -m64)
- else()
- set(nvcc_flags ${nvcc_flags} -m32)
- endif()
-
- # This needs to be passed in at this stage, because VS needs to fill out the
- # value of VCInstallDir from within VS.
- if(CMAKE_GENERATOR MATCHES "Visual Studio")
- if( CMAKE_SIZEOF_VOID_P EQUAL 8 )
- # Add nvcc flag for 64b Windows
- set(ccbin_flags -D "\"CCBIN:PATH=$(VCInstallDir)bin\"" )
- endif()
- endif()
-
- # Figure out which configure we will use and pass that in as an argument to
- # the script. We need to defer the decision until compilation time, because
- # for VS projects we won't know if we are making a debug or release build
- # until build time.
- if(CMAKE_GENERATOR MATCHES "Visual Studio")
- set( CUDA_build_configuration "$(ConfigurationName)" )
- else()
- set( CUDA_build_configuration "${CMAKE_BUILD_TYPE}")
- endif()
-
- # Initialize our list of includes with the user ones followed by the CUDA system ones.
- set(CUDA_NVCC_INCLUDE_ARGS ${CUDA_NVCC_INCLUDE_ARGS_USER} "-I${CUDA_INCLUDE_DIRS}")
- # Get the include directories for this directory and use them for our nvcc command.
- get_directory_property(CUDA_NVCC_INCLUDE_DIRECTORIES INCLUDE_DIRECTORIES)
- if(CUDA_NVCC_INCLUDE_DIRECTORIES)
- foreach(dir ${CUDA_NVCC_INCLUDE_DIRECTORIES})
- list(APPEND CUDA_NVCC_INCLUDE_ARGS "-I${dir}")
- endforeach()
- endif()
-
- # Reset these variables
- set(CUDA_WRAP_OPTION_NVCC_FLAGS)
- foreach(config ${CUDA_configuration_types})
- string(TOUPPER ${config} config_upper)
- set(CUDA_WRAP_OPTION_NVCC_FLAGS_${config_upper})
- endforeach()
-
- CUDA_GET_SOURCES_AND_OPTIONS(_cuda_wrap_sources _cuda_wrap_cmake_options _cuda_wrap_options ${ARGN})
- CUDA_PARSE_NVCC_OPTIONS(CUDA_WRAP_OPTION_NVCC_FLAGS ${_cuda_wrap_options})
-
- # Figure out if we are building a shared library. BUILD_SHARED_LIBS is
- # respected in CUDA_ADD_LIBRARY.
- set(_cuda_build_shared_libs FALSE)
- # SHARED, MODULE
- list(FIND _cuda_wrap_cmake_options SHARED _cuda_found_SHARED)
- list(FIND _cuda_wrap_cmake_options MODULE _cuda_found_MODULE)
- if(_cuda_found_SHARED GREATER -1 OR _cuda_found_MODULE GREATER -1)
- set(_cuda_build_shared_libs TRUE)
- endif()
- # STATIC
- list(FIND _cuda_wrap_cmake_options STATIC _cuda_found_STATIC)
- if(_cuda_found_STATIC GREATER -1)
- set(_cuda_build_shared_libs FALSE)
- endif()
-
- # CUDA_HOST_FLAGS
- if(_cuda_build_shared_libs)
- # If we are setting up code for a shared library, then we need to add extra flags for
- # compiling objects for shared libraries.
- set(CUDA_HOST_SHARED_FLAGS ${CMAKE_SHARED_LIBRARY_${CUDA_C_OR_CXX}_FLAGS})
- else()
- set(CUDA_HOST_SHARED_FLAGS)
- endif()
- # Only add the CMAKE_{C,CXX}_FLAGS if we are propagating host flags. We
- # always need to set the SHARED_FLAGS, though.
- if(CUDA_PROPAGATE_HOST_FLAGS)
- set(CUDA_HOST_FLAGS "set(CMAKE_HOST_FLAGS ${CMAKE_${CUDA_C_OR_CXX}_FLAGS} ${CUDA_HOST_SHARED_FLAGS})")
- else()
- set(CUDA_HOST_FLAGS "set(CMAKE_HOST_FLAGS ${CUDA_HOST_SHARED_FLAGS})")
- endif()
-
- set(CUDA_NVCC_FLAGS_CONFIG "# Build specific configuration flags")
- # Loop over all the configuration types to generate appropriate flags for run_nvcc.cmake
- foreach(config ${CUDA_configuration_types})
- string(TOUPPER ${config} config_upper)
- # CMAKE_FLAGS are strings and not lists. By not putting quotes around CMAKE_FLAGS
- # we convert the strings to lists (like we want).
-
- if(CUDA_PROPAGATE_HOST_FLAGS)
- # nvcc chokes on -g3, so replace it with -g
- if(CMAKE_COMPILER_IS_GNUCC)
- string(REPLACE "-g3" "-g" _cuda_C_FLAGS "${CMAKE_${CUDA_C_OR_CXX}_FLAGS_${config_upper}}")
- else()
- set(_cuda_C_FLAGS "${CMAKE_${CUDA_C_OR_CXX}_FLAGS_${config_upper}}")
- endif()
-
- set(CUDA_HOST_FLAGS "${CUDA_HOST_FLAGS}\nset(CMAKE_HOST_FLAGS_${config_upper} ${_cuda_C_FLAGS})")
- endif()
-
- # Note that if we ever want CUDA_NVCC_FLAGS_<CONFIG> to be string (instead of a list
- # like it is currently), we can remove the quotes around the
- # ${CUDA_NVCC_FLAGS_${config_upper}} variable like the CMAKE_HOST_FLAGS_<CONFIG> variable.
- set(CUDA_NVCC_FLAGS_CONFIG "${CUDA_NVCC_FLAGS_CONFIG}\nset(CUDA_NVCC_FLAGS_${config_upper} \"${CUDA_NVCC_FLAGS_${config_upper}};;${CUDA_WRAP_OPTION_NVCC_FLAGS_${config_upper}}\")")
- endforeach()
-
- if(compile_to_ptx)
- # Don't use any of the host compilation flags for PTX targets.
- set(CUDA_HOST_FLAGS)
- set(CUDA_NVCC_FLAGS_CONFIG)
- endif()
-
- # Get the list of definitions from the directory property
- get_directory_property(CUDA_NVCC_DEFINITIONS COMPILE_DEFINITIONS)
- if(CUDA_NVCC_DEFINITIONS)
- foreach(_definition ${CUDA_NVCC_DEFINITIONS})
- list(APPEND nvcc_flags "-D${_definition}")
- endforeach()
- endif()
-
- if(_cuda_build_shared_libs)
- list(APPEND nvcc_flags "-D${cuda_target}_EXPORTS")
- endif()
-
- # Determine output directory
- if(CUDA_GENERATED_OUTPUT_DIR)
- set(cuda_compile_output_dir "${CUDA_GENERATED_OUTPUT_DIR}")
- else()
- set(cuda_compile_output_dir "${CMAKE_CURRENT_BINARY_DIR}")
- endif()
-
- # Reset the output variable
- set(_cuda_wrap_generated_files "")
-
- # Iterate over the macro arguments and create custom
- # commands for all the .cu files.
- foreach(file ${ARGN})
- # Ignore any file marked as a HEADER_FILE_ONLY
- get_source_file_property(_is_header ${file} HEADER_FILE_ONLY)
- if(${file} MATCHES ".*\\.cu$" AND NOT _is_header)
-
- # Add a custom target to generate a c or ptx file. ######################
-
- get_filename_component( basename ${file} NAME )
- if( compile_to_ptx )
- set(generated_file_path "${cuda_compile_output_dir}")
- set(generated_file_basename "${cuda_target}_generated_${basename}.ptx")
- set(format_flag "-ptx")
- file(MAKE_DIRECTORY "${cuda_compile_output_dir}")
- else( compile_to_ptx )
- set(generated_file_path "${cuda_compile_output_dir}/${CMAKE_CFG_INTDIR}")
- set(generated_file_basename "${cuda_target}_generated_${basename}${generated_extension}")
- set(format_flag "-c")
- endif( compile_to_ptx )
-
- # Set all of our file names. Make sure that whatever filenames that have
- # generated_file_path in them get passed in through as a command line
- # argument, so that the ${CMAKE_CFG_INTDIR} gets expanded at run time
- # instead of configure time.
- set(generated_file "${generated_file_path}/${generated_file_basename}")
- set(cmake_dependency_file "${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${generated_file_basename}.depend")
- set(NVCC_generated_dependency_file "${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${generated_file_basename}.NVCC-depend")
- set(generated_cubin_file "${generated_file_path}/${generated_file_basename}.cubin.txt")
- set(custom_target_script "${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${generated_file_basename}.cmake")
-
- # Setup properties for obj files:
- if( NOT compile_to_ptx )
- set_source_files_properties("${generated_file}"
- PROPERTIES
- EXTERNAL_OBJECT true # This is an object file not to be compiled, but only be linked.
- )
- endif()
-
- # Don't add CMAKE_CURRENT_SOURCE_DIR if the path is already an absolute path.
- get_filename_component(file_path "${file}" PATH)
- if(IS_ABSOLUTE "${file_path}")
- set(source_file "${file}")
- else()
- set(source_file "${CMAKE_CURRENT_SOURCE_DIR}/${file}")
- endif()
-
- # Bring in the dependencies. Creates a variable CUDA_NVCC_DEPEND #######
- cuda_include_nvcc_dependencies(${cmake_dependency_file})
-
- # Convience string for output ###########################################
- if(CUDA_BUILD_EMULATION)
- set(cuda_build_type "Emulation")
- else(CUDA_BUILD_EMULATION)
- set(cuda_build_type "Device")
- endif(CUDA_BUILD_EMULATION)
-
- # Build the NVCC made dependency file ###################################
- set(build_cubin OFF)
- if ( NOT CUDA_BUILD_EMULATION AND CUDA_BUILD_CUBIN )
- if ( NOT compile_to_ptx )
- set ( build_cubin ON )
- endif( NOT compile_to_ptx )
- endif( NOT CUDA_BUILD_EMULATION AND CUDA_BUILD_CUBIN )
-
- # Configure the build script
- configure_file("${CUDA_run_nvcc}" "${custom_target_script}" @ONLY)
-
- # So if a user specifies the same cuda file as input more than once, you
- # can have bad things happen with dependencies. Here we check an option
- # to see if this is the behavior they want.
- if(CUDA_ATTACH_VS_BUILD_RULE_TO_CUDA_FILE)
- set(main_dep MAIN_DEPENDENCY ${source_file})
- else()
- set(main_dep DEPENDS ${source_file})
- endif()
-
- if(CUDA_VERBOSE_BUILD)
- set(verbose_output ON)
- elseif(CMAKE_GENERATOR MATCHES "Makefiles")
- set(verbose_output "$(VERBOSE)")
- else()
- set(verbose_output OFF)
- endif()
-
- # Create up the comment string
- file(RELATIVE_PATH generated_file_relative_path "${CMAKE_BINARY_DIR}" "${generated_file}")
- if(compile_to_ptx)
- set(cuda_build_comment_string "Building NVCC ptx file ${generated_file_relative_path}")
- else()
- set(cuda_build_comment_string "Building NVCC (${cuda_build_type}) object ${generated_file_relative_path}")
- endif()
-
- # Build the generated file and dependency file ##########################
- add_custom_command(
- OUTPUT ${generated_file}
- # These output files depend on the source_file and the contents of cmake_dependency_file
- ${main_dep}
- DEPENDS ${CUDA_NVCC_DEPEND}
- DEPENDS ${custom_target_script}
- # Make sure the output directory exists before trying to write to it.
- COMMAND ${CMAKE_COMMAND} -E make_directory "${generated_file_path}"
- COMMAND ${CMAKE_COMMAND} ARGS
- -D verbose:BOOL=${verbose_output}
- ${ccbin_flags}
- -D build_configuration:STRING=${CUDA_build_configuration}
- -D "generated_file:STRING=${generated_file}"
- -D "generated_cubin_file:STRING=${generated_cubin_file}"
- -P "${custom_target_script}"
- COMMENT "${cuda_build_comment_string}"
- )
-
- # Make sure the build system knows the file is generated.
- set_source_files_properties(${generated_file} PROPERTIES GENERATED TRUE)
-
- # Don't add the object file to the list of generated files if we are using
- # visual studio and we are attaching the build rule to the cuda file. VS
- # will add our object file to the linker automatically for us.
- set(cuda_add_generated_file TRUE)
-
- if(NOT compile_to_ptx AND CMAKE_GENERATOR MATCHES "Visual Studio" AND CUDA_ATTACH_VS_BUILD_RULE_TO_CUDA_FILE)
- # Visual Studio 8 crashes when you close the solution when you don't add the object file.
- if(NOT CMAKE_GENERATOR MATCHES "Visual Studio 8")
- #message("Not adding ${generated_file}")
- set(cuda_add_generated_file FALSE)
- endif()
- endif()
-
- if(cuda_add_generated_file)
- list(APPEND _cuda_wrap_generated_files ${generated_file})
- endif()
-
- # Add the other files that we want cmake to clean on a cleanup ##########
- list(APPEND CUDA_ADDITIONAL_CLEAN_FILES "${cmake_dependency_file}")
- list(REMOVE_DUPLICATES CUDA_ADDITIONAL_CLEAN_FILES)
- set(CUDA_ADDITIONAL_CLEAN_FILES ${CUDA_ADDITIONAL_CLEAN_FILES} CACHE INTERNAL "List of intermediate files that are part of the cuda dependency scanning.")
-
- endif(${file} MATCHES ".*\\.cu$" AND NOT _is_header)
- endforeach(file)
-
- # Set the return parameter
- set(${generated_files} ${_cuda_wrap_generated_files})
-endmacro(CUDA_WRAP_SRCS)
-
-
-###############################################################################
-###############################################################################
-# ADD LIBRARY
-###############################################################################
-###############################################################################
-macro(CUDA_ADD_LIBRARY cuda_target)
-
- CUDA_ADD_CUDA_INCLUDE_ONCE()
-
- # Separate the sources from the options
- CUDA_GET_SOURCES_AND_OPTIONS(_sources _cmake_options _options ${ARGN})
- CUDA_BUILD_SHARED_LIBRARY(_cuda_shared_flag ${ARGN})
- # Create custom commands and targets for each file.
- CUDA_WRAP_SRCS( ${cuda_target} OBJ _generated_files ${_sources}
- ${_cmake_options} ${_cuda_shared_flag}
- OPTIONS ${_options} )
-
- # Add the library.
- add_library(${cuda_target} ${_cmake_options}
- ${_generated_files}
- ${_sources}
- )
-
- target_link_libraries(${cuda_target}
- ${CUDA_LIBRARIES}
- )
-
- # We need to set the linker language based on what the expected generated file
- # would be. CUDA_C_OR_CXX is computed based on CUDA_HOST_COMPILATION_CPP.
- set_target_properties(${cuda_target}
- PROPERTIES
- LINKER_LANGUAGE ${CUDA_C_OR_CXX}
- )
-
-endmacro(CUDA_ADD_LIBRARY cuda_target)
-
-
-###############################################################################
-###############################################################################
-# ADD EXECUTABLE
-###############################################################################
-###############################################################################
-macro(CUDA_ADD_EXECUTABLE cuda_target)
-
- CUDA_ADD_CUDA_INCLUDE_ONCE()
-
- # Separate the sources from the options
- CUDA_GET_SOURCES_AND_OPTIONS(_sources _cmake_options _options ${ARGN})
- # Create custom commands and targets for each file.
- CUDA_WRAP_SRCS( ${cuda_target} OBJ _generated_files ${_sources} OPTIONS ${_options} )
-
- # Add the library.
- add_executable(${cuda_target} ${_cmake_options}
- ${_generated_files}
- ${_sources}
- )
-
- target_link_libraries(${cuda_target}
- ${CUDA_LIBRARIES}
- )
-
- # We need to set the linker language based on what the expected generated file
- # would be. CUDA_C_OR_CXX is computed based on CUDA_HOST_COMPILATION_CPP.
- set_target_properties(${cuda_target}
- PROPERTIES
- LINKER_LANGUAGE ${CUDA_C_OR_CXX}
- )
-
-endmacro(CUDA_ADD_EXECUTABLE cuda_target)
-
-
-###############################################################################
-###############################################################################
-# CUDA COMPILE
-###############################################################################
-###############################################################################
-macro(CUDA_COMPILE generated_files)
-
- # Separate the sources from the options
- CUDA_GET_SOURCES_AND_OPTIONS(_sources _cmake_options _options ${ARGN})
- # Create custom commands and targets for each file.
- CUDA_WRAP_SRCS( cuda_compile OBJ _generated_files ${_sources} ${_cmake_options}
- OPTIONS ${_options} )
-
- set( ${generated_files} ${_generated_files})
-
-endmacro(CUDA_COMPILE)
-
-
-###############################################################################
-###############################################################################
-# CUDA COMPILE PTX
-###############################################################################
-###############################################################################
-macro(CUDA_COMPILE_PTX generated_files)
-
- # Separate the sources from the options
- CUDA_GET_SOURCES_AND_OPTIONS(_sources _cmake_options _options ${ARGN})
- # Create custom commands and targets for each file.
- CUDA_WRAP_SRCS( cuda_compile_ptx PTX _generated_files ${_sources} ${_cmake_options}
- OPTIONS ${_options} )
-
- set( ${generated_files} ${_generated_files})
-
-endmacro(CUDA_COMPILE_PTX)
-
-###############################################################################
-###############################################################################
-# CUDA ADD CUFFT TO TARGET
-###############################################################################
-###############################################################################
-macro(CUDA_ADD_CUFFT_TO_TARGET target)
- if (CUDA_BUILD_EMULATION)
- target_link_libraries(${target} ${CUDA_cufftemu_LIBRARY})
- else()
- target_link_libraries(${target} ${CUDA_cufft_LIBRARY})
- endif()
-endmacro()
-
-###############################################################################
-###############################################################################
-# CUDA ADD CUBLAS TO TARGET
-###############################################################################
-###############################################################################
-macro(CUDA_ADD_CUBLAS_TO_TARGET target)
- if (CUDA_BUILD_EMULATION)
- target_link_libraries(${target} ${CUDA_cublasemu_LIBRARY})
- else()
- target_link_libraries(${target} ${CUDA_cublas_LIBRARY})
- endif()
-endmacro()
-
-###############################################################################
-###############################################################################
-# CUDA BUILD CLEAN TARGET
-###############################################################################
-###############################################################################
-macro(CUDA_BUILD_CLEAN_TARGET)
- # Call this after you add all your CUDA targets, and you will get a convience
- # target. You should also make clean after running this target to get the
- # build system to generate all the code again.
-
- set(cuda_clean_target_name clean_cuda_depends)
- if (CMAKE_GENERATOR MATCHES "Visual Studio")
- string(TOUPPER ${cuda_clean_target_name} cuda_clean_target_name)
- endif()
- add_custom_target(${cuda_clean_target_name}
- COMMAND ${CMAKE_COMMAND} -E remove ${CUDA_ADDITIONAL_CLEAN_FILES})
-
- # Clear out the variable, so the next time we configure it will be empty.
- # This is useful so that the files won't persist in the list after targets
- # have been removed.
- set(CUDA_ADDITIONAL_CLEAN_FILES "" CACHE INTERNAL "List of intermediate files that are part of the cuda dependency scanning.")
-endmacro(CUDA_BUILD_CLEAN_TARGET)
+++ /dev/null
-# James Bigler, NVIDIA Corp (nvidia.com - jbigler)
-# Abe Stephens, SCI Institute -- http://www.sci.utah.edu/~abe/FindCuda.html
-#
-# Copyright (c) 2008 - 2009 NVIDIA Corporation. All rights reserved.
-#
-# Copyright (c) 2007-2009
-# Scientific Computing and Imaging Institute, University of Utah
-#
-# This code is licensed under the MIT License. See the FindCUDA.cmake script
-# for the text of the license.
-
-# The MIT License
-#
-# License for the specific language governing rights and limitations under
-# 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 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.
-#
-
-#######################################################################
-# This converts a file written in makefile syntax into one that can be included
-# by CMake.
-
-file(READ ${input_file} depend_text)
-
-if (${depend_text} MATCHES ".+")
-
- # message("FOUND DEPENDS")
-
- # Remember, four backslashes is escaped to one backslash in the string.
- string(REGEX REPLACE "\\\\ " " " depend_text ${depend_text})
-
- # This works for the nvcc -M generated dependency files.
- string(REGEX REPLACE "^.* : " "" depend_text ${depend_text})
- string(REGEX REPLACE "[ \\\\]*\n" ";" depend_text ${depend_text})
-
- set(dependency_list "")
-
- foreach(file ${depend_text})
-
- string(REGEX REPLACE "^ +" "" file ${file})
-
- if(NOT IS_DIRECTORY ${file})
- # If softlinks start to matter, we should change this to REALPATH. For now we need
- # to flatten paths, because nvcc can generate stuff like /bin/../include instead of
- # just /include.
- get_filename_component(file_absolute "${file}" ABSOLUTE)
- list(APPEND dependency_list "${file_absolute}")
- endif(NOT IS_DIRECTORY ${file})
-
- endforeach(file)
-
-else()
- # message("FOUND NO DEPENDS")
-endif()
-
-# Remove the duplicate entries and sort them.
-list(REMOVE_DUPLICATES dependency_list)
-list(SORT dependency_list)
-
-foreach(file ${dependency_list})
- set(cuda_nvcc_depend "${cuda_nvcc_depend} \"${file}\"\n")
-endforeach()
-
-file(WRITE ${output_file} "# Generated by: make2cmake.cmake\nSET(CUDA_NVCC_DEPEND\n ${cuda_nvcc_depend})\n\n")
+++ /dev/null
-# James Bigler, NVIDIA Corp (nvidia.com - jbigler)
-# Abe Stephens, SCI Institute -- http://www.sci.utah.edu/~abe/FindCuda.html
-#
-# Copyright (c) 2008 - 2009 NVIDIA Corporation. All rights reserved.
-#
-# Copyright (c) 2007-2009
-# Scientific Computing and Imaging Institute, University of Utah
-#
-# This code is licensed under the MIT License. See the FindCUDA.cmake script
-# for the text of the license.
-
-# The MIT License
-#
-# License for the specific language governing rights and limitations under
-# 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 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.
-#
-
-#######################################################################
-# Parses a .cubin file produced by nvcc and reports statistics about the file.
-
-
-file(READ ${input_file} file_text)
-
-if (${file_text} MATCHES ".+")
-
- # Remember, four backslashes is escaped to one backslash in the string.
- string(REGEX REPLACE ";" "\\\\;" file_text ${file_text})
- string(REGEX REPLACE "\ncode" ";code" file_text ${file_text})
-
- list(LENGTH file_text len)
-
- foreach(line ${file_text})
-
- # Only look at "code { }" blocks.
- if(line MATCHES "^code")
-
- # Break into individual lines.
- string(REGEX REPLACE "\n" ";" line ${line})
-
- foreach(entry ${line})
-
- # Extract kernel names.
- if (${entry} MATCHES "[^g]name = ([^ ]+)")
- string(REGEX REPLACE ".* = ([^ ]+)" "\\1" entry ${entry})
-
- # Check to see if the kernel name starts with "_"
- set(skip FALSE)
- # if (${entry} MATCHES "^_")
- # Skip the rest of this block.
- # message("Skipping ${entry}")
- # set(skip TRUE)
- # else (${entry} MATCHES "^_")
- message("Kernel: ${entry}")
- # endif (${entry} MATCHES "^_")
-
- endif(${entry} MATCHES "[^g]name = ([^ ]+)")
-
- # Skip the rest of the block if necessary
- if(NOT skip)
-
- # Registers
- if (${entry} MATCHES "reg([ ]+)=([ ]+)([^ ]+)")
- string(REGEX REPLACE ".*([ ]+)=([ ]+)([^ ]+)" "\\3" entry ${entry})
- message("Registers: ${entry}")
- endif()
-
- # Local memory
- if (${entry} MATCHES "lmem([ ]+)=([ ]+)([^ ]+)")
- string(REGEX REPLACE ".*([ ]+)=([ ]+)([^ ]+)" "\\3" entry ${entry})
- message("Local: ${entry}")
- endif()
-
- # Shared memory
- if (${entry} MATCHES "smem([ ]+)=([ ]+)([^ ]+)")
- string(REGEX REPLACE ".*([ ]+)=([ ]+)([^ ]+)" "\\3" entry ${entry})
- message("Shared: ${entry}")
- endif()
-
- if (${entry} MATCHES "^}")
- message("")
- endif()
-
- endif(NOT skip)
-
-
- endforeach(entry)
-
- endif(line MATCHES "^code")
-
- endforeach(line)
-
-else()
- # message("FOUND NO DEPENDS")
-endif()
-
-
+++ /dev/null
-# James Bigler, NVIDIA Corp (nvidia.com - jbigler)
-#
-# Copyright (c) 2008 - 2009 NVIDIA Corporation. All rights reserved.
-#
-# This code is licensed under the MIT License. See the FindCUDA.cmake script
-# for the text of the license.
-
-# The MIT License
-#
-# License for the specific language governing rights and limitations under
-# 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 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.
-
-
-##########################################################################
-# This file runs the nvcc commands to produce the desired output file along with
-# the dependency file needed by CMake to compute dependencies. In addition the
-# file checks the output of each command and if the command fails it deletes the
-# output files.
-
-# Input variables
-#
-# verbose:BOOL=<> OFF: Be as quiet as possible (default)
-# ON : Describe each step
-#
-# build_configuration:STRING=<> Typically one of Debug, MinSizeRel, Release, or
-# RelWithDebInfo, but it should match one of the
-# entries in CUDA_HOST_FLAGS. This is the build
-# configuration used when compiling the code. If
-# blank or unspecified Debug is assumed as this is
-# what CMake does.
-#
-# generated_file:STRING=<> File to generate. This argument must be passed in.
-#
-# generated_cubin_file:STRING=<> File to generate. This argument must be passed
-# in if build_cubin is true.
-
-if(NOT generated_file)
- message(FATAL_ERROR "You must specify generated_file on the command line")
-endif()
-
-# Set these up as variables to make reading the generated file easier
-set(CMAKE_COMMAND "@CMAKE_COMMAND@")
-set(source_file "@source_file@")
-set(NVCC_generated_dependency_file "@NVCC_generated_dependency_file@")
-set(cmake_dependency_file "@cmake_dependency_file@")
-set(CUDA_make2cmake "@CUDA_make2cmake@")
-set(CUDA_parse_cubin "@CUDA_parse_cubin@")
-set(build_cubin @build_cubin@)
-# We won't actually use these variables for now, but we need to set this, in
-# order to force this file to be run again if it changes.
-set(generated_file_path "@generated_file_path@")
-set(generated_file_internal "@generated_file@")
-set(generated_cubin_file_internal "@generated_cubin_file@")
-
-set(CUDA_NVCC_EXECUTABLE "@CUDA_NVCC_EXECUTABLE@")
-set(CUDA_NVCC_FLAGS "@CUDA_NVCC_FLAGS@;;@CUDA_WRAP_OPTION_NVCC_FLAGS@")
-@CUDA_NVCC_FLAGS_CONFIG@
-set(nvcc_flags "@nvcc_flags@")
-set(CUDA_NVCC_INCLUDE_ARGS "@CUDA_NVCC_INCLUDE_ARGS@")
-set(format_flag "@format_flag@")
-
-if(build_cubin AND NOT generated_cubin_file)
- message(FATAL_ERROR "You must specify generated_cubin_file on the command line")
-endif()
-
-# This is the list of host compilation flags. It C or CXX should already have
-# been chosen by FindCUDA.cmake.
-@CUDA_HOST_FLAGS@
-
-# Take the compiler flags and package them up to be sent to the compiler via -Xcompiler
-set(nvcc_host_compiler_flags "")
-# If we weren't given a build_configuration, use Debug.
-if(NOT build_configuration)
- set(build_configuration Debug)
-endif()
-string(TOUPPER "${build_configuration}" build_configuration)
-#message("CUDA_NVCC_HOST_COMPILER_FLAGS = ${CUDA_NVCC_HOST_COMPILER_FLAGS}")
-foreach(flag ${CMAKE_HOST_FLAGS} ${CMAKE_HOST_FLAGS_${build_configuration}})
- # Extra quotes are added around each flag to help nvcc parse out flags with spaces.
- set(nvcc_host_compiler_flags "${nvcc_host_compiler_flags},\"${flag}\"")
-endforeach()
-if (nvcc_host_compiler_flags)
- set(nvcc_host_compiler_flags "-Xcompiler" ${nvcc_host_compiler_flags})
-endif()
-#message("nvcc_host_compiler_flags = \"${nvcc_host_compiler_flags}\"")
-# Add the build specific configuration flags
-list(APPEND CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS_${build_configuration}})
-
-if(DEFINED CCBIN)
- set(CCBIN -ccbin "${CCBIN}")
-endif()
-
-# cuda_execute_process - Executes a command with optional command echo and status message.
-#
-# status - Status message to print if verbose is true
-# command - COMMAND argument from the usual execute_process argument structure
-# ARGN - Remaining arguments are the command with arguments
-#
-# CUDA_result - return value from running the command
-#
-# Make this a macro instead of a function, so that things like RESULT_VARIABLE
-# and other return variables are present after executing the process.
-macro(cuda_execute_process status command)
- set(_command ${command})
- if(NOT _command STREQUAL "COMMAND")
- message(FATAL_ERROR "Malformed call to cuda_execute_process. Missing COMMAND as second argument. (command = ${command})")
- endif()
- if(verbose)
- execute_process(COMMAND "${CMAKE_COMMAND}" -E echo -- ${status})
- # Now we need to build up our command string. We are accounting for quotes
- # and spaces, anything else is left up to the user to fix if they want to
- # copy and paste a runnable command line.
- set(cuda_execute_process_string)
- foreach(arg ${ARGN})
- # If there are quotes, excape them, so they come through.
- string(REPLACE "\"" "\\\"" arg ${arg})
- # Args with spaces need quotes around them to get them to be parsed as a single argument.
- if(arg MATCHES " ")
- list(APPEND cuda_execute_process_string "\"${arg}\"")
- else()
- list(APPEND cuda_execute_process_string ${arg})
- endif()
- endforeach()
- # Echo the command
- execute_process(COMMAND ${CMAKE_COMMAND} -E echo ${cuda_execute_process_string})
- endif(verbose)
- # Run the command
- execute_process(COMMAND ${ARGN} RESULT_VARIABLE CUDA_result )
-endmacro()
-
-# Delete the target file
-cuda_execute_process(
- "Removing ${generated_file}"
- COMMAND "${CMAKE_COMMAND}" -E remove "${generated_file}"
- )
-
-# For CUDA 2.3 and below, -G -M doesn't work, so remove the -G flag
-# for dependency generation and hope for the best.
-set(depends_CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS}")
-set(CUDA_VERSION @CUDA_VERSION@)
-if(CUDA_VERSION VERSION_LESS "3.0")
- cmake_policy(PUSH)
- # CMake policy 0007 NEW states that empty list elements are not
- # ignored. I'm just setting it to avoid the warning that's printed.
- cmake_policy(SET CMP0007 NEW)
- # Note that this will remove all occurances of -G.
- list(REMOVE_ITEM depends_CUDA_NVCC_FLAGS "-G")
- cmake_policy(POP)
-endif()
-
-# nvcc doesn't define __CUDACC__ for some reason when generating dependency files. This
-# can cause incorrect dependencies when #including files based on this macro which is
-# defined in the generating passes of nvcc invokation. We will go ahead and manually
-# define this for now until a future version fixes this bug.
-set(CUDACC_DEFINE -D__CUDACC__)
-
-# Generate the dependency file
-cuda_execute_process(
- "Generating dependency file: ${NVCC_generated_dependency_file}"
- COMMAND "${CUDA_NVCC_EXECUTABLE}"
- -M
- ${CUDACC_DEFINE}
- "${source_file}"
- -o "${NVCC_generated_dependency_file}"
- ${CCBIN}
- ${nvcc_flags}
- ${nvcc_host_compiler_flags}
- ${depends_CUDA_NVCC_FLAGS}
- -DNVCC
- ${CUDA_NVCC_INCLUDE_ARGS}
- )
-
-if(CUDA_result)
- message(FATAL_ERROR "Error generating ${generated_file}")
-endif()
-
-# Generate the cmake readable dependency file to a temp file. Don't put the
-# quotes just around the filenames for the input_file and output_file variables.
-# CMake will pass the quotes through and not be able to find the file.
-cuda_execute_process(
- "Generating temporary cmake readable file: ${cmake_dependency_file}.tmp"
- COMMAND "${CMAKE_COMMAND}"
- -D "input_file:FILEPATH=${NVCC_generated_dependency_file}"
- -D "output_file:FILEPATH=${cmake_dependency_file}.tmp"
- -P "${CUDA_make2cmake}"
- )
-
-if(CUDA_result)
- message(FATAL_ERROR "Error generating ${generated_file}")
-endif()
-
-# Copy the file if it is different
-cuda_execute_process(
- "Copy if different ${cmake_dependency_file}.tmp to ${cmake_dependency_file}"
- COMMAND "${CMAKE_COMMAND}" -E copy_if_different "${cmake_dependency_file}.tmp" "${cmake_dependency_file}"
- )
-
-if(CUDA_result)
- message(FATAL_ERROR "Error generating ${generated_file}")
-endif()
-
-# Delete the temporary file
-cuda_execute_process(
- "Removing ${cmake_dependency_file}.tmp and ${NVCC_generated_dependency_file}"
- COMMAND "${CMAKE_COMMAND}" -E remove "${cmake_dependency_file}.tmp" "${NVCC_generated_dependency_file}"
- )
-
-if(CUDA_result)
- message(FATAL_ERROR "Error generating ${generated_file}")
-endif()
-
-# Generate the code
-cuda_execute_process(
- "Generating ${generated_file}"
- COMMAND "${CUDA_NVCC_EXECUTABLE}"
- "${source_file}"
- ${format_flag} -o "${generated_file}"
- ${CCBIN}
- ${nvcc_flags}
- ${nvcc_host_compiler_flags}
- ${CUDA_NVCC_FLAGS}
- -DNVCC
- ${CUDA_NVCC_INCLUDE_ARGS}
- )
-
-if(CUDA_result)
- # Since nvcc can sometimes leave half done files make sure that we delete the output file.
- cuda_execute_process(
- "Removing ${generated_file}"
- COMMAND "${CMAKE_COMMAND}" -E remove "${generated_file}"
- )
- message(FATAL_ERROR "Error generating file ${generated_file}")
-else()
- if(verbose)
- message("Generated ${generated_file} successfully.")
- endif()
-endif()
-
-# Cubin resource report commands.
-if( build_cubin )
- # Run with -cubin to produce resource usage report.
- cuda_execute_process(
- "Generating ${generated_cubin_file}"
- COMMAND "${CUDA_NVCC_EXECUTABLE}"
- "${source_file}"
- ${CUDA_NVCC_FLAGS}
- ${nvcc_flags}
- ${CCBIN}
- ${nvcc_host_compiler_flags}
- -DNVCC
- -cubin
- -o "${generated_cubin_file}"
- ${CUDA_NVCC_INCLUDE_ARGS}
- )
-
- # Execute the parser script.
- cuda_execute_process(
- "Executing the parser script"
- COMMAND "${CMAKE_COMMAND}"
- -D "input_file:STRING=${generated_cubin_file}"
- -P "${CUDA_parse_cubin}"
- )
-
-endif( build_cubin )
-# Try to find the git version control tool
-#
# The module defines the following variables:
-#
-# Git_EXECUTABLE - path the the git executable
-# Git_VERSION - git version
-# Git_FOUND - tru if git was found, false otherwise
-#
-# Author: Szilard Pall (pszilard@cbr.su.se)
+# GIT_EXECUTABLE - path to git command line client
+# GIT_FOUND - true if the command line client was found
+# Example usage:
+# find_package(Git)
+# if(GIT_FOUND)
+# message("git found: ${GIT_EXECUTABLE}")
+# endif()
-if(Git_EXECUTABLE AND Git_VERSION)
- set(Git_FIND_QUIETLY TRUE)
-endif()
+#=============================================================================
+# Copyright 2010 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
-# search for git binary
-find_program(Git_EXECUTABLE git
- PATHS ENV PATH
- CACHE DOC "Git version control tool")
+# Look for 'git' or 'eg' (easy git)
+#
+set(git_names git eg)
-if(NOT Git_EXECUTABLE)
- set(_err_msg "Git executable not found")
- if(Git_FIND_REQUIRED)
- message(FATAL_ERROR " ${_err_msg}")
- elseif(NOT Git_FIND_QUIETLY)
- message("${_err_msg}")
- endif()
+# Prefer .cmd variants on Windows unless running in a Makefile
+# in the MSYS shell.
+#
+if(WIN32)
+ if(NOT CMAKE_GENERATOR MATCHES "MSYS")
+ set(git_names git.cmd git eg.cmd eg)
+ endif()
endif()
-# parse version
-if(Git_EXECUTABLE AND NOT Git_VERSION)
- execute_process(COMMAND ${Git_EXECUTABLE} "--version"
- OUTPUT_VARIABLE _exec_out
- OUTPUT_STRIP_TRAILING_WHITESPACE)
- string(REGEX REPLACE "git version (.*)" "\\1" Git_VERSION ${_exec_out})
- set(Git_VERSION ${Git_VERSION} CACHE STRING "Git version")
-
- # check version
- set(_git_version_ok TRUE)
- # this should at some point become VERSION_EQUAL
- if(Git_FIND_VERSION_EXACT AND NOT Git_VERSION STREQUAL Git_FIND_VERSION)
- set(_err_msg "Found git version ${Git_VERSION} but this does not match the requested ${Git_FIND_VERSION}")
- if(Git_FIND_REQUIRED)
- message(FATAL_ERROR " ${_err_msg}")
- elseif(NOT Git_FIND_QUIETLY)
- message("${_err_msg}")
- endif()
- set(_git_version_ok FALSE)
- endif()
- # this should at some point become VERSION_LESS
- if(Git_FIND_VERSION AND Git_VERSION STRLESS Git_FIND_VERSION)
- set(_err_msg "Found git version ${Git_VERSION} but this is less then the requested ${Git_FIND_VERSION}")
- if(Git_FIND_REQUIRED)
- message(FATAL_ERROR " ${_err_msg}")
- elseif(NOT Git_FIND_QUIETLY)
- message("${_err_msg}")
- endif()
- set(_git_version_ok FALSE)
- endif()
+find_program(GIT_EXECUTABLE
+ NAMES ${git_names}
+ DOC "git command line client"
+ )
+mark_as_advanced(GIT_EXECUTABLE)
-endif()
-set(Git_FOUND True)
-include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(Git DEFAULT_MSG
- Git_EXECUTABLE
- Git_VERSION
- _git_version_ok)
+# Handle the QUIETLY and REQUIRED arguments and set GIT_FOUND to TRUE if
+# all listed variables are TRUE
-mark_as_advanced(Git_EXECUTABLE Git_VERSION)
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(Git DEFAULT_MSG GIT_EXECUTABLE)
if(_libraries_work)
# Test this combination of libraries.
if(UNIX AND BLA_STATIC)
- set(CMAKE_REQUIRED_LIBRARIES ${_flags} "-Wl,--start-group ${${LIBRARIES}} ${_blas};-Wl,--end-group" ${_threads})
+ set(CMAKE_REQUIRED_LIBRARIES ${_flags} "-Wl,--start-group ${${LIBRARIES}} ${_blas} -Wl,--end-group" ${_threads})
else(UNIX AND BLA_STATIC)
set(CMAKE_REQUIRED_LIBRARIES ${_flags} ${${LIBRARIES}} ${_blas} ${_threads})
endif(UNIX AND BLA_STATIC)
+++ /dev/null
-# - Try to find the LibXml2 xml processing library
-# Once done this will define
-#
-# LIBXML2_FOUND - System has LibXml2
-# LIBXML2_INCLUDE_DIR - The LibXml2 include directory
-# LIBXML2_LIBRARIES - The libraries needed to use LibXml2
-# LIBXML2_DEFINITIONS - Compiler switches required for using LibXml2
-# LIBXML2_XMLLINT_EXECUTABLE - The XML checking tool xmllint coming with LibXml2
-
-#=============================================================================
-# Copyright 2006-2009 Kitware, Inc.
-# Copyright 2006 Alexander Neundorf <neundorf@kde.org>
-#
-# Distributed under the OSI-approved BSD License (the "License");
-# see accompanying file Copyright.txt for details.
-#
-# This software is distributed WITHOUT ANY WARRANTY; without even the
-# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the License for more information.
-#=============================================================================
-# (To distributed this file outside of CMake, substitute the full
-# License text for the above reference.)
-
-# use pkg-config to get the directories and then use these values
-# in the FIND_PATH() and FIND_LIBRARY() calls
-FIND_PACKAGE(PkgConfig)
-PKG_CHECK_MODULES(PC_LIBXML libxml-2.0)
-SET(LIBXML2_DEFINITIONS ${PC_LIBXML_CFLAGS_OTHER})
-
-FIND_PATH(LIBXML2_INCLUDE_DIR NAMES libxml/xpath.h
- HINTS
- ${PC_LIBXML_INCLUDEDIR}
- ${PC_LIBXML_INCLUDE_DIRS}
- PATH_SUFFIXES libxml2
- )
-
-FIND_LIBRARY(LIBXML2_LIBRARIES NAMES xml2 libxml2
- HINTS
- ${PC_LIBXML_LIBDIR}
- ${PC_LIBXML_LIBRARY_DIRS}
- )
-
-FIND_PROGRAM(LIBXML2_XMLLINT_EXECUTABLE xmllint)
-# for backwards compat. with KDE 4.0.x:
-SET(XMLLINT_EXECUTABLE "${LIBXML2_XMLLINT_EXECUTABLE}")
-
-# handle the QUIETLY and REQUIRED arguments and set LIBXML2_FOUND to TRUE if
-# all listed variables are TRUE
-INCLUDE(FindPackageHandleStandardArgs)
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(LibXml2 DEFAULT_MSG LIBXML2_LIBRARIES LIBXML2_INCLUDE_DIR)
-
-MARK_AS_ADVANCED(LIBXML2_INCLUDE_DIR LIBXML2_LIBRARIES LIBXML2_XMLLINT_EXECUTABLE)
-
+++ /dev/null
-# - Message Passing Interface (MPI) module.
-#
-# The Message Passing Interface (MPI) is a library used to write
-# high-performance parallel applications that use message passing, and
-# is typically deployed on a cluster. MPI is a standard interface
-# (defined by the MPI forum) for which many implementations are
-# available. All of these implementations have somewhat different
-# compilation approaches (different include paths, libraries to link
-# against, etc.), and this module tries to smooth out those differences.
-#
-# This module will set the following variables:
-# MPI_FOUND TRUE if we have found MPI
-# MPI_COMPILE_FLAGS Compilation flags for MPI programs
-# MPI_INCLUDE_PATH Include path(s) for MPI header
-# MPI_LINK_FLAGS Linking flags for MPI programs
-# MPI_LIBRARY First MPI library to link against (cached)
-# MPI_EXTRA_LIBRARY Extra MPI libraries to link against (cached)
-# MPI_LIBRARIES All libraries to link MPI programs against
-# MPIEXEC Executable for running MPI programs
-# MPIEXEC_NUMPROC_FLAG Flag to pass to MPIEXEC before giving it the
-# number of processors to run on
-# MPIEXEC_PREFLAGS Flags to pass to MPIEXEC directly before the
-# executable to run.
-# MPIEXEC_POSTFLAGS Flags to pass to MPIEXEC after all other flags.
-#
-# This module will attempt to auto-detect these settings, first by
-# looking for a MPI compiler, which many MPI implementations provide
-# as a pass-through to the native compiler to simplify the compilation
-# of MPI programs. The MPI compiler is stored in the cache variable
-# MPI_COMPILER, and will attempt to look for commonly-named drivers
-# mpic++, mpicxx, mpiCC, or mpicc. If the compiler driver is found and
-# recognized, it will be used to set all of the module variables. To
-# skip this auto-detection, set MPI_LIBRARY and MPI_INCLUDE_PATH in
-# the CMake cache.
-#
-# If no compiler driver is found or the compiler driver is not
-# recognized, this module will then search for common include paths
-# and library names to try to detect MPI.
-#
-# If CMake initially finds a different MPI than was intended, and you
-# want to use the MPI compiler auto-detection for a different MPI
-# implementation, set MPI_COMPILER to the MPI compiler driver you want
-# to use (e.g., mpicxx) and then set MPI_LIBRARY to the string
-# MPI_LIBRARY-NOTFOUND. When you re-configure, auto-detection of MPI
-# will run again with the newly-specified MPI_COMPILER.
-#
-# When using MPIEXEC to execute MPI applications, you should typically
-# use all of the MPIEXEC flags as follows:
-# ${MPIEXEC} ${MPIEXEC_NUMPROC_FLAG} PROCS ${MPIEXEC_PREFLAGS} EXECUTABLE
-# ${MPIEXEC_POSTFLAGS} ARGS
-# where PROCS is the number of processors on which to execute the program,
-# EXECUTABLE is the MPI program, and ARGS are the arguments to pass to the
-# MPI program.
-
-#=============================================================================
-# Copyright 2001-2009 Kitware, Inc.
-#
-# Distributed under the OSI-approved BSD License (the "License");
-# see accompanying file Copyright.txt for details.
-#
-# This software is distributed WITHOUT ANY WARRANTY; without even the
-# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the License for more information.
-#=============================================================================
-# (To distributed this file outside of CMake, substitute the full
-# License text for the above reference.)
-
-# This module is maintained by David Partyka <dave.partyka@kitware.com>.
-
-# A set of directories to search through in addition to the standard system paths
-# that find_program will search through.
-# Microsoft HPC SDK is automatically added to the system path
-# Argonne National Labs MPICH2 sets a registry key that we can use.
-
-TRY_COMPILE(MPI_FOUND ${CMAKE_BINARY_DIR}
- "${CMAKE_SOURCE_DIR}/cmake/TestMPI.c"
- COMPILE_DEFINITIONS )
-
-if(MPI_FOUND)
- return()
-endif()
-
-set(_MPI_PACKAGE_DIR
- mpi
- mpich
- openmpi
- lib/mpi
- lib/mpich
- lib/openmpi
- "MPICH/SDK"
- "Microsoft Compute Cluster Pack"
- )
-
-set(_MPI_PREFIX_PATH)
-if(WIN32)
- list(APPEND _MPI_PREFIX_PATH "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MPICH\\SMPD;binary]/..")
- list(APPEND _MPI_PREFIX_PATH "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MPICH2;Path]")
-endif()
-
-foreach(SystemPrefixDir ${CMAKE_SYSTEM_PREFIX_PATH})
- foreach(MpiPackageDir ${_MPI_PREFIX_PATH})
- if(EXISTS ${SystemPrefixDir}/${MpiPackageDir})
- list(APPEND _MPI_PREFIX_PATH "${SystemPrefixDir}/${MpiPackageDir}")
- endif()
- endforeach(MpiPackageDir)
-endforeach(SystemPrefixDir)
-
-# Most mpi distros have some form of mpiexec which gives us something we can reliably look for.
-find_program(MPIEXEC
- NAMES mpiexec mpirun lamexec
- PATHS ${_MPI_PREFIX_PATH}
- PATH_SUFFIXES bin
- DOC "Executable for running MPI programs."
- )
-
-# call get_filename_component twice to remove mpiexec and the directory it exists in (typically bin).
-# This gives us a fairly reliable base directory to search for /bin /lib and /include from.
-get_filename_component(_MPI_BASE_DIR "${MPIEXEC}" PATH)
-get_filename_component(_MPI_BASE_DIR "${_MPI_BASE_DIR}" PATH)
-
-# If there is an mpi compiler find it and interogate (farther below) it for the include
-# and lib dirs otherwise we will continue to search from ${_MPI_BASE_DIR}.
-find_program(MPI_COMPILER
- NAMES mpic++ mpicxx mpiCC mpicc
- HINTS "${_MPI_BASE_DIR}"
- PATH_SUFFIXES bin
- DOC "MPI compiler. Used only to detect MPI compilation flags.")
-mark_as_advanced(MPI_COMPILER)
-
-set(MPIEXEC_NUMPROC_FLAG "-np" CACHE STRING "Flag used by MPI to specify the number of processes for MPIEXEC; the next option will be the number of processes.")
-set(MPIEXEC_PREFLAGS "" CACHE STRING "These flags will be directly before the executable that is being run by MPIEXEC.")
-set(MPIEXEC_POSTFLAGS "" CACHE STRING "These flags will come after all flags given to MPIEXEC.")
-set(MPIEXEC_MAX_NUMPROCS "2" CACHE STRING "Maximum number of processors available to run MPI applications.")
-mark_as_advanced(MPIEXEC MPIEXEC_NUMPROC_FLAG MPIEXEC_PREFLAGS
- MPIEXEC_POSTFLAGS MPIEXEC_MAX_NUMPROCS)
-
-if (MPI_INCLUDE_PATH AND MPI_LIBRARY)
- # Do nothing: we already have MPI_INCLUDE_PATH and MPI_LIBRARY in
- # the cache, and we don't want to override those settings.
-elseif (MPI_COMPILER)
- # Check whether the -showme:compile option works. This indicates
- # that we have either Open MPI or a newer version of LAM-MPI, and
- # implies that -showme:link will also work.
- # Note that Windows distros do not have an mpi compiler to interogate.
- exec_program(${MPI_COMPILER}
- ARGS -showme:compile
- OUTPUT_VARIABLE MPI_COMPILE_CMDLINE
- RETURN_VALUE MPI_COMPILER_RETURN)
-
- if (MPI_COMPILER_RETURN EQUAL 0)
- # If we appear to have -showme:compile, then we should also have
- # -showme:link. Try it.
- exec_program(${MPI_COMPILER}
- ARGS -showme:link
- OUTPUT_VARIABLE MPI_LINK_CMDLINE
- RETURN_VALUE MPI_COMPILER_RETURN)
-
- # Note that we probably have -showme:incdirs and -showme:libdirs
- # as well.
- set(MPI_COMPILER_MAY_HAVE_INCLIBDIRS TRUE)
- endif (MPI_COMPILER_RETURN EQUAL 0)
-
- if (MPI_COMPILER_RETURN EQUAL 0)
- # Do nothing: we have our command lines now
- else (MPI_COMPILER_RETURN EQUAL 0)
- # Older versions of LAM-MPI have "-showme". Try it.
- exec_program(${MPI_COMPILER}
- ARGS -showme
- OUTPUT_VARIABLE MPI_COMPILE_CMDLINE
- RETURN_VALUE MPI_COMPILER_RETURN)
- endif (MPI_COMPILER_RETURN EQUAL 0)
-
- if (MPI_COMPILER_RETURN EQUAL 0)
- # Do nothing: we have our command lines now
- else (MPI_COMPILER_RETURN EQUAL 0)
- # MPICH uses "-show". Try it.
- exec_program(${MPI_COMPILER}
- ARGS -show
- OUTPUT_VARIABLE MPI_COMPILE_CMDLINE
- RETURN_VALUE MPI_COMPILER_RETURN)
- endif (MPI_COMPILER_RETURN EQUAL 0)
-
- if (MPI_COMPILER_RETURN EQUAL 0)
- # We have our command lines, but we might need to copy
- # MPI_COMPILE_CMDLINE into MPI_LINK_CMDLINE, if the underlying
- if (NOT MPI_LINK_CMDLINE)
- SET(MPI_LINK_CMDLINE ${MPI_COMPILE_CMDLINE})
- endif (NOT MPI_LINK_CMDLINE)
- else (MPI_COMPILER_RETURN EQUAL 0)
- message(STATUS "Unable to determine MPI from MPI driver ${MPI_COMPILER}")
- endif (MPI_COMPILER_RETURN EQUAL 0)
-endif (MPI_INCLUDE_PATH AND MPI_LIBRARY)
-
-if (MPI_INCLUDE_PATH AND MPI_LIBRARY)
- # Do nothing: we already have MPI_INCLUDE_PATH and MPI_LIBRARY in
- # the cache, and we don't want to override those settings.
-elseif (MPI_COMPILE_CMDLINE)
- # Extract compile flags from the compile command line.
- string(REGEX MATCHALL "-D([^\" ]+|\"[^\"]+\")" MPI_ALL_COMPILE_FLAGS "${MPI_COMPILE_CMDLINE}")
- set(MPI_COMPILE_FLAGS_WORK)
- foreach(FLAG ${MPI_ALL_COMPILE_FLAGS})
- if (MPI_COMPILE_FLAGS_WORK)
- set(MPI_COMPILE_FLAGS_WORK "${MPI_COMPILE_FLAGS_WORK} ${FLAG}")
- else(MPI_COMPILE_FLAGS_WORK)
- set(MPI_COMPILE_FLAGS_WORK ${FLAG})
- endif(MPI_COMPILE_FLAGS_WORK)
- endforeach(FLAG)
-
- # Extract include paths from compile command line
- string(REGEX MATCHALL "-I([^\" ]+|\"[^\"]+\")" MPI_ALL_INCLUDE_PATHS "${MPI_COMPILE_CMDLINE}")
- set(MPI_INCLUDE_PATH_WORK)
- foreach(IPATH ${MPI_ALL_INCLUDE_PATHS})
- string(REGEX REPLACE "^-I" "" IPATH ${IPATH})
- string(REGEX REPLACE "//" "/" IPATH ${IPATH})
- list(APPEND MPI_INCLUDE_PATH_WORK ${IPATH})
- endforeach(IPATH)
-
- if (NOT MPI_INCLUDE_PATH_WORK)
- if (MPI_COMPILER_MAY_HAVE_INCLIBDIRS)
- # The compile command line didn't have any include paths on it,
- # but we may have -showme:incdirs. Use it.
- exec_program(${MPI_COMPILER}
- ARGS -showme:incdirs
- OUTPUT_VARIABLE MPI_INCLUDE_PATH_WORK
- RETURN_VALUE MPI_COMPILER_RETURN)
- separate_arguments(MPI_INCLUDE_PATH_WORK)
- endif (MPI_COMPILER_MAY_HAVE_INCLIBDIRS)
- endif (NOT MPI_INCLUDE_PATH_WORK)
-
- if (NOT MPI_INCLUDE_PATH_WORK)
- # If all else fails, just search for mpi.h in the normal include
- # paths.
- find_path(MPI_INCLUDE_PATH mpi.h
- HINTS ${_MPI_BASE_DIR} ${_MPI_PREFIX_PATH}
- PATH_SUFFIXES include
- )
- set(MPI_INCLUDE_PATH_WORK ${MPI_INCLUDE_PATH})
- endif (NOT MPI_INCLUDE_PATH_WORK)
-
- # Extract linker paths from the link command line
- string(REGEX MATCHALL "-L([^\" ]+|\"[^\"]+\")" MPI_ALL_LINK_PATHS "${MPI_LINK_CMDLINE}")
- set(MPI_LINK_PATH)
- foreach(LPATH ${MPI_ALL_LINK_PATHS})
- string(REGEX REPLACE "^-L" "" LPATH ${LPATH})
- string(REGEX REPLACE "//" "/" LPATH ${LPATH})
- list(APPEND MPI_LINK_PATH ${LPATH})
- endforeach(LPATH)
-
- if (NOT MPI_LINK_PATH)
- if (MPI_COMPILER_MAY_HAVE_INCLIBDIRS)
- # The compile command line didn't have any linking paths on it,
- # but we may have -showme:libdirs. Use it.
- exec_program(${MPI_COMPILER}
- ARGS -showme:libdirs
- OUTPUT_VARIABLE MPI_LINK_PATH
- RETURN_VALUE MPI_COMPILER_RETURN)
- separate_arguments(MPI_LINK_PATH)
- endif (MPI_COMPILER_MAY_HAVE_INCLIBDIRS)
- endif (NOT MPI_LINK_PATH)
-
- # Extract linker flags from the link command line
- string(REGEX MATCHALL "-Wl,([^\" ]+|\"[^\"]+\")" MPI_ALL_LINK_FLAGS "${MPI_LINK_CMDLINE}")
- set(MPI_LINK_FLAGS_WORK)
- foreach(FLAG ${MPI_ALL_LINK_FLAGS})
- if (MPI_LINK_FLAGS_WORK)
- set(MPI_LINK_FLAGS_WORK "${MPI_LINK_FLAGS_WORK} ${FLAG}")
- else(MPI_LINK_FLAGS_WORK)
- set(MPI_LINK_FLAGS_WORK ${FLAG})
- endif(MPI_LINK_FLAGS_WORK)
- endforeach(FLAG)
-
- # Extract the set of libraries to link against from the link command
- # line
- string(REGEX MATCHALL "-l([^\" ]+|\"[^\"]+\")" MPI_LIBNAMES "${MPI_LINK_CMDLINE}")
-
- # Determine full path names for all of the libraries that one needs
- # to link against in an MPI program
- set(MPI_LIBRARIES)
- foreach(LIB ${MPI_LIBNAMES})
- string(REGEX REPLACE "^-l" "" LIB ${LIB})
- set(MPI_LIB "MPI_LIB-NOTFOUND" CACHE FILEPATH "Cleared" FORCE)
- find_library(MPI_LIB ${LIB} HINTS ${MPI_LINK_PATH})
- if (MPI_LIB)
- list(APPEND MPI_LIBRARIES ${MPI_LIB})
- else (MPI_LIB)
- message(SEND_ERROR "Unable to find MPI library ${LIB}")
- endif (MPI_LIB)
- endforeach(LIB)
- set(MPI_LIB "MPI_LIB-NOTFOUND" CACHE INTERNAL "Scratch variable for MPI detection" FORCE)
-
- # Chop MPI_LIBRARIES into the old-style MPI_LIBRARY and
- # MPI_EXTRA_LIBRARY.
- list(LENGTH MPI_LIBRARIES MPI_NUMLIBS)
- list(LENGTH MPI_LIBNAMES MPI_NUMLIBS_EXPECTED)
- if (MPI_NUMLIBS EQUAL MPI_NUMLIBS_EXPECTED)
- list(GET MPI_LIBRARIES 0 MPI_LIBRARY_WORK)
- set(MPI_LIBRARY ${MPI_LIBRARY_WORK} CACHE FILEPATH "MPI library to link against" FORCE)
- else (MPI_NUMLIBS EQUAL MPI_NUMLIBS_EXPECTED)
- set(MPI_LIBRARY "MPI_LIBRARY-NOTFOUND" CACHE FILEPATH "MPI library to link against" FORCE)
- endif (MPI_NUMLIBS EQUAL MPI_NUMLIBS_EXPECTED)
- if (MPI_NUMLIBS GREATER 1)
- set(MPI_EXTRA_LIBRARY_WORK ${MPI_LIBRARIES})
- list(REMOVE_AT MPI_EXTRA_LIBRARY_WORK 0)
- set(MPI_EXTRA_LIBRARY ${MPI_EXTRA_LIBRARY_WORK} CACHE STRING "Extra MPI libraries to link against" FORCE)
- else (MPI_NUMLIBS GREATER 1)
- set(MPI_EXTRA_LIBRARY "MPI_EXTRA_LIBRARY-NOTFOUND" CACHE STRING "Extra MPI libraries to link against" FORCE)
- endif (MPI_NUMLIBS GREATER 1)
-
- # Set up all of the appropriate cache entries
- set(MPI_COMPILE_FLAGS ${MPI_COMPILE_FLAGS_WORK} CACHE STRING "MPI compilation flags" FORCE)
- set(MPI_INCLUDE_PATH ${MPI_INCLUDE_PATH_WORK} CACHE STRING "MPI include path" FORCE)
- set(MPI_LINK_FLAGS ${MPI_LINK_FLAGS_WORK} CACHE STRING "MPI linking flags" FORCE)
-else (MPI_COMPILE_CMDLINE)
-# No MPI compiler to interogate so attempt to find everything with find functions.
- find_path(MPI_INCLUDE_PATH mpi.h
- HINTS ${_MPI_BASE_DIR} ${_MPI_PREFIX_PATH}
- PATH_SUFFIXES include
- )
-
- # Decide between 32-bit and 64-bit libraries for Microsoft's MPI
- if("${CMAKE_SIZEOF_VOID_P}" EQUAL 8)
- set(MS_MPI_ARCH_DIR amd64)
- else()
- set(MS_MPI_ARCH_DIR i386)
- endif()
-
- find_library(MPI_LIBRARY
- NAMES mpi mpich msmpi
- HINTS ${_MPI_BASE_DIR} ${_MPI_PREFIX_PATH}
- PATH_SUFFIXES lib lib/${MS_MPI_ARCH_DIR} Lib Lib/${MS_MPI_ARCH_DIR}
- )
-
- find_library(MPI_EXTRA_LIBRARY
- NAMES mpi++
- HINTS ${_MPI_BASE_DIR} ${_MPI_PREFIX_PATH}
- PATH_SUFFIXES lib
- DOC "Extra MPI libraries to link against.")
-
- set(MPI_COMPILE_FLAGS "" CACHE STRING "MPI compilation flags")
- set(MPI_LINK_FLAGS "" CACHE STRING "MPI linking flags")
-endif (MPI_INCLUDE_PATH AND MPI_LIBRARY)
-
-# on BlueGene/L the MPI lib is named libmpich.rts.a, there also these additional libs are required
-if("${MPI_LIBRARY}" MATCHES "mpich.rts")
- set(MPI_EXTRA_LIBRARY ${MPI_EXTRA_LIBRARY} msglayer.rts devices.rts rts.rts devices.rts)
- set(MPI_LIBRARY ${MPI_LIBRARY} msglayer.rts devices.rts rts.rts devices.rts)
-endif("${MPI_LIBRARY}" MATCHES "mpich.rts")
-
-# Set up extra variables to conform to
-if (MPI_EXTRA_LIBRARY)
- set(MPI_LIBRARIES ${MPI_LIBRARY} ${MPI_EXTRA_LIBRARY})
-else (MPI_EXTRA_LIBRARY)
- set(MPI_LIBRARIES ${MPI_LIBRARY})
-endif (MPI_EXTRA_LIBRARY)
-
-if (MPI_INCLUDE_PATH AND MPI_LIBRARY)
- set(MPI_FOUND TRUE)
-else (MPI_INCLUDE_PATH AND MPI_LIBRARY)
- set(MPI_FOUND FALSE)
-endif (MPI_INCLUDE_PATH AND MPI_LIBRARY)
-
-include(FindPackageHandleStandardArgs)
-# handle the QUIETLY and REQUIRED arguments
-find_package_handle_standard_args(MPI DEFAULT_MSG MPI_LIBRARY MPI_INCLUDE_PATH)
-
-mark_as_advanced(MPI_INCLUDE_PATH MPI_COMPILE_FLAGS MPI_LINK_FLAGS MPI_LIBRARY
- MPI_EXTRA_LIBRARY)
-
-# unset to cleanup namespace
-unset(_MPI_PACKAGE_DIR)
-unset(_MPI_PREFIX_PATH)
-unset(_MPI_BASE_DIR)
# GEN_VERSION_INFO_INTERNAL has to be set ON.
#
# The following variables have to be previously defined:
-# Git_EXECUTABLE - path to git binary
-# Git_VERSION - git version (if not defined it's assumed that >=1.5.3)
+# GIT_EXECUTABLE - path to git binary
+# GIT_VERSION - git version (if not defined it's assumed that >=1.5.3)
# PROJECT_VERSION - hard-coded version string, should have the following structure:
# VERSION[-dev-SUFFIX] where the VERSION can have any form and the suffix
# is optional but should start with -dev
# if git executable xists and it's compatible version
# build the development version string
# this should at some point become VERSION_LESS
-if(EXISTS ${Git_EXECUTABLE} AND NOT Git_VERSION STRLESS "1.5.1")
+if(EXISTS ${GIT_EXECUTABLE} AND NOT ${GIT_VERSION} STRLESS "1.5.1")
# refresh git index
- execute_process(COMMAND ${Git_EXECUTABLE} update-index -q --refresh
+ execute_process(COMMAND ${GIT_EXECUTABLE} update-index -q --refresh
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
TIMEOUT 5
OUTPUT_QUIET
)
# get the full hash of the current HEAD
- execute_process(COMMAND ${Git_EXECUTABLE} rev-parse HEAD
+ execute_process(COMMAND ${GIT_EXECUTABLE} rev-parse HEAD
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
OUTPUT_VARIABLE GMX_GIT_HEAD_HASH
ERROR_VARIABLE EXEC_ERR
string(SUBSTRING ${GMX_GIT_HEAD_HASH} 0 5 HEAD_HASH_SHORT)
# if there are local uncommitted changes, the build gets labeled "dirty"
- execute_process(COMMAND ${Git_EXECUTABLE} diff-index --name-only HEAD
+ execute_process(COMMAND ${GIT_EXECUTABLE} diff-index --name-only HEAD
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
OUTPUT_VARIABLE SRC_LOCAL_CHANGES
ERROR_VARIABLE EXEC_ERR
# if git is older then 1.5.3 we need to extract the RFC2822 style date
# and massage it, otherwise the ISO 8601 format is more trusworthy
# this should at some point become VERSION_LESS
- if (NOT Git_VERSION STREQUAL "" AND Git_VERSION STRLESS "1.5.3")
- execute_process(COMMAND ${Git_EXECUTABLE} rev-list -n1 "--pretty=format:%cD" HEAD
+ if (NOT GIT_VERSION STREQUAL "" AND GIT_VERSION STRLESS "1.5.3")
+ execute_process(COMMAND ${GIT_EXECUTABLE} rev-list -n1 "--pretty=format:%cD" HEAD
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
OUTPUT_VARIABLE HEAD_DATE
ERROR_VARIABLE EXEC_ERR
string(REGEX REPLACE "DEC" "12" HEAD_DATE ${HEAD_DATE})
else()
# get the date of the HEAD commit
- execute_process(COMMAND ${Git_EXECUTABLE} rev-list -n1 "--pretty=format:%ci" HEAD
+ execute_process(COMMAND ${GIT_EXECUTABLE} rev-list -n1 "--pretty=format:%ci" HEAD
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
OUTPUT_VARIABLE HEAD_DATE
ERROR_VARIABLE EXEC_ERR
set(VERSION_STR_SUFFIX "${HEAD_DATE}-${HEAD_HASH_SHORT}${DIRTY_STR}")
# find the name of the remote which is located on the official gromacs git server
- execute_process(COMMAND ${Git_EXECUTABLE} config --get-regexp
+ execute_process(COMMAND ${GIT_EXECUTABLE} config --get-regexp
"remote\\..*\\.url" "git\\.gromacs\\.org[:|/]gromacs"
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
OUTPUT_VARIABLE GMX_REMOTE
# find the first ancestor in the list provided by rev-list (not
# necessarily the last though) which is in GMX_REMOTE, extract the
# hash and the number of commits HEAD is ahead with
- execute_process(COMMAND ${Git_EXECUTABLE} rev-list --max-count=100 HEAD
+ execute_process(COMMAND ${GIT_EXECUTABLE} rev-list --max-count=100 HEAD
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
OUTPUT_VARIABLE ANCESTOR_LIST
)
set(AHEAD 0)
set(GMX_GIT_REMOTE_HASH "")
foreach(OBJ ${ANCESTOR_LIST})
- execute_process(COMMAND ${Git_EXECUTABLE} name-rev --refs=refs/remotes/${GMX_REMOTE}/* ${OBJ}
+ execute_process(COMMAND ${GIT_EXECUTABLE} name-rev --refs=refs/remotes/${GMX_REMOTE}/* ${OBJ}
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
OUTPUT_VARIABLE HASH_AND_REVNAME
OUTPUT_STRIP_TRAILING_WHITESPACE
+++ /dev/null
-# - Define macro to check return type of signals (int/void)
-#
-# GMX_TEST_RETSIGTYPE(VARIABLE)
-#
-# VARIABLE will be set to the return type of signals - "int" or "void"
-#
-# Remember to have a cmakedefine for it too...
-
-MACRO(GMX_TEST_RETSIGTYPE VARIABLE)
- IF(NOT DEFINED ${VARIABLE})
-
- MESSAGE(STATUS "Checking for return type of signals")
-
- # First check without any special flags
- TRY_COMPILE(RETSIGTYPE_INT_OK "${CMAKE_BINARY_DIR}"
- "${CMAKE_SOURCE_DIR}/cmake/TestRetSigType.c")
-
- if(RETSIGTYPE_INT_OK)
- MESSAGE(STATUS "Checking for return type of signals - int")
- set(${VARIABLE} "int" CACHE INTERNAL "Result of test for signal return type" FORCE)
- else(RETSIGTYPE_INT_OK)
- MESSAGE(STATUS "Checking for return type of signals - void")
- set(${VARIABLE} "void" CACHE INTERNAL "Result of test for signal return type" FORCE)
- endif(RETSIGTYPE_INT_OK)
-
- ENDIF(NOT DEFINED ${VARIABLE})
-ENDMACRO(GMX_TEST_RETSIGTYPE VARIABLE)
-
-
-
-# - Define macro to check return type of signals (int/void)
-#
-# GMX_TEST_RETSIGTYPE(VARIABLE)
-#
-# VARIABLE will be set to the return type of signals - "int" or "void"
-#
-# Remember to have a cmakedefine for it too...
-
-MACRO(GMX_TEST_RETSIGTYPE VARIABLE)
- IF(NOT DEFINED ${VARIABLE})
-
- MESSAGE(STATUS "Checking for return type of signals")
-
- # First check without any special flags
- TRY_COMPILE(RETSIGTYPE_INT_OK "${CMAKE_BINARY_DIR}"
- "${CMAKE_SOURCE_DIR}/cmake/TestRetSigType.c")
-
- if(RETSIGTYPE_INT_OK)
- MESSAGE(STATUS "Checking for return type of signals - int")
- set(${VARIABLE} "int" CACHE INTERNAL "Result of test for signal return type" FORCE)
- else(RETSIGTYPE_INT_OK)
- MESSAGE(STATUS "Checking for return type of signals - void")
- set(${VARIABLE} "void" CACHE INTERNAL "Result of test for signal return type" FORCE)
- endif(RETSIGTYPE_INT_OK)
-
- ENDIF(NOT DEFINED ${VARIABLE})
-ENDMACRO(GMX_TEST_RETSIGTYPE VARIABLE)
-
-
-
# - Define macro to check if SIGUSR1 is defined
#
# GMX_TEST_SIGUSR1(VARIABLE)
sub pr_order {
my $t = shift;
my $nrepl = shift;
- printf(NDX "%-8g",$t);
+ printf(NDX "%-20g",$t);
for(my $k=0; ($k<$nrepl); $k++) {
my $oo = shift;
printf(NDX " %3d",$oo);
sub pr_revorder {
my $t = shift;
my $nrepl = shift;
- printf(TEMP "%-8g",$t);
+ printf(TEMP "%-20g",$t);
for(my $k=0; ($k<$nrepl); $k++) {
my $oo = shift;
printf(TEMP " %3d",$oo);
nstlog = 5000
nstenergy = 250
nstxtcout = 250
-xtc_grps = Protein
+xtc-grps = Protein
energygrps = Protein SOL
nstlist = 10
-ns_type = grid
+ns-type = grid
rlist = 0.8
coulombtype = cut-off
rcoulomb = 1.4
rvdw = 0.8
tcoupl = Berendsen
tc-grps = Protein SOL
-tau_t = 0.1 0.1
-ref_t = 300 300
+tau-t = 0.1 0.1
+ref-t = 300 300
Pcoupl = Berendsen
-tau_p = 1.0
+tau-p = 1.0
compressibility = 4.5e-5
-ref_p = 1.0
-gen_vel = yes
-gen_temp = 300
-gen_seed = 173529
+ref-p = 1.0
+gen-vel = yes
+gen-temp = 300
+gen-seed = 173529
constraints = all-bonds
</pre>
<hr>
; Force tolerance and initial step-size =
emtol = 100
emstep = 0.01
-; Max number of iterations in relax_shells =
+; Max number of iterations in relax-shells =
niter = 20
; Frequency of steepest descents steps when doing CG =
nstcgsteep = 1000
xtc-precision = 1000
; This selects the subset of atoms for the xtc file. You can =
; select multiple groups. By default all atoms will be written. =
-xtc_grps = Protein
+xtc-grps = Protein
; Selection of energy groups =
energygrps = Protein SOL
; nblist update frequency =
nstlist = 10
; ns algorithm (simple or grid) =
-ns_type = grid
+ns-type = grid
; Periodic boundary conditions: xyz or none =
pbc = xyz
; nblist cut-off =
; Spacing for the PME/PPPM FFT grid =
fourierspacing = 0.12
; FFT grid size, when a value is 0 fourierspacing will be used =
-fourier_nx = 0
-fourier_ny = 0
-fourier_nz = 0
+fourier-nx = 0
+fourier-ny = 0
+fourier-nz = 0
; EWALD/PME/PPPM parameters =
-pme_order = 4
-ewald_rtol = 1e-05
-epsilon_surface = 0
-optimize_fft = no
+pme-order = 4
+ewald-rtol = 1e-05
+epsilon-surface = 0
+optimize-fft = no
; OPTIONS FOR WEAK COUPLING ALGORITHMS =
; Temperature coupling =
; Groups to couple separately =
tc-grps = Protein SOL
; Time constant (ps) and reference temperature (K) =
-tau_t = 0.1 0.1
-ref_t = 300 300
+tau-t = 0.1 0.1
+ref-t = 300 300
; Pressure coupling =
Pcoupl = Berendsen
Pcoupltype = Isotropic
; Time constant (ps), compressibility (1/bar) and reference P (bar) =
-tau_p = 1.0
+tau-p = 1.0
compressibility = 4.5e-5
-ref_p = 1.0
+ref-p = 1.0
; SIMULATED ANNEALING CONTROL =
annealing = no
; Time at which temperature should be zero (ps) =
-zero-temp_time = 0
+zero-temp-time = 0
; GENERATE VELOCITIES FOR STARTUP RUN =
-gen_vel = yes
-gen_temp = 300
-gen_seed = 173529
+gen-vel = yes
+gen-temp = 300
+gen-seed = 173529
; OPTIONS FOR BONDS =
constraints = all-bonds
freezegrps =
freezedim =
cos-acceleration = 0
-energygrp_excl =
+energygrp-excl =
; Electric fields =
; Format is number of terms (int) and for all terms an amplitude (real) =
<li><A HREF="#general"><b>General remarks</b></A>
<p> </p>
<li><A HREF="#pp"><b>preprocessing</b></A> (include, define)
-<li><A HREF="#run"><b>run control</b></A> (integrator, tinit, dt, nsteps, init_step, comm_mode, nstcomm, comm_grps)
-<li><A HREF="#ld"><b>langevin dynamics</b></A> (bd_fric, ld_seed)
+<li><A HREF="#run"><b>run control</b></A> (integrator, tinit, dt, nsteps, init-step, comm-mode, nstcomm, comm-grps)
+<li><A HREF="#ld"><b>langevin dynamics</b></A> (bd-fric, ld-seed)
<li><A HREF="#em"><b>energy minimization</b></A> (emtol, emstep, nstcgsteep)
<li><a HREF="#xmdrun"><b>shell molecular dynamics</b></a>(emtol,niter,fcstep)
<li><a HREF="#tpi"><b>test particle insertion</b></a>(rtpi)
-<li><A HREF="#out"><b>output control</b></A> (nstxout, nstvout, nstfout, nstlog, nstcalcenergy, nstenergy, nstxtcout, xtc_precision, xtc_grps, energygrps)
-<li><A HREF="#nl"><b>neighbor searching</b></A> (nstlist, ns_type, pbc, periodic_molecules, rlist, rlistlong)
-<li><A HREF="#el"><b>electrostatics</b></A> (coulombtype, rcoulomb_switch, rcoulomb, epsilon_r, epsilon_rf)
-<li><A HREF="#vdw"><b>VdW</b></A> (vdwtype, rvdw_switch, rvdw, DispCorr)
-<li><A HREF="#table"><b>tables</b></A> (table-extension, energygrp_table)
-<li><A HREF="#ewald"><b>Ewald</b></A> (fourierspacing, fourier_nx, fourier_ny, fourier_nz, pme_order, ewald_rtol, ewald_geometry, epsilon_surface, optimize_fft)
-<li><A HREF="#tc"><b>Temperature coupling</b></A> (tcoupl, nsttcouple, tc_grps, tau_t, ref_t)
+<li><A HREF="#out"><b>output control</b></A> (nstxout, nstvout, nstfout, nstlog, nstcalcenergy, nstenergy, nstxtcout, xtc-precision, xtc-grps, energygrps)
+<li><A HREF="#nl"><b>neighbor searching</b></A> (nstlist, ns-type, pbc, periodic-molecules, rlist, rlistlong)
+<li><A HREF="#el"><b>electrostatics</b></A> (coulombtype, rcoulomb-switch, rcoulomb, epsilon-r, epsilon-rf)
+<li><A HREF="#vdw"><b>VdW</b></A> (vdwtype, rvdw-switch, rvdw, DispCorr)
+<li><A HREF="#table"><b>tables</b></A> (table-extension, energygrp-table)
+<li><A HREF="#ewald"><b>Ewald</b></A> (fourierspacing, fourier-nx, fourier-ny, fourier-nz, pme-order, ewald-rtol, ewald-geometry, epsilon-surface, optimize-fft)
+<li><A HREF="#tc"><b>Temperature coupling</b></A> (tcoupl, nsttcouple, tc-grps, tau-t, ref-t)
<li><A HREF="#pc"><b>Pressure coupling</b></A> (pcoupl, pcoupltype,
- nstpcouple, tau_p, compressibility, ref_p, refcoord_scaling)
-<li><A HREF="#sa"><b>simulated annealing</b></A> (annealing, annealing_npoints, annealing_time, annealing_temp)
-<li><A HREF="#vel"><b>velocity generation</b></A> (gen_vel, gen_temp, gen_seed)
-<li><A HREF="#bond"><b>bonds</b></A> (constraints, constraint_algorithm, continuation, shake_tol, lincs_order, lincs_iter, lincs_warnangle, morse)
-<li><A HREF="#egexcl"><b>Energy group exclusions</b></A> (energygrp_excl)
-<li><A HREF="#walls"><b>Walls</b></A> (nwall, wall_type, wall_r_linpot, wall_atomtype,
-wall_density, wall_ewald_zfac)
+ nstpcouple, tau-p, compressibility, ref-p, refcoord-scaling)
+<li><A HREF="#sa"><b>simulated annealing</b></A> (annealing, annealing-npoints, annealing-time, annealing-temp)
+<li><A HREF="#vel"><b>velocity generation</b></A> (gen-vel, gen-temp, gen-seed)
+<li><A HREF="#bond"><b>bonds</b></A> (constraints, constraint-algorithm, continuation, shake-tol, lincs-order, lincs-iter, lincs-warnangle, morse)
+<li><A HREF="#egexcl"><b>Energy group exclusions</b></A> (energygrp-excl)
+<li><A HREF="#walls"><b>Walls</b></A> (nwall, wall-type, wall-r-linpot, wall-atomtype,
+wall-density, wall-ewald-zfac)
<li><A HREF="#pull"><b>COM pulling</b></A> (pull, ...)
-<li><A HREF="#nmr"><b>NMR refinement</b></A> (disre, disre_weighting, disre_mixed, disre_fc, disre_tau, nstdisreout, orire, orire_fc, orire_tau, orire_fitgrp, nstorireout)
-<li><A HREF="#free"><b>Free Energy calculations</b></A> (free_energy, init_lambda, delta_lambda, sc_alpha, sc_power, sc_sigma, couple-moltype, couple-lambda0, couple-lambda1, couple-intramol)
-<li><A HREF="#neq"><b>Non-equilibrium MD</b></A> (acc_grps, accelerate, freezegrps, freezedim, cos_acceleration, deform)
-<li><A HREF="#ef"><b>Electric fields</b></A> (E_x, E_xt, E_y, E_yt, E_z, E_zt )
+<li><A HREF="#nmr"><b>NMR refinement</b></A> (disre, disre-weighting, disre-mixed, disre-fc, disre-tau, nstdisreout, orire, orire-fc, orire-tau, orire-fitgrp, nstorireout)
+<li><A HREF="#free"><b>Free Energy calculations</b></A> (free-energy, init-lambda, delta-lambda, sc-alpha, sc-power, sc-sigma, couple-moltype, couple-lambda0, couple-lambda1, couple-intramol)
+<li><A HREF="#neq"><b>Non-equilibrium MD</b></A> (acc-grps, accelerate, freezegrps, freezedim, cos-acceleration, deform)
+<li><A HREF="#ef"><b>Electric fields</b></A> (E-x, E-xt, E-y, E-yt, E-z, E-zt )
<li><A HREF="#qmmm"><b>Mixed quantum/classical dynamics</b></A> (QMMM, QMMM-grps, QMMMscheme, QMmethod, QMbasis, QMcharge, Qmmult, CASorbitals, CASelectrons, SH)
-<li><A HREF="#gbsa"><b>Implicit solvent</b></A> (implicit_solvent, gb_algorithm, nstgbradii, rgbradii, gb_epsilon_solvent, gb_saltconc, gb_obc_alpha, gb_obc_beta, gb_obc_gamma, gb_dielectric_offset, sa_algorithm, sa_surface_tension)
-<li><A HREF="#user"><b>User defined thingies</b></A> (user1_grps, user2_grps, userint1, userint2, userint3, userint4, userreal1, userreal2, userreal3, userreal4)
+<li><A HREF="#gbsa"><b>Implicit solvent</b></A> (implicit-solvent, gb-algorithm, nstgbradii, rgbradii, gb-epsilon-solvent, gb-saltconc, gb-obc-alpha, gb-obc-beta, gb-obc-gamma, gb-dielectric-offset, sa-algorithm, sa-surface-tension)
+<li><A HREF="#user"><b>User defined thingies</b></A> (user1-grps, user2-grps, userint1, userint2, userint3, userint4, userreal1, userreal2, userreal3, userreal4)
<li><A HREF="#idx"><b>Index</b></A>
</ul>
</P>
Depending on the computational cost of the force calculation,
this can take a significant part of the simulation time.
The temperature for one or more groups of atoms
-(<b><A HREF="#tc">tc_grps</A></b>)
-is set with <b><A HREF="#tc">ref_t</A></b> [K],
+(<b><A HREF="#tc">tc-grps</A></b>)
+is set with <b><A HREF="#tc">ref-t</A></b> [K],
the inverse friction constant for each group is set with
-<b><A HREF="#tc">tau_t</A></b> [ps].
+<b><A HREF="#tc">tau-t</A></b> [ps].
The parameter <b><A HREF="#tc">tcoupl</A></b> is ignored.
-The random generator is initialized with <b><A HREF="#ld">ld_seed</A></b>.
-When used as a thermostat, an appropriate value for <b>tau_t</b> is 2 ps,
+The random generator is initialized with <b><A HREF="#ld">ld-seed</A></b>.
+When used as a thermostat, an appropriate value for <b>tau-t</b> is 2 ps,
since this results in a friction that is lower than the internal friction
of water, while it is high enough to remove excess heat
(unless <b>cut-off</b> or <b>reaction-field</b> electrostatics is used).
NOTE: temperature deviations decay twice as fast as with
-a Berendsen thermostat with the same <b>tau_t</b>.</dd>
+a Berendsen thermostat with the same <b>tau-t</b>.</dd>
<dt><b>sd1</b></dt>
<dd> An efficient leap-frog stochastic dynamics integrator.
This integrator is equivalent to <b>sd</b>, except that it requires
only one Gaussian random number and one constraint step.
This integrator is less accurate.
For water the relative error in the temperature with this integrator
-is 0.5 <b>delta_t</b>/<b>tau_t</b>, but for other systems it can be higher.
+is 0.5 <b>delta-t</b>/<b>tau-t</b>, but for other systems it can be higher.
Use with care and check the temperature.</dd>
<dt><b>bd</b></dt>
<dd>An Euler integrator for Brownian or position Langevin dynamics, the
velocity is the force divided by a friction coefficient
-(<b><A HREF="#ld">bd_fric</A></b> [amu ps<sup>-1</sup>])
-plus random thermal noise (<b><A HREF="#tc">ref_t</A></b>).
-When <b><A HREF="#ld">bd_fric</A></b><tt>=0</tt>, the friction coefficient for each
-particle is calculated as mass/<b><A HREF="#tc">tau_t</A></b>, as for the
+(<b><A HREF="#ld">bd-fric</A></b> [amu ps<sup>-1</sup>])
+plus random thermal noise (<b><A HREF="#tc">ref-t</A></b>).
+When <b><A HREF="#ld">bd-fric</A></b><tt>=0</tt>, the friction coefficient for each
+particle is calculated as mass/<b><A HREF="#tc">tau-t</A></b>, as for the
integrator <tt>sd</tt>.
-The random generator is initialized with <b><A HREF="#ld">ld_seed</A></b>.</dd>
+The random generator is initialized with <b><A HREF="#ld">ld-seed</A></b>.</dd>
<dt><b>steep</b></dt>
<dd>A <!--Idx-->steepest descent<!--EIdx--> algorithm for energy
which is only allowed for single-atom molecules).
Since neighborlist construction is expensive, one can perform several
extra insertions with the same list almost for free.
-The random seed is set with <b><A HREF="#ld">ld_seed</A></b>.
+The random seed is set with <b><A HREF="#ld">ld-seed</A></b>.
The temperature for the Boltzmann weighting is set with
-<b><A HREF="#tc">ref_t</A></b>, this should match the temperature
+<b><A HREF="#tc">ref-t</A></b>, this should match the temperature
of the simulation of the original trajectory.
Dispersion correction is implemented correctly for tpi.
All relevant quantities are written to the file specified with
<tt>sd</tt> and <tt>bd</tt>)</dd>
<dt><b>nsteps: (0)</b></dt>
<dd>maximum number of steps to integrate or minimize, -1 is no maximum</dd>
-<dt><b>init_step: (0)</b></dt>
+<dt><b>init-step: (0)</b></dt>
<dd>The starting step.
-The time at an step i in a run is calculated as: t = <tt>tinit</tt> + <tt>dt</tt>*(<tt>init_step</tt> + i).
-The free-energy lambda is calculated as: lambda = <tt>init_lambda</tt> + <tt>delta_lambda</tt>*(<tt>init_step</tt> + i).
+The time at an step i in a run is calculated as: t = <tt>tinit</tt> + <tt>dt</tt>*(<tt>init-step</tt> + i).
+The free-energy lambda is calculated as: lambda = <tt>init-lambda</tt> + <tt>delta-lambda</tt>*(<tt>init-step</tt> + i).
Also non-equilibrium MD parameters can depend on the step number.
Thus for exact restarts or redoing part of a run it might be necessary to
-set <tt>init_step</tt> to the step number of the restart frame.
+set <tt>init-step</tt> to the step number of the restart frame.
<tt>tpbconv</tt> does this automatically.
</dd>
-<dt><b>comm_mode:</b></dt>
+<dt><b>comm-mode:</b></dt>
<dd><dl compact>
<dt><b>Linear</b></dt>
<dd>Remove center of mass translation</dd>
</dl></dd>
<dt><b>nstcomm: (10) [steps]</b></dt>
<dd>frequency for center of mass motion removal</dd>
-<dt><b>comm_grps:</b></dt>
+<dt><b>comm-grps:</b></dt>
<dd>group(s) for center of mass motion removal, default is the whole system</dd>
</dl>
<h3><!--Idx-->Langevin dynamics<!--EIdx--></h3>
<dl>
-<dt><b>bd_fric: (0) [amu ps<sup>-1</sup>]</b></dt>
+<dt><b>bd-fric: (0) [amu ps<sup>-1</sup>]</b></dt>
<dd>Brownian dynamics friction coefficient.
-When <b>bd_fric</b><tt>=0</tt>, the friction coefficient for each
-particle is calculated as mass/<b><A HREF="#tc">tau_t</A></b>.</dd>
-<dt><b>ld_seed: (1993) [integer]</b></dt>
+When <b>bd-fric</b><tt>=0</tt>, the friction coefficient for each
+particle is calculated as mass/<b><A HREF="#tc">tau-t</A></b>.</dd>
+<dt><b>ld-seed: (1993) [integer]</b></dt>
<dd>used to initialize random generator for thermal noise
for stochastic and Brownian dynamics.
-When <b>ld_seed</b> is set to -1, the seed is calculated from the process ID.
+When <b>ld-seed</b> is set to -1, the seed is calculated from the process ID.
When running BD or SD on multiple processors, each processor uses a seed equal
-to <b>ld_seed</b> plus the processor number.</dd>
+to <b>ld-seed</b> plus the processor number.</dd>
</dl>
<A NAME="em"><br>
energy averages and fluctuations also when <b>nstenergy</b><tt>>1</tt></dd>
<dt><b>nstxtcout: (0) [steps]</b></dt>
<dd>frequency to write coordinates to xtc trajectory</dd>
-<dt><b>xtc_precision: (1000) [real]</b></dt>
+<dt><b>xtc-precision: (1000) [real]</b></dt>
<dd>precision to write to xtc trajectory</dd>
-<dt><b>xtc_grps:</b></dt>
+<dt><b>xtc-grps:</b></dt>
<dd>group(s) to write to xtc trajectory, default the whole system is written
(if <b>nstxtcout</b> > 0)</dd>
<dt><b>energygrps:</b></dt>
</dd>
</dl></dd>
-<dt><b>ns_type:</b></dt>
+<dt><b>ns-type:</b></dt>
<dd><dl compact>
<dt><b>grid</b></dt>
<dd>Make a grid in the box and only check atoms in neighboring grid
<dd>Use no periodic boundary conditions, ignore the box.
To simulate without cut-offs, set all cut-offs to 0 and <b>nstlist</b><tt>=0</tt>.
For best performance without cut-offs, use <b>nstlist</b><tt>=0</tt>,
-<b>ns_type</b><tt>=simple</tt>
+<b>ns-type</b><tt>=simple</tt>
and particle decomposition instead of domain decomposition.</dd>
<dt><b>xy</b></dt>
<dd>Use periodic boundary conditions in x and y directions only.
-This works only with <b>ns_type</b><tt>=grid</tt> and can be used
+This works only with <b>ns-type</b><tt>=grid</tt> and can be used
in combination with <b><a href="#walls">walls</a></b>.
Without walls or with only one wall the system size is infinite
in the z direction. Therefore pressure coupling or Ewald summation
These disadvantages do not apply when two walls are used.</dd>
</dl></dd>
-<dt><b>periodic_molecules:</b></dt>
+<dt><b>periodic-molecules:</b></dt>
<dd><dl compact>
<dt><b>no</b></dt>
<dd>molecules are finite, fast molecular PBC can be used</dd>
Use e.g. <b>rlist</b><tt>=0.9</tt>, <b>rcoulomb</b><tt>=0.9</tt>. The highest magnitude of
wave vectors used in reciprocal space is controlled by <b>fourierspacing</b>.
The relative accuracy of direct/reciprocal space
-is controlled by <b>ewald_rtol</b>.
+is controlled by <b>ewald-rtol</b>.
<br>
NOTE: Ewald scales as O(N<sup>3/2</sup>)
and is thus extremely slow for large systems. It is included mainly for
<dd>Fast Particle-Mesh Ewald electrostatics. Direct space is similar
to the Ewald sum, while the reciprocal part is performed with
FFTs. Grid dimensions are controlled with <b>fourierspacing</b> and the
-interpolation order with <b>pme_order</b>. With a grid spacing of 0.1
+interpolation order with <b>pme-order</b>. With a grid spacing of 0.1
nm and cubic interpolation the electrostatic forces have an accuracy
of 2-3*10<sup>-4</sup>. Since the error from the vdw-cutoff is larger than this you
might try 0.15 nm. When running in parallel the interpolation
<dt><b><!--Idx-->Reaction-Field<!--EIdx--></b></dt>
<dd>Reaction field with Coulomb cut-off <b>rcoulomb</b>,
where <b>rcoulomb</b> ≥ <b>rlist</b>.
-The dielectric constant beyond the cut-off is <b>epsilon_rf</b>.
-The dielectric constant can be set to infinity by setting <b>epsilon_rf</b><tt>=0</tt>.</dd>
+The dielectric constant beyond the cut-off is <b>epsilon-rf</b>.
+The dielectric constant can be set to infinity by setting <b>epsilon-rf</b><tt>=0</tt>.</dd>
<dt><b>Generalized-Reaction-Field</b></dt>
<dd>Generalized reaction field with Coulomb cut-off <b>rcoulomb</b>,
where <b>rcoulomb</b> &ge <b>rlist</b>.
-The dielectric constant beyond the cut-off is <b>epsilon_rf</b>.
+The dielectric constant beyond the cut-off is <b>epsilon-rf</b>.
The ionic strength is computed from the number of charged
(i.e. with non zero charge) <!--Idx-->charge group<!--EIdx-->s.
The temperature for the GRF potential is set with
-<b><A HREF="#tc">ref_t</A></b> [K].</dd>
+<b><A HREF="#tc">ref-t</A></b> [K].</dd>
<dt><b>Reaction-Field-zero</b></dt>
<dd>In GROMACS normal reaction-field electrostatics leads to bad
energy conservation. <b>Reaction-Field-zero</b> solves this
by making the potential zero beyond the cut-off. It can only
-be used with an infinite dielectric constant (<b>epsilon_rf=0</b>),
+be used with an infinite dielectric constant (<b>epsilon-rf=0</b>),
because only for that value the force vanishes at the cut-off.
<b>rlist</b> should be 0.1 to 0.3 nm larger than <b>rcoulomb</b>
to accommodate for the size of charge groups and diffusion
</dl></dd>
<A NAME="el2">
-<dt><b>rcoulomb_switch: (0) [nm]</b></dt>
+<dt><b>rcoulomb-switch: (0) [nm]</b></dt>
<dd>where to start switching the Coulomb potential</dd>
<dt><b>rcoulomb: (1) [nm]</b></dt>
<dd>distance for the Coulomb <!--Idx-->cut-off<!--EIdx--></dd>
-<dt><b>epsilon_r: (1)</b></dt>
+<dt><b>epsilon-r: (1)</b></dt>
<dd>The relative <!--Idx-->dielectric constant<!--EIdx-->.
A value of 0 means infinity.</dd>
-<dt><b>epsilon_rf: (1)</b></dt>
+<dt><b>epsilon-rf: (1)</b></dt>
<dd>The relative dielectric constant of the reaction field.
This is only used with reaction-field electrostatics.
A value of 0 means infinity.</dd>
where <b>rvdw</b> <tt>&ge</tt> <b>rlist</b>.</dd>
<dt><b>Shift</b></dt>
<dd>The LJ (not Buckingham) potential is decreased over the whole
-range and the forces decay smoothly to zero between <b>rvdw_switch</b>
+range and the forces decay smoothly to zero between <b>rvdw-switch</b>
and <b>rvdw</b>. The neighbor search cut-off <b>rlist</b> should be
0.1 to 0.3 nm larger than <b>rvdw</b> to accommodate for the size of
charge groups and diffusion between neighbor list
<dt><b>Switch</b></dt>
<dd>The LJ (not Buckingham)
-potential is normal out to <b>rvdw_switch</b>, after which it is switched
+potential is normal out to <b>rvdw-switch</b>, after which it is switched
off to reach zero at <b>rvdw</b>. Both the potential and force functions
are continuously smooth, but be aware that all switch functions will give rise
to a bulge (increase) in the force (since we are switching the potential).
for f and -f' are ignored.</dd>
</dl></dd>
-<dt><b>rvdw_switch: (0) [nm]</b></dt>
+<dt><b>rvdw-switch: (0) [nm]</b></dt>
<dd>where to start switching the LJ potential</dd>
<dt><b>rvdw: (1) [nm]</b></dt>
which are always tabulated irrespective of the use of
tables for the non-bonded interactions. </dd>
-<dt><b>energygrp_table:</b></dt>
+<dt><b>energygrp-table:</b></dt>
<dd>When user tables are used for electrostatics and/or VdW,
here one can give pairs of energy groups for which seperate
user tables should be used.
The two energy groups will be appended to the table file name,
in order of their definition in <b>energygrps</b>, seperated by underscores.
For example, if <tt>energygrps = Na Cl Sol</tt>
-and <tt>energygrp_table = Na Na Na Cl</tt>, <tt>mdrun</tt> will read
+and <tt>energygrp-table = Na Na Na Cl</tt>, <tt>mdrun</tt> will read
<tt>table_Na_Na.xvg</tt> and <tt>table_Na_Cl.xvg</tt> in addition
to the normal <tt>table.xvg</tt> which will be used for all other
energy group pairs.
For ordinary Ewald the spacing times the box dimensions determines the
highest magnitude to use in each direction. In all cases
each direction can be overridden by entering a non-zero value for
-<b>fourier_n*</b>.
+<b>fourier-n*</b>.
For optimizing the relative load of the particle-particle interactions
and the mesh part of PME it is useful to know that
the accuracy of the electrostatics remains nearly constant
when the Coulomb cut-off and the PME grid spacing are scaled
by the same factor.</dd>
-<dt><b>fourier_nx (0) ; fourier_ny (0) ; fourier_nz: (0)</b></dt>
+<dt><b>fourier-nx (0) ; fourier-ny (0) ; fourier-nz: (0)</b></dt>
<dd>Highest magnitude of wave vectors in reciprocal space when using Ewald.</dd>
<dd>Grid size when using PPPM or PME. These values override
<b>fourierspacing</b> per direction. The best choice is powers of
2, 3, 5 and 7. Avoid large primes.</dd>
-<dt><b>pme_order (4)</b></dt>
+<dt><b>pme-order (4)</b></dt>
<dd>Interpolation order for PME. 4 equals cubic interpolation. You might try
6/8/10 when running in parallel and simultaneously decrease grid dimension.</dd>
-<dt><b>ewald_rtol (1e-5)</b></dt>
+<dt><b>ewald-rtol (1e-5)</b></dt>
<dd>The relative strength of the Ewald-shifted direct potential at
-<b>rcoulomb</b> is given by <b>ewald_rtol</b>.
+<b>rcoulomb</b> is given by <b>ewald-rtol</b>.
Decreasing this will give a more accurate direct sum,
but then you need more wave vectors for the reciprocal sum.</dd>
-<dt><b>ewald_geometry: (3d)</b></dt>
+<dt><b>ewald-geometry: (3d)</b></dt>
<dd><dl compact>
<dt><b>3d</b></dt>
<dd>The Ewald sum is performed in all three dimensions.</dd>
and use this option.</dd>
</dl></dd>
-<dt><b>epsilon_surface: (0)</b></dt>
+<dt><b>epsilon-surface: (0)</b></dt>
<dd>This controls the dipole correction to the Ewald summation in 3d. The
default value of zero means it is turned off. Turn it on by setting it to the value
of the relative permittivity of the imaginary surface around your infinite system. Be
This value does not affect the slab 3DC variant of the long range corrections.</dd>
-<dt><b>optimize_fft:</b></dt>
+<dt><b>optimize-fft:</b></dt>
<dd><dl compact>
<dt><b>no</b></dt>
<dd>Don't calculate the optimal FFT plan for the grid at startup.</dd>
<dd>No temperature coupling.</dd>
<dt><b>berendsen</b></dt>
<dd>Temperature coupling with a Berendsen-thermostat to a bath with
-temperature <b>ref_t</b> [K], with time constant <b>tau_t</b> [ps].
+temperature <b>ref-t</b> [K], with time constant <b>tau-t</b> [ps].
Several groups can be coupled separately, these are specified in the
-<b>tc_grps</b> field separated by spaces.</dd>
+<b>tc-grps</b> field separated by spaces.</dd>
<dt><b>nose-hoover</b></dt>
<dd>Temperature coupling using a Nose-Hoover extended
ensemble. The reference temperature and coupling groups are selected
-as above, but in this case <b>tau_t</b> [ps] controls the period
+as above, but in this case <b>tau-t</b> [ps] controls the period
of the temperature fluctuations at equilibrium, which is slightly
different from a relaxation time.
For NVT simulations the conserved energy quantity is written
<dd>Temperature coupling using velocity rescaling with a stochastic term
(JCP 126, 014101).
This thermostat is similar to Berendsen coupling, with the same scaling
-using <b>tau_t</b>, but the stochastic term ensures that a proper
+using <b>tau-t</b>, but the stochastic term ensures that a proper
canonical ensemble is generated. The random seed is set with
-<b><A HREF="#ld">ld_seed</A></b>.
-This thermostat works correctly even for <b>tau_t</b><tt>=0</tt>.
+<b><A HREF="#ld">ld-seed</A></b>.
+This thermostat works correctly even for <b>tau-t</b><tt>=0</tt>.
For NVT simulations the conserved energy quantity is written
to the energy and log file.</dd>
</dl>
</dd>
<dt><b>nh-chain-length (10)</b></dt>
<dd>the number of chained Nose-Hoover thermostats for velocity Verlet integrators, the leap-frog <b>md</b> integrator only supports 1. Data for the NH chain variables is not printed to the .edr, but can be using the <tt>GMX_NOSEHOOVER_CHAINS</tt> environment variable</dd>
-<dt><b>tc_grps:</b></dt>
+<dt><b>tc-grps:</b></dt>
<dd>groups to couple separately to temperature bath</dd>
-<dt><b>tau_t: [ps]</b></dt>
-<dd>time constant for coupling (one for each group in <b>tc_grps</b>),
+<dt><b>tau-t: [ps]</b></dt>
+<dd>time constant for coupling (one for each group in <b>tc-grps</b>),
-1 means no temperature coupling</dd>
-<dt><b>ref_t: [K]</b></dt>
-<dd>reference temperature for coupling (one for each group in <b>tc_grps</b>)</dd>
+<dt><b>ref-t: [K]</b></dt>
+<dd>reference temperature for coupling (one for each group in <b>tc-grps</b>)</dd>
</dl>
<A NAME="pc"><br>
<dd>No pressure coupling. This means a fixed box size.</dd>
<dt><b>berendsen</b></dt>
<dd>Exponential relaxation pressure coupling with time constant
-<b>tau_p</b> [ps]. The box is scaled every timestep. It has been
+<b>tau-p</b> [ps]. The box is scaled every timestep. It has been
argued that this does not yield a correct thermodynamic ensemble,
but it is the most efficient way to scale a box at the beginning
of a run.</dd>
<dd>Extended-ensemble pressure coupling where the box vectors are
subject to an equation of motion. The equation of motion for the atoms
is coupled to this. No instantaneous scaling takes place. As for
-Nose-Hoover temperature coupling the time constant <b>tau_p</b> [ps]
+Nose-Hoover temperature coupling the time constant <b>tau-p</b> [ps]
is the period of pressure fluctuations at equilibrium. This is
probably a better method when you want to apply pressure scaling
during data collection, but beware that you can get very large
<dt><b>MTTK</b></dt>
<dd>Martyna-Tuckerman-Tobias-Klein implementation, only useable with <b>md-vv</b>
or <b>md-vv-avek</b>, very similar to Parrinello-Rahman.
-As for Nose-Hoover temperature coupling the time constant <b>tau_p</b>
+As for Nose-Hoover temperature coupling the time constant <b>tau-p</b>
[ps] is the period of pressure fluctuations at equilibrium. This is
probably a better method when you want to apply pressure scaling
during data collection, but beware that you can get very large
<dt><b>pcoupltype:</b></dt>
<dd><dl compact>
<dt><b>isotropic</b></dt>
-<dd>Isotropic pressure coupling with time constant <b>tau_p</b> [ps].
+<dd>Isotropic pressure coupling with time constant <b>tau-p</b> [ps].
The compressibility and reference pressure are set with
-<b>compressibility</b> [bar<sup>-1</sup>] and <b>ref_p</b> [bar], one
+<b>compressibility</b> [bar<sup>-1</sup>] and <b>ref-p</b> [bar], one
value is needed.</dd>
<dt><b>semiisotropic</b></dt>
<dd>Pressure coupling which is isotropic in the x and y direction,
<dd>Surface tension coupling for surfaces parallel to the xy-plane.
Uses normal pressure coupling for the z-direction, while the surface tension
is coupled to the x/y dimensions of the box.
-The first <b>ref_p</b> value is the reference surface tension times
+The first <b>ref-p</b> value is the reference surface tension times
the number of surfaces [bar nm],
the second value is the reference z-pressure [bar].
The two <b>compressibility</b> [bar<sup>-1</sup>] values are the compressibility
For velocity Verlet integrators <b>nstpcouple</b> is set to 1.</dd>
</dd>
-<dt><b>tau_p: (1) [ps]</b></dt>
+<dt><b>tau-p: (1) [ps]</b></dt>
<dd>time constant for coupling</dd>
<dt><b>compressibility: [bar<sup>-1</sup>]</b></dt>
<dd>compressibility (NOTE: this is now really in bar<sup>-1</sup>)
For water at 1 atm and 300 K the compressibility is 4.5e-5 [bar<sup>-1</sup>].</dd>
-<dt><b>ref_p: [bar]</b></dt>
+<dt><b>ref-p: [bar]</b></dt>
<dd>reference pressure for coupling</dd>
-<dt><b>refcoord_scaling:</b></dt>
+<dt><b>refcoord-scaling:</b></dt>
<dd><dl compact>
<dt><b>no</b></dt>
<dd>The reference coordinates for position restraints are not modified.
</dd>
</dl>
-<dt><b>annealing_npoints:</b></dt>
+<dt><b>annealing-npoints:</b></dt>
<dd>A list with the number of annealing reference/control points used for
each temperature group. Use 0 for groups that are not annealed. The number of entries should equal the number of temperature groups.</dd>
-<dt><b>annealing_time:</b></dt>
-<dd>List of times at the annealing reference/control points for each group. If you are using periodic annealing, the times will be used modulo the last value, i.e. if the values are 0, 5, 10, and 15, the coupling will restart at the 0ps value after 15ps, 30ps, 45ps, etc. The number of entries should equal the sum of the numbers given in <tt>annealing_npoints</tt>.</dd>
+<dt><b>annealing-time:</b></dt>
+<dd>List of times at the annealing reference/control points for each group. If you are using periodic annealing, the times will be used modulo the last value, i.e. if the values are 0, 5, 10, and 15, the coupling will restart at the 0ps value after 15ps, 30ps, 45ps, etc. The number of entries should equal the sum of the numbers given in <tt>annealing-npoints</tt>.</dd>
-<dt><b>annealing_temp:</b></dt>
-<dd>List of temperatures at the annealing reference/control points for each group. The number of entries should equal the sum of the numbers given in <tt>annealing_npoints</tt>.</dd>
+<dt><b>annealing-temp:</b></dt>
+<dd>List of temperatures at the annealing reference/control points for each group. The number of entries should equal the sum of the numbers given in <tt>annealing-npoints</tt>.</dd>
<br>
-Confused? OK, let's use an example. Assume you have two temperature groups, set the group selections to <tt>annealing = single periodic</tt>, the number of points of each group to <tt>annealing_npoints = 3 4</tt>, the times to <tt>annealing_time = 0 3 6 0 2 4 6</tt> and finally temperatures to <tt>annealing_temp = 298 280 270 298 320 320 298</tt>.
+Confused? OK, let's use an example. Assume you have two temperature groups, set the group selections to <tt>annealing = single periodic</tt>, the number of points of each group to <tt>annealing-npoints = 3 4</tt>, the times to <tt>annealing-time = 0 3 6 0 2 4 6</tt> and finally temperatures to <tt>annealing-temp = 298 280 270 298 320 320 298</tt>.
The first group will be coupled to 298K at 0ps, but the reference temperature will drop linearly to reach 280K at 3ps, and then linearly between 280K and 270K from 3ps to 6ps. After this is stays constant, at 270K. The second group is coupled to 298K at 0ps, it increases linearly to 320K at 2ps, where it stays constant until 4ps. Between 4ps and 6ps it decreases to 298K, and then it starts over with the same pattern again, i.e. rising linearly from 298K to 320K between 6ps and 8ps. Check the summary printed by <tt>grompp</tt> if you are unsure!
</dl>
<h3>Velocity generation</h3>
<dl>
-<dt><b>gen_vel:</b></dt>
+<dt><b>gen-vel:</b></dt>
<dd><dl compact>
<dt><b>no</b></dt>
<dd> Do not generate velocities. The velocities are set to zero
when there are no velocities in the input structure file.</dd>
<dt><b>yes</b></dt>
<dd>Generate velocities in <tt>grompp</tt> according to a Maxwell distribution at
-temperature <b>gen_temp</b> [K], with random seed <b>gen_seed</b>.
+temperature <b>gen-temp</b> [K], with random seed <b>gen-seed</b>.
This is only meaningful with integrator <b><A HREF="#run">md</A></b>.</dd>
</dl></dd>
-<dt><b>gen_temp: (300) [K]</b></dt>
+<dt><b>gen-temp: (300) [K]</b></dt>
<dd>temperature for Maxwell distribution</dd>
-<dt><b>gen_seed: (173529) [integer]</b></dt>
+<dt><b>gen-seed: (173529) [integer]</b></dt>
<dd>used to initialize random generator for random velocities,
-when <b>gen_seed</b> is set to -1, the seed is calculated from
+when <b>gen-seed</b> is set to -1, the seed is calculated from
the process ID number.
</dl>
<dd>Convert all bonds and angles to bond-constraints.</dd>
</dl>
-<dt><b>constraint_algorithm:</b></dt>
+<dt><b>constraint-algorithm:</b></dt>
<dd><dl compact>
<dt><b><!--Idx-->LINCS<!--EIdx--></b></dt>
<dd>LINear Constraint Solver.
With domain decomposition the parallel version P-LINCS is used.
The accuracy in set with
-<b>lincs_order</b>, which sets the number of matrices in the expansion
+<b>lincs-order</b>, which sets the number of matrices in the expansion
for the matrix inversion.
After the matrix inversion correction the algorithm does
an iterative correction to compensate for lengthening due to rotation.
The number of such iterations can be controlled with
-<b>lincs_iter</b>. The root mean square relative constraint deviation
+<b>lincs-iter</b>. The root mean square relative constraint deviation
is printed to the log file every <b>nstlog</b> steps.
-If a bond rotates more than <b>lincs_warnangle</b> [degrees] in one step,
+If a bond rotates more than <b>lincs-warnangle</b> [degrees] in one step,
a warning will be printed both to the log file and to <TT>stderr</TT>.
LINCS should not be used with coupled angle constraints.
</dd>
<dt><b><!--Idx-->SHAKE<!--EIdx--></b></dt>
<dd>SHAKE is slightly slower and less stable than LINCS, but does work with
angle constraints.
-The relative tolerance is set with <b>shake_tol</b>, 0.0001 is a good value
+The relative tolerance is set with <b>shake-tol</b>, 0.0001 is a good value
for ``normal'' MD. SHAKE does not support constraints between atoms
on different nodes, thus it can not be used with domain decompositon
when inter charge-group constraints are present.
</dd>
</dl></dd>
<dt><b>continuation:</b></dt>
-<dd>This option was formerly known as <tt>unconstrained_start</tt>.</dd>
+<dd>This option was formerly known as <tt>unconstrained-start</tt>.</dd>
<dd><dl compact>
<dt><b>no</b></dt>
<dd>apply constraints to the start configuration and reset shells</dd>
</dl></dd>
<A NAME="bond2">
-<dt><b>shake_tol: (0.0001)</b></dt>
+<dt><b>shake-tol: (0.0001)</b></dt>
<dd>relative tolerance for SHAKE</dd>
-<dt><b>lincs_order: (4)</b></dt>
+<dt><b>lincs-order: (4)</b></dt>
<dd>Highest order in the expansion of the constraint coupling matrix.
When constraints form triangles, an additional expansion of the same
order is applied on top of the normal expansion only for the couplings
needed for large time-steps with virtual sites or BD.
For accurate energy minimization an order of 8 or more might be required.
With domain decomposition, the cell size is limited by the distance
-spanned by <b>lincs_order</b>+1 constraints. When one wants to scale
-further than this limit, one can decrease <b>lincs_order</b> and increase
-<b>lincs_iter</b>, since the accuracy does not deteriorate
-when (1+<b>lincs_iter</b>)*<b>lincs_order</b> remains constant.</dd>
-<dt><b>lincs_iter: (1)</b></dt>
+spanned by <b>lincs-order</b>+1 constraints. When one wants to scale
+further than this limit, one can decrease <b>lincs-order</b> and increase
+<b>lincs-iter</b>, since the accuracy does not deteriorate
+when (1+<b>lincs-iter</b>)*<b>lincs-order</b> remains constant.</dd>
+<dt><b>lincs-iter: (1)</b></dt>
<dd>Number of iterations to correct for rotational lengthening in LINCS.
For normal runs a single step is sufficient, but for NVE
runs where you want to conserve energy accurately or for accurate
energy minimization you might want to increase it to 2.
-<dt><b>lincs_warnangle: </b>(30) [degrees]</dt>
+<dt><b>lincs-warnangle: </b>(30) [degrees]</dt>
<dd>maximum angle that a bond can rotate before LINCS will complain</dd>
<dt><b>morse:</b></dt>
<hr>
<h3>Energy group <!--Idx-->exclusions<!--EIdx--></h3>
<dl>
-<dt><b>energygrp_excl: </b></dt>
+<dt><b>energygrp-excl: </b></dt>
<dd>Pairs of energy groups for which all non-bonded interactions are
excluded. An example: if you have two energy groups <tt>Protein</tt>
and <tt>SOL</tt>, specifying
<br>
-<tt>energygrp_excl = Protein Protein SOL SOL</tt>
+<tt>energygrp-excl = Protein Protein SOL SOL</tt>
<br>
would give only the non-bonded interactions between the protein and the
solvent. This is especially useful for speeding up energy calculations with
<dl>
<dt><b>nwall: 0</b></dt>
<dd>When set to <b>1</b> there is a wall at z=0, when set to <b>2</b>
-there is also a wall at z=z_box. Walls can only be used with <b>pbc=xy</b>.
+there is also a wall at z=z-box. Walls can only be used with <b>pbc=xy</b>.
When set to <b>2</b> pressure coupling and Ewald summation can be used
(it is usually best to use semiisotropic pressure coupling with
the x/y compressibility set to 0, as otherwise the surface area will change).
-Walls interact wit the rest of the system through an optional <tt>wall_atomtype</tt>.
+Walls interact wit the rest of the system through an optional <tt>wall-atomtype</tt>.
Energy groups <tt>wall0</tt> and <tt>wall1</tt> (for <b>nwall=2</b>) are
added automatically to monitor the interaction of energy groups
with each wall.
The <A HREF="#run">center of mass motion removal</A> will be turned
off in the z-direction.</dd>
-<dt><b>wall_atomtype:</b></dt>
+<dt><b>wall-atomtype:</b></dt>
<dd>the atom type name in the force field for each wall.
By (for example) defining a special wall atom type in the topology with its
own combination rules, this allows for independent tuning of the interaction
of each atomtype with the walls.</dd>
-<dt><b>wall_type:</b></dt>
+<dt><b>wall-type:</b></dt>
<dd><dl compact>
<dt><b>9-3</b></dt>
<dd>LJ integrated over the volume behind the wall: 9-3 potential</dd>
<dt><b>12-6</b></dt>
<dd>direct LJ potential with the z distance from the wall</dd>
<dt><b>table</b></dt><dd>user defined potentials indexed with the z distance from the wall, the tables are read analogously to
-the <b><A HREF="#table">energygrp_table</A></b> option,
+the <b><A HREF="#table">energygrp-table</A></b> option,
where the first name is for a ``normal'' energy group and the second name
is <tt>wall0</tt> or <tt>wall1</tt>,
only the dispersion and repulsion columns are used</dd>
</dl></dd>
-<dt><b>wall_r_linpot: -1 (nm)</b></dt>
+<dt><b>wall-r-linpot: -1 (nm)</b></dt>
<dd>Below this distance from the wall the potential is continued
linearly and thus the force is constant. Setting this option to
a postive value is especially useful for equilibration when some atoms
are beyond a wall.
-When the value is ≤0 (<0 for <b>wall_type=table</b>),
+When the value is ≤0 (<0 for <b>wall-type=table</b>),
a fatal error is generated when atoms are beyond a wall.
</dd>
-<dt><b>wall_density: [nm<sup>-3</sup>/nm<sup>-2</sup>]</b></dt>
+<dt><b>wall-density: [nm<sup>-3</sup>/nm<sup>-2</sup>]</b></dt>
<dd>the number density of the atoms for each wall for wall types
<b>9-3</b> and <b>10-4</b>
-<dt><b>wall_ewald_zfac: 3</b></dt>
+<dt><b>wall-ewald-zfac: 3</b></dt>
<dd>The scaling factor for the third box vector for Ewald summation only,
the minimum is 2.
Ewald summation can only be used with <b>nwall=2</b>, where one
-should use <b><A HREF="#ewald">ewald_geometry</A><tt>=3dc</tt></b>.
+should use <b><A HREF="#ewald">ewald-geometry</A><tt>=3dc</tt></b>.
The empty layer in the box serves to decrease the unphysical Coulomb
interaction between periodic images.
</dl>
between the reference group and one or more groups.
The setup is identical to the option <b>umbrella</b>, except for the fact
that a rigid constraint is applied instead of a harmonic potential.</dd>
-<dt><b>constant_force</b></dt>
+<dt><b>constant-force</b></dt>
<dd>Center of mass pulling using a linear potential and therefore
a constant force. For this option there is no reference position
-and therefore the parameters <b>pull_init</b> and <b>pull_rate</b>
+and therefore the parameters <b>pull-init</b> and <b>pull-rate</b>
are not used.</dd>
</dl></dd>
-<dt><b>pull_geometry:</b></dt>
+<dt><b>pull-geometry:</b></dt>
<dd><dl compact>
<dt><b>distance</b></dt>
<dd>Pull along the vector connecting the two groups.
-Components can be selected with <b>pull_dim</b>.</dd>
+Components can be selected with <b>pull-dim</b>.</dd>
<dt><b>direction</b></dt>
-<dd>Pull in the direction of <b>pull_vec</b>.</dd>
-<dt><b>direction_periodic</b></dt>
+<dd>Pull in the direction of <b>pull-vec</b>.</dd>
+<dt><b>direction-periodic</b></dt>
<dd>As <b>direction</b>, but allows the distance to be larger than
half the box size. With this geometry the box should not be dynamic
(e.g. no pressure scaling) in the pull dimensions and the pull force
<dt><b>cylinder</b></dt>
<dd>Designed for pulling with respect to a layer where the reference COM
is given by a local cylindrical part of the reference group.
-The pulling is in the direction of <b>pull_vec</b>.
+The pulling is in the direction of <b>pull-vec</b>.
From the reference group a cylinder is selected around the axis going
-through the pull group with direction <b>pull_vec</b> using two radii.
-The radius <b>pull_r1</b> gives the radius within which all
-the relative weights are one, between <b>pull_r1</b> and
-<b>pull_r0</b> the weights are switched to zero. Mass weighting is also used.
+through the pull group with direction <b>pull-vec</b> using two radii.
+The radius <b>pull-r1</b> gives the radius within which all
+the relative weights are one, between <b>pull-r1</b> and
+<b>pull-r0</b> the weights are switched to zero. Mass weighting is also used.
Note that the radii should be smaller than half the box size.
For tilted cylinders they should be even smaller than half the box size
since the distance of an atom in the reference group
from the COM of the pull group has both a radial and an axial component.
<dt><b>position</b></dt>
<dd>Pull to the position of the reference group plus
-<b>pull_init</b> + time*<b>pull_rate</b>*<b>pull_vec</b>.</dd>
+<b>pull-init</b> + time*<b>pull-rate</b>*<b>pull-vec</b>.</dd>
</dl></dd>
-<dt><b>pull_dim: (Y Y Y)</b></dt>
+<dt><b>pull-dim: (Y Y Y)</b></dt>
<dd>the distance components to be used with geometry <b>distance</b>
and <b>position</b>, and also sets which components are printed
to the output files</dd>
-<dt><b>pull_r1: (1) [nm]</b></dt>
+<dt><b>pull-r1: (1) [nm]</b></dt>
<dd>the inner radius of the cylinder for geometry <b>cylinder</b></dd>
-<dt><b>pull_r0: (1) [nm]</b></dt>
+<dt><b>pull-r0: (1) [nm]</b></dt>
<dd>the outer radius of the cylinder for geometry <b>cylinder</b></dd>
-<dt><b>pull_constr_tol: (1e-6)</b></dt>
+<dt><b>pull-constr-tol: (1e-6)</b></dt>
<dd>the relative constraint tolerance for constraint pulling</dd>
-<dt><b>pull_start:</b></dt>
+<dt><b>pull-start:</b></dt>
<dd><dl compact>
<dt><b>no</b></dt>
-<dd>do not modify <b>pull_init</b>
+<dd>do not modify <b>pull-init</b>
<dt><b>yes</b></dt>
-<dd>add the COM distance of the starting conformation to <b>pull_init</b></dd>
+<dd>add the COM distance of the starting conformation to <b>pull-init</b></dd>
</dl>
-<dt><b>pull_nstxout: (10)</b></dt>
+<dt><b>pull-nstxout: (10)</b></dt>
<dd>frequency for writing out the COMs of all the pull group</dd>
-<dt><b>pull_nstfout: (1)</b></dt>
+<dt><b>pull-nstfout: (1)</b></dt>
<dd>frequency for writing out the force of all the pulled group</dd>
-<dt><b>pull_ngroups: (1)</b></dt>
+<dt><b>pull-ngroups: (1)</b></dt>
<dd>The number of pull groups, not including the reference group.
If there is only one group, there is no difference in treatment
of the reference and pulled group (except with the cylinder geometry).
and the first group (ending on 1) are given,
further groups work analogously, but with the number 1 replaced
by the group number.</dd>
-<dt><b>pull_group0: </b></dt>
+<dt><b>pull-group0: </b></dt>
<dd>The name of the reference group. When this is empty an absolute reference
of (0,0,0) is used. With an absolute reference the system is no longer
translation invariant and one should think about what to do with
the <A HREF="#run">center of mass motion</A>.</dd>
-<dt><b>pull_weights0: </b></dt>
-<dd>see <b>pull_weights1</b></dd>
-<dt><b>pull_pbcatom0: (0)</b></dt>
-<dd>see <b>pull_pbcatom1</b></dd>
-<dt><b>pull_group1: </b></dt>
+<dt><b>pull-weights0: </b></dt>
+<dd>see <b>pull-weights1</b></dd>
+<dt><b>pull-pbcatom0: (0)</b></dt>
+<dd>see <b>pull-pbcatom1</b></dd>
+<dt><b>pull-group1: </b></dt>
<dd>The name of the pull group.</dd>
-<dt><b>pull_weights1: </b></dt>
+<dt><b>pull-weights1: </b></dt>
<dd>Optional relative weights which are multiplied with the masses of the atoms
to give the total weight for the COM. The number should be 0, meaning all 1,
or the number of atoms in the pull group.</dd>
-<dt><b>pull_pbcatom1: (0)</b></dt>
+<dt><b>pull-pbcatom1: (0)</b></dt>
<dd>The reference atom for the treatment of periodic boundary conditions
inside the group
(this has no effect on the treatment of the pbc between groups).
This option is only important when the diameter of the pull group
is larger than half the shortest box vector.
For determining the COM, all atoms in the group are put at their periodic image
-which is closest to <b>pull_pbcatom1</b>.
+which is closest to <b>pull-pbcatom1</b>.
A value of 0 means that the middle atom (number wise) is used.
This parameter is not used with geometry <b>cylinder</b>.
A value of -1 turns on cosine weighting, which is useful for a group
of molecules in a periodic system, e.g. a water slab (see Engin et al.
J. Chem. Phys. B 2010).</dd>
-<dt><b>pull_vec1: (0.0 0.0 0.0)</b></dt>
+<dt><b>pull-vec1: (0.0 0.0 0.0)</b></dt>
<dd>The pull direction. <tt>grompp</tt> normalizes the vector.</dd>
-<dt><b>pull_init1: (0.0) / (0.0 0.0 0.0) [nm]</b></dt>
+<dt><b>pull-init1: (0.0) / (0.0 0.0 0.0) [nm]</b></dt>
<dd>The reference distance at t=0. This is a single value,
except for geometry <b>position</b> which uses a vector.</dd>
-<dt><b>pull_rate1: (0) [nm/ps]</b></dt>
+<dt><b>pull-rate1: (0) [nm/ps]</b></dt>
<dd>The rate of change of the reference position.</dd>
-<dt><b>pull_k1: (0) [kJ mol<sup>-1</sup> nm<sup>-2</sup>] / [kJ mol<sup>-1</sup> nm<sup>-1</sup>]</b></dt>
+<dt><b>pull-k1: (0) [kJ mol<sup>-1</sup> nm<sup>-2</sup>] / [kJ mol<sup>-1</sup> nm<sup>-1</sup>]</b></dt>
<dd>The force constant. For umbrella pulling this is the harmonic force
constant in [kJ mol<sup>-1</sup> nm<sup>-2</sup>]. For constant force pulling
this is the force constant of the linear potential, and thus minus (!)
the constant force in [kJ mol<sup>-1</sup> nm<sup>-1</sup>].</dd>
-<dt><b>pull_kB1: (pull_k1) [kJ mol<sup>-1</sup> nm<sup>-2</sup>] / [kJ mol<sup>-1</sup> nm<sup>-1</sup>]</b></dt>
-<dd>As <b>pull_k1</b>, but for state B. This is only used when
-<A HREF="#free"><b>free_energy</b></A> is turned on.
-The force constant is then (1 - lambda)*<b>pull_k1</b> + lambda*<b>pull_kB1</b>.
+<dt><b>pull-kB1: (pull-k1) [kJ mol<sup>-1</sup> nm<sup>-2</sup>] / [kJ mol<sup>-1</sup> nm<sup>-1</sup>]</b></dt>
+<dd>As <b>pull-k1</b>, but for state B. This is only used when
+<A HREF="#free"><b>free-energy</b></A> is turned on.
+The force constant is then (1 - lambda)*<b>pull-k1</b> + lambda*<b>pull-kB1</b>.
</dl>
<A NAME="nmr"><br>
should only be used for special cases, such as dimers
(this option is not fuctional in the current version of GROMACS)</dd>
</dl></dd>
-<dt><b>disre_weighting:</b></dt>
+<dt><b>disre-weighting:</b></dt>
<dd><dl compact>
<dt><b>conservative</b></dt>
<dd>the forces are the derivative of the restraint potential,
<dt><b>equal</b></dt>
<dd>divide the restraint force equally over all atom pairs in the restraint</dd>
</dl></dd>
-<dt><b>disre_mixed:</b></dt>
+<dt><b>disre-mixed:</b></dt>
<dd><dl compact>
<dt><b>no</b></dt>
<dd>the violation used in the calculation of the restraint force is the
square root of the time averaged violation times the instantaneous violation </dd>
</dl></dd>
-<dt><b>disre_fc: (1000) [kJ mol<sup>-1</sup> nm<sup>-2</sup>]</b></dt>
+<dt><b>disre-fc: (1000) [kJ mol<sup>-1</sup> nm<sup>-2</sup>]</b></dt>
<dd>force constant for distance restraints, which is multiplied by a
(possibly) different factor for each restraint</dd>
-<dt><b>disre_tau: (0) [ps]</b></dt>
+<dt><b>disre-tau: (0) [ps]</b></dt>
<dd>time constant for distance restraints running average</dd>
<dt><b>nstdisreout: (100) [steps]</b></dt>
<dd>use orientation restraints, ensemble averaging can be performed
with <tt>mdrun -multi</tt></dd>
</dl>
-<dt><b>orire_fc: (0) [kJ mol]</b></dt>
+<dt><b>orire-fc: (0) [kJ mol]</b></dt>
<dd>force constant for orientation restraints, which is multiplied by a
(possibly) different factor for each restraint, can be set to zero to
obtain the orientations from a free simulation</dd>
-<dt><b>orire_tau: (0) [ps]</b></dt>
+<dt><b>orire-tau: (0) [ps]</b></dt>
<dd>time constant for orientation restraints running average</dd>
-<dt><b>orire_fitgrp: </b></dt>
+<dt><b>orire-fitgrp: </b></dt>
<dd>fit group for orientation restraining, for a protein backbone is a good
choice</dd>
<dt><b>nstorireout: (100) [steps]</b></dt>
<h3><!--Idx-->Free energy calculations<!--EIdx--></h3>
<dl>
-<dt><b>free_energy:</b></dt>
+<dt><b>free-energy:</b></dt>
<dd><dl compact>
<dt><b>no</b></dt>
<dd>Only use topology A.</dd>
<dt><b>yes</b></dt>
<dd>Interpolate between topology A (lambda=0) to topology B (lambda=1)
-and write the derivative of the Hamiltonian with respect to lambda (as specified with <b>dhdl_derivatives</b>), or the Hamiltonian differences with respect to other lambda values (as specified with <b>foreign_lambda</b>) to
+and write the derivative of the Hamiltonian with respect to lambda (as specified with <b>dhdl-derivatives</b>), or the Hamiltonian differences with respect to other lambda values (as specified with <b>foreign-lambda</b>) to
the energy file and/or to <tt>dhdl.xvg</tt>, where they can be processed by, for example <tt>g_bar</tt>.
The potentials, bond-lengths and angles are interpolated linearly as
-described in the manual. When <b>sc_alpha</b> is larger than zero, soft-core
+described in the manual. When <b>sc-alpha</b> is larger than zero, soft-core
potentials are used for the LJ and Coulomb interactions.</dd>
</dl></dd>
-<dt><b>init_lambda: (0)</b></dt>
+<dt><b>init-lambda: (0)</b></dt>
<dd>starting value for lambda</dd>
-<dt><b>delta_lambda: (0)</b></dt>
+<dt><b>delta-lambda: (0)</b></dt>
<dd>increment per time step for lambda</dd>
-<dt><b>foreign_lambda: ()</b></dt>
+<dt><b>foreign-lambda: ()</b></dt>
<dd>Zero, one or more lambda values for which Delta H values will
be determined and written to dhdl.xvg every <b>nstdhdl</b> steps.
Free energy differences between different lambda values can then
be determined with <tt>g_bar</tt>.</dd>
-<dt><b>dhdl_derivatives: (yes)</b></dt>
+<dt><b>dhdl-derivatives: (yes)</b></dt>
<dd>If yes (the default), the derivatives of the Hamiltonian with respect to lambda at each <b>nstdhdl</b> step are written out. These values are needed for interpolation of linear energy differences with <tt>g_bar</tt> (although the same can also be achieved with the right <b>foreign lambda</b> setting, that may not be as flexible), or with thermodynamic integration</dd>
-<dt><b>sc_alpha: (0)</b></dt>
+<dt><b>sc-alpha: (0)</b></dt>
<dd>the soft-core parameter, a value of 0 results in linear interpolation of
the LJ and Coulomb interactions</dd>
-<dt><b>sc_power: (0)</b></dt>
+<dt><b>sc-power: (0)</b></dt>
<dd>the power for lambda in the soft-core function,
only the values 1 and 2 are supported</dd>
-<dt><b>sc_sigma: (0.3) [nm]</b></dt>
+<dt><b>sc-sigma: (0.3) [nm]</b></dt>
<dd>the soft-core sigma for particles which have a C6 or C12 parameter equal
-to zero or a sigma smaller than <b>sc_sigma</b></dd>
+to zero or a sigma smaller than <b>sc-sigma</b></dd>
<dt><b>couple-moltype:</b></dt>
<dd>Here one can supply a molecule type (as defined in the topology)
for calculating solvation or coupling free energies.
There is a special option <b>system</b> that couples all molecule types
in the system. This can be useful for equilibrating a system
starting from (nearly) random coordinates.
-<b>free_energy</b> has to be turned on.
+<b>free-energy</b> has to be turned on.
The Van der Waals interactions and/or charges in this molecule type can be
turned on or off between lambda=0 and lambda=1, depending on the settings
of <b>couple-lambda0</b> and <b>couple-lambda1</b>. If you want to decouple
<dt><b>nstdhdl: (10)</b></dt>
<dd>the frequency for writing dH/dlambda and possibly Delta H to dhdl.xvg,
0 means no ouput, should be a multiple of <b>nstcalcenergy</b></dd>
-<dt><b>separate_dhdl_file: (yes)</b></dt>
+<dt><b>separate-dhdl-file: (yes)</b></dt>
<dd><dl compact>
<dt><b>yes</b></dt>
-<dd>the free energy values that are calculated (as specified with the <b>foreign-lambda</b> and <b>dhdl_derivatives</b> settings) are written out to a separate file, with the default name <tt>dhdl.xvg</tt>. This file can be used directly with <tt>g_bar</tt>.</dd>
+<dd>the free energy values that are calculated (as specified with the <b>foreign-lambda</b> and <b>dhdl-derivatives</b> settings) are written out to a separate file, with the default name <tt>dhdl.xvg</tt>. This file can be used directly with <tt>g_bar</tt>.</dd>
<dt><b>no</b></dt>
<dd>The free energy values are written out to the energy output file (<tt>ener.edr</tt>, in accumulated blocks at every <b>nstenergy</b> steps), where they can be extracted with <tt>g_energy</tt> or used directly with <tt>g_bar</tt>.</dd>
</dl>
-<dt><b>dh_hist_size: (0)</b></dt>
-<dd>If nonzero, specifies the size of the histogram into which the Delta H values (specified with <b>foreign_lambda</b>) and the derivative dH/dl values are binned, and written to ener.edr. This can be used to save disk space while calculating free energy differences. One histogram gets written for each <b>foreign lambda</b> and two for the dH/dl, at every <b>nstenergy</b> step. Be aware that incorrect histogram settings (too small size or too wide bins) can introduce errors. Do not use histograms unless you're certain you need it.</dd>
-<dt><b>dh_hist_spacing (0.1)</b></dt>
-<dd>Specifies the bin width of the histograms, in energy units. Used in conjunction with <b>dh_hist_size</b>. This size limits the accuracy with which free energies can be calculated. Do not use histograms unless you're certain you need it.</dd>
+<dt><b>dh-hist-size: (0)</b></dt>
+<dd>If nonzero, specifies the size of the histogram into which the Delta H values (specified with <b>foreign-lambda</b>) and the derivative dH/dl values are binned, and written to ener.edr. This can be used to save disk space while calculating free energy differences. One histogram gets written for each <b>foreign lambda</b> and two for the dH/dl, at every <b>nstenergy</b> step. Be aware that incorrect histogram settings (too small size or too wide bins) can introduce errors. Do not use histograms unless you're certain you need it.</dd>
+<dt><b>dh-hist-spacing (0.1)</b></dt>
+<dd>Specifies the bin width of the histograms, in energy units. Used in conjunction with <b>dh-hist-size</b>. This size limits the accuracy with which free energies can be calculated. Do not use histograms unless you're certain you need it.</dd>
</dl>
<h3><!--Idx-->Non-equilibrium MD<!--EIdx--></h3>
<dl>
-<dt><b>acc_grps: </b></dt>
+<dt><b>acc-grps: </b></dt>
<dd>groups for constant acceleration (e.g.: <tt>Protein Sol</tt>)
all atoms in groups Protein and Sol will experience constant acceleration
as specified in the <b>accelerate</b> line</dd>
<dt><b>accelerate: (0) [nm ps<sup>-2</sup>]</b></dt>
-<dd>acceleration for <b>acc_grps</b>; x, y and z for each group
+<dd>acceleration for <b>acc-grps</b>; x, y and z for each group
(e.g. <tt>0.1 0.0 0.0 -0.1 0.0 0.0</tt> means that first group has constant
acceleration of 0.1 nm ps<sup>-2</sup> in X direction, second group the
opposite).</dd>
(e.g. <tt>Y Y N N N N</tt> means that particles in the first group
can move only in Z direction. The particles in the second group can
move in any direction).</dd>
-<dt><b>cos_acceleration: (0) [nm ps<sup>-2</sup>]</b></dt>
+<dt><b>cos-acceleration: (0) [nm ps<sup>-2</sup>]</b></dt>
<dd>the amplitude of the acceleration profile for calculating the
<!--Idx-->viscosity<!--EIdx-->.
The acceleration is in the X-direction and the magnitude is
-<b>cos_acceleration</b> cos(2 pi z/boxheight).
+<b>cos-acceleration</b> cos(2 pi z/boxheight).
Two terms are added to the energy file:
the amplitude of the velocity profile and 1/viscosity.</dd>
<dt><b><!--Idx-->deform<!--EIdx-->: (0 0 0 0 0 0) [nm ps<sup>-1</sup>]</b></dt>
<h3><!--Idx-->Electric field<!--EIdx-->s</h3>
<dl>
-<dt><b>E_x ; E_y ; E_z:</b></dt>
+<dt><b>E-x ; E-y ; E-z:</b></dt>
<dd>If you want to use an electric field in a direction, enter 3 numbers
-after the appropriate <b>E_*</b>, the first number: the number of cosines,
+after the appropriate <b>E-*</b>, the first number: the number of cosines,
only 1 is implemented (with frequency 0) so enter 1,
the second number: the strength of the electric field in
<b>V nm<sup>-1</sup></b>,
the third number: the phase of the cosine, you can enter any number here
since a cosine of frequency zero has no phase.</dd>
-<dt><b>E_xt; E_yt; E_zt: </b></dt>
+<dt><b>E-xt; E-yt; E-zt: </b></dt>
<dd>not implemented yet</dd>
</dl>
<br>
<h3>Implicit solvent</h3>
<dl>
-<dt><b>implicit_solvent:</b></dt>
+<dt><b>implicit-solvent:</b></dt>
<dd><dl compact="compact">
<dt><b>no</b></dt>
<dd>No implicit solvent</dd>
<dt><b>GBSA</b></dt>
<dd>Do a simulation with implicit solvent using the Generalized Born formalism.
Three different methods for calculating the Born radii are available, Still, HCT and
-OBC. These are specified with the <b>gb_algorithm</b> field. The non-polar solvation
-is specified with the <b>sa_algorithm</b> field.</dd>
+OBC. These are specified with the <b>gb-algorithm</b> field. The non-polar solvation
+is specified with the <b>sa-algorithm</b> field.</dd>
</dl>
-<dt><b>gb_algorithm:</b></dt>
+<dt><b>gb-algorithm:</b></dt>
<dd><dl compact="compact">
<dt><b>Still</b></dt>
<dd>Use the Still method to calculate the Born radii</dd>
<dt><b>rgbradii: (1.0) [nm]</b></dt>
<dd>Cut-off for the calculation of the Born radii. Currently must be equal to rlist</dd>
-<dt><b>gb_epsilon_solvent: (80)</b></dt>
+<dt><b>gb-epsilon-solvent: (80)</b></dt>
<dd>Dielectric constant for the implicit solvent</dd>
-<dt><b>gb_saltconc: (0) [M]</b></dt>
+<dt><b>gb-saltconc: (0) [M]</b></dt>
<dd>Salt concentration for implicit solvent models, currently not used</dd>
-<dt><b>gb_obc_alpha (1); gb_obc_beta (0.8); gb_obc_gamma (4.85);</b></dt>
+<dt><b>gb-obc-alpha (1); gb-obc-beta (0.8); gb-obc-gamma (4.85);</b></dt>
<dd>Scale factors for the OBC model. Default values are OBC(II).
Values for OBC(I) are 0.8, 0 and 2.91 respectively</dd>
-<dt><b>gb_dielectric_offset: (0.009) [nm]</b></dt>
+<dt><b>gb-dielectric-offset: (0.009) [nm]</b></dt>
<dd>Distance for the di-electric offset when calculating the Born radii. This is
the offset between the center of each atom the center of the polarization energy
for the corresponding atom</dd>
-<dt><b>sa_algorithm</b></dt>
+<dt><b>sa-algorithm</b></dt>
<dd><dl compact="compact">
<dt><b>Ace-approximation</b></dt>
<dd>Use an Ace-type approximation (default)</dd>
calculated</dd>
</dl>
-<dt><b>sa_surface_tension: [kJ mol<sup>-1</sup> nm<sup>-2</sup>]</b></dt>
+<dt><b>sa-surface-tension: [kJ mol<sup>-1</sup> nm<sup>-2</sup>]</b></dt>
<dd>Default value for surface tension with SA algorithms. The default value is -1;
Note that if this default value is not changed
it will be overridden by <tt>grompp</tt> using values that are specific for the choice
of radii algorithm (0.0049 kcal/mol/Angstrom<sup>2</sup> for Still, 0.0054 kcal/mol/Angstrom<sup>2</sup>
for HCT/OBC)
-Setting it to 0 will while using an sa_algorithm other than None means
+Setting it to 0 will while using an sa-algorithm other than None means
no non-polar calculations are done.
</dd>
</dl>
<h3>User defined thingies</h3>
<dl>
-<dt><b>user1_grps; user2_grps: </b></dt>
+<dt><b>user1-grps; user2-grps: </b></dt>
<dt><b>userint1 (0); userint2 (0); userint3 (0); userint4 (0)</b></dt>
<dt><b>userreal1 (0); userreal2 (0); userreal3 (0); userreal4 (0)</b></dt>
<dd>These you can use if you modify code. You can pass integers and
<P>
<multicol cols=4>
-<A HREF="#neq">acc_grps</A><br>
+<A HREF="#neq">acc-grps</A><br>
<A HREF="#neq">accelerate</A><br>
<A HREF="#sa">annealing</A><br>
-<A HREF="#sa">annealing_npoints</A><br>
-<A HREF="#sa">annealing_time</A><br>
-<A HREF="#sa">annealing_temp</A><br>
-<A HREF="#ld">bd_fric</A><br>
+<A HREF="#sa">annealing-npoints</A><br>
+<A HREF="#sa">annealing-time</A><br>
+<A HREF="#sa">annealing-temp</A><br>
+<A HREF="#ld">bd-fric</A><br>
<A HREF="#vdw">bDispCorr</A><br>
-<A HREF="#run">comm_mode</A><br>
-<A HREF="#run">comm_grps</A><br>
+<A HREF="#run">comm-mode</A><br>
+<A HREF="#run">comm-grps</A><br>
<A HREF="#pc">compressibility</A><br>
-<A HREF="#bond">constraint_algorithm</A><br>
+<A HREF="#bond">constraint-algorithm</A><br>
<A HREF="#bond">constraints</A><br>
-<A HREF="#neq">cos_acceleration</A><br>
+<A HREF="#neq">cos-acceleration</A><br>
<A HREF="#el">coulombtype</A><br>
<A HREF="#free">couple-intramol</A><br>
<A HREF="#free">couple-lambda0</A><br>
<A HREF="#free">couple-moltype</A><br>
<A HREF="#pp">define</A><br>
<A HREF="#neq">deform</A><br>
-<A HREF="#free">delta_lambda</A><br>
+<A HREF="#free">delta-lambda</A><br>
<A HREF="#nmr">disre</A><br>
-<A HREF="#nmr">disre_weighting</A><br>
-<A HREF="#nmr">disre_mixed</A><br>
-<A HREF="#nmr">disre_fc</A><br>
-<A HREF="#nmr">disre_tau</A><br>
+<A HREF="#nmr">disre-weighting</A><br>
+<A HREF="#nmr">disre-mixed</A><br>
+<A HREF="#nmr">disre-fc</A><br>
+<A HREF="#nmr">disre-tau</A><br>
<A HREF="#run">dt</A><br>
<A HREF="#em">emstep</A><br>
<A HREF="#em">emtol</A><br>
-<A HREF="#egexcl">energygrp_excl</A><br>
-<A HREF="#table">energygrp_table</A><br>
+<A HREF="#egexcl">energygrp-excl</A><br>
+<A HREF="#table">energygrp-table</A><br>
<A HREF="#out">energygrps</A><br>
-<A HREF="#el2">epsilon_r</A><br>
-<A HREF="#el2">epsilon_rf</A><br>
-<A HREF="#ewald">ewald_rtol</A><br>
-<A HREF="#ewald">ewald_geometry</A><br>
-<A HREF="#ewald">epsilon_surface</A><br>
-<A HREF="#ef">E_x</A><br>
-<A HREF="#ef">E_xt</A><br>
-<A HREF="#ef">E_y</A><br>
-<A HREF="#ef">E_yt</A><br>
-<A HREF="#ef">E_z</A><br>
-<A HREF="#ef">E_zt </A><br>
+<A HREF="#el2">epsilon-r</A><br>
+<A HREF="#el2">epsilon-rf</A><br>
+<A HREF="#ewald">ewald-rtol</A><br>
+<A HREF="#ewald">ewald-geometry</A><br>
+<A HREF="#ewald">epsilon-surface</A><br>
+<A HREF="#ef">E-x</A><br>
+<A HREF="#ef">E-xt</A><br>
+<A HREF="#ef">E-y</A><br>
+<A HREF="#ef">E-yt</A><br>
+<A HREF="#ef">E-z</A><br>
+<A HREF="#ef">E-zt </A><br>
<A HREF="#xmdrun">fcstep</A><br>
-<A HREF="#ewald">fourier_nx</A><br>
-<A HREF="#ewald">fourier_ny</A><br>
-<A HREF="#ewald">fourier_nz</A><br>
+<A HREF="#ewald">fourier-nx</A><br>
+<A HREF="#ewald">fourier-ny</A><br>
+<A HREF="#ewald">fourier-nz</A><br>
<A HREF="#ewald">fourierspacing</A><br>
-<A HREF="#free">free_energy</A><br>
+<A HREF="#free">free-energy</A><br>
<A HREF="#neq">freezedim </A><br>
<A HREF="#neq">freezegrps</A><br>
-<A HREF="#vel">gen_seed</A><br>
-<A HREF="#vel">gen_temp</A><br>
-<A HREF="#vel">gen_vel</A><br>
+<A HREF="#vel">gen-seed</A><br>
+<A HREF="#vel">gen-temp</A><br>
+<A HREF="#vel">gen-vel</A><br>
<A HREF="#pp">include</A><br>
-<A HREF="#free">init_lambda</A><br>
-<A HREF="#run">init_step</A><br>
+<A HREF="#free">init-lambda</A><br>
+<A HREF="#run">init-step</A><br>
<A HREF="#run">integrator</A><br>
-<A HREF="#ld">ld_seed</A><br>
-<A HREF="#bond2">lincs_iter</A><br>
-<A HREF="#bond2">lincs_order</A><br>
-<A HREF="#bond2">lincs_warnangle</A><br>
+<A HREF="#ld">ld-seed</A><br>
+<A HREF="#bond2">lincs-iter</A><br>
+<A HREF="#bond2">lincs-order</A><br>
+<A HREF="#bond2">lincs-warnangle</A><br>
<A HREF="#bond2">morse</A><br>
<A HREF="#em">nbfgscorr</A><br>
<A HREF="#xmdrun">niter</A><br>
<A HREF="#out">nstvout</A><br>
<A HREF="#out">nstxout</A><br>
<A HREF="#out">nstxtcout</A><br>
-<A HREF="#nl">ns_type</A><br>
+<A HREF="#nl">ns-type</A><br>
<A HREF="#wall">nwall</A><br>
-<A HREF="#ewald">optimize_fft</A><br>
+<A HREF="#ewald">optimize-fft</A><br>
<A HREF="#nmr2">orire</A><br>
-<A HREF="#nmr2">orire_fc</A><br>
-<A HREF="#nmr2">orire_tau</A><br>
-<A HREF="#nmr2">orire_fitgrp</A><br>
+<A HREF="#nmr2">orire-fc</A><br>
+<A HREF="#nmr2">orire-tau</A><br>
+<A HREF="#nmr2">orire-fitgrp</A><br>
<A HREF="#nmr2">nstorireout</A><br>
<A HREF="#nl">pbc</A><br>
<A HREF="#pc">pcoupl</A><br>
<A HREF="#pc">pcoupltype</A><br>
-<A HREF="#nl">periodic_molecules</A><br>
-<A HREF="#ewald">pme_order</A><br>
+<A HREF="#nl">periodic-molecules</A><br>
+<A HREF="#ewald">pme-order</A><br>
<A HREF="#pull">pull</A><br>
-<A HREF="#pc">refcoord_scaling</A><br>
-<A HREF="#pc">ref_p</A><br>
-<A HREF="#tc">ref_t</A><br>
-<A HREF="#el2">rcoulomb_switch</A><br>
+<A HREF="#pc">refcoord-scaling</A><br>
+<A HREF="#pc">ref-p</A><br>
+<A HREF="#tc">ref-t</A><br>
+<A HREF="#el2">rcoulomb-switch</A><br>
<A HREF="#el2">rcoulomb</A><br>
<A HREF="#nl">rlist</A><br>
<A HREF="#nl">rlistlong</A><br>
<A HREF="#tpi">rtpi</A><br>
-<A HREF="#vdw">rvdw_switch</A><br>
+<A HREF="#vdw">rvdw-switch</A><br>
<A HREF="#vdw">rvdw</A><br>
-<A HREF="#free">sc_alpha</A><br>
-<A HREF="#free">sc_power</A><br>
-<A HREF="#free">sc_sigma</A><br>
-<A HREF="#bond2">shake_tol</A><br>
+<A HREF="#free">sc-alpha</A><br>
+<A HREF="#free">sc-power</A><br>
+<A HREF="#free">sc-sigma</A><br>
+<A HREF="#bond2">shake-tol</A><br>
<A HREF="#table">table-extension</A><br>
-<A HREF="#pc">tau_p</A><br>
-<A HREF="#tc">tau_t</A><br>
-<A HREF="#tc">tc_grps</A><br>
+<A HREF="#pc">tau-p</A><br>
+<A HREF="#tc">tau-t</A><br>
+<A HREF="#tc">tc-grps</A><br>
<A HREF="#tc">tcoupl</A><br>
<A HREF="#run">tinit</A><br>
<A HREF="#bond">continuation</A><br>
-<A HREF="#user">user1_grps</A><br>
-<A HREF="#user">user2_grps</A><br>
+<A HREF="#user">user1-grps</A><br>
+<A HREF="#user">user2-grps</A><br>
<A HREF="#user">userint1</A><br>
<A HREF="#user">userint2</A><br>
<A HREF="#user">userint3</A><br>
<A HREF="#user">userreal3</A><br>
<A HREF="#user">userreal4</A><br>
<A HREF="#el">vdwtype</A><br>
-<A HREF="#out">xtc_grps</A><br>
-<A HREF="#out">xtc_precision</A><br>
-<A HREF="#sa">zero_temp_time</A><br>
-<A HREF="#walls">wall_atomtype</A><br>
-<A HREF="#walls">wall_density</A><br>
-<A HREF="#walls">wall_ewald_zfac</A><br>
-<A HREF="#walls">wall_r_linpot</A><br>
-<A HREF="#walls">wall_type</A><br>
+<A HREF="#out">xtc-grps</A><br>
+<A HREF="#out">xtc-precision</A><br>
+<A HREF="#sa">zero-temp-time</A><br>
+<A HREF="#walls">wall-atomtype</A><br>
+<A HREF="#walls">wall-density</A><br>
+<A HREF="#walls">wall-ewald-zfac</A><br>
+<A HREF="#walls">wall-r-linpot</A><br>
+<A HREF="#walls">wall-type</A><br>
</multicol>
<hr>
The GROMACS xpm file format is compatible with the XPixMap format
and is used for storing matrix data.
Thus GROMACS xpm files can be viewed directly with programs like XV.
+Alternatively, they can be imported into GIMP and scaled to 300 DPI,
+using strong antialiasing for font and graphics.
The first matrix data line in an xpm file corresponds to the last matrix
row.
In addition to the XPixMap format, GROMACS xpm files may contain
+++ /dev/null
-## Process this file with automake to produce Makefile.in
-#
-# Don't edit - this file is generated automatically from Makefile.am
-#
-
-templatedir = ${pkgdatadir}/template
-
-# we don't build this, it's meant for the user to play with.
-# Since a Makefile is used for the installation, we call the
-# template makefile Template.mak, and rename it to Makefile when installing.
-# We add the GMX_DOUBLE define to CPPFLAGS, so users can do without config.h
-XLDFLAGS = -L@libdir@ @LDFLAGS@
-XLIBS = -lmd@LIBSUFFIX@ -lgmx@LIBSUFFIX@ @FFT_LIBS@ @XML_LIBS@ @GSL_LIBS@ @LIBS@
-XCC = @CC@
-if GMX_DOUBLE
-MYCFLAGS = @CFLAGS@ @INCLUDES@ -I@includedir@ -DGMX_DOUBLE
-else
-MYCFLAGS = @CFLAGS@ @INCLUDES@ -I@includedir@
-endif
-
-if GMX_DOUBLE
-template_DATA = template.c README Makefile.@host@_double Makefile.pkg
-else
-template_DATA = template.c README Makefile.@host@ Makefile.pkg
-endif
-EXTRA_DIST = template.c README Template.mak Makefile.pkg CMakeLists.txt.template
-
-BUILT_SOURCES = gromacs
-
-gromacs:
- $(LN_S) $(top_srcdir)/include gromacs
-
-Makefile.@host@ Makefile.@host@_double: Template.mak Makefile
- cat $(srcdir)/Template.mak | \
- sed 's,@LDFLAGS\@,$(XLDFLAGS),' | \
- sed 's,@LIBS\@,$(XLIBS),' | \
- sed 's,@CFLAGS\@,$(MYCFLAGS),' | \
- sed 's,@CC\@,$(XCC),' | \
- sed 's,@host\@,@host@,' >$@
-
-CLEANFILES = Makefile.@host@ Makefile.@host@_double *~ \\\#*
-
-template_SOURCES = template.c
-noinst_PROGRAMS = template
-LDADD = ../../src/mdlib/libmd@LIBSUFFIX@.la ../../src/gmxlib/libgmx@LIBSUFFIX@.la
-#template.$(OBJEXT): gromacs
-
-clean-local:
- rm -rf gromacs
CZ3 CD2 CE3 HE3
CG NE1 CD1 HD1
CD1 CG CB CD2
-
[ CPHE ]
[ atoms ]
[ bondtypes ]
; i j func b0 kb
- C C 1 0.1525 259408.0 ; new99
- C OS 1 0.1323 376560.0 ; new99
- C H4 1 0.1080 307105.6 ; new99
- C H5 1 0.1080 307105.6 ; new99
- CA OH 1 0.1364 376560.0 ; new99
- CM OS 1 0.1240 401664.0 ; new99
- Cl CT 1 0.1766 194137.6 ; new99
- Br CT 1 0.1944 133051.2 ; new99
- I CT 1 0.2166 123846.4 ; new99
- F CA 1 0.1359 323004.8 ; new99
- Cl CA 1 0.1727 161502.4 ; new99
- I CA 1 0.2075 143092.8 ; new99
- Br CA 1 0.1890 143929.6 ; new99
OW HW 1 0.09572 462750.4 ; P water
HW HW 1 0.15136 462750.4 ; P water
C CA 1 0.14090 392459.2 ; 7,(1986),230; TYR
; i j k func th0 cth
HW OW HW 1 104.520 836.800 ; TIP3P water
HW HW OW 1 127.740 0.000 ; (found in crystallographic water with 3 bonds)
-C C O 1 120.000 669.440 ; new99
-C C OH 1 120.000 669.440 ; new99
-CT C CT 1 117.000 527.184 ; new99
-CT C OS 1 115.000 669.440 ; new99
-O C OS 1 125.000 669.440 ; new99
-H4 C C 1 120.000 418.400 ; new99
-H4 C CM 1 115.000 418.400 ; new99
-H4 C CT 1 115.000 418.400 ; new99
-H4 C O 1 120.000 418.400 ; new99
-H4 C OH 1 120.000 418.400 ; new99
-H5 C N 1 120.000 418.400 ; new99
-H5 C O 1 119.000 418.400 ; new99
-H5 C OH 1 107.000 418.400 ; new99
-H5 C OS 1 107.000 418.400 ; new99
-CA CA OH 1 120.000 585.760 ; new99
-CA OH HO 1 113.000 418.400 ; new99
-F CA CA 1 121.000 585.760 ; new99
-Cl CA CA 1 118.800 585.760 ; new99
-Br CA CA 1 118.800 585.760 ; new99
-I CA CA 1 118.800 585.760 ; new99
-CM CM OS 1 125.000 669.440 ; new99
-H4 CM OS 1 113.000 418.400 ; new99
-HA CM HA 1 120.000 292.880 ; new99
-HA CM CT 1 120.000 418.400 ; new99
-H1 CT CM 1 109.500 418.400 ; new99
-HC CT CM 1 109.500 418.400 ; new99
-C CT OS 1 109.500 502.080 ; new99
-CM CT CT 1 111.000 527.184 ; new99
-CM CT OS 1 109.500 418.400 ; new99
-CT CT CA 1 114.000 527.184 ; new99
-OS CT OS 1 101.000 502.080 ; new99
-F CT CT 1 109.000 418.400 ; new99
-F CT H2 1 109.500 418.400 ; new99
-Cl CT CT 1 108.500 418.400 ; new99
-Cl CT H1 1 108.500 418.400 ; new99
-Br CT CT 1 108.000 418.400 ; new99
-Br CT H1 1 106.500 418.400 ; new99
-I CT CT 1 106.000 418.400 ; new99
CB C NA 1 111.300 585.760 ; NA
CB C O 1 128.800 669.440 ;
CM C NA 1 114.100 585.760 ;
CM C O 1 125.300 669.440 ;
CT C O 1 120.400 669.440 ;
CT C O2 1 117.000 585.760 ;
-CT C OH 1 110.000 669.440 ; new99
+CT C OH 1 117.000 585.760 ;
N* C NA 1 115.400 585.760 ;
N* C NC 1 118.600 585.760 ;
N* C O 1 120.900 669.440 ;
N C O 1 122.900 669.440 ; AA general
O C O 1 126.000 669.440 ; AA COO- terminal residues
O2 C O2 1 126.000 669.440 ; AA GLU (SCH JPC 79,2379)
-O C OH 1 120.000 669.440 ;
+O C OH 1 126.000 669.440 ;
CA C CA 1 120.000 527.184 ; changed from 85.0 bsd on C6H6 nmodes; AA tyr
CA C OH 1 120.000 585.760 ; AA tyr
C CA CA 1 120.000 527.184 ; changed from 85.0 bsd on C6H6 nmodes
CA CA CA 1 120.000 527.184 ; changed from 85.0 bsd on C6H6 nmodes
CA CA CB 1 120.000 527.184 ; changed from 85.0 bsd on C6H6 nmodes
CA CA CT 1 120.000 585.760 ;
-CA CA HA 1 120.000 418.400 ; new99
-CA CA H4 1 120.000 418.400 ; new99
-CB CA HA 1 120.000 418.400 ; new99
-CB CA H4 1 120.000 418.400 ; new99
+CA CA HA 1 120.000 292.880 ;
+CA CA H4 1 120.000 292.880 ;
+CB CA HA 1 120.000 292.880 ;
+CB CA H4 1 120.000 292.880 ;
CB CA N2 1 123.500 585.760 ;
CB CA NC 1 117.300 585.760 ;
CM CA N2 1 120.100 585.760 ;
N2 CA NA 1 116.000 585.760 ;
N2 CA NC 1 119.300 585.760 ;
NA CA NC 1 123.300 585.760 ;
-C CA HA 1 120.000 418.400 ; new99 tyr
+C CA HA 1 120.000 292.880 ; AA tyr
N2 CA N2 1 120.000 585.760 ; AA arg
-CN CA HA 1 120.000 418.400 ; new99 trp
+CN CA HA 1 120.000 292.880 ; AA trp
CA CA CN 1 120.000 527.184 ; changed from 85.0 bsd on C6H6 nmodes; AA trp
C CB CB 1 119.200 527.184 ; changed from 85.0 bsd on C6H6 nmodes; NA gua
C CB NB 1 130.000 585.760 ;
C* CB CA 1 134.900 527.184 ; changed from 85.0 bsd on C6H6 nmodes; AA trp
C* CB CN 1 108.800 527.184 ; changed from 85.0 bsd on C6H6 nmodes; AA trp
CA CB CN 1 116.200 527.184 ; changed from 85.0 bsd on C6H6 nmodes; AA trp
-H5 CK N* 1 123.050 418.400 ; new99
-H5 CK NB 1 123.050 418.400 ; new99
+H5 CK N* 1 123.050 292.880 ;
+H5 CK NB 1 123.050 292.880 ;
N* CK NB 1 113.900 585.760 ;
C CM CM 1 120.700 527.184 ; changed from 85.0 bsd on C6H6 nmodes; NA thy
C CM CT 1 119.700 585.760 ;
-C CM HA 1 119.700 418.400 ; new99
-C CM H4 1 119.700 418.400 ; new99
+C CM HA 1 119.700 292.880 ;
+C CM H4 1 119.700 292.880 ;
CA CM CM 1 117.000 527.184 ; changed from 85.0 bsd on C6H6 nmodes; NA cyt
-CA CM HA 1 123.300 418.400 ; new99
-CA CM H4 1 123.300 418.400 ; new99
+CA CM HA 1 123.300 292.880 ;
+CA CM H4 1 123.300 292.880 ;
CM CM CT 1 119.700 585.760 ;
-CM CM HA 1 119.700 418.400 ; new99
-CM CM H4 1 119.700 418.400 ; new99
+CM CM HA 1 119.700 292.880 ;
+CM CM H4 1 119.700 292.880 ;
CM CM N* 1 121.200 585.760 ;
-H4 CM N* 1 119.100 418.400 ; new99
-H5 CQ NC 1 115.450 418.400 ; new99
+H4 CM N* 1 119.100 292.880 ;
+H5 CQ NC 1 115.450 292.880 ;
NC CQ NC 1 129.100 585.760 ;
CM CT HC 1 109.500 418.400 ; changed based on NMA nmodes
CT CT CT 1 109.500 334.720 ;
CW CC NA 1 120.000 585.760 ; AA his
CW CC NB 1 120.000 585.760 ; AA his
CT CC CW 1 120.000 585.760 ; AA his
-H5 CR NA 1 120.000 418.400 ; new99 his
-H5 CR NB 1 120.000 418.400 ; new99 his
+H5 CR NA 1 120.000 292.880 ; AA his
+H5 CR NB 1 120.000 292.880 ; AA his
NA CR NA 1 120.000 585.760 ; AA his
NA CR NB 1 120.000 585.760 ; AA his
-CC CV H4 1 120.000 418.400 ; new99 his
+CC CV H4 1 120.000 292.880 ; AA his
CC CV NB 1 120.000 585.760 ; AA his
-H4 CV NB 1 120.000 418.400 ; new99 his
-CC CW H4 1 120.000 418.400 ; new99 his
+H4 CV NB 1 120.000 292.880 ; AA his
+CC CW H4 1 120.000 292.880 ; AA his
CC CW NA 1 120.000 585.760 ; AA his
-H4 CW NA 1 120.000 418.400 ; new99 his
-C* CW H4 1 120.000 418.400 ; new99 trp
+H4 CW NA 1 120.000 292.880 ; AA his
+C* CW H4 1 120.000 292.880 ; AA trp
C* CW NA 1 108.700 585.760 ; AA trp
CT C* CW 1 125.000 585.760 ; AA trp
CB C* CT 1 128.600 585.760 ; AA trp
CB CN NA 1 104.400 585.760 ; AA trp
CA CN CB 1 122.700 527.184 ; changed from 85.0 bsd on C6H6 nmodes; AA trp
C N CT 1 121.900 418.400 ; AA general
-C N H 1 120.000 418.400 ; new99 general, gln, asn,changed based on NMA nmodes
-CT N H 1 118.040 418.400 ; new99 general, changed based on NMA nmodes
+C N H 1 120.000 251.040 ; AA general, gln, asn,changed based on NMA nmodes
+CT N H 1 118.040 251.040 ; AA general, changed based on NMA nmodes
CT N CT 1 118.000 418.400 ; AA pro (DETAR JACS 99,1232)
H N H 1 120.000 292.880 ; ade,cyt,gua,gln,asn **
C N* CM 1 121.600 585.760 ;
C N* CT 1 117.600 585.760 ;
-C N* H 1 119.200 418.400 ; new99
+C N* H 1 119.200 251.040 ; changed based on NMA nmodes
CB N* CK 1 105.400 585.760 ;
CB N* CT 1 125.800 585.760 ;
-CB N* H 1 125.800 418.400 ; new99
+CB N* H 1 125.800 251.040 ; for unmethylated n.a. bases,chngd bsd NMA nmodes
CK N* CT 1 128.800 585.760 ;
-CK N* H 1 128.800 418.400 ; new99 for unmethylated n.a. bases,chngd bsd NMA nmodes
+CK N* H 1 128.800 251.040 ; for unmethylated n.a. bases,chngd bsd NMA nmodes
CM N* CT 1 121.200 585.760 ;
-CM N* H 1 121.200 418.400 ; new99 for unmethylated n.a. bases,chngd bsd NMA nmodes
-CA N2 H 1 120.000 418.400 ; new99
+CM N* H 1 121.200 251.040 ; for unmethylated n.a. bases,chngd bsd NMA nmodes
+CA N2 H 1 120.000 292.880 ;
H N2 H 1 120.000 292.880 ;
-CT N2 H 1 118.400 418.400 ; new99 arg
+CT N2 H 1 118.400 292.880 ; AA arg
CA N2 CT 1 123.200 418.400 ; AA arg
CT N3 H 1 109.500 418.400 ; AA lys, changed based on NMA nmodes
CT N3 CT 1 109.500 418.400 ; AA pro/nt
H N3 H 1 109.500 292.880 ; AA lys, AA(end)
C NA C 1 126.400 585.760 ;
C NA CA 1 125.200 585.760 ;
-C NA H 1 116.800 418.400 ; new99
-CA NA H 1 118.000 418.400 ; new99
+C NA H 1 116.800 251.040 ; changed based on NMA nmodes
+CA NA H 1 118.000 251.040 ; changed based on NMA nmodes
CC NA CR 1 120.000 585.760 ; AA his
-CC NA H 1 120.000 418.400 ; new99 his
+CC NA H 1 120.000 251.040 ; AA his, changed based on NMA nmodes
CR NA CW 1 120.000 585.760 ; AA his
-CR NA H 1 120.000 418.400 ; new99 his
-CW NA H 1 120.000 418.400 ; new99 his
+CR NA H 1 120.000 251.040 ; AA his, changed based on NMA nmodes
+CW NA H 1 120.000 251.040 ; AA his, changed based on NMA nmodes
CN NA CW 1 111.600 585.760 ; AA trp
-CN NA H 1 123.100 418.400 ; new99 trp
+CN NA H 1 123.100 251.040 ; AA trp, changed based on NMA nmodes
CB NB CK 1 103.800 585.760 ;
CC NB CR 1 117.000 585.760 ; AA his
CR NB CV 1 117.000 585.760 ; AA his
CA NC CB 1 112.200 585.760 ;
CA NC CQ 1 118.600 585.760 ;
CB NC CQ 1 111.000 585.760 ;
-C OH HO 1 113.000 418.400 ; new99
+C OH HO 1 113.000 292.880 ;
CT OH HO 1 108.500 460.240 ;
HO OH P 1 108.500 376.560 ;
CT OS CT 1 109.500 502.080 ;
CT SH HS 1 96.000 359.824 ; changed from 44.0 based on methanethiol nmodes
HS SH HS 1 92.070 292.880 ; AA cys
F CT F 1 109.100 644.336 ; JCC,13,(1992),963;
-F CT H1 1 109.500 418.400 ; new99
+F CT H1 1 109.500 292.880 ; JCC,13,(1992),963;
N C N 1 120.000 585.760 ; Added for Urea (same as N2-CA-N2) - EJS
[ dihedraltypes ]
;i j k l func phase kd pn
-CA CA CA OH 4 180.00 4.60240 2 ; new99
-H5 O C OH 4 180.00 4.60240 2 ; new99
-H5 O C OS 4 180.00 4.60240 2 ; new99
-CM CT CM HA 4 180.00 4.60240 2 ; new99
-CA CA CA Br 4 180.00 4.60240 2 ; new99
-CM H4 C O 4 180.00 4.60240 2 ; new99
-C CT N H 4 180.00 4.60240 2 ; new99
-C CT N O 4 180.00 4.60240 2 ; new99
+;impropers treated as propers in GROMACS to use correct AMBER analytical function
CB CK N* CT 4 180.00 4.18400 2 ;
-CK CB N* CT 4 180.00 4.18400 2 ;
+CK CB N* CT 4 180.00 4.18400 2 ;
+CM C N* CT 4 180.00 4.18400 2 ; dac guess, 9/94
C CM N* CT 4 180.00 4.18400 2 ; dac guess, 9/94
CT N* C CM 4 180.00 4.18400 2 ;
CM C CM CT 4 180.00 4.60240 2 ;
+C CM CM CT 4 180.00 4.60240 2 ;
CT O C OH 4 180.00 43.93200 2 ;
+CT CV CC NA 4 180.00 4.60240 2 ;
NA CV CC CT 4 180.00 4.60240 2 ;
+CT CW CC NB 4 180.00 4.60240 2 ;
NB CW CC CT 4 180.00 4.60240 2 ;
+CT CW CC NA 4 180.00 4.60240 2 ;
NA CW CC CT 4 180.00 4.60240 2 ;
+CB CT C* CW 4 180.00 4.60240 2 ;
CW CB C* CT 4 180.00 4.60240 2 ;
CA CA CA CT 4 180.00 4.60240 2 ;
C CM CM CT 4 180.00 4.60240 2 ; dac guess, 9/94
+CM N2 CA NC 4 180.00 4.60240 2 ; dac guess, 9/94
NC CM CA N2 4 180.00 4.60240 2 ; dac guess, 9/94
+CB N2 CA NC 4 180.00 4.60240 2 ; dac, 10/94
CB NC CA N2 4 180.00 4.60240 2 ; dac, 10/94
+N2 NA CA NC 4 180.00 4.60240 2 ; dac, 10/94
NA NC CA N2 4 180.00 4.60240 2 ; dac, 10/94
CA CA C OH 4 180.00 4.60240 2 ;
-CT CV CC NA 4 180.00 4.60240 2 ;
-CT CW CC NB 4 180.00 4.60240 2 ;
-CT CW CC NA 4 180.00 4.60240 2 ;
-CB CT C* CW 4 180.00 4.60240 2 ;
-CM N2 CA NC 4 180.00 4.60240 2 ;
-CB N2 CA NC 4 180.00 4.60240 2 ;
-N2 NA CA NC 4 180.00 4.60240 2 ;
N N C O 4 180.00 43.93200 2 ; urea
X O2 C O2 4 180.00 43.93200 2 ; JCC,7,(1986),230
X N2 CA N2 4 180.00 43.93200 2 ; JCC,7,(1986),230
[ dihedraltypes ]
-;i j k l func
- CT CT OS CT 9 0.0 1.60247 3 ;
+;i j k l func C0 ... C5
CT CT OS CT 9 180.0 0.41840 2 ;
- C N CT C 9 0.0 1.12968 2 ; new for 99sb
- C N CT C 9 0.0 1.75728 3 ; new for 99sb
- N CT C N 9 180.0 1.88280 1 ; new for 99sb
- N CT C N 9 180.0 6.61072 2 ; new for 99sb
- N CT C N 9 180.0 2.30120 3 ; new for 99sb
- CT CT N C 9 0.0 8.36800 1 ; new for 99sb
- CT CT N C 9 0.0 8.36800 2 ; new for 99sb
- CT CT N C 9 0.0 1.67360 3 ; new for 99sb
- CT CT C N 9 0.0 0.83680 1 ; new for 99sb
- CT CT C N 9 0.0 0.83680 2 ; new for 99sb
- CT CT C N 9 0.0 1.67360 3 ; new for 99sb
- H N C O 9 180.0 10.46000 2 ; JCC,7,(1986),230
+ CT CT OS CT 9 0.0 1.60247 3 ;
+ C N CT C 9 0.0 0.0 1 ; AmberGS
+ N CT C N 9 0.0 0.0 1 ; AmberGS
+ CT CT N C 9 0.0 2.21752 1 ;
+ CT CT N C 9 180.0 0.62760 3 ;
+ CT CT N C 9 180.0 2.09200 4 ;
+ CT CT C N 9 0.0 0.29288 2 ;
+ CT CT C N 9 0.0 0.41840 4 ;
H N C O 9 0.0 8.36800 1 ; J.C.cistrans-NMA DE
+ H N C O 9 180.0 10.46000 2 ; JCC,7,(1986),230
CT S S CT 9 0.0 14.64400 2 ; JCC,7,(1986),230
CT S S CT 9 0.0 2.51040 3 ; JCC,7,(1986),230
- OS CT CT OS 9 0.0 0.60250 3 ; parm98, TC,PC,PAK
- OS CT CT OS 9 0.0 4.91620 2 ; Piotr et al.
- OS CT CT OH 9 0.0 0.60250 3 ; parm98, TC,PC,PAK
- OS CT CT OH 9 0.0 4.91620 2 ; parm98, TC,PC,PAK
- OH CT CT OH 9 0.0 0.60250 3 ; parm98, TC,PC,PAK
- OH CT CT OH 9 0.0 4.91620 2 ; parm98, TC,PC,PAK
- OH P OS CT 9 0.0 1.04600 3 ; JCC,7,(1986),230
+ OS CT CT OS 9 0.0 4.18400 2 ; pucker anal (93')
+ OS CT CT OS 9 0.0 0.60250 3 ; JCC,7,(1986),230
+ OS CT CT OH 9 0.0 4.18400 2 ; pucker anal (93')
+ OS CT CT OH 9 0.0 0.60250 3 ; JCC,7,(1986),230
+ OH CT CT OH 9 0.0 4.18400 2 ; check glicolWC? puc
+ OH CT CT OH 9 0.0 0.60250 3 ; JCC,7,(1986),230
OH P OS CT 9 0.0 5.02080 2 ; gg> ene.631g*/mp2
- OS P OS CT 9 0.0 1.04600 3 ; JCC,7,(1986),230
+ OH P OS CT 9 0.0 1.04600 3 ; JCC,7,(1986),230
OS P OS CT 9 0.0 5.02080 2 ; gg> ene.631g*/mp2
- OS CT N* CK 9 0.0 10.46000 1 ; parm98, TC,PC,PAK
- OS CT N* CM 9 0.0 10.46000 1 ; parm98, TC,PC,PAK
- H1 CT C O 9 0.0 3.34720 1 ; Junmei et al, 1999
- H1 CT C O 9 180.0 0.33472 3 ; Junmei et al, 1999
- HC CT C O 9 0.0 3.34720 1 ; Junmei et al, 1999
- HC CT C O 9 180.0 0.33472 3 ; Junmei et al, 1999
- HC CT CT HC 9 0.0 0.62760 3 ; Junmei et al, 1999
- HC CT CT CT 9 0.0 0.66944 3 ; Junmei et al, 1999
- HC CT CM CM 9 180.0 1.58992 3 ; Junmei et al, 1999
- HC CT CM CM 9 0.0 4.81160 1 ; Junmei et al, 1999
- HO OH CT CT 9 0.0 0.66944 3 ; Junmei et al, 1999
- HO OH CT CT 9 0.0 1.04600 1 ; Junmei et al, 1999
- HO OH C O 9 180.0 9.62320 2 ; Junmei et al, 1999
- HO OH C O 9 0.0 7.94960 1 ; Junmei et al, 1999
- CM CM C O 9 180.0 9.10020 2 ; Junmei et al, 1999
- CM CM C O 9 0.0 1.25520 3 ; Junmei et al, 1999
- CT CM CM CT 9 180.0 27.82360 2 ; Junmei et al, 1999
- CT CM CM CT 9 180.0 7.94960 1 ; Junmei et al, 1999
- CT CT CT CT 9 0.0 0.75312 3 ; Junmei et al, 1999
- CT CT CT CT 9 180.0 1.04600 2 ; Junmei et al, 1999
- CT CT CT CT 9 180.0 0.83680 1 ; Junmei et al, 1999
- CT CT OS C 9 0.0 1.60247 3 ; Junmei et al, 1999
- CT CT OS C 9 180.0 3.34720 1 ; Junmei et al, 1999
- CT OS CT OS 9 0.0 0.41840 3 ; Junmei et al, 1999
- CT OS CT OS 9 180.0 3.55640 2 ; Junmei et al, 1999
- CT OS CT OS 9 180.0 5.64840 1 ; Junmei et al, 1999
- O C OS CT 9 180.0 11.29680 2 ; Junmei et al, 1999
- O C OS CT 9 180.0 5.85760 1 ; Junmei et al, 1999
- F CT CT F 9 180.0 5.02080 1 ; Junmei et al, 1999
- Cl CT CT Cl 9 180.0 1.88280 1 ; Junmei et al, 1999
- Br CT CT Br 9 0.0 0.00000 0 ; Junmei et al, 1999
- H1 CT CT OS 9 0.0 1.04600 1 ; Junmei et al, 1999
- H1 CT CT OH 9 0.0 1.04600 1 ; Junmei et al, 1999
- H1 CT CT F 9 0.0 0.79496 1 ; Junmei et al, 1999
- H1 CT CT Cl 9 0.0 1.04600 1 ; Junmei et al, 1999
- H1 CT CT Br 9 0.0 2.30120 1 ; Junmei et al, 1999
- HC CT CT OS 9 0.0 1.04600 1 ; Junmei et al, 1999
- HC CT CT OH 9 0.0 1.04600 1 ; Junmei et al, 1999
- HC CT CT F 9 0.0 0.79496 1 ; Junmei et al, 1999
- HC CT CT Cl 9 0.0 1.04600 1 ; Junmei et al, 1999
- HC CT CT Br 9 0.0 2.30120 1 ; Junmei et al, 1999
- CT OS CT N* 9 0.0 1.60247 3 ; parm98.dat, TC,PC,PAK
- CT OS CT N* 9 0.0 2.71960 2 ; Piotr et al.
- X C C X 9 180.0 15.16700 2 ; Junmei et al, 1999
- X C O X 9 180.0 11.71520 2 ; Junmei et al, 1999
- X C OS X 9 180.0 11.29680 2 ; Junmei et al, 1999
- X CA OH X 9 180.0 3.76560 2 ; Junmei et al, 99
- X CM OS X 9 180.0 4.39320 2 ; Junmei et al, 1999
+ OS P OS CT 9 0.0 1.04600 3 ; JCC,7,(1986),230
+ OS CT N* CK 9 0.0 10.46000 1 ; sugar frag calc (PC)
+ OS CT N* CK 9 180.0 2.09200 2 ; sugar frag calc (PC)
+ OS CT N* CM 9 0.0 10.46000 1 ; sugar frag calc (PC)
+ OS CT N* CM 9 180.0 2.09200 2 ; sugar frag calc (PC)
X C CA X 9 180.0 15.16700 2 ; intrpol.bsd.on C6H6
X C CB X 9 180.0 12.55200 2 ; intrpol.bsd.on C6H6
X C CM X 9 180.0 9.10020 2 ; intrpol.bsd.on C6H6
X C N* X 9 180.0 6.06680 2 ; JCC,7,(1986),230
X C NA X 9 180.0 5.64840 2 ; JCC,7,(1986),230
X C NC X 9 180.0 16.73600 2 ; JCC,7,(1986),230
- X C OH X 9 180.0 9.62320 2 ; Junmei et al, 1999
- X C CT X 9 0.0 0.00000 0 ; JCC,7,(1986),230
+ X C OH X 9 180.0 3.76560 2 ; JCC,7,(1986),230
+ X C CT X 9 0.0 0.00000 2 ; JCC,7,(1986),230
X CA CA X 9 180.0 15.16700 2 ; intrpol.bsd.on C6H6
X CA CB X 9 180.0 14.64400 2 ; intrpol.bsd.on C6H6
X CA CM X 9 180.0 10.66920 2 ; intrpol.bsd.on C6H6
- X CA CT X 9 0.0 0.00000 0 ; JCC,7,(1986),230
+ X CA CT X 9 0.0 0.00000 2 ; JCC,7,(1986),230
X CA N2 X 9 180.0 10.04160 2 ; reinterpolated 93'
X CA NA X 9 180.0 6.27600 2 ; JCC,7,(1986),230
X CA NC X 9 180.0 20.08320 2 ; JCC,7,(1986),230
X CK N* X 9 180.0 7.11280 2 ; JCC,7,(1986),230
X CK NB X 9 180.0 41.84000 2 ; JCC,7,(1986),230
X CM CM X 9 180.0 27.82360 2 ; intrpol.bsd.on C6H6
- X CM CT X 9 0.0 0.00000 0 ; JCC,7,(1986),230
+ X CM CT X 9 0.0 0.00000 3 ; JCC,7,(1986),230
X CM N* X 9 180.0 7.74040 2 ; JCC,7,(1986),230
X CQ NC X 9 180.0 28.45120 2 ; JCC,7,(1986),230
X CT CT X 9 0.0 0.65084 3 ; JCC,7,(1986),230
- X CT N X 9 0.0 0.00000 0 ; JCC,7,(1986),230
- X CT N* X 9 0.0 0.00000 0 ; JCC,7,(1986),230
- X CT N2 X 9 0.0 0.00000 0 ; JCC,7,(1986),230
+ X CT N X 9 0.0 0.00000 2 ; JCC,7,(1986),230
+ X CT N* X 9 0.0 0.00000 2 ; JCC,7,(1986),230
+ X CT N2 X 9 0.0 0.00000 3 ; JCC,7,(1986),230
X CT OH X 9 0.0 0.69733 3 ; JCC,7,(1986),230
X CT OS X 9 0.0 1.60387 3 ; JCC,7,(1986),230
X OH P X 9 0.0 1.04600 3 ; JCC,7,(1986),230
X OS P X 9 0.0 1.04600 3 ; JCC,7,(1986),230
- X C N X 9 180.0 10.46000 2 ; AA,NMA
+ X C N X 9 180.0 10.46000 2 ; AA|check Wendy?&NMA
X CT N3 X 9 0.0 0.65084 3 ; JCC,7,(1986),230
X CT S X 9 0.0 1.39467 3 ; JCC,7,(1986),230
X CT SH X 9 0.0 1.04600 3 ; JCC,7,(1986),230
X C* CB X 9 180.0 7.00820 2 ; intrpol.bsd.onC6H6aa
- X C* CT X 9 0.0 0.00000 0 ; JCC,7,(1986),230
+ X C* CT X 9 0.0 0.00000 2 ; JCC,7,(1986),230
X C* CW X 9 180.0 27.30060 2 ; intrpol.bsd.on C6H6
X CA CN X 9 180.0 15.16700 2 ; reinterpolated 93'
X CB CN X 9 180.0 12.55200 2 ; reinterpolated 93'
- X CC CT X 9 0.0 0.00000 0 ; JCC,7,(1986),230
+ X CC CT X 9 0.0 0.00000 2 ; JCC,7,(1986),230
X CC CV X 9 180.0 21.54760 2 ; intrpol.bsd.on C6H6
X CC CW X 9 180.0 22.48900 2 ; intrpol.bsd.on C6H6
X CC NA X 9 180.0 5.85760 2 ; JCC,7,(1986),230
X CR NB X 9 180.0 20.92000 2 ; JCC,7,(1986),230
X CV NB X 9 180.0 10.04160 2 ; JCC,7,(1986),230
X CW NA X 9 180.0 6.27600 2 ; JCC,7,(1986),230
-
-
-
********************************************************************
#define _FF_AMBER
-#define _FF_AMBER96
+#define _FF_AMBER94
[ defaults ]
; nbfunc comb-rule gen-pairs fudgeLJ fudgeQQ
[ implicit_genborn_params ]
; atype sar st pi gbr hct
+;H0 0.1 1 1 0.125 0.85 ; H
C 0.172 1 1.554 0.1875 0.72 ; C
CA 0.18 1 1.037 0.1875 0.72 ; C
CB 0.172 0.012 1.554 0.1875 0.72 ; C
; rtp residue to rtp building block table
;GMX Force-field
A RA RA5 RA3 RAN
-T RT RT5 RT3 RTN
U RU RU5 RU3 RUN
C RC RC5 RC3 RCN
G RG RG5 RG3 RGN
1 5 HA CA N C CB
2 6 HB CB CG CA
1 2 HD2 OD2 CG CB
+CT3 2
+1 1 HN N -C CH3
+3 4 HH3 CH3 N HN
CYS2 3
1 1 HN N -C CA
1 5 HA CA N C CB
[ ZN2 ]
[ atoms ]
ZN ZN 2.00 0
+
+[ ACE ]
+ [ atoms ]
+ CH3 CT3 -0.270 0
+ HH31 HA 0.090 1
+ HH32 HA 0.090 2
+ HH33 HA 0.090 3
+ C C 0.510 4
+ O O -0.510 5
+ [ bonds ]
+ C CH3
+ C +N
+ CH3 HH31
+ CH3 HH32
+ CH3 HH33
+ O C
+ [ impropers ]
+ C CH3 +N O
+
+[ CT3 ]
+; this can also be done with the .c.tdb, but the atom naming is different
+; and this can matter
+ [ atoms ]
+ N NH1 -0.470 0
+ HN H 0.310 1
+ CH3 CT3 -0.110 2
+ HH31 HA 0.090 3
+ HH32 HA 0.090 4
+ HH33 HA 0.090 5
+ [ bonds ]
+ -C N
+ N HN
+ N CH3
+ CH3 HH31
+ CH3 HH32
+ CH3 HH33
+
+ [ impropers ]
+ N -C CH3 HN
+ -C CH3 N -O
O3' O3' ON5 15.9994 -0.66
[ Add ]
1 2 H3T O3' C3' C4'
- HN5 1.008 0.43
+ HN5 1.008 0.43 -1
C5' C5' CN8B 12.011 0.05
[ Add ]
1 2 H5T O5' C5' C4'
- HN5 1.008 0.43
+ HN5 1.008 0.43 -1
[ atoms ]
; id at type res nr residu name at name cg nr charge
-1 ZN 1 ZN ZN 1 -2
+1 ZN 1 ZN ZN 1 2
O3' O3' ON5 15.9994 -0.66
[ Add ]
1 2 H3T O3' C3' C4'
- HN5 1.008 0.43
+ HN5 1.008 0.43 -1
C5' C5' CN8B 12.011 0.05
[ Add ]
1 2 H5T O5' C5' C4'
- HN5 1.008 0.43
+ HN5 1.008 0.43 -1
ASP1 Protein
ASPH Protein
ASH Protein
+CT3 Protein
CYS Protein
CYS1 Protein
CYS2 Protein
dt = 0.002
nsteps = 10000
; For exact run continuation or redoing part of a run
-init_step = 0
+init-step = 0
; mode for center of mass motion removal
comm-mode = Linear
; number of steps for center of mass motion removal
; Force tolerance and initial step-size
emtol = 100
emstep = 0.01
-; Max number of iterations in relax_shells
+; Max number of iterations in relax-shells
niter = 20
; Step size (1/ps^2) for minimization of flexible constraints
fcstep = 0
; nblist update frequency
nstlist = 5
; ns algorithm (simple or grid)
-ns_type = grid
+ns-type = grid
; Periodic boundary conditions: xyz (default), no (vacuum)
; or full (infinite systems only)
pbc = xyz
; Spacing for the PME/PPPM FFT grid
fourierspacing = 0.12
; FFT grid size, when a value is 0 fourierspacing will be used
-fourier_nx = 0
-fourier_ny = 0
-fourier_nz = 0
+fourier-nx = 0
+fourier-ny = 0
+fourier-nz = 0
; EWALD/PME/PPPM parameters
-pme_order = 4
-ewald_rtol = 1e-05
-ewald_geometry = 3d
-epsilon_surface = 0
-optimize_fft = no
+pme-order = 4
+ewald-rtol = 1e-05
+ewald-geometry = 3d
+epsilon-surface = 0
+optimize-fft = no
; GENERALIZED BORN ELECTROSTATICS
; Algorithm for calculating Born radii
-gb_algorithm = Still
+gb-algorithm = Still
; Frequency of calculating the Born radii inside rlist
nstgbradii = 1
; Cutoff for Born radii calculation; the contribution from atoms
; between rlist and rgbradii is updated every nstlist steps
rgbradii = 2
; Salt concentration in M for Generalized Born models
-gb_saltconc = 0
+gb-saltconc = 0
; IMPLICIT SOLVENT (for use with Generalized Born electrostatics)
-implicit_solvent = No
+implicit-solvent = No
; OPTIONS FOR WEAK COUPLING ALGORITHMS
; Temperature coupling
; Groups to couple separately
tc-grps = System
; Time constant (ps) and reference temperature (K)
-tau_t = 0.1
-ref_t = 300
+tau-t = 0.1
+ref-t = 300
; Pressure coupling
Pcoupl = berendsen
Pcoupltype = isotropic
; Time constant (ps), compressibility (1/bar) and reference P (bar)
-tau_p = 1.0
+tau-p = 1.0
compressibility = 4.5e-5
-ref_p = 1.0
+ref-p = 1.0
; Random seed for Andersen thermostat
-andersen_seed = 815131
+andersen-seed = 815131
; SIMULATED ANNEALING
; Type of annealing for each temperature group (no/single/periodic)
annealing = no
; Number of time points to use for specifying annealing in each group
-annealing_npoints =
+annealing-npoints =
; List of times at the annealing points for each group
-annealing_time =
+annealing-time =
; Temp. at each annealing point, for each group.
-annealing_temp =
+annealing-temp =
; GENERATE VELOCITIES FOR STARTUP RUN
-gen_vel = yes
-gen_temp = 300
-gen_seed = 1993
+gen-vel = yes
+gen-temp = 300
+gen-seed = 1993
; OPTIONS FOR BONDS
constraints = all-bonds
; ENERGY GROUP EXCLUSIONS
; Pairs of energy groups for which all non-bonded interactions are excluded
-energygrp_excl =
+energygrp-excl =
; NMR refinement stuff
; Distance restraints type: No, Simple or Ensemble
dt = 0.002
nsteps = 500000
; For exact run continuation or redoing part of a run
-init_step = 0
+init-step = 0
; mode for center of mass motion removal
comm-mode = Linear
; number of steps for center of mass motion removal
; Force tolerance and initial step-size
emtol = 100
emstep = 0.01
-; Max number of iterations in relax_shells
+; Max number of iterations in relax-shells
niter = 20
; Step size (1/ps^2) for minimization of flexible constraints
fcstep = 0
; nblist update frequency
nstlist = 5
; ns algorithm (simple or grid)
-ns_type = grid
+ns-type = grid
; Periodic boundary conditions: xyz (default), no (vacuum)
; or full (infinite systems only)
pbc = xyz
; Spacing for the PME/PPPM FFT grid
fourierspacing = 0.12
; FFT grid size, when a value is 0 fourierspacing will be used
-fourier_nx = 0
-fourier_ny = 0
-fourier_nz = 0
+fourier-nx = 0
+fourier-ny = 0
+fourier-nz = 0
; EWALD/PME/PPPM parameters
-pme_order = 4
-ewald_rtol = 1e-05
-ewald_geometry = 3d
-epsilon_surface = 0
-optimize_fft = no
+pme-order = 4
+ewald-rtol = 1e-05
+ewald-geometry = 3d
+epsilon-surface = 0
+optimize-fft = no
; GENERALIZED BORN ELECTROSTATICS
; Algorithm for calculating Born radii
-gb_algorithm = Still
+gb-algorithm = Still
; Frequency of calculating the Born radii inside rlist
nstgbradii = 1
; Cutoff for Born radii calculation; the contribution from atoms
; between rlist and rgbradii is updated every nstlist steps
rgbradii = 2
; Salt concentration in M for Generalized Born models
-gb_saltconc = 0
+gb-saltconc = 0
; IMPLICIT SOLVENT (for use with Generalized Born electrostatics)
-implicit_solvent = No
+implicit-solvent = No
; OPTIONS FOR WEAK COUPLING ALGORITHMS
; Temperature coupling
; Groups to couple separately
tc-grps = MeOH SOL
; Time constant (ps) and reference temperature (K)
-tau_t = 0.1 0.1
-ref_t = 300 300
+tau-t = 0.1 0.1
+ref-t = 300 300
; Pressure coupling
Pcoupl = berendsen
Pcoupltype = anisotropic
; Time constant (ps), compressibility (1/bar) and reference P (bar)
-tau_p = 2.0
+tau-p = 2.0
compressibility = 5e-5 5e-5 5e-5 0 0 0
-ref_p = 1 1 1 0 0 0
+ref-p = 1 1 1 0 0 0
; Random seed for Andersen thermostat
-andersen_seed = 815131
+andersen-seed = 815131
; SIMULATED ANNEALING
; Type of annealing for each temperature group (no/single/periodic)
annealing = no no
; Number of time points to use for specifying annealing in each group
-annealing_npoints =
+annealing-npoints =
; List of times at the annealing points for each group
-annealing_time =
+annealing-time =
; Temp. at each annealing point, for each group.
-annealing_temp =
+annealing-temp =
; GENERATE VELOCITIES FOR STARTUP RUN
-gen_vel = yes
-gen_temp = 300
-gen_seed = 1993
+gen-vel = yes
+gen-temp = 300
+gen-seed = 1993
; OPTIONS FOR BONDS
constraints = all-bonds
; ENERGY GROUP EXCLUSIONS
; Pairs of energy groups for which all non-bonded interactions are excluded
-energygrp_excl =
+energygrp-excl =
; NMR refinement stuff
; Distance restraints type: No, Simple or Ensemble
; Force tolerance and initial step-size =
emtol = 0.001
emstep = 0.1
-; Max number of iterations in relax_shells =
+; Max number of iterations in relax-shells =
niter = 0
; Frequency of steepest descents steps when doing CG =
nstcgsteep = 1000
nstenergy = 100
; Output frequency and precision for xtc file =
nstxtcout = 10
-xtc_precision = 1000
+xtc-precision = 1000
; This selects the subset of atoms for the xtc file. You can =
; select multiple groups. By default all atoms will be written. =
xtc-grps =
; nblist update frequency =
nstlist = 100
; ns algorithm (simple or grid) =
-ns_type = simple
+ns-type = simple
; Periodic boundary conditions: xyz or none =
pbc = xyz
; nblist cut-off =
rcoulomb-switch = 0
rcoulomb = 1
; Dielectric constant (DC) for cut-off or DC of reaction field =
-epsilon_r = 1.0
+epsilon-r = 1.0
; Method for doing Van der Waals =
vdw-type = Cut-off
; cut-off lengths =
; Spacing for the PME/PPPM FFT grid =
fourierspacing = 0.12
; FFT grid size, when a value is 0 fourierspacing will be used =
-fourier_nx = 0
-fourier_ny = 0
-fourier_nz = 0
+fourier-nx = 0
+fourier-ny = 0
+fourier-nz = 0
; EWALD/PME/PPPM parameters =
-pme_order = 4
-ewald_rtol = 1e-05
-epsilon_surface = 0
-optimize_fft = no
+pme-order = 4
+ewald-rtol = 1e-05
+epsilon-surface = 0
+optimize-fft = no
; OPTIONS FOR WEAK COUPLING ALGORITHMS =
; Temperature coupling =
; Groups to couple separately =
tc-grps = System
; Time constant (ps) and reference temperature (K) =
-tau_t = 0.1
-ref_t = 300
+tau-t = 0.1
+ref-t = 300
; Pressure coupling =
Pcoupl = no
Pcoupltype = Isotropic
; Time constant (ps), compressibility (1/bar) and reference P (bar) =
-tau_p = 1
+tau-p = 1
compressibility =
-ref_p = 1.0 1.0 1.0
+ref-p = 1.0 1.0 1.0
; SIMULATED ANNEALING CONTROL =
annealing = no
; Time at which temperature should be zero (ps) =
-zero-temp_time = 0
+zero-temp-time = 0
; GENERATE VELOCITIES FOR STARTUP RUN =
-gen_vel = yes
-gen_temp = 300.0
-gen_seed = 173529
+gen-vel = yes
+gen-temp = 300.0
+gen-seed = 173529
; OPTIMIZATIONS FOR SOLVENT MODELS =
; Solvent molecule name (blank: no optimization) =
disre-weighting = Equal
; Use sqrt of the time averaged times the instantaneous violation =
disre-mixed = no
-disre_fc = 1000
-disre_tau = 0.0
+disre-fc = 1000
+disre-tau = 0.0
; Output frequency for pair distances to energy file =
nstdisreout = 100
freezegrps =
freezedim =
cos-acceleration = 0
-energygrp_excl =
+energygrp-excl =
; Electric fields =
; Format is number of terms (int) and for all terms an amplitude (real) =
; Force tolerance and initial step-size =
emtol = 0.001
emstep = 0.1
-; Max number of iterations in relax_shells =
+; Max number of iterations in relax-shells =
niter = 0
; Frequency of steepest descents steps when doing CG =
nstcgsteep = 1000
nstenergy = 100
; Output frequency and precision for xtc file =
nstxtcout = 10
-xtc_precision = 1000
+xtc-precision = 1000
; This selects the subset of atoms for the xtc file. You can =
; select multiple groups. By default all atoms will be written. =
xtc-grps =
; nblist update frequency =
nstlist = 100
; ns algorithm (simple or grid) =
-ns_type = simple
+ns-type = simple
; Periodic boundary conditions: xyz or none =
pbc = xyz
; nblist cut-off =
rcoulomb-switch = 0
rcoulomb = 1
; Dielectric constant (DC) for cut-off or DC of reaction field =
-epsilon_r = 1.0
+epsilon-r = 1.0
; Method for doing Van der Waals =
vdw-type = Cut-off
; cut-off lengths =
; Spacing for the PME/PPPM FFT grid =
fourierspacing = 0.12
; FFT grid size, when a value is 0 fourierspacing will be used =
-fourier_nx = 0
-fourier_ny = 0
-fourier_nz = 0
+fourier-nx = 0
+fourier-ny = 0
+fourier-nz = 0
; EWALD/PME/PPPM parameters =
-pme_order = 4
-ewald_rtol = 1e-05
-epsilon_surface = 0
-optimize_fft = no
+pme-order = 4
+ewald-rtol = 1e-05
+epsilon-surface = 0
+optimize-fft = no
; OPTIONS FOR WEAK COUPLING ALGORITHMS =
; Temperature coupling =
; Groups to couple separately =
tc-grps = System
; Time constant (ps) and reference temperature (K) =
-tau_t = 0.1
-ref_t = 300
+tau-t = 0.1
+ref-t = 300
; Pressure coupling =
Pcoupl = no
Pcoupltype = Isotropic
; Time constant (ps), compressibility (1/bar) and reference P (bar) =
-tau_p = 1
+tau-p = 1
compressibility =
-ref_p = 1.0 1.0 1.0
+ref-p = 1.0 1.0 1.0
; SIMULATED ANNEALING CONTROL =
annealing = no
; Time at which temperature should be zero (ps) =
-zero-temp_time = 0
+zero-temp-time = 0
; GENERATE VELOCITIES FOR STARTUP RUN =
-gen_vel = yes
-gen_temp = 300.0
-gen_seed = 173529
+gen-vel = yes
+gen-temp = 300.0
+gen-seed = 173529
; OPTIONS FOR BONDS =
constraints = none
disre-weighting = Equal
; Use sqrt of the time averaged times the instantaneous violation =
disre-mixed = no
-disre_fc = 1000
-disre_tau = 0.0
+disre-fc = 1000
+disre-tau = 0.0
; Output frequency for pair distances to energy file =
nstdisreout = 100
freezegrps =
freezedim =
cos-acceleration = 0
-energygrp_excl =
+energygrp-excl =
; Electric fields =
; Format is number of terms (int) and for all terms an amplitude (real) =
; Input file
;
cpp = /usr/bin/cpp
-define = -DFLEX_SPC
+define = -DFLEX-SPC
constraints = none
integrator = steep
nsteps = 100
emstep = 0.01
nstcomm = 1
-ns_type = grid
+ns-type = grid
rlist = 1
rcoulomb = 1.0
rvdw = 1.0
Tcoupl = no
Pcoupl = no
-gen_vel = no
+gen-vel = no
nstlog = 100
nstenergy = 100
nstlist = 10
-ns_type = grid
+ns-type = grid
rlist = 1.0
rcoulomb = 1.0
rvdw = 1.0
; Berendsen temperature coupling is on in two groups
Tcoupl = berendsen
tc-grps = Protein SOL
-tau_t = 0.1 0.1
-ref_t = 300 300
+tau-t = 0.1 0.1
+ref-t = 300 300
; Energy monitoring
energygrps = Protein SOL
; Isotropic pressure coupling is now on
Pcoupl = berendsen
Pcoupltype = isotropic
-tau_p = 0.5
+tau-p = 0.5
compressibility = 4.5e-5
-ref_p = 1.0
+ref-p = 1.0
; Generate velocites is off at 300 K.
-gen_vel = no
-gen_temp = 300.0
-gen_seed = 173529
+gen-vel = no
+gen-temp = 300.0
+gen-seed = 173529
nstlog = 10
nstenergy = 10
nstlist = 10
-ns_type = grid
+ns-type = grid
rlist = 1.0
rcoulomb = 1.0
rvdw = 1.0
; Berendsen temperature coupling is on in two groups
Tcoupl = berendsen
tc-grps = Protein SOL
-tau_t = 0.1 0.1
-ref_t = 300 300
+tau-t = 0.1 0.1
+ref-t = 300 300
; Energy monitoring
energygrps = Protein SOL
; Pressure coupling is not on
Pcoupl = no
-tau_p = 0.5
+tau-p = 0.5
compressibility = 4.5e-5
-ref_p = 1.0
+ref-p = 1.0
; Generate velocites is on at 300 K.
-gen_vel = yes
-gen_temp = 300.0
-gen_seed = 173529
+gen-vel = yes
+gen-temp = 300.0
+gen-seed = 173529
;
; File 'mdout.mdp' was generated
-; By user: spoel (291)
-; On host: chagall
-; At date: Mon Dec 15 13:13:06 2003
+; By user: alexxy (1000)
+; On host: x201
+; At date: Wed Oct 12 02:06:35 2011
;
; VARIOUS PREPROCESSING OPTIONS
-title = Yo
-cpp = /usr/bin/cpp
+; Preprocessor information: use cpp syntax.
+; e.g.: -I/home/joe/doe -I/home/mary/roe
include =
+; e.g.: -DPOSRES -DFLEXIBLE (note these variable names are case sensitive)
define =
; RUN CONTROL PARAMETERS
dt = 0.002
nsteps = 10000
; For exact run continuation or redoing part of a run
-init_step = 0
+init-step = 0
+; Part index is updated automatically on checkpointing (keeps files separate)
+simulation-part = 1
; mode for center of mass motion removal
comm-mode = Linear
; number of steps for center of mass motion removal
-nstcomm = 1
+nstcomm = 10
; group(s) for center of mass motion removal
comm-grps =
; LANGEVIN DYNAMICS OPTIONS
-; Temperature, friction coefficient (amu/ps) and random seed
-bd-temp = 300
+; Friction coefficient (amu/ps) and random seed
bd-fric = 0
ld-seed = 1993
; Force tolerance and initial step-size
emtol = 100
emstep = 0.01
-; Max number of iterations in relax_shells
+; Max number of iterations in relax-shells
niter = 20
-; Step size (1/ps^2) for minimization of flexible constraints
+; Step size (ps^2) for minimization of flexible constraints
fcstep = 0
; Frequency of steepest descents steps when doing CG
nstcgsteep = 1000
nbfgscorr = 10
+; TEST PARTICLE INSERTION OPTIONS
+rtpi = 0.05
+
; OUTPUT CONTROL OPTIONS
; Output frequency for coords (x), velocities (v) and forces (f)
nstxout = 0
nstvout = 0
nstfout = 0
-; Checkpointing helps you continue after crashes
-nstcheckpoint = 1000
; Output frequency for energies to log file and energy file
nstlog = 50
+nstcalcenergy = -1
nstenergy = 50
-; Output frequency and precision for xtc file
+; Output frequency and precision for .xtc file
nstxtcout = 50
xtc-precision = 1000
-; This selects the subset of atoms for the xtc file. You can
+; This selects the subset of atoms for the .xtc file. You can
; select multiple groups. By default all atoms will be written.
xtc-grps =
; Selection of energy groups
; nblist update frequency
nstlist = 5
; ns algorithm (simple or grid)
-ns_type = grid
-; Periodic boundary conditions: xyz (default), no (vacuum)
-; or full (infinite systems only)
+ns-type = grid
+; Periodic boundary conditions: xyz, no, xy
pbc = xyz
+periodic-molecules = no
; nblist cut-off
rlist = 0.9
-domain-decomposition = no
+; long-range cut-off for switched potentials
+rlistlong = -1
; OPTIONS FOR ELECTROSTATICS AND VDW
; Method for doing electrostatics
coulombtype = Cut-off
rcoulomb-switch = 0
rcoulomb = 0.9
-; Dielectric constant (DC) for cut-off or DC of reaction field
+; Relative dielectric constant for the medium and the reaction field
epsilon-r = 1
+epsilon-rf = 1
; Method for doing Van der Waals
vdw-type = Cut-off
; cut-off lengths
DispCorr = EnerPres
; Extension of the potential lookup tables beyond the cut-off
table-extension = 1
+; Seperate tables between energy group pairs
+energygrp-table =
; Spacing for the PME/PPPM FFT grid
fourierspacing = 0.12
; FFT grid size, when a value is 0 fourierspacing will be used
-fourier_nx = 0
-fourier_ny = 0
-fourier_nz = 0
+fourier-nx = 0
+fourier-ny = 0
+fourier-nz = 0
; EWALD/PME/PPPM parameters
-pme_order = 4
-ewald_rtol = 1e-05
-ewald_geometry = 3d
-epsilon_surface = 0
-optimize_fft = no
+pme-order = 4
+ewald-rtol = 1e-05
+ewald-geometry = 3d
+epsilon-surface = 0
+optimize-fft = no
+
+; IMPLICIT SOLVENT ALGORITHM
+implicit-solvent = No
; GENERALIZED BORN ELECTROSTATICS
; Algorithm for calculating Born radii
-gb_algorithm = Still
+gb-algorithm = Still
; Frequency of calculating the Born radii inside rlist
nstgbradii = 1
; Cutoff for Born radii calculation; the contribution from atoms
; between rlist and rgbradii is updated every nstlist steps
rgbradii = 2
+; Dielectric coefficient of the implicit solvent
+gb-epsilon-solvent = 80
; Salt concentration in M for Generalized Born models
-gb_saltconc = 0
-
-; IMPLICIT SOLVENT (for use with Generalized Born electrostatics)
-implicit_solvent = No
+gb-saltconc = 0
+; Scaling factors used in the OBC GB model. Default values are OBC(II)
+gb-obc-alpha = 1
+gb-obc-beta = 0.8
+gb-obc-gamma = 4.85
+gb-dielectric-offset = 0.009
+sa-algorithm = Ace-approximation
+; Surface tension (kJ/mol/nm^2) for the SA (nonpolar surface) part of GBSA
+; The value -1 will set default value for Still/HCT/OBC GB-models.
+sa-surface-tension = -1
; OPTIONS FOR WEAK COUPLING ALGORITHMS
; Temperature coupling
Tcoupl = berendsen
+nsttcouple = -1
+nh-chain-length = 10
; Groups to couple separately
tc-grps = System
; Time constant (ps) and reference temperature (K)
-tau_t = 0.1
-ref_t = 300
+tau-t = 0.1
+ref-t = 300
; Pressure coupling
Pcoupl = berendsen
Pcoupltype = isotropic
+nstpcouple = -1
; Time constant (ps), compressibility (1/bar) and reference P (bar)
-tau_p = 0.5
+tau-p = 0.5
compressibility = 4.5e-5
-ref_p = 1.0
+ref-p = 1.0
+; Scaling of reference coordinates, No, All or COM
+refcoord-scaling = No
; Random seed for Andersen thermostat
-andersen_seed = 815131
+andersen-seed = 815131
+
+; OPTIONS FOR QMMM calculations
+QMMM = no
+; Groups treated Quantum Mechanically
+QMMM-grps =
+; QM method
+QMmethod =
+; QMMM scheme
+QMMMscheme = normal
+; QM basisset
+QMbasis =
+; QM charge
+QMcharge =
+; QM multiplicity
+QMmult =
+; Surface Hopping
+SH =
+; CAS space options
+CASorbitals =
+CASelectrons =
+SAon =
+SAoff =
+SAsteps =
+; Scale factor for MM charges
+MMChargeScaleFactor = 1
+; Optimization of QM subsystem
+bOPT =
+bTS =
; SIMULATED ANNEALING
; Type of annealing for each temperature group (no/single/periodic)
annealing = no
; Number of time points to use for specifying annealing in each group
-annealing_npoints =
+annealing-npoints =
; List of times at the annealing points for each group
-annealing_time =
+annealing-time =
; Temp. at each annealing point, for each group.
-annealing_temp =
+annealing-temp =
; GENERATE VELOCITIES FOR STARTUP RUN
-gen_vel = yes
-gen_temp = 300
-gen_seed = 1993
+gen-vel = yes
+gen-temp = 300
+gen-seed = 1993
; OPTIONS FOR BONDS
constraints = none
; Type of constraint algorithm
constraint-algorithm = Lincs
; Do not constrain the start configuration
-unconstrained-start = no
+continuation = no
; Use successive overrelaxation to reduce the number of shake iterations
Shake-SOR = no
; Relative tolerance of shake
; ENERGY GROUP EXCLUSIONS
; Pairs of energy groups for which all non-bonded interactions are excluded
-energygrp_excl =
+energygrp-excl =
+
+; WALLS
+; Number of walls, type, atom types, densities and box-z scale factor for Ewald
+nwall = 0
+wall-type = 9-3
+wall-r-linpot = -1
+wall-atomtype =
+wall-density =
+wall-ewald-zfac = 3
+
+; COM PULLING
+; Pull type: no, umbrella, constraint or constant-force
+pull = no
; NMR refinement stuff
; Distance restraints type: No, Simple or Ensemble
orire-fc = 0
orire-tau = 0
orire-fitgrp =
-; Output frequency for trace(SD) to energy file
+; Output frequency for trace(SD) and S to energy file
nstorireout = 100
-; Dihedral angle restraints: No, Simple or Ensemble
+; Dihedral angle restraints: No or Yes
dihre = No
dihre-fc = 1000
-dihre-tau = 0
-; Output frequency for dihedral values to energy file
-nstdihreout = 100
; Free energy control stuff
free-energy = no
init-lambda = 0
delta-lambda = 0
+foreign-lambda =
sc-alpha = 0
+sc-power = 0
sc-sigma = 0.3
+nstdhdl = 10
+separate-dhdl-file = yes
+dhdl-derivatives = yes
+dh-hist-size = 0
+dh-hist-spacing = 0.1
+couple-moltype =
+couple-lambda0 = vdw-q
+couple-lambda1 = vdw-q
+couple-intramol = no
; Non-equilibrium MD stuff
acc-grps =
freezegrps =
freezedim =
cos-acceleration = 0
+deform =
; Electric fields
; Format is number of terms (int) and for all terms an amplitude (real)
if(NOT GMX_FAHCORE)
add_subdirectory(tools)
add_subdirectory(ngmx)
+ add_subdirectory(contrib)
endif(NOT GMX_FAHCORE)
order! Only relevant when FLOAT_FORMAT_IEEE754 is defined. */
#cmakedefine GMX_IEEE754_BIG_ENDIAN_WORD_ORDER
-/* Define as the return type of signal handlers (int or void). */
-#cmakedefine RETSIGTYPE @RETSIGTYPE@
-
/* Define if SIGUSR1 is present */
#cmakedefine HAVE_SIGUSR1
--- /dev/null
+set(CONTRIB_PROGRAMS
+ #add here any programs you want to compile
+)
+
+foreach(PROG ${CONTRIB_PROGRAMS})
+ add_executable(${PROG} ${PROG}.c ${NGMX_COMMON_SOURCE})
+ set_target_properties(${PROG} PROPERTIES OUTPUT_NAME "${PROG}${GMX_BINARY_SUFFIX}")
+endforeach(PROG)
+++ /dev/null
-## Process this file with automake to produce Makefile.in
-# Note: Makefile is automatically generated from Makefile.in by the configure
-# script, and Makefile.in is generated from Makefile.am by automake.
-
-AM_CPPFLAGS = -I$(top_srcdir)/include -DGMXLIBDIR=\"$(datadir)/top\" -I/sw/include
-
-LDADD = ../kernel/libgmxpreprocess@LIBSUFFIX@.la ../mdlib/libmd@LIBSUFFIX@.la ../gmxlib/libgmx@LIBSUFFIX@.la ../tools/libgmxana@LIBSUFFIX@.la
-
-
-EXTRA_DIST = README
-
-# These programs are not compiled or installed by default - you will have to
-# issue "make <program>" and copy the binary to the correct location yourself!
-# Add new entries in Makefile.am!
-
-EXTRA_PROGRAMS = copyrgt \
- hrefify \
- addquote compnl \
- gen_table ehole g_sdf\
- do_multiprot
-
-compnl_SOURCES = compnl.c
-compnl_LDADD = ../mdlib/libmd@LIBSUFFIX@.la ../gmxlib/libgmx@LIBSUFFIX@.la
-
-g_sdf_SOURCES = gmx_sdf.c g_sdf.c
-
-ehole_SOURCES = ehdata.c ehdata.h ehanal.c ehole.c
-
-# Note: you don't have to list sources for "prog" if it is the single file prog.c
-
-CLEANFILES = *~ \\\#*
or documented, so if there are problems your best bet is probably
either the mailing lists or to contact the author listed in the file.
-To add a program, you should edit Makefile.am. Have a look at
-www.gromacs.org/developer if you are unfamiliar with automake/autoconf.
-Since gromacs uses both assembly, fortran, shared libraries and
-dynamic dependency tracking on all platforms we rely on features in
-the prereleases of autoconf 1.5. Until this is released,
-you can get version 1.4j or later from ftp.gromacs.org/developer
-
-The EXTRA_PROGRAMS tag used here means they are not compiled and
-installed for the default package configuration setup.
-
-You should always be able to execute the program in this directory,
-but it is not installed automatically. Since we use libtool to handle
-shared/static libraries the "program file" you see is actually a libtool
-wrapper script, and if you move this script it will not work. To install
-e.g. "options" as "/usr/local/gromacs/i686-pc-linux-gnu/bin/options"
-you should give the command:
-
-../../libtool install options /usr/local/gromacs/i686-pc-linux-gnu/bin/options
+To add a program, you should edit CMakeLists.txt.
+++ /dev/null
-
-AM_CPPFLAGS= -I$(top_srcdir)/include -DGMXLIBDIR=\"$(datadir)/top\"
-
-noinst_PROGRAMS = mknb
-
-
-mknb_SOURCES = \
- mknb.c \
- mknb_metacode.c mknb_metacode.h \
- mknb_common.c mknb_common.h \
- mknb_declarations.c mknb_declarations.h \
- mknb_outerloop.c mknb_outerloop.h \
- mknb_innerloop.c mknb_innerloop.h \
- mknb_interactions.c mknb_interactions.h
-
-
if (USE_VERSION_H)
add_custom_target(gmx_version ALL
COMMAND ${CMAKE_COMMAND}
- -D Git_EXECUTABLE="${Git_EXECUTABLE}"
- -D Git_VERSION="${Git_VERSION}"
+ -D GIT_EXECUTABLE="${GIT_EXECUTABLE}"
+ -D GIT_VERSION="${GIT_VERSION}"
-D PROJECT_VERSION="${PROJECT_VERSION}"
-D PROJECT_SOURCE_DIR="${PROJECT_SOURCE_DIR}"
-D VERSION_C_CMAKEIN="${CMAKE_CURRENT_SOURCE_DIR}/version.c.cmakein"
/* Loop over all bonded force types to calculate the bonded forces */
for(ftype=0; (ftype<F_NRE); ftype++) {
if(ftype<F_GB12 || ftype>F_GB14) {
- if (interaction_function[ftype].flags & IF_BOND &&
+ if ((interaction_function[ftype].flags & IF_BOND) &&
!(ftype == F_CONNBONDS || ftype == F_POSRES)) {
nbonds=idef->il[ftype].nr;
if (nbonds > 0) {
for(ftype=0; (ftype<F_NRE); ftype++) {
if(ftype<F_GB12 || ftype>F_GB14) {
- if (interaction_function[ftype].flags & IF_BOND &&
+ if ((interaction_function[ftype].flags & IF_BOND) &&
!(ftype == F_CONNBONDS || ftype == F_POSRES))
{
nbonds_np = idef->il[ftype].nr_nonperturbed;
check_string(fplog,"Build machine",BUILD_MACHINE,bmach ,&mm);
check_string(fplog,"Program name" ,Program() ,fprog ,&mm);
- npp = cr->nnodes - cr->npmenodes;
check_int (fplog,"#nodes" ,cr->nnodes ,npp_f+npme_f ,&mm);
if (bPartDecomp)
{
dd_nc[YY] = 1;
dd_nc[ZZ] = 1;
}
- if (npp > 1)
+ if (cr->nnodes > 1)
{
check_int (fplog,"#PME-nodes" ,cr->npmenodes,npme_f ,&mm);
+
+ npp = cr->nnodes;
+ if (cr->npmenodes >= 0)
+ {
+ npp -= cr->npmenodes;
+ }
if (npp == npp_f)
{
check_int (fplog,"#DD-cells[x]",dd_nc[XX] ,dd_nc_f[XX],&mm);
if (!PAR(cr))
{
nppnodes = 1;
+ cr->npmenodes = 0;
}
else if (bPartDecomp)
{
nppnodes = cr->nnodes;
+ cr->npmenodes = 0;
}
else if (cr->nnodes == nppnodes_f + npmenodes_f)
{
cp_error();
}
*bReadEkin = ((flags_eks & (1<<eeksEKINH)) || (flags_eks & (1<<eeksEKINF)) || (flags_eks & (1<<eeksEKINO)) ||
- (flags_eks & (1<<eeksEKINSCALEF)) | (flags_eks & (1<<eeksEKINSCALEH)) | (flags_eks & (1<<eeksVSCALE)));
+ ((flags_eks & (1<<eeksEKINSCALEF)) | (flags_eks & (1<<eeksEKINSCALEH)) | (flags_eks & (1<<eeksVSCALE))));
ret = do_cpt_enerhist(gmx_fio_getxdr(fp),TRUE,
flags_enh,&state->enerhist,NULL);
"Auger Electron Cascades in Water and Ice",
"Chem. Phys.",
299, 2004, "277-283" },
+ { "Pascal2011a",
+ "T. A. Pascal and S. T. Lin and W. A. Goddard III",
+ "Thermodynamics of liquids: standard molar entropies and heat capacities of common solvents from 2PT molecular dynamics",
+ "Phys. Chem. Chem. Phys.",
+ 13, 2011, "169-181" },
{ "Caleman2011b",
"C. Caleman and M. Hong and J. S. Hub and L. T. da Costa and P. J. van Maaren and D. van der Spoel",
"Force Field Benchmark 1: Density, Heat of Vaporization, Heat Capacity, Surface Tension and Dielectric Constant of 152 Organic Liquids",
}
}
- if (PAR(cr) && !bPartDecomp)
+ if (cr && PAR(cr) && !bPartDecomp)
{
/* Temporary check, will be removed when disre is implemented with DD */
const char *notestr="NOTE: atoms involved in distance restraints should be within the longest cut-off distance, if this is not the case mdrun generates a fatal error, in that case use particle decomposition (mdrun option -pd)";
dd->Rtav_6 = &(dd->Rt_6[dd->nres]);
ptr = getenv("GMX_DISRE_ENSEMBLE_SIZE");
- if (cr->ms != NULL && ptr != NULL)
+ if (cr && cr->ms != NULL && ptr != NULL)
{
#ifdef GMX_MPI
dd->nsystems = 0;
if (fplog) {
fprintf(fplog,"There are %d distance restraints involving %d atom pairs\n",dd->nres,dd->npair);
}
- if (cr->ms)
+ if (cr && cr->ms)
{
check_multi_int(fplog,cr->ms,fcd->disres.nres,
"the number of distance restraints");
/* If it is not, open it as a regular file */
fio->fp = ffopen(fn,newmode);
}
+
+ /* for appending seek to end of file to make sure ftell gives correct position
+ * important for checkpointing */
+ if (newmode[0]=='a')
+ {
+ gmx_fseek(fio->fp, 0, SEEK_END);
+ }
}
else
{
}
}
+/*! /brief Instances of this struct contain the data necessary to
+ * construct a single (protein) index group in
+ * analyse_prot(). */
+typedef struct gmx_help_make_index_group
+{
+ /* The set of atom names that will be used to form this index group */
+ const char **defining_atomnames;
+ /* Size of the defining_atomnames array */
+ const int num_defining_atomnames;
+ /* Name of this index group */
+ const char *group_name;
+ /* Whether the above atom names name the atoms in the group, or
+ * those not in the group */
+ gmx_bool bTakeComplement;
+ /* The index in wholename gives the first item in the arrays of
+ * atomnames that should be tested with 'gmx_strncasecmp' in stead of
+ * gmx_strcasecmp, or -1 if all items should be tested with strcasecmp
+ * This is comparable to using a '*' wildcard at the end of specific
+ * atom names, but that is more involved to implement...
+ */
+ int wholename;
+ /* Only create this index group if it differs from the one specified in compareto,
+ where -1 means to always create this group. */
+ int compareto;
+} t_gmx_help_make_index_group;
+
static void analyse_prot(const char ** restype,t_atoms *atoms,
t_blocka *gb,char ***gn,gmx_bool bASK,gmx_bool bVerb)
{
- /* atomnames to be used in constructing index groups: */
- static const char *pnoh[] = { "H" };
+ /* lists of atomnames to be used in constructing index groups: */
+ static const char *pnoh[] = { "H", "HN" };
static const char *pnodum[] = { "MN1", "MN2", "MCB1", "MCB2", "MCG1", "MCG2",
"MCD1", "MCD2", "MCE1", "MCE2", "MNZ1", "MNZ2" };
static const char *calpha[] = { "CA" };
static const char *mc[] = { "N","CA","C","O","O1","O2","OC1","OC2","OT","OXT" };
static const char *mcb[] = { "N","CA","CB","C","O","O1","O2","OC1","OC2","OT","OXT" };
static const char *mch[] = { "N","CA","C","O","O1","O2","OC1","OC2","OT","OXT",
- "H1","H2","H3","H" };
- /* array of arrays of atomnames: */
- static const char **chains[] = { NULL,pnoh,calpha,bb,mc,mcb,mch,mch,mch,pnodum };
-#define NCH asize(chains)
- /* array of sizes of arrays of atomnames: */
- const int sizes[NCH] = {
- 0, asize(pnoh), asize(calpha), asize(bb),
- asize(mc), asize(mcb), asize(mch), asize(mch), asize(mch), asize(pnodum)
- };
- /* descriptive names of index groups */
- const char *ch_name[NCH] = {
- "Protein", "Protein-H", "C-alpha", "Backbone",
- "MainChain", "MainChain+Cb", "MainChain+H", "SideChain", "SideChain-H",
- "Prot-Masses"
- };
- /* construct index group containing (TRUE) or excluding (FALSE)
- given atom names */
- const gmx_bool complement[NCH] = {
- TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE
- };
- const int wholename[NCH] = { -1, 0,-1,-1,-1,-1,-1,-1, 11,-1 };
- /* the index in wholename gives the first item in the arrays of
- * atomtypes that should be tested with 'gmx_strncasecmp' in stead of
- * gmx_strcasecmp, or -1 if all items should be tested with strcasecmp
- * This is comparable to using a '*' wildcard at the end of specific
- * atom names, but that is more involved to implement...
- */
- /* only add index group if it differs from the specified one,
- specify -1 to always add group */
- const int compareto[NCH] = { -1,-1,-1,-1,-1,-1,-1,-1,-1, 0 };
+ "H1","H2","H3","H","HN" };
+
+ static const t_gmx_help_make_index_group constructing_data[] =
+ {{ NULL, 0, "Protein", TRUE, -1, -1},
+ { pnoh, asize(pnoh), "Protein-H", TRUE, 0, -1},
+ { calpha, asize(calpha), "C-alpha", FALSE, -1, -1},
+ { bb, asize(bb), "Backbone", FALSE, -1, -1},
+ { mc, asize(mc), "MainChain", FALSE, -1, -1},
+ { mcb, asize(mcb), "MainChain+Cb", FALSE, -1, -1},
+ { mch, asize(mch), "MainChain+H", FALSE, -1, -1},
+ { mch, asize(mch), "SideChain", TRUE, -1, -1},
+ { mch, asize(mch), "SideChain-H", TRUE, 11, -1},
+ { pnodum, asize(pnodum), "Prot-Masses", TRUE, -1, 0},
+ };
+ const int num_index_groups = asize(constructing_data);
int n,j;
atom_id *aid;
/* calculate the number of protein residues */
npres=0;
- for(i=0; (i<atoms->nres); i++)
- if (!gmx_strcasecmp(restype[i],"Protein"))
- {
+ for(i=0; (i<atoms->nres); i++) {
+ if (0 == gmx_strcasecmp(restype[i],"Protein")) {
npres++;
+ }
}
/* find matching or complement atoms */
- for(i=0; (i<(int)NCH); i++) {
+ for(i=0; (i<(int)num_index_groups); i++) {
nra=0;
for(n=0; (n<atoms->nr); n++) {
- if (!gmx_strcasecmp(restype[atoms->atom[n].resind],"Protein")) {
-
+ if (0 == gmx_strcasecmp(restype[atoms->atom[n].resind],"Protein")) {
match=FALSE;
- for(j=0; (j<sizes[i]); j++) {
+ for(j=0; (j<constructing_data[i].num_defining_atomnames); j++) {
/* skip digits at beginning of atomname, e.g. 1H */
atnm=*atoms->atomname[n];
- while (isdigit(atnm[0]))
+ while (isdigit(atnm[0])) {
atnm++;
- if ( (wholename[i]==-1) || (j<wholename[i]) ) {
- if (gmx_strcasecmp(chains[i][j],atnm) == 0)
+ }
+ if ( (constructing_data[i].wholename==-1) || (j<constructing_data[i].wholename) ) {
+ if (0 == gmx_strcasecmp(constructing_data[i].defining_atomnames[j],atnm)) {
match=TRUE;
+ }
} else {
- if (gmx_strncasecmp(chains[i][j],atnm,strlen(chains[i][j])) == 0)
+ if (0 == gmx_strncasecmp(constructing_data[i].defining_atomnames[j],atnm,strlen(constructing_data[i].defining_atomnames[j]))) {
match=TRUE;
+ }
}
}
- if (match != complement[i])
+ if (constructing_data[i].bTakeComplement != match) {
aid[nra++]=n;
+ }
}
}
/* if we want to add this group always or it differs from previous
group, add it: */
- if ( compareto[i] == -1 || !grp_cmp(gb,nra,aid,compareto[i]-i) )
- add_grp(gb,gn,nra,aid,ch_name[i]);
+ if ( -1 == constructing_data[i].compareto || !grp_cmp(gb,nra,aid,constructing_data[i].compareto-i) ) {
+ add_grp(gb,gn,nra,aid,constructing_data[i].group_name);
+ }
}
if (bASK) {
- for(i=0; (i<(int)NCH); i++) {
- printf("Split %12s into %5d residues (y/n) ? ",ch_name[i],npres);
+ for(i=0; (i<(int)num_index_groups); i++) {
+ printf("Split %12s into %5d residues (y/n) ? ",constructing_data[i].group_name,npres);
if (gmx_ask_yesno(bASK)) {
int resind;
nra = 0;
resind = atoms->atom[n].resind;
for(;((atoms->atom[n].resind==resind) && (n<atoms->nr));n++) {
match=FALSE;
- for(j=0;(j<sizes[i]); j++)
- if (gmx_strcasecmp(chains[i][j],*atoms->atomname[n]) == 0)
+ for(j=0;(j<constructing_data[i].num_defining_atomnames); j++) {
+ if (0 == gmx_strcasecmp(constructing_data[i].defining_atomnames[j],*atoms->atomname[n])) {
match=TRUE;
- if (match != complement[i])
+ }
+ }
+ if (constructing_data[i].bTakeComplement != match) {
aid[nra++]=n;
+ }
}
/* copy the residuename to the tail of the groupname */
if (nra > 0) {
t_resinfo *ri;
ri = &atoms->resinfo[resind];
sprintf(ndx_name,"%s_%s%d%c",
- ch_name[i],*ri->name,ri->nr,ri->ic==' ' ? '\0' : ri->ic);
+ constructing_data[i].group_name,*ri->name,ri->nr,ri->ic==' ' ? '\0' : ri->ic);
add_grp(gb,gn,nra,aid,ndx_name);
nra = 0;
}
hold=nra;
nra+=2;
} else if (strcmp("C",*atoms->atomname[n]) == 0) {
- if (hold == -1)
+ if (hold == -1) {
gmx_incons("Atom naming problem");
+ }
aid[hold]=n;
} else if (strcmp("O",*atoms->atomname[n]) == 0) {
- if (hold == -1)
+ if (hold == -1) {
gmx_incons("Atom naming problem");
+ }
aid[hold+1]=n;
} else if (strcmp("O1",*atoms->atomname[n]) == 0) {
- if (hold == -1)
+ if (hold == -1) {
gmx_incons("Atom naming problem");
+ }
aid[hold+1]=n;
} else
aid[nra++]=n;
/* preallocate a small buffer and ip on the stack - if we need more
we can always malloc(). This is faster for small values of size: */
- int prealloc_size=3*16;
+ unsigned prealloc_size=3*16;
int prealloc_ip[3*16], prealloc_buf[3*20];
int we_should_free=0;
/* initialize the MPI_IN_PLACE replacement buffers */
snew(ms->mpb, 1);
ms->mpb->ibuf=NULL;
+ ms->mpb->libuf=NULL;
ms->mpb->fbuf=NULL;
ms->mpb->dbuf=NULL;
ms->mpb->ibuf_alloc=0;
+ ms->mpb->libuf_alloc=0;
ms->mpb->fbuf_alloc=0;
ms->mpb->dbuf_alloc=0;
#endif
/* initialize the MPI_IN_PLACE replacement buffers */
snew(cr->mpb, 1);
cr->mpb->ibuf=NULL;
+ cr->mpb->libuf=NULL;
cr->mpb->fbuf=NULL;
cr->mpb->dbuf=NULL;
cr->mpb->ibuf_alloc=0;
+ cr->mpb->libuf_alloc=0;
cr->mpb->fbuf_alloc=0;
cr->mpb->dbuf_alloc=0;
#endif
gmx_fio_do_int(fio, i);
- if(i==GMX_MTXIO_FULL_MATRIX)
+ if(i==GMX_MTXIO_FULL_MATRIX && NULL != full_matrix)
{
printf("Full matrix storage format, nrow=%d, ncols=%d\n",*nrow,*ncol);
snew((*full_matrix),sz);
bDum=gmx_fio_ndo_real(fio, (*full_matrix),sz);
}
- else
+ else if (NULL != sparse_matrix)
{
/* Sparse storage */
printf("Sparse matrix storage format, nrow=%d, ncols=%d\n",*nrow,*ncol);
};
const char *epull_names[epullNR+1] = {
- "no", "umbrella", "constraint", "constant_force", NULL
+ "no", "umbrella", "constraint", "constant-force", NULL
};
const char *epullg_names[epullgNR+1] = {
- "distance", "direction", "cylinder", "position", "direction_periodic", NULL
+ "distance", "direction", "cylinder", "position", "direction-periodic", NULL
};
const char *erotg_names[erotgNR+1] = {
#else
int i;
- if (nr > cr->mpb->ibuf_alloc) {
- cr->mpb->ibuf_alloc = nr;
- srenew(cr->mpb->ibuf,cr->mpb->ibuf_alloc);
+ if (nr > cr->mpb->libuf_alloc) {
+ cr->mpb->libuf_alloc = nr;
+ srenew(cr->mpb->libuf,cr->mpb->libuf_alloc);
}
if (cr->nc.bUse) {
/* Use two step summing */
- MPI_Allreduce(r,cr->mpb->ibuf,nr,GMX_MPI_LARGE_INT,MPI_SUM,
+ MPI_Allreduce(r,cr->mpb->libuf,nr,GMX_MPI_LARGE_INT,MPI_SUM,
cr->nc.comm_intra);
if (cr->nc.rank_intra == 0) {
/* Sum with the buffers reversed */
- MPI_Allreduce(cr->mpb->ibuf,r,nr,GMX_MPI_LARGE_INT,MPI_SUM,
+ MPI_Allreduce(cr->mpb->libuf,r,nr,GMX_MPI_LARGE_INT,MPI_SUM,
cr->nc.comm_inter);
}
MPI_Bcast(r,nr,GMX_MPI_LARGE_INT,0,cr->nc.comm_intra);
} else {
- MPI_Allreduce(r,cr->mpb->ibuf,nr,GMX_MPI_LARGE_INT,MPI_SUM,
+ MPI_Allreduce(r,cr->mpb->libuf,nr,GMX_MPI_LARGE_INT,MPI_SUM,
cr->mpi_comm_mygroup);
for(i=0; i<nr; i++)
- r[i] = cr->mpb->ibuf[i];
+ r[i] = cr->mpb->libuf[i];
}
#endif
#endif
/* this is thread-unsafe, but it will do for now: */
int i;
- if (nr > ms->mpb->ibuf_alloc) {
- ms->mpb->ibuf_alloc = nr;
- srenew(ms->mpb->ibuf,ms->mpb->ibuf_alloc);
+ if (nr > ms->mpb->libuf_alloc) {
+ ms->mpb->libuf_alloc = nr;
+ srenew(ms->mpb->libuf,ms->mpb->libuf_alloc);
}
- MPI_Allreduce(r,ms->mpb->ibuf,nr,GMX_MPI_LARGE_INT,MPI_SUM,
+ MPI_Allreduce(r,ms->mpb->libuf,nr,GMX_MPI_LARGE_INT,MPI_SUM,
ms->mpi_comm_masters);
for(i=0; i<nr; i++)
- r[i] = ms->mpb->ibuf[i];
+ r[i] = ms->mpb->libuf[i];
#endif
#endif
}
ntype = *p_ntype;
nthreads = *p_nthreads;
_facel = *p_facel;
- _tabscale = *p_tabscale;
- _gbtabscale = *p_gbtabscale;
- _krf = *p_krf;
- _crf = *p_crf;
+#if (COULOMB == COULOMB_TAB || VDW == VDW_TAB)
+ _tabscale = *p_tabscale;
+#else
+ _tabscale = 0.0;
+#endif
+#if COULOMB == REACTION_FIELD
+ _krf = *p_krf;
+ _crf = *p_crf;
+#else
+ _krf = 0.0;
+ _crf = 0.0;
+#endif
+#if COULOMB == GENERALIZED_BORN
+ _gbtabscale = *p_gbtabscale;
+#else
+ _gbtabscale = 0.0;
+#endif
nj1 = 0;
for(n=0; (n<nri); n++)
int k,ggid;
real _iq = _facel * charge[ii];
+#if COULOMB == GENERALIZED_BORN
real _isai = invsqrta[ii];
+#else
+ real _isai = 0.0;
+#endif
// add the shift vector to all water atoms
#if COULOMB == GENERALIZED_BORN
dvda[jnr11] -= __creal(dvdaj);
- dvda[jnr21] -= __creal(dvdaj);
+ dvda[jnr21] -= __cimag(dvdaj);
dvdaj = __cmplx(dvda[jnr12],dvda[jnr22]);
#endif
#if COULOMB == GENERALIZED_BORN
dvda[jnr12] -= __creal(dvdaj);
- dvda[jnr22] -= __creal(dvdaj);
+ dvda[jnr22] -= __cimag(dvdaj);
dvdaj = __cmplx(dvda[jnr13],dvda[jnr23]);
#endif
#if COULOMB == GENERALIZED_BORN
dvda[jnr13] -= __creal(dvdaj);
- dvda[jnr23] -= __creal(dvdaj);
+ dvda[jnr23] -= __cimag(dvdaj);
#endif
#ifndef NO_FORCE
ntype = *p_ntype;
nthreads = *p_nthreads;
_facel = *p_facel;
+#if (COULOMB == COULOMB_TAB || VDW == VDW_TAB)
_tabscale = *p_tabscale;
- _gbtabscale = *p_gbtabscale;
+#else
+ _tabscale = 0.0;
+#endif
+#if COULOMB == REACTION_FIELD
_krf = *p_krf;
_crf = *p_crf;
+#else
+ _krf = 0.0;
+ _crf = 0.0;
+#endif
+#if COULOMB == GENERALIZED_BORN
+ _gbtabscale = *p_gbtabscale;
+#else
+ _gbtabscale = 0.0;
+#endif
ii = iinr[0];
_qO = _facel * charge[ii];
ntype = *p_ntype;
nthreads = *p_nthreads;
_facel = *p_facel;
+#if (COULOMB == COULOMB_TAB || VDW == VDW_TAB)
_tabscale = *p_tabscale;
+#else
+ _tabscale = 0.0;
+#endif
+#if COULOMB == REACTION_FIELD
_krf = *p_krf;
_crf = *p_crf;
- _gbtabscale = *p_gbtabscale;
+#else
+ _krf = 0.0;
+ _crf = 0.0;
+#endif
+#if COULOMB == GENERALIZED_BORN
+ _gbtabscale = *p_gbtabscale;
+#else
+ _gbtabscale = 0.0;
+#endif
ii = iinr[0];
ntype = *p_ntype;
nthreads = *p_nthreads;
_facel = *p_facel;
+#if (COULOMB == COULOMB_TAB || VDW == VDW_TAB)
_tabscale = *p_tabscale;
- _gbtabscale = *p_gbtabscale;
+#else
+ _tabscale = 0.0;
+#endif
+#if COULOMB == REACTION_FIELD
_krf = *p_krf;
_crf = *p_crf;
+#else
+ _krf = 0.0;
+ _crf = 0.0;
+#endif
+#if COULOMB == GENERALIZED_BORN
+ _gbtabscale = *p_gbtabscale;
+#else
+ _gbtabscale = 0.0;
+#endif
ii = iinr[0];
_qH = _facel * charge[ii+1];
ntype = *p_ntype;
nthreads = *p_nthreads;
_facel = *p_facel;
+#if (COULOMB == COULOMB_TAB || VDW == VDW_TAB)
_tabscale = *p_tabscale;
+#else
+ _tabscale = 0.0;
+#endif
+#if COULOMB == REACTION_FIELD
_krf = *p_krf;
_crf = *p_crf;
- _gbtabscale = *p_gbtabscale;
+#else
+ _krf = 0.0;
+ _crf = 0.0;
+#endif
+#if COULOMB == GENERALIZED_BORN
+ _gbtabscale = *p_gbtabscale;
+#else
+ _gbtabscale = 0.0;
+#endif
ii = iinr[0];
static volatile sig_atomic_t usr_condition=0;
-static RETSIGTYPE signal_handler(int n)
+static void signal_handler(int n)
{
switch (n) {
/* windows doesn't do SIGINT correctly according to ANSI (yes, signals are in
static tMPI_Thread_mutex_t tc_mutex=TMPI_THREAD_MUTEX_INITIALIZER;
#endif
-typedef struct {
- real tfactor;
- const char *tstr,*xvgstr;
-} t_timeconvert;
-
-static const t_timeconvert timeconvert[] = {
- { 0, NULL, NULL },
- { 1e3, "fs", "fs" },
- { 1, "ps", "ps" },
- { 1e-3, "ns", "ns" },
- { 1e-6, "us", "\\mus" },
- { 1e-9, "ms", "ms" },
- { 1e-12, "s", "s" },
- { (1.0/60.0)*1e-12, "m", "m" },
- { (1.0/3600.0)*1e-12, "h", "h" },
- { 0, NULL, NULL }
-};
-
gmx_bool bTimeSet(int tcontrol)
{
gmx_bool ret;
/* there are a few global variables that maintain information about the
running threads. Some are defined by the MPI standard: */
tMPI_Comm TMPI_COMM_WORLD=NULL;
-tMPI_Group tMPI_GROUP_EMPTY=NULL;
+tMPI_Group TMPI_GROUP_EMPTY=NULL;
/* the threads themselves (tmpi_comm only contains lists of pointers to this
/* allocate world and thread data */
threads=(struct tmpi_thread*)tMPI_Malloc(sizeof(struct tmpi_thread)*N);
TMPI_COMM_WORLD=tMPI_Comm_alloc(NULL, N);
- tMPI_GROUP_EMPTY=tMPI_Group_alloc();
+ TMPI_GROUP_EMPTY=tMPI_Group_alloc();
if (tMPI_Thread_key_create(&id_key, NULL))
{
tMPI_Comm_destroy(TMPI_COMM_WORLD);
}
- tMPI_Group_free(&tMPI_GROUP_EMPTY);
+ tMPI_Group_free(&TMPI_GROUP_EMPTY);
threads=0;
TMPI_COMM_WORLD=NULL;
- tMPI_GROUP_EMPTY=NULL;
+ TMPI_GROUP_EMPTY=NULL;
Nthreads=0;
/* deallocate the 'global' structure */
bPert = (ip->lj14.c6A != ip->lj14.c6B ||
ip->lj14.c12A != ip->lj14.c12B);
break;
+ case F_CMAP:
+ bPert = FALSE;
+ break;
default:
bPert = FALSE;
gmx_fatal(FARGS,"Function type %s not implemented in ip_pert",
for(i=0; i<nind; i++)
copy_rvec(fr->f[ind[i]],fout[i]);
}
+ /* no break */
case efXTC:
case efG87:
if (fr->bX) {
case efTRR:
if (vout) sfree(vout);
if (fout) sfree(fout);
+ /* no break */
case efXTC:
case efG87:
sfree(xout);
/* Checkpoint files can not contain mulitple frames */
break;
case efG96:
+ gmx_fatal(FARGS,
+ "Reading trajectories in .g96 format is broken. Please use\n"
+ "a different file format.");
read_g96_conf(gmx_fio_getfp(status->fio),NULL,fr);
bRet = (fr->natoms > 0);
break;
}
if (bRet) {
- bMissingData = ((fr->flags & TRX_NEED_X && !fr->bX) ||
- (fr->flags & TRX_NEED_V && !fr->bV) ||
- (fr->flags & TRX_NEED_F && !fr->bF));
+ bMissingData = (((fr->flags & TRX_NEED_X) && !fr->bX) ||
+ ((fr->flags & TRX_NEED_V) && !fr->bV) ||
+ ((fr->flags & TRX_NEED_F) && !fr->bF));
bSkip = FALSE;
if (!bMissingData) {
ct=check_times2(fr->time,fr->t0,fr->tpf,fr->tppf,fr->bDouble);
- if (ct == 0 || (fr->flags & TRX_DONT_SKIP && ct<0)) {
+ if (ct == 0 || ((fr->flags & TRX_DONT_SKIP) && ct<0)) {
printcount(status, oenv,fr->time,FALSE);
} else if (ct > 0)
bRet = FALSE;
fprintf(out,"\n");
pr_indent(out,indent);
- fprintf(out,"ref_t%s",bMDPformat ? " = " : ":");
+ fprintf(out,"ref-t%s",bMDPformat ? " = " : ":");
for(i=0; (i<opts->ngtc); i++)
fprintf(out," %10g",opts->ref_t[i]);
fprintf(out,"\n");
pr_indent(out,indent);
- fprintf(out,"tau_t%s",bMDPformat ? " = " : ":");
+ fprintf(out,"tau-t%s",bMDPformat ? " = " : ":");
for(i=0; (i<opts->ngtc); i++)
fprintf(out," %10g",opts->tau_t[i]);
fprintf(out,"\n");
fprintf(out," %10s",EANNEAL(opts->annealing[i]));
fprintf(out,"\n");
- fprintf(out,"ann_npoints%s",bMDPformat ? " = " : ":");
+ fprintf(out,"ann-npoints%s",bMDPformat ? " = " : ":");
for(i=0; (i<opts->ngtc); i++)
fprintf(out," %10d",opts->anneal_npoints[i]);
fprintf(out,"\n");
for(i=0; (i<opts->ngener); i++) {
pr_indent(out,indent);
- fprintf(out,"energygrp_flags[%3d]:",i);
+ fprintf(out,"energygrp-flags[%3d]:",i);
for(m=0; (m<opts->ngener); m++)
fprintf(out," %d",opts->egp_flags[opts->ngener*i+m]);
fprintf(out,"\n");
static void pr_pullgrp(FILE *fp,int indent,int g,t_pullgrp *pg)
{
pr_indent(fp,indent);
- fprintf(fp,"pull_group %d:\n",g);
+ fprintf(fp,"pull-group %d:\n",g);
indent += 2;
pr_ivec_block(fp,indent,"atom",pg->ind,pg->nat,TRUE);
pr_rvec(fp,indent,"weight",pg->weight,pg->nweight,TRUE);
{
int g;
- PS("pull_geometry",EPULLGEOM(pull->eGeom));
- pr_ivec(fp,indent,"pull_dim",pull->dim,DIM,TRUE);
- PR("pull_r1",pull->cyl_r1);
- PR("pull_r0",pull->cyl_r0);
- PR("pull_constr_tol",pull->constr_tol);
- PI("pull_nstxout",pull->nstxout);
- PI("pull_nstfout",pull->nstfout);
- PI("pull_ngrp",pull->ngrp);
+ PS("pull-geometry",EPULLGEOM(pull->eGeom));
+ pr_ivec(fp,indent,"pull-dim",pull->dim,DIM,TRUE);
+ PR("pull-r1",pull->cyl_r1);
+ PR("pull-r0",pull->cyl_r0);
+ PR("pull-constr-tol",pull->constr_tol);
+ PI("pull-nstxout",pull->nstxout);
+ PI("pull-nstfout",pull->nstfout);
+ PI("pull-ngrp",pull->ngrp);
for(g=0; g<pull->ngrp+1; g++)
pr_pullgrp(fp,indent,g,&pull->grp[g]);
}
indent=pr_title(fp,indent,title);
PS("integrator",EI(ir->eI));
PSTEP("nsteps",ir->nsteps);
- PSTEP("init_step",ir->init_step);
- PS("ns_type",ENS(ir->ns_type));
+ PSTEP("init-step",ir->init_step);
+ PS("ns-type",ENS(ir->ns_type));
PI("nstlist",ir->nstlist);
PI("ndelta",ir->ndelta);
PI("nstcomm",ir->nstcomm);
- PS("comm_mode",ECOM(ir->comm_mode));
+ PS("comm-mode",ECOM(ir->comm_mode));
PI("nstlog",ir->nstlog);
PI("nstxout",ir->nstxout);
PI("nstvout",ir->nstvout);
PI("nstcalcenergy",ir->nstcalcenergy);
PI("nstenergy",ir->nstenergy);
PI("nstxtcout",ir->nstxtcout);
- PR("init_t",ir->init_t);
- PR("delta_t",ir->delta_t);
+ PR("init-t",ir->init_t);
+ PR("delta-t",ir->delta_t);
PR("xtcprec",ir->xtcprec);
PI("nkx",ir->nkx);
PI("nky",ir->nky);
PI("nkz",ir->nkz);
- PI("pme_order",ir->pme_order);
- PR("ewald_rtol",ir->ewald_rtol);
- PR("ewald_geometry",ir->ewald_geometry);
- PR("epsilon_surface",ir->epsilon_surface);
- PS("optimize_fft",BOOL(ir->bOptFFT));
+ PI("pme-order",ir->pme_order);
+ PR("ewald-rtol",ir->ewald_rtol);
+ PR("ewald-geometry",ir->ewald_geometry);
+ PR("epsilon-surface",ir->epsilon_surface);
+ PS("optimize-fft",BOOL(ir->bOptFFT));
PS("ePBC",EPBC(ir->ePBC));
PS("bPeriodicMols",BOOL(ir->bPeriodicMols));
PS("bContinuation",BOOL(ir->bContinuation));
PS("epc",EPCOUPLTYPE(ir->epc));
PS("epctype",EPCOUPLTYPETYPE(ir->epct));
PI("nstpcouple",ir->nstpcouple);
- PR("tau_p",ir->tau_p);
- pr_matrix(fp,indent,"ref_p",ir->ref_p,bMDPformat);
+ PR("tau-p",ir->tau_p);
+ pr_matrix(fp,indent,"ref-p",ir->ref_p,bMDPformat);
pr_matrix(fp,indent,"compress",ir->compress,bMDPformat);
- PS("refcoord_scaling",EREFSCALINGTYPE(ir->refcoord_scaling));
+ PS("refcoord-scaling",EREFSCALINGTYPE(ir->refcoord_scaling));
if (bMDPformat)
- fprintf(fp,"posres_com = %g %g %g\n",ir->posres_com[XX],
+ fprintf(fp,"posres-com = %g %g %g\n",ir->posres_com[XX],
ir->posres_com[YY],ir->posres_com[ZZ]);
else
- pr_rvec(fp,indent,"posres_com",ir->posres_com,DIM,TRUE);
+ pr_rvec(fp,indent,"posres-com",ir->posres_com,DIM,TRUE);
if (bMDPformat)
- fprintf(fp,"posres_comB = %g %g %g\n",ir->posres_comB[XX],
+ fprintf(fp,"posres-comB = %g %g %g\n",ir->posres_comB[XX],
ir->posres_comB[YY],ir->posres_comB[ZZ]);
else
- pr_rvec(fp,indent,"posres_comB",ir->posres_comB,DIM,TRUE);
- PI("andersen_seed",ir->andersen_seed);
+ pr_rvec(fp,indent,"posres-comB",ir->posres_comB,DIM,TRUE);
+ PI("andersen-seed",ir->andersen_seed);
PR("rlist",ir->rlist);
PR("rlistlong",ir->rlistlong);
PR("rtpi",ir->rtpi);
PS("coulombtype",EELTYPE(ir->coulombtype));
- PR("rcoulomb_switch",ir->rcoulomb_switch);
+ PR("rcoulomb-switch",ir->rcoulomb_switch);
PR("rcoulomb",ir->rcoulomb);
PS("vdwtype",EVDWTYPE(ir->vdwtype));
- PR("rvdw_switch",ir->rvdw_switch);
+ PR("rvdw-switch",ir->rvdw_switch);
PR("rvdw",ir->rvdw);
if (ir->epsilon_r != 0)
- PR("epsilon_r",ir->epsilon_r);
+ PR("epsilon-r",ir->epsilon_r);
else
- PS("epsilon_r",infbuf);
+ PS("epsilon-r",infbuf);
if (ir->epsilon_rf != 0)
- PR("epsilon_rf",ir->epsilon_rf);
+ PR("epsilon-rf",ir->epsilon_rf);
else
- PS("epsilon_rf",infbuf);
+ PS("epsilon-rf",infbuf);
PR("tabext",ir->tabext);
- PS("implicit_solvent",EIMPLICITSOL(ir->implicit_solvent));
- PS("gb_algorithm",EGBALGORITHM(ir->gb_algorithm));
- PR("gb_epsilon_solvent",ir->gb_epsilon_solvent);
+ PS("implicit-solvent",EIMPLICITSOL(ir->implicit_solvent));
+ PS("gb-algorithm",EGBALGORITHM(ir->gb_algorithm));
+ PR("gb-epsilon-solvent",ir->gb_epsilon_solvent);
PI("nstgbradii",ir->nstgbradii);
PR("rgbradii",ir->rgbradii);
- PR("gb_saltconc",ir->gb_saltconc);
- PR("gb_obc_alpha",ir->gb_obc_alpha);
- PR("gb_obc_beta",ir->gb_obc_beta);
- PR("gb_obc_gamma",ir->gb_obc_gamma);
- PR("gb_dielectric_offset",ir->gb_dielectric_offset);
- PS("sa_algorithm",ESAALGORITHM(ir->gb_algorithm));
- PR("sa_surface_tension",ir->sa_surface_tension);
+ PR("gb-saltconc",ir->gb_saltconc);
+ PR("gb-obc-alpha",ir->gb_obc_alpha);
+ PR("gb-obc-beta",ir->gb_obc_beta);
+ PR("gb-obc-gamma",ir->gb_obc_gamma);
+ PR("gb-dielectric-offset",ir->gb_dielectric_offset);
+ PS("sa-algorithm",ESAALGORITHM(ir->gb_algorithm));
+ PR("sa-surface-tension",ir->sa_surface_tension);
PS("DispCorr",EDISPCORR(ir->eDispCorr));
- PS("free_energy",EFEPTYPE(ir->efep));
- PR("init_lambda",ir->init_lambda);
- PR("delta_lambda",ir->delta_lambda);
+ PS("free-energy",EFEPTYPE(ir->efep));
+ PR("init-lambda",ir->init_lambda);
+ PR("delta-lambda",ir->delta_lambda);
if (!bMDPformat)
{
- PI("n_foreign_lambda",ir->n_flambda);
+ PI("n-foreign-lambda",ir->n_flambda);
}
if (ir->n_flambda > 0)
{
pr_indent(fp,indent);
- fprintf(fp,"foreign_lambda%s",bMDPformat ? " = " : ":");
+ fprintf(fp,"foreign-lambda%s",bMDPformat ? " = " : ":");
for(i=0; i<ir->n_flambda; i++)
{
fprintf(fp," %10g",ir->flambda[i]);
}
fprintf(fp,"\n");
}
- PR("sc_alpha",ir->sc_alpha);
- PI("sc_power",ir->sc_power);
- PR("sc_sigma",ir->sc_sigma);
- PR("sc_sigma_min",ir->sc_sigma_min);
+ PR("sc-alpha",ir->sc_alpha);
+ PI("sc-power",ir->sc_power);
+ PR("sc-sigma",ir->sc_sigma);
+ PR("sc-sigma-min",ir->sc_sigma_min);
PI("nstdhdl", ir->nstdhdl);
- PS("separate_dhdl_file", SEPDHDLFILETYPE(ir->separate_dhdl_file));
- PS("dhdl_derivatives", DHDLDERIVATIVESTYPE(ir->dhdl_derivatives));
- PI("dh_hist_size", ir->dh_hist_size);
- PD("dh_hist_spacing", ir->dh_hist_spacing);
+ PS("separate-dhdl-file", SEPDHDLFILETYPE(ir->separate_dhdl_file));
+ PS("dhdl-derivatives", DHDLDERIVATIVESTYPE(ir->dhdl_derivatives));
+ PI("dh-hist-size", ir->dh_hist_size);
+ PD("dh-hist-spacing", ir->dh_hist_spacing);
PI("nwall",ir->nwall);
- PS("wall_type",EWALLTYPE(ir->wall_type));
- PI("wall_atomtype[0]",ir->wall_atomtype[0]);
- PI("wall_atomtype[1]",ir->wall_atomtype[1]);
- PR("wall_density[0]",ir->wall_density[0]);
- PR("wall_density[1]",ir->wall_density[1]);
- PR("wall_ewald_zfac",ir->wall_ewald_zfac);
+ PS("wall-type",EWALLTYPE(ir->wall_type));
+ PI("wall-atomtype[0]",ir->wall_atomtype[0]);
+ PI("wall-atomtype[1]",ir->wall_atomtype[1]);
+ PR("wall-density[0]",ir->wall_density[0]);
+ PR("wall-density[1]",ir->wall_density[1]);
+ PR("wall-ewald-zfac",ir->wall_ewald_zfac);
PS("pull",EPULLTYPE(ir->ePull));
if (ir->ePull != epullNO)
pr_rot(fp,indent,ir->rot);
PS("disre",EDISRETYPE(ir->eDisre));
- PS("disre_weighting",EDISREWEIGHTING(ir->eDisreWeighting));
- PS("disre_mixed",BOOL(ir->bDisreMixed));
- PR("dr_fc",ir->dr_fc);
- PR("dr_tau",ir->dr_tau);
+ PS("disre-weighting",EDISREWEIGHTING(ir->eDisreWeighting));
+ PS("disre-mixed",BOOL(ir->bDisreMixed));
+ PR("dr-fc",ir->dr_fc);
+ PR("dr-tau",ir->dr_tau);
PR("nstdisreout",ir->nstdisreout);
- PR("orires_fc",ir->orires_fc);
- PR("orires_tau",ir->orires_tau);
+ PR("orires-fc",ir->orires_fc);
+ PR("orires-tau",ir->orires_tau);
PR("nstorireout",ir->nstorireout);
PR("dihre-fc",ir->dihre_fc);
- PR("em_stepsize",ir->em_stepsize);
- PR("em_tol",ir->em_tol);
+ PR("em-stepsize",ir->em_stepsize);
+ PR("em-tol",ir->em_tol);
PI("niter",ir->niter);
- PR("fc_stepsize",ir->fc_stepsize);
+ PR("fc-stepsize",ir->fc_stepsize);
PI("nstcgsteep",ir->nstcgsteep);
PI("nbfgscorr",ir->nbfgscorr);
PS("ConstAlg",ECONSTRTYPE(ir->eConstrAlg));
- PR("shake_tol",ir->shake_tol);
- PI("lincs_order",ir->nProjOrder);
- PR("lincs_warnangle",ir->LincsWarnAngle);
- PI("lincs_iter",ir->nLincsIter);
- PR("bd_fric",ir->bd_fric);
- PI("ld_seed",ir->ld_seed);
- PR("cos_accel",ir->cos_accel);
+ PR("shake-tol",ir->shake_tol);
+ PI("lincs-order",ir->nProjOrder);
+ PR("lincs-warnangle",ir->LincsWarnAngle);
+ PI("lincs-iter",ir->nLincsIter);
+ PR("bd-fric",ir->bd_fric);
+ PI("ld-seed",ir->ld_seed);
+ PR("cos-accel",ir->cos_accel);
pr_matrix(fp,indent,"deform",ir->deform,bMDPformat);
PI("userint1",ir->userint1);
PI("userint2",ir->userint2);
PI("QMconstraints",ir->QMconstraints);
PI("QMMMscheme",ir->QMMMscheme);
PR("scalefactor",ir->scalefactor);
- pr_qm_opts(fp,indent,"qm_opts",&(ir->opts));
+ pr_qm_opts(fp,indent,"qm-opts",&(ir->opts));
}
}
#undef PS
for(j=2; (pa[i].u.c[j] != NULL); j++)
fprintf(out,",'%s'",pa[i].u.c[j]);
fprintf(out,"],%d))\n",is_hidden(&(pa[i])));
+ break;
default:
break;
}
-/*
+/* -*- mode: c; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; c-file-style: "stroustrup"; -*-
+ *
*
* This source code is part of
*
#include <stdlib.h>
#include "typedefs.h"
+static int div_nsteps(int nsteps,int nst)
+{
+ if (nst > 0)
+ {
+ return (1 + nsteps + nst - 1)/nst;
+ }
+ else
+ {
+ return 0;
+ }
+}
+
double compute_io(t_inputrec *ir,int natoms,gmx_groups_t *groups,
int nrener,int nrepl)
{
int nsteps = ir->nsteps;
int i,nxtcatoms=0;
- int nstx=0,nstv=0,nstf=0,nste=0,nstlog=0,nstxtc=0,nfep=0;
+ int nstx,nstv,nstf,nste,nstlog,nstxtc,nfep=0;
double cio;
- if (ir->nstxout > 0)
- nstx = 1 + nsteps / ir->nstxout;
- if (ir->nstvout > 0)
- nstv = 1 + nsteps / ir->nstvout;
- if (ir->nstfout > 0)
- nstf = (1 + nsteps) / ir->nstfout;
- if (ir->nstxtcout > 0) {
- for(i=0; i<natoms; i++) {
- if (groups->grpnr[egcXTC] == NULL || groups->grpnr[egcXTC][i] == 0)
- nxtcatoms++;
+ nstx = div_nsteps(nsteps,ir->nstxout);
+ nstv = div_nsteps(nsteps,ir->nstvout);
+ nstf = div_nsteps(nsteps,ir->nstfout);
+ nstxtc = div_nsteps(nsteps,ir->nstxtcout);
+ if (ir->nstxtcout > 0)
+ {
+ for(i=0; i<natoms; i++)
+ {
+ if (groups->grpnr[egcXTC] == NULL || groups->grpnr[egcXTC][i] == 0)
+ {
+ nxtcatoms++;
+ }
+ }
}
- nstxtc = (1 + nsteps) / ir->nstxtcout;
- }
- if (ir->nstlog > 0)
- nstlog = 1 + nsteps / ir->nstlog;
- if (ir->nstenergy > 0)
- nste = 3 + nsteps / ir->nstenergy;
+ nstlog = div_nsteps(nsteps,ir->nstlog);
+ /* We add 2 for the header */
+ nste = div_nsteps(2+nsteps,ir->nstenergy);
+
cio = 80*natoms;
cio += (nstx+nstf+nstv)*sizeof(real)*(3.0*natoms);
cio += nstxtc*(14*4 + nxtcatoms*5.0); /* roughly 5 bytes per atom */
{
int nchars = 8 + ndh*10; /* time data ~8 chars/line,
dH data ~10 chars/line */
- cio += ((1 + nsteps)/ir->nstdhdl)*nchars;
+ cio += div_nsteps(nsteps,ir->nstdhdl)*nchars;
}
else
{
if (ir->dh_hist_size <= 0)
{
/* as data blocks: 1 real per dH point */
- cio += ((1 + nsteps)/ir->nstdhdl)*ndh*sizeof(real);
+ cio += div_nsteps(nsteps,ir->nstenergy)*ndh*sizeof(real);
}
else
{
/* as histograms: dh_hist_size ints per histogram */
- cio += ((1 + nsteps)/ir->nstenergy)*
+ cio += div_nsteps(nsteps,ir->nstenergy)*
sizeof(int)*ir->dh_hist_size*ndh;
}
}
}
- if (ir->pull != NULL) {
- if (ir->pull->nstxout > 0) {
- cio += (1 + nsteps)/ir->pull->nstxout*20; /* roughly 20 chars per line */
+ if (ir->pull != NULL)
+ {
+ cio += div_nsteps(nsteps,ir->pull->nstxout)*20; /* roughly 20 chars per line */
+ cio += div_nsteps(nsteps,ir->pull->nstfout)*20; /* roughly 20 chars per line */
}
- if (ir->pull->nstfout > 0) {
- cio += (1 + nsteps)/ir->pull->nstfout*20; /* roughly 20 chars per line */
- }
- }
return cio*nrepl/(1024*1024);
}
sinalpha=sqrt(1-cosalpha*cosalpha);
x[atCG] = - sinalpha*dCGCE1;
y[atCG] = 0;
+ x[atHE1] = x[atHE2] = x[atHD1] = x[atHD2] = 0;
+ y[atHE1] = y[atHE2] = y[atHD1] = y[atHD2] = 0;
/* calculate ND1 and CD2 positions from CE1 and NE2 */
/* Sort the list (necessary to be able to use bsearch */
qsort(aah,nah,(size_t)sizeof(**ah),compaddh);
+ /*
if (debug)
dump_h_db(hfn,nah,aah);
+ */
*nahptr = nah;
*ah = aah;
{
if (strcmp(bondtype,"check") != 0) {
if (bDontQuit) {
- fprintf(stderr,
- "WARNING: atom %s not found in residue seq.nr. %d while adding %s\n",
- atomname,resind+1,bondtype);
+ gmx_warning("WARNING: Atom %s is used in an interaction of type %s in the\n"
+ "topology database, but an atom of that name was not found in\n"
+ "residue number %d.\n",
+ atomname,bondtype,resind+1);
} else {
gmx_fatal(fatal_errno,file,line,
- "Atom %s not found in residue seq.nr. %d while adding %s\n",
- atomname,resind+1,bondtype);
+ "Atom %s is used in an interaction of type %s in the topology\n"
+ "database, but an atom of that name was not found in residue\n"
+ "number %d.\n",
+ atomname,bondtype,resind+1);
}
}
}
{
dt_pcoupl = ir->nstpcouple*ir->delta_t;
- sprintf(err_buf,"tau_p must be > 0 instead of %g\n",ir->tau_p);
+ sprintf(err_buf,"tau-p must be > 0 instead of %g\n",ir->tau_p);
CHECK(ir->tau_p <= 0);
if (ir->tau_p/dt_pcoupl < pcouple_min_integration_steps(ir->epc))
{
- sprintf(warn_buf,"For proper integration of the %s barostat, tau_p (%g) should be at least %d times larger than nstpcouple*dt (%g)",
+ sprintf(warn_buf,"For proper integration of the %s barostat, tau-p (%g) should be at least %d times larger than nstpcouple*dt (%g)",
EPCOUPLTYPE(ir->epc),ir->tau_p,pcouple_min_integration_steps(ir->epc),dt_pcoupl);
warning(wi,warn_buf);
}
}
if (ir->epsilon_r!=1 && ir->implicit_solvent==eisGBSA) {
- sprintf(warn_buf,"epsilon_r = %g with GB implicit solvent, will use this value for inner dielectric",ir->epsilon_r);
+ sprintf(warn_buf,"epsilon-r = %g with GB implicit solvent, will use this value for inner dielectric",ir->epsilon_r);
warning_note(wi,warn_buf);
}
if (EEL_RF(ir->coulombtype) && ir->epsilon_rf==1 && ir->epsilon_r!=1) {
- sprintf(warn_buf,"epsilon_r = %g and epsilon_rf = 1 with reaction field, assuming old format and exchanging epsilon_r and epsilon_rf",ir->epsilon_r);
+ sprintf(warn_buf,"epsilon-r = %g and epsilon-rf = 1 with reaction field, assuming old format and exchanging epsilon-r and epsilon-rf",ir->epsilon_r);
warning(wi,warn_buf);
ir->epsilon_rf = ir->epsilon_r;
ir->epsilon_r = 1.0;
}
if (getenv("GALACTIC_DYNAMICS") == NULL) {
- sprintf(err_buf,"epsilon_r must be >= 0 instead of %g\n",ir->epsilon_r);
+ sprintf(err_buf,"epsilon-r must be >= 0 instead of %g\n",ir->epsilon_r);
CHECK(ir->epsilon_r < 0);
}
/* reaction field (at the cut-off) */
if (ir->coulombtype == eelRF_ZERO) {
- sprintf(err_buf,"With coulombtype = %s, epsilon_rf must be 0",
+ sprintf(err_buf,"With coulombtype = %s, epsilon-rf must be 0",
eel_names[ir->coulombtype]);
CHECK(ir->epsilon_rf != 0);
}
- sprintf(err_buf,"epsilon_rf must be >= epsilon_r");
+ sprintf(err_buf,"epsilon-rf must be >= epsilon-r");
CHECK((ir->epsilon_rf < ir->epsilon_r && ir->epsilon_rf != 0) ||
(ir->epsilon_r == 0));
if (ir->epsilon_rf == ir->epsilon_r) {
- sprintf(warn_buf,"Using epsilon_rf = epsilon_r with %s does not make sense",
+ sprintf(warn_buf,"Using epsilon-rf = epsilon-r with %s does not make sense",
eel_names[ir->coulombtype]);
warning(wi,warn_buf);
}
if (EEL_PME(ir->coulombtype)) {
if (ir->pme_order < 3) {
- warning_error(wi,"pme_order can not be smaller than 3");
+ warning_error(wi,"pme-order can not be smaller than 3");
}
}
if (ir->nwall==2 && EEL_FULL(ir->coulombtype)) {
if (ir->ewald_geometry == eewg3D) {
- sprintf(warn_buf,"With pbc=%s you should use ewald_geometry=%s",
+ sprintf(warn_buf,"With pbc=%s you should use ewald-geometry=%s",
epbc_names[ir->ePBC],eewg_names[eewg3DC]);
warning(wi,warn_buf);
}
/* This check avoids extra pbc coding for exclusion corrections */
- sprintf(err_buf,"wall_ewald_zfac should be >= 2");
+ sprintf(err_buf,"wall-ewald-zfac should be >= 2");
CHECK(ir->wall_ewald_zfac < 2);
}
if (EVDW_SWITCHED(ir->vdwtype)) {
- sprintf(err_buf,"With vdwtype = %s rvdw_switch must be < rvdw",
+ sprintf(err_buf,"With vdwtype = %s rvdw-switch must be < rvdw",
evdw_names[ir->vdwtype]);
CHECK(ir->rvdw_switch >= ir->rvdw);
} else if (ir->vdwtype == evdwCUT) {
ir->implicit_solvent=eisGBSA;
fprintf(stderr,"Note: Old option for generalized born electrostatics given:\n"
"Changing coulombtype from \"generalized-born\" to \"cut-off\" and instead\n"
- "setting implicit_solvent value to \"GBSA\" in input section.\n");
+ "setting implicit-solvent value to \"GBSA\" in input section.\n");
}
if(ir->sa_algorithm==esaSTILL)
nstr = str_nelem(wall_density,MAXPTR,names);
if (nstr != ir->nwall)
{
- gmx_fatal(FARGS,"Expected %d elements for wall_density, found %d",ir->nwall,nstr);
+ gmx_fatal(FARGS,"Expected %d elements for wall-density, found %d",ir->nwall,nstr);
}
for(i=0; i<ir->nwall; i++)
{
sscanf(names[i],"%lf",&dbl);
if (dbl <= 0)
{
- gmx_fatal(FARGS,"wall_density[%d] = %f\n",i,dbl);
+ gmx_fatal(FARGS,"wall-density[%d] = %f\n",i,dbl);
}
ir->wall_density[i] = dbl;
}
RTYPE ("dt", ir->delta_t, 0.001);
STEPTYPE ("nsteps", ir->nsteps, 0);
CTYPE ("For exact run continuation or redoing part of a run");
- STEPTYPE ("init_step",ir->init_step, 0);
+ STEPTYPE ("init-step",ir->init_step, 0);
CTYPE ("Part index is updated automatically on checkpointing (keeps files separate)");
- ITYPE ("simulation_part", ir->simulation_part, 1);
+ ITYPE ("simulation-part", ir->simulation_part, 1);
CTYPE ("mode for center of mass motion removal");
EETYPE("comm-mode", ir->comm_mode, ecm_names);
CTYPE ("number of steps for center of mass motion removal");
CTYPE ("Force tolerance and initial step-size");
RTYPE ("emtol", ir->em_tol, 10.0);
RTYPE ("emstep", ir->em_stepsize,0.01);
- CTYPE ("Max number of iterations in relax_shells");
+ CTYPE ("Max number of iterations in relax-shells");
ITYPE ("niter", ir->niter, 20);
CTYPE ("Step size (ps^2) for minimization of flexible constraints");
RTYPE ("fcstep", ir->fc_stepsize, 0);
ir->ndelta = 2;
CTYPE ("Periodic boundary conditions: xyz, no, xy");
EETYPE("pbc", ir->ePBC, epbc_names);
- EETYPE("periodic_molecules", ir->bPeriodicMols, yesno_names);
+ EETYPE("periodic-molecules", ir->bPeriodicMols, yesno_names);
CTYPE ("nblist cut-off");
RTYPE ("rlist", ir->rlist, 1.0);
CTYPE ("long-range cut-off for switched potentials");
RTYPE ("rcoulomb-switch", ir->rcoulomb_switch, 0.0);
RTYPE ("rcoulomb", ir->rcoulomb, 1.0);
CTYPE ("Relative dielectric constant for the medium and the reaction field");
- RTYPE ("epsilon_r", ir->epsilon_r, 1.0);
- RTYPE ("epsilon_rf", ir->epsilon_rf, 1.0);
+ RTYPE ("epsilon-r", ir->epsilon_r, 1.0);
+ RTYPE ("epsilon-rf", ir->epsilon_rf, 1.0);
CTYPE ("Method for doing Van der Waals");
EETYPE("vdw-type", ir->vdwtype, evdw_names);
CTYPE ("cut-off lengths");
CTYPE ("Extension of the potential lookup tables beyond the cut-off");
RTYPE ("table-extension", ir->tabext, 1.0);
CTYPE ("Seperate tables between energy group pairs");
- STYPE ("energygrp_table", egptable, NULL);
+ STYPE ("energygrp-table", egptable, NULL);
CTYPE ("Spacing for the PME/PPPM FFT grid");
RTYPE ("fourierspacing", opts->fourierspacing,0.12);
CTYPE ("FFT grid size, when a value is 0 fourierspacing will be used");
- ITYPE ("fourier_nx", ir->nkx, 0);
- ITYPE ("fourier_ny", ir->nky, 0);
- ITYPE ("fourier_nz", ir->nkz, 0);
+ ITYPE ("fourier-nx", ir->nkx, 0);
+ ITYPE ("fourier-ny", ir->nky, 0);
+ ITYPE ("fourier-nz", ir->nkz, 0);
CTYPE ("EWALD/PME/PPPM parameters");
- ITYPE ("pme_order", ir->pme_order, 4);
- RTYPE ("ewald_rtol", ir->ewald_rtol, 0.00001);
- EETYPE("ewald_geometry", ir->ewald_geometry, eewg_names);
- RTYPE ("epsilon_surface", ir->epsilon_surface, 0.0);
- EETYPE("optimize_fft",ir->bOptFFT, yesno_names);
+ ITYPE ("pme-order", ir->pme_order, 4);
+ RTYPE ("ewald-rtol", ir->ewald_rtol, 0.00001);
+ EETYPE("ewald-geometry", ir->ewald_geometry, eewg_names);
+ RTYPE ("epsilon-surface", ir->epsilon_surface, 0.0);
+ EETYPE("optimize-fft",ir->bOptFFT, yesno_names);
CCTYPE("IMPLICIT SOLVENT ALGORITHM");
- EETYPE("implicit_solvent", ir->implicit_solvent, eis_names);
+ EETYPE("implicit-solvent", ir->implicit_solvent, eis_names);
CCTYPE ("GENERALIZED BORN ELECTROSTATICS");
CTYPE ("Algorithm for calculating Born radii");
- EETYPE("gb_algorithm", ir->gb_algorithm, egb_names);
+ EETYPE("gb-algorithm", ir->gb_algorithm, egb_names);
CTYPE ("Frequency of calculating the Born radii inside rlist");
ITYPE ("nstgbradii", ir->nstgbradii, 1);
CTYPE ("Cutoff for Born radii calculation; the contribution from atoms");
CTYPE ("between rlist and rgbradii is updated every nstlist steps");
RTYPE ("rgbradii", ir->rgbradii, 1.0);
CTYPE ("Dielectric coefficient of the implicit solvent");
- RTYPE ("gb_epsilon_solvent",ir->gb_epsilon_solvent, 80.0);
+ RTYPE ("gb-epsilon-solvent",ir->gb_epsilon_solvent, 80.0);
CTYPE ("Salt concentration in M for Generalized Born models");
- RTYPE ("gb_saltconc", ir->gb_saltconc, 0.0);
+ RTYPE ("gb-saltconc", ir->gb_saltconc, 0.0);
CTYPE ("Scaling factors used in the OBC GB model. Default values are OBC(II)");
- RTYPE ("gb_obc_alpha", ir->gb_obc_alpha, 1.0);
- RTYPE ("gb_obc_beta", ir->gb_obc_beta, 0.8);
- RTYPE ("gb_obc_gamma", ir->gb_obc_gamma, 4.85);
- RTYPE ("gb_dielectric_offset", ir->gb_dielectric_offset, 0.009);
- EETYPE("sa_algorithm", ir->sa_algorithm, esa_names);
+ RTYPE ("gb-obc-alpha", ir->gb_obc_alpha, 1.0);
+ RTYPE ("gb-obc-beta", ir->gb_obc_beta, 0.8);
+ RTYPE ("gb-obc-gamma", ir->gb_obc_gamma, 4.85);
+ RTYPE ("gb-dielectric-offset", ir->gb_dielectric_offset, 0.009);
+ EETYPE("sa-algorithm", ir->sa_algorithm, esa_names);
CTYPE ("Surface tension (kJ/mol/nm^2) for the SA (nonpolar surface) part of GBSA");
CTYPE ("The value -1 will set default value for Still/HCT/OBC GB-models.");
- RTYPE ("sa_surface_tension", ir->sa_surface_tension, -1);
+ RTYPE ("sa-surface-tension", ir->sa_surface_tension, -1);
/* Coupling stuff */
CCTYPE ("OPTIONS FOR WEAK COUPLING ALGORITHMS");
CTYPE ("Time constant (ps) and reference temperature (K)");
STYPE ("tau-t", tau_t, NULL);
STYPE ("ref-t", ref_t, NULL);
- CTYPE ("Pressure coupling");
- EETYPE("Pcoupl", ir->epc, epcoupl_names);
- EETYPE("Pcoupltype", ir->epct, epcoupltype_names);
+ CTYPE ("pressure coupling");
+ EETYPE("pcoupl", ir->epc, epcoupl_names);
+ EETYPE("pcoupltype", ir->epct, epcoupltype_names);
ITYPE ("nstpcouple", ir->nstpcouple, -1);
CTYPE ("Time constant (ps), compressibility (1/bar) and reference P (bar)");
RTYPE ("tau-p", ir->tau_p, 1.0);
STYPE ("compressibility", dumstr[0], NULL);
STYPE ("ref-p", dumstr[1], NULL);
CTYPE ("Scaling of reference coordinates, No, All or COM");
- EETYPE ("refcoord_scaling",ir->refcoord_scaling,erefscaling_names);
+ EETYPE ("refcoord-scaling",ir->refcoord_scaling,erefscaling_names);
CTYPE ("Random seed for Andersen thermostat");
- ITYPE ("andersen_seed", ir->andersen_seed, 815131);
+ ITYPE ("andersen-seed", ir->andersen_seed, 815131);
/* QMMM */
CCTYPE ("OPTIONS FOR QMMM calculations");
CTYPE ("Type of annealing for each temperature group (no/single/periodic)");
STYPE ("annealing", anneal, NULL);
CTYPE ("Number of time points to use for specifying annealing in each group");
- STYPE ("annealing_npoints", anneal_npoints, NULL);
+ STYPE ("annealing-npoints", anneal_npoints, NULL);
CTYPE ("List of times at the annealing points for each group");
- STYPE ("annealing_time", anneal_time, NULL);
+ STYPE ("annealing-time", anneal_time, NULL);
CTYPE ("Temp. at each annealing point, for each group.");
- STYPE ("annealing_temp", anneal_temp, NULL);
+ STYPE ("annealing-temp", anneal_temp, NULL);
/* Startup run */
CCTYPE ("GENERATE VELOCITIES FOR STARTUP RUN");
/* Energy group exclusions */
CCTYPE ("ENERGY GROUP EXCLUSIONS");
CTYPE ("Pairs of energy groups for which all non-bonded interactions are excluded");
- STYPE ("energygrp_excl", egpexcl, NULL);
+ STYPE ("energygrp-excl", egpexcl, NULL);
/* Walls */
CCTYPE ("WALLS");
CTYPE ("Number of walls, type, atom types, densities and box-z scale factor for Ewald");
ITYPE ("nwall", ir->nwall, 0);
- EETYPE("wall_type", ir->wall_type, ewt_names);
- RTYPE ("wall_r_linpot", ir->wall_r_linpot, -1);
- STYPE ("wall_atomtype", wall_atomtype, NULL);
- STYPE ("wall_density", wall_density, NULL);
- RTYPE ("wall_ewald_zfac", ir->wall_ewald_zfac, 3);
+ EETYPE("wall-type", ir->wall_type, ewt_names);
+ RTYPE ("wall-r-linpot", ir->wall_r_linpot, -1);
+ STYPE ("wall-atomtype", wall_atomtype, NULL);
+ STYPE ("wall-density", wall_density, NULL);
+ RTYPE ("wall-ewald-zfac", ir->wall_ewald_zfac, 3);
/* COM pulling */
CCTYPE("COM PULLING");
- CTYPE("Pull type: no, umbrella, constraint or constant_force");
+ CTYPE("Pull type: no, umbrella, constraint or constant-force");
EETYPE("pull", ir->ePull, epull_names);
if (ir->ePull != epullNO) {
snew(ir->pull,1);
EETYPE("free-energy", ir->efep, efep_names);
RTYPE ("init-lambda", ir->init_lambda,0.0);
RTYPE ("delta-lambda",ir->delta_lambda,0.0);
- STYPE ("foreign_lambda", foreign_lambda, NULL);
+ STYPE ("foreign-lambda", foreign_lambda, NULL);
RTYPE ("sc-alpha",ir->sc_alpha,0.0);
ITYPE ("sc-power",ir->sc_power,0);
RTYPE ("sc-sigma",ir->sc_sigma,0.3);
EETYPE("separate-dhdl-file", ir->separate_dhdl_file,
separate_dhdl_file_names);
EETYPE("dhdl-derivatives", ir->dhdl_derivatives, dhdl_derivatives_names);
- ITYPE ("dh_hist_size", ir->dh_hist_size, 0);
- RTYPE ("dh_hist_spacing", ir->dh_hist_spacing, 0.1);
+ ITYPE ("dh-hist-size", ir->dh_hist_size, 0);
+ RTYPE ("dh-hist-spacing", ir->dh_hist_spacing, 0.1);
STYPE ("couple-moltype", couple_moltype, NULL);
EETYPE("couple-lambda0", opts->couple_lam0, couple_lam);
EETYPE("couple-lambda1", opts->couple_lam1, couple_lam);
warning(wi,"For proper sampling of the (nearly) decoupled state, stochastic dynamics should be used");
}
} else {
- warning(wi,"Can not couple a molecule with free_energy = no");
+ warning(wi,"Can not couple a molecule with free-energy = no");
}
}
nref_t = str_nelem(ref_t,MAXPTR,ptr2);
ntcg = str_nelem(tcgrps,MAXPTR,ptr3);
if ((ntau_t != ntcg) || (nref_t != ntcg)) {
- gmx_fatal(FARGS,"Invalid T coupling input: %d groups, %d ref_t values and "
- "%d tau_t values",ntcg,nref_t,ntau_t);
+ gmx_fatal(FARGS,"Invalid T coupling input: %d groups, %d ref-t values and "
+ "%d tau-t values",ntcg,nref_t,ntau_t);
}
bSetTCpar = (ir->etc || EI_SD(ir->eI) || ir->eI==eiBD || EI_TPI(ir->eI));
snew(ir->opts.tau_t,nr);
snew(ir->opts.ref_t,nr);
if (ir->eI==eiBD && ir->bd_fric==0) {
- fprintf(stderr,"bd_fric=0, so tau_t will be used as the inverse friction constant(s)\n");
+ fprintf(stderr,"bd-fric=0, so tau-t will be used as the inverse friction constant(s)\n");
}
if (bSetTCpar)
{
if (nr != nref_t)
{
- gmx_fatal(FARGS,"Not enough ref_t and tau_t values!");
+ gmx_fatal(FARGS,"Not enough ref-t and tau-t values!");
}
tau_min = 1e20;
ir->opts.tau_t[i] = strtod(ptr1[i],NULL);
if ((ir->eI == eiBD || ir->eI == eiSD2) && ir->opts.tau_t[i] <= 0)
{
- sprintf(warn_buf,"With integrator %s tau_t should be larger than 0",ei_names[ir->eI]);
+ sprintf(warn_buf,"With integrator %s tau-t should be larger than 0",ei_names[ir->eI]);
warning_error(wi,warn_buf);
}
if ((ir->etc == etcVRESCALE && ir->opts.tau_t[i] >= 0) ||
{
if (tau_min/(ir->delta_t*ir->nsttcouple) < nstcmin)
{
- sprintf(warn_buf,"For proper integration of the %s thermostat, tau_t (%g) should be at least %d times larger than nsttcouple*dt (%g)",
+ sprintf(warn_buf,"For proper integration of the %s thermostat, tau-t (%g) should be at least %d times larger than nsttcouple*dt (%g)",
ETCOUPLTYPE(ir->etc),
tau_min,nstcmin,
ir->nsttcouple*ir->delta_t);
ir->opts.ref_t[i] = strtod(ptr2[i],NULL);
if (ir->opts.ref_t[i] < 0)
{
- gmx_fatal(FARGS,"ref_t for group %d negative",i);
+ gmx_fatal(FARGS,"ref-t for group %d negative",i);
}
}
}
/* Read the other fields too */
nSA_points = str_nelem(anneal_npoints,MAXPTR,ptr1);
if(nSA_points!=nSA)
- gmx_fatal(FARGS,"Found %d annealing_npoints values for %d groups\n",nSA_points,nSA);
+ gmx_fatal(FARGS,"Found %d annealing-npoints values for %d groups\n",nSA_points,nSA);
for(k=0,i=0;i<nr;i++) {
ir->opts.anneal_npoints[i]=strtol(ptr1[i],NULL,10);
if(ir->opts.anneal_npoints[i]==1)
nSA_time = str_nelem(anneal_time,MAXPTR,ptr1);
if(nSA_time!=k)
- gmx_fatal(FARGS,"Found %d annealing_time values, wanter %d\n",nSA_time,k);
+ gmx_fatal(FARGS,"Found %d annealing-time values, wanter %d\n",nSA_time,k);
nSA_temp = str_nelem(anneal_temp,MAXPTR,ptr2);
if(nSA_temp!=k)
- gmx_fatal(FARGS,"Found %d annealing_temp values, wanted %d\n",nSA_temp,k);
+ gmx_fatal(FARGS,"Found %d annealing-temp values, wanted %d\n",nSA_temp,k);
for(i=0,k=0;i<nr;i++) {
nr = groups->grps[egcENER].nr;
snew(ir->opts.egp_flags,nr*nr);
- bExcl = do_egp_flag(ir,groups,"energygrp_excl",egpexcl,EGP_EXCL);
+ bExcl = do_egp_flag(ir,groups,"energygrp-excl",egpexcl,EGP_EXCL);
if (bExcl && EEL_FULL(ir->coulombtype))
warning(wi,"Can not exclude the lattice Coulomb energy between energy groups");
- bTable = do_egp_flag(ir,groups,"energygrp_table",egptable,EGP_TABLE);
+ bTable = do_egp_flag(ir,groups,"energygrp-table",egptable,EGP_TABLE);
if (bTable && !(ir->vdwtype == evdwUSER) &&
!(ir->coulombtype == eelUSER) && !(ir->coulombtype == eelPMEUSER) &&
!(ir->coulombtype == eelPMEUSERSWITCH))
}
}
-static gmx_bool absolute_reference(t_inputrec *ir,gmx_mtop_t *sys,ivec AbsRef)
+static gmx_bool absolute_reference(t_inputrec *ir,gmx_mtop_t *sys,
+ gmx_bool posres_only,
+ ivec AbsRef)
{
- int d,g,i;
- gmx_mtop_ilistloop_t iloop;
- t_ilist *ilist;
- int nmol;
- t_iparams *pr;
-
- /* Check the COM */
- for(d=0; d<DIM; d++) {
- AbsRef[d] = (d < ndof_com(ir) ? 0 : 1);
- }
- /* Check for freeze groups */
- for(g=0; g<ir->opts.ngfrz; g++) {
- for(d=0; d<DIM; d++) {
- if (ir->opts.nFreeze[g][d] != 0) {
- AbsRef[d] = 1;
- }
+ int d,g,i;
+ gmx_mtop_ilistloop_t iloop;
+ t_ilist *ilist;
+ int nmol;
+ t_iparams *pr;
+
+ clear_ivec(AbsRef);
+
+ if (!posres_only)
+ {
+ /* Check the COM */
+ for(d=0; d<DIM; d++)
+ {
+ AbsRef[d] = (d < ndof_com(ir) ? 0 : 1);
+ }
+ /* Check for freeze groups */
+ for(g=0; g<ir->opts.ngfrz; g++)
+ {
+ for(d=0; d<DIM; d++)
+ {
+ if (ir->opts.nFreeze[g][d] != 0)
+ {
+ AbsRef[d] = 1;
+ }
+ }
+ }
}
- }
- /* Check for position restraints */
- iloop = gmx_mtop_ilistloop_init(sys);
- while (gmx_mtop_ilistloop_next(iloop,&ilist,&nmol)) {
- if (nmol > 0) {
- for(i=0; i<ilist[F_POSRES].nr; i+=2) {
- pr = &sys->ffparams.iparams[ilist[F_POSRES].iatoms[i]];
- for(d=0; d<DIM; d++) {
- if (pr->posres.fcA[d] != 0) {
- AbsRef[d] = 1;
- }
- }
- }
+
+ /* Check for position restraints */
+ iloop = gmx_mtop_ilistloop_init(sys);
+ while (gmx_mtop_ilistloop_next(iloop,&ilist,&nmol))
+ {
+ if (nmol > 0 &&
+ (AbsRef[XX] == 0 || AbsRef[YY] == 0 || AbsRef[ZZ] == 0))
+ {
+ for(i=0; i<ilist[F_POSRES].nr; i+=2)
+ {
+ pr = &sys->ffparams.iparams[ilist[F_POSRES].iatoms[i]];
+ for(d=0; d<DIM; d++)
+ {
+ if (pr->posres.fcA[d] != 0)
+ {
+ AbsRef[d] = 1;
+ }
+ }
+ }
+ }
}
- }
- return (AbsRef[XX] != 0 && AbsRef[YY] != 0 && AbsRef[ZZ] != 0);
+ return (AbsRef[XX] != 0 && AbsRef[YY] != 0 && AbsRef[ZZ] != 0);
}
void triple_check(const char *mdparin,t_inputrec *ir,gmx_mtop_t *sys,
if (EI_DYNAMICS(ir->eI) && !EI_SD(ir->eI) && ir->eI != eiBD &&
ir->comm_mode == ecmNO &&
- !(absolute_reference(ir,sys,AbsRef) || ir->nsteps <= 10)) {
+ !(absolute_reference(ir,sys,FALSE,AbsRef) || ir->nsteps <= 10)) {
warning(wi,"You are not using center of mass motion removal (mdp option comm-mode), numerical rounding errors can lead to build up of kinetic energy of the center of mass");
}
-
+
+ /* Check for pressure coupling with absolute position restraints */
+ if (ir->epc != epcNO && ir->refcoord_scaling == erscNO)
+ {
+ absolute_reference(ir,sys,TRUE,AbsRef);
+ {
+ for(m=0; m<DIM; m++)
+ {
+ if (AbsRef[m] && norm2(ir->compress[m]) > 0)
+ {
+ warning(wi,"You are using pressure coupling with absolute position restraints, this will give artifacts. Use the refcoord_scaling option.");
+ break;
+ }
+ }
+ }
+ }
+
bCharge = FALSE;
aloopb = gmx_mtop_atomloop_block_init(sys);
while (gmx_mtop_atomloop_block_next(aloopb,&atom,&nmol)) {
for(i=0; (i<ir->opts.ngtc); i++)
gdt_max = max(gdt_max,ir->delta_t/ir->opts.tau_t[i]);
if (0.5*gdt_max > 0.0015) {
- sprintf(warn_buf,"The relative error with integrator %s is 0.5*delta_t/tau_t = %g, you might want to switch to integrator %s\n",
+ sprintf(warn_buf,"The relative error with integrator %s is 0.5*delta-t/tau-t = %g, you might want to switch to integrator %s\n",
ei_names[ir->eI],0.5*gdt_max,ei_names[eiSD2]);
warning_note(wi,warn_buf);
}
if (ir->ePull != epullNO) {
if (ir->pull->grp[0].nat == 0) {
- absolute_reference(ir,sys,AbsRef);
+ absolute_reference(ir,sys,FALSE,AbsRef);
for(m=0; m<DIM; m++) {
if (ir->pull->dim[m] && !AbsRef[m]) {
warning(wi,"You are using an absolute reference for pulling, but the rest of the system does not have an absolute reference. This will lead to artifacts.");
if (bConstr && ir->eConstrAlg == econtSHAKE) {
if (ir->shake_tol <= 0.0) {
- sprintf(warn_buf,"ERROR: shake_tol must be > 0 instead of %g\n",
+ sprintf(warn_buf,"ERROR: shake-tol must be > 0 instead of %g\n",
ir->shake_tol);
warning_error(wi,warn_buf);
}
}
if ((ir->eI == eiCG || ir->eI == eiLBFGS) && (ir->nProjOrder<8)) {
- sprintf(warn_buf,"For accurate %s with LINCS constraints, lincs_order should be 8 or more.",ei_names[ir->eI]);
+ sprintf(warn_buf,"For accurate %s with LINCS constraints, lincs-order should be 8 or more.",ei_names[ir->eI]);
warning_note(wi,warn_buf);
}
if (ir->epc==epcMTTK) {
trim(buf);
}
}
- while (NULL!=buf && strlen(buf)==0);
+ while (!feof(in) && NULL!=buf && strlen(buf)==0);
if ((buf != NULL) && (sscanf(buf,"%s%lf",name,&m) == 2))
{
int i,sel,ret;
printf("%s\n",title);
- for(i=0; (i<nb); i++)
- printf("%2d: %s\n",i,(*tb[i]).name);
+ for(i=0; (i<nb); i++)
+ {
+ char *advice_string = "";
+ if (0 == gmx_wcmatch("*ZWITTERION*", (*tb[i]).name))
+ {
+ advice_string = " (only use with zwitterions containing exactly one residue)";
+ }
+ printf("%2d: %s%s\n",i,(*tb[i]).name, advice_string);
+ }
do {
ret=fscanf(stdin,"%d",&sel);
} while ((ret != 1) || (sel < 0) || (sel >= nb));
gmx_fatal(FARGS,"Invalid bond type %d",type);
break;
}
+ break;
case d_angles:
case d_angletypes:
switch (type) {
gmx_fatal(FARGS,"Invalid angle type %d",type);
break;
}
- case d_pairs:
+ break;
+ case d_pairs:
case d_pairtypes:
if (type == 1 || (d == d_pairtypes && type == 2))
return F_LJ14;
return F_LJC14_Q;
else
gmx_fatal(FARGS,"Invalid pairs type %d",type);
+ break;
case d_pairs_nb:
return F_LJC_PAIRS_NB;
case d_dihedrals:
default:
gmx_fatal(FARGS,"Invalid vsites3 type %d",type);
}
+ break;
case d_vsites4:
switch (type) {
case 1:
default:
gmx_fatal(FARGS,"Invalid vsites4 type %d",type);
}
+ break;
case d_vsitesn:
return F_VSITEN;
case d_constraints:
default:
gmx_fatal(FARGS,"Invalid constraints type %d",type);
}
+ break;
case d_settles:
return F_SETTLE;
case d_position_restraints:
return F_POSRES;
case 2:
gmx_fatal(FARGS,"Water polarization should now be listed under [ water_polarization ]\n");
+ break;
default:
gmx_fatal(FARGS,"Invalid position restraint type %d",type);
}
+ break;
case d_polarization:
return F_POLARIZATION;
case d_thole_polarization:
gmx_cpp_t handle;
char *tmp_line=NULL;
char warn_buf[STRLEN];
-
+ const char *floating_point_arithmetic_tip =
+ "Total charge should normally be an integer. See\n"
+ "http://www.gromacs.org/Documentation/Floating_Point_Arithmetic\n"
+ "for discussion on how close it should be to an integer.\n";
/* We need to open the output file before opening the input file,
* because cpp_open_file can change the current working directory.
*/
if(!title)
title=put_symtab(symtab,"");
if (fabs(qt) > 1e-4) {
- sprintf(warn_buf,"System has non-zero total charge: %e\n\n",qt);
+ sprintf(warn_buf,"System has non-zero total charge: %.6f\n%s\n",qt,floating_point_arithmetic_tip);
warning_note(wi,warn_buf);
}
if (fabs(qBt) > 1e-4 && !gmx_within_tol(qBt,qt,1e-6)) {
- sprintf(warn_buf,"State B has non-zero total charge: %e\n\n",qBt);
+ sprintf(warn_buf,"State B has non-zero total charge: %.6f\n%s\n",qBt,floating_point_arithmetic_tip);
warning_note(wi,warn_buf);
}
DS_Done (&DS);
return angle;
}
+static char *get_atomtype_name_AB(t_atom *atom,gpp_atomtype_t atype)
+{
+ char *name;
+
+ name = get_atomtype_name(atom->type,atype);
+
+ /* When using the decoupling option, atom types are changed
+ * to decoupled for the non-bonded interactions, but the virtual
+ * sites constructions should be based on the "normal" interactions.
+ * So we return the state B atom type name if the state A atom
+ * type is the decoupled one. We should actually check for the atom
+ * type number, but that's not passed here. So we check for
+ * the decoupled atom type name. This should not cause trouble
+ * as this code is only used for topologies with v-sites without
+ * parameters generated by pdb2gmx.
+ */
+ if (strcmp(name,"decoupled") == 0)
+ {
+ name = get_atomtype_name(atom->typeB,atype);
+ }
+
+ return name;
+}
+
static gmx_bool calc_vsite3_param(gpp_atomtype_t atype,
t_param *param, t_atoms *at,
int nrbond, t_mybonded *bonds,
for (i=0; i<4; i++)
fprintf(debug,"atom %u type %s ",
param->a[i]+1,
- get_atomtype_name(at->atom[param->a[i]].type,atype));
+ get_atomtype_name_AB(&at->atom[param->a[i]],atype));
fprintf(debug,"\n");
}
bXH3 =
- ( (gmx_strncasecmp(get_atomtype_name(at->atom[param->AK].type,atype),"MNH",3)==0) &&
- (gmx_strncasecmp(get_atomtype_name(at->atom[param->AL].type,atype),"MNH",3)==0) ) ||
- ( (gmx_strncasecmp(get_atomtype_name(at->atom[param->AK].type,atype),"MCH3",4)==0) &&
- (gmx_strncasecmp(get_atomtype_name(at->atom[param->AL].type,atype),"MCH3",4)==0) );
+ ( (gmx_strncasecmp(get_atomtype_name_AB(&at->atom[param->AK],atype),"MNH",3)==0) &&
+ (gmx_strncasecmp(get_atomtype_name_AB(&at->atom[param->AL],atype),"MNH",3)==0) ) ||
+ ( (gmx_strncasecmp(get_atomtype_name_AB(&at->atom[param->AK],atype),"MCH3",4)==0) &&
+ (gmx_strncasecmp(get_atomtype_name_AB(&at->atom[param->AL],atype),"MCH3",4)==0) );
bjk = get_bond_length(nrbond, bonds, param->AJ, param->AK);
bjl = get_bond_length(nrbond, bonds, param->AJ, param->AL);
int i;
for (i=0; i<4; i++)
fprintf(debug,"atom %u type %s ",
- param->a[i]+1,get_atomtype_name(at->atom[param->a[i]].type,atype));
+ param->a[i]+1,get_atomtype_name_AB(&at->atom[param->a[i]],atype));
fprintf(debug,"\n");
}
bXH3 =
- ( (gmx_strncasecmp(get_atomtype_name(at->atom[param->AK].type,atype),"MNH",3)==0) &&
- (gmx_strncasecmp(get_atomtype_name(at->atom[param->AL].type,atype),"MNH",3)==0) ) ||
- ( (gmx_strncasecmp(get_atomtype_name(at->atom[param->AK].type,atype),"MCH3",4)==0) &&
- (gmx_strncasecmp(get_atomtype_name(at->atom[param->AL].type,atype),"MCH3",4)==0) );
+ ( (gmx_strncasecmp(get_atomtype_name_AB(&at->atom[param->AK],atype),"MNH",3)==0) &&
+ (gmx_strncasecmp(get_atomtype_name_AB(&at->atom[param->AL],atype),"MNH",3)==0) ) ||
+ ( (gmx_strncasecmp(get_atomtype_name_AB(&at->atom[param->AK],atype),"MCH3",4)==0) &&
+ (gmx_strncasecmp(get_atomtype_name_AB(&at->atom[param->AL],atype),"MCH3",4)==0) );
/* check if construction parity must be swapped */
bSwapParity = ( param->C1 == -1 );
int
gmx_densmap(int argc,char *argv[]);
+int
+gmx_densorder(int argc,char *argv[]);
+
int
gmx_dielectric(int argc,char *argv[]);
int
gmx_helixorient(int argc,char *argv[]);
+int
+gmx_hydorder(int argc,char *argv[]);
+
int
gmx_kinetics(int argc,char *argv[]);
gmx_bool bHisto, const char *fn_histo, int maxchi,
real **dih, int nlist, t_dlist dlist[],
int nframes, int nangles, const char *grpname,
- int xity[], real t0, real dt, gmx_bool bRb,
+ int multiplicity[], real t0, real dt, gmx_bool bRb,
real core_frac, const output_env_t oenv);
- /* as above but passes dlist so can copy occupancies into it, and xity[]
+ /* as above but passes dlist so can copy occupancies into it, and multiplicity[]
* (1..nangles, corresp to dih[this][], so can have non-3 multiplicity of
* rotamers. Also production of xvg output files is conditional
* and the fractional width of each rotamer can be set ie for a 3 fold
void mk_chi_lookup (int **lookup, int maxchi, real **dih,
int nlist, t_dlist dlist[]) ;
-void mk_multiplicity_lookup (int *xity, int maxchi, real **dih,
+void mk_multiplicity_lookup (int *multiplicity, int maxchi, real **dih,
int nlist, t_dlist dlist[],int nangle) ;
void get_chi_product_traj (real **dih,int nframes,int nangles,
int nlist,int maxchi, t_dlist dlist[],
- real time[], int **lookup,int *xity,
+ real time[], int **lookup,int *multiplicity,
gmx_bool bRb,gmx_bool bNormalize,
real core_frac,gmx_bool bAll,const char *fnall,
const output_env_t oenv);
gmx_bool bDynBox;
gmx_bool bNHC_trotter;
gmx_bool bMTTK;
+ gmx_bool bDiagPres;
int f_nre;
int epc;
- tensor ref_p;
+ real ref_p;
int etc;
int nCrmsd;
gmx_bool bEner[F_NRE];
* structure is simply nrow*ncol floating-point elements. The sparse
* matrix structure should be freed with gmx_sparsematrix_destroy() when you are done.
*
- * To determine the format you should set full_matrix and sparse_matrix to NULL
+ * To determine the format you should set *full_matrix and *sparse_matrix to NULL
* before calling this routine, and check which one is non-NULL on return.
*/
void
#define TMPI_GROUP_NULL NULL
/** the empty group */
-extern tMPI_Group tMPI_GROUP_EMPTY;
+extern tMPI_Group TMPI_GROUP_EMPTY;
/** The maximum processor name returned using tMPI_Get_processor_name(). */
int *ibuf; /* for ints */
int ibuf_alloc;
+ gmx_large_int_t *libuf;
+ int libuf_alloc;
+
float *fbuf; /* for floats */
int fbuf_alloc;
int solvent_opt;
int nWatMol;
gmx_bool bGrid;
- gmx_bool bExcl_IntraCGAll_InterCGNone;
cginfo_mb_t *cginfo_mb;
int *cginfo;
rvec *cg_cm;
#define NRFP(ftype) (NRFPA(ftype)+NRFPB(ftype))
#define NRAL(ftype) (interaction_function[(ftype)].nratoms)
-#define IS_CHEMBOND(ftype) (interaction_function[(ftype)].nratoms==2 && interaction_function[(ftype)].flags & IF_CHEMBOND)
+#define IS_CHEMBOND(ftype) (interaction_function[(ftype)].nratoms==2 && (interaction_function[(ftype)].flags & IF_CHEMBOND))
/* IS_CHEMBOND tells if function type ftype represents a chemical bond */
/* IS_ANGLE tells if a function type ftype represents an angle
* Per Larsson, 2007-11-06
*/
-#define IS_ANGLE(ftype) (interaction_function[(ftype)].nratoms==3 && interaction_function[(ftype)].flags & IF_ATYPE)
+#define IS_ANGLE(ftype) (interaction_function[(ftype)].nratoms==3 && (interaction_function[(ftype)].flags & IF_ATYPE))
#define IS_VSITE(ftype) (interaction_function[(ftype)].flags & IF_VSITE)
#define IS_TABULATED(ftype) (interaction_function[(ftype)].flags & IF_TABULATED)
{
/* general routine for both barostat and thermostat nose hoover chains */
- int i,j,mi,mj,jmax,nd;
- double Ekin,Efac,reft,kT;
+ int i,j,mi,mj,jmax;
+ double Ekin,Efac,reft,kT,nd;
double dt;
t_grp_tcstat *tcstat;
double *ivxi,*ixi;
}
for(est=0; est<estNR; est++)
{
- if (EST_DISTR(est) && state_local->flags & (1<<est))
+ if (EST_DISTR(est) && (state_local->flags & (1<<est)))
{
switch (est) {
case estX:
for(est=0; est<estNR; est++)
{
- if (EST_DISTR(est) && state->flags & (1<<est))
+ if (EST_DISTR(est) && (state->flags & (1<<est)))
{
switch(est) {
case estX:
}
for(i=0; i<estNR; i++)
{
- if (EST_DISTR(i) && state_local->flags & (1<<i))
+ if (EST_DISTR(i) && (state_local->flags & (1<<i)))
{
switch (i) {
case estX:
for(est=0; est<estNR; est++)
{
- if (EST_DISTR(est) && state->flags & (1<<est)) {
+ if (EST_DISTR(est) && (state->flags & (1<<est))) {
switch (est) {
case estX:
/* Rotate the complete state; for a rectangular box only */
static void make_load_communicator(gmx_domdec_t *dd,MPI_Group g_all,
int dim_ind,ivec loc)
{
- MPI_Group g_row;
+ MPI_Group g_row = MPI_GROUP_EMPTY;
MPI_Comm c_row;
int dim,i,*rank;
ivec loc_c;
gmx_domdec_root_t *root;
+ gmx_bool bPartOfGroup = FALSE;
dim = dd->dim[dim_ind];
copy_ivec(loc,loc_c);
{
loc_c[dim] = i;
rank[i] = dd_index(dd->nc,loc_c);
+ if (rank[i] == dd->rank)
+ {
+ /* This process is part of the group */
+ bPartOfGroup = TRUE;
+ }
+ }
+ if (bPartOfGroup)
+ {
+ MPI_Group_incl(g_all,dd->nc[dim],rank,&g_row);
}
- /* Here we create a new group, that does not necessarily
- * include our process. But MPI_Comm_create needs to be
- * called by all the processes in the original communicator.
- * Calling MPI_Group_free afterwards gives errors, so I assume
- * also the group is needed by all processes. (B. Hess)
- */
- MPI_Group_incl(g_all,dd->nc[dim],rank,&g_row);
MPI_Comm_create(dd->mpi_comm_all,g_row,&c_row);
- if (c_row != MPI_COMM_NULL)
+ if (bPartOfGroup)
{
- /* This process is part of the group */
dd->comm->mpi_comm_load[dim_ind] = c_row;
if (dd->comm->eDLB != edlbNO)
{
if (cr->npmenodes > dd->nnodes)
{
gmx_fatal_collective(FARGS,cr,NULL,
- "The number of separate PME node (%d) is larger than the number of PP nodes (%d), this is not supported.",cr->npmenodes,dd->nnodes);
+ "The number of separate PME nodes (%d) is larger than the number of PP nodes (%d), this is not supported.",cr->npmenodes,dd->nnodes);
}
if (cr->npmenodes > 0)
{
/* Reorder the state */
for(i=0; i<estNR; i++)
{
- if (EST_DISTR(i) && state->flags & (1<<i))
+ if (EST_DISTR(i) && (state->flags & (1<<i)))
{
switch (i)
{
/* Print load every nstlog, first and last step to the log file */
bLogLoad = ((ir->nstlog > 0 && step % ir->nstlog == 0) ||
comm->n_load_collect == 0 ||
- (step + ir->nstlist > ir->init_step + ir->nsteps));
+ (ir->nsteps >= 0 &&
+ (step + ir->nstlist > ir->init_step + ir->nsteps)));
/* Avoid extra communication due to verbose screen output
* when nstglobalcomm is set.
{
int d,ndiv;
+ if (n <= 0)
+ {
+ gmx_fatal(FARGS, "Can only factorize positive integers.");
+ }
+
/* Decompose n in factors */
snew(*fac,n/2);
snew(*mfac,n/2);
ir->ePBC==epbcXYZ && ir->ewald_geometry==eewg3DC);
}
+/* Avoid integer overflows */
+static float comm_pme_cost_vol(int npme, int a, int b, int c)
+{
+ float comm_vol;
+
+ comm_vol = npme - 1;
+ comm_vol *= npme;
+ comm_vol *= div_up(a, npme);
+ comm_vol *= div_up(b, npme);
+ comm_vol *= c;
+ return comm_vol;
+}
+
static float comm_cost_est(gmx_domdec_t *dd,real limit,real cutoff,
matrix box,gmx_ddbox_t *ddbox,
int natoms,t_inputrec *ir,
*/
float pbcdx_rect_fac = 0.1;
float pbcdx_tric_fac = 0.2;
+ float temp;
/* Check the DD algorithm restrictions */
if ((ir->ePBC == epbcXY && ir->nwall < 2 && nc[ZZ] > 1) ||
{
nk = (i==0 ? ir->nkx : ir->nky);
overlap = (nk % npme[i] == 0 ? ir->pme_order-1 : ir->pme_order);
- comm_pme += npme[i]*overlap*ir->nkx*ir->nky*ir->nkz/nk;
+ temp = npme[i];
+ temp *= overlap;
+ temp *= ir->nkx;
+ temp *= ir->nky;
+ temp *= ir->nkz;
+ temp /= nk;
+ comm_pme += temp;
+/* Old line comm_pme += npme[i]*overlap*ir->nkx*ir->nky*ir->nkz/nk; */
}
}
* are similar and therefore these formulas also prefer load balance
* in the FFT and pme_solve calculation.
*/
- comm_pme += (npme[YY] - 1)*npme[YY]*div_up(ir->nky,npme[YY])*div_up(ir->nkz,npme[YY])*ir->nkx;
- comm_pme += (npme[XX] - 1)*npme[XX]*div_up(ir->nkx,npme[XX])*div_up(ir->nky,npme[XX])*ir->nkz;
+ comm_pme += comm_pme_cost_vol(npme[YY], ir->nky, ir->nkz, ir->nkx);
+ comm_pme += comm_pme_cost_vol(npme[XX], ir->nkx, ir->nky, ir->nkz);
/* Add cost of pbc_dx for bondeds */
cost_pbcdx = 0;
real cellsize_limit,real cutoff_dd,
gmx_bool bInterCGBondeds,gmx_bool bInterCGMultiBody)
{
- int npme,nkx,nky;
- int ldiv;
+ int nnodes_div,ldiv;
real limit;
if (MASTER(cr))
{
+ nnodes_div = cr->nnodes;
+ if (EEL_PME(ir->coulombtype))
+ {
+ if (cr->npmenodes > 0)
+ {
+ if (cr->nnodes <= 2)
+ {
+ gmx_fatal(FARGS,
+ "Can not have separate PME nodes with 2 or less nodes");
+ }
+ if (cr->npmenodes >= cr->nnodes)
+ {
+ gmx_fatal(FARGS,
+ "Can not have %d separate PME nodes with just %d total nodes",
+ cr->npmenodes, cr->nnodes);
+ }
+
+ /* If the user purposely selected the number of PME nodes,
+ * only check for large primes in the PP node count.
+ */
+ nnodes_div -= cr->npmenodes;
+ }
+ }
+ else
+ {
+ cr->npmenodes = 0;
+ }
+
if (cr->nnodes > 12)
{
- ldiv = largest_divisor(cr->nnodes);
+ ldiv = largest_divisor(nnodes_div);
/* Check if the largest divisor is more than nnodes^2/3 */
- if (ldiv*ldiv*ldiv > cr->nnodes*cr->nnodes)
+ if (ldiv*ldiv*ldiv > nnodes_div*nnodes_div)
{
gmx_fatal(FARGS,"The number of nodes you selected (%d) contains a large prime factor %d. In most cases this will lead to bad performance. Choose a number with smaller prime factors or set the decomposition (option -dd) manually.",
- cr->nnodes,ldiv);
+ nnodes_div,ldiv);
}
}
if (EEL_PME(ir->coulombtype))
{
- if (cr->npmenodes >= 0)
- {
- if (cr->nnodes <= 2 && cr->npmenodes > 0)
- {
- gmx_fatal(FARGS,
- "Can not have separate PME nodes with 2 or less nodes");
- }
- }
- else
+ if (cr->npmenodes < 0)
{
if (cr->nnodes <= 10)
{
fprintf(fplog,"Using %d separate PME nodes\n",cr->npmenodes);
}
}
- else
- {
- if (cr->npmenodes < 0)
- {
- cr->npmenodes = 0;
- }
- }
limit = optimize_ncells(fplog,cr->nnodes,cr->npmenodes,
bDynLoadBal,dlb_scale,
{
if (readmagic==666 || readmagic==667 || readmagic==668)
gmx_fatal(FARGS,"Wrong magic number: Use newest version of make_edi to produce edi file");
- else if (readmagic == 669)
- ;
- else
+ else if (readmagic != 669)
gmx_fatal(FARGS,"Wrong magic number %d in %s",readmagic,ed->edinam);
}
int i;
for (i=sqrt(z);;i--)
if (z%i==0) return i;
+ return 1;
}
/* largest factor */
if (z==1) return 1;
for (i=z/2;;i--)
if (z%i==0) return i;
+ return 1;
}
/* largest prime factor: WARNING: slow recursion, only use for small numbers */
#ifdef GMX_FFT_FFTW3 /*if not FFTW - then we don't do a 3d plan but insead only 1D plans */
if ((!(flags&FFT5D_INPLACE)) && (!(P[0]>1 || P[1]>1))) { /*don't do 3d plan in parallel or if in_place requested */
int fftwflags=FFTW_DESTROY_INPUT;
- fftw_iodim dims[3];
+ FFTW(iodim) dims[3];
int inNG=NG,outMG=MG,outKG=KG;
FFTW_LOCK;
rotate(NG);
}
}
- if (plan->flags&FFT5D_REALCOMPLEX && ((!(plan->flags&FFT5D_BACKWARD) && s==0) || (plan->flags&FFT5D_BACKWARD && s==2))) {
+ if ((plan->flags&FFT5D_REALCOMPLEX) && ((!(plan->flags&FFT5D_BACKWARD) && s==0) || ((plan->flags&FFT5D_BACKWARD) && s==2))) {
xl[0] = rC[s];
}
}
int x,y,z,l;
int *coor = plan->coor;
int ll=2; /*compare ll values per element (has to be 2 for complex)*/
- if (plan->flags&FFT5D_REALCOMPLEX && plan->flags&FFT5D_BACKWARD)
+ if ((plan->flags&FFT5D_REALCOMPLEX) && (plan->flags&FFT5D_BACKWARD))
{
ll=1;
}
}
static cginfo_mb_t *init_cginfo_mb(FILE *fplog,const gmx_mtop_t *mtop,
- t_forcerec *fr,gmx_bool bNoSolvOpt,
- gmx_bool *bExcl_IntraCGAll_InterCGNone)
+ t_forcerec *fr,gmx_bool bNoSolvOpt)
{
const t_block *cgs;
const t_blocka *excl;
ncg_tot = ncg_mtop(mtop);
snew(cginfo_mb,mtop->nmolblock);
- *bExcl_IntraCGAll_InterCGNone = TRUE;
-
excl_nalloc = 10;
snew(bExcl,excl_nalloc);
cg_offset = 0;
gmx_fatal(FARGS,"A charge group has size %d which is larger than the limit of %d atoms",a1-a0,MAX_CHARGEGROUP_SIZE);
}
SET_CGINFO_NATOMS(cginfo[cgm+cg],a1-a0);
-
- if (!bExclIntraAll || bExclInter)
- {
- *bExcl_IntraCGAll_InterCGNone = FALSE;
- }
}
}
cg_offset += molb->nmol*cgs->nr;
fr->qr = mk_QMMMrec();
/* Set all the static charge group info */
- fr->cginfo_mb = init_cginfo_mb(fp,mtop,fr,bNoSolvOpt,
- &fr->bExcl_IntraCGAll_InterCGNone);
+ fr->cginfo_mb = init_cginfo_mb(fp,mtop,fr,bNoSolvOpt);
+
if (DOMAINDECOMP(cr)) {
fr->cginfo = NULL;
} else {
case egbSTILL:
if(fr->UseOptimizedKernels)
{
- calc_gb_rad_still_sse2_double(cr,fr,md->nr,top, atype, x[0], nl, born);
+ calc_gb_rad_still_sse2_double(cr,fr,born->nr,top, atype, x[0], nl, born);
}
else
{
{
for(i=n0;i<n1;i++)
{
- rbi = born->bRad[k];
+ rbi = born->bRad[i];
rb[i] = rbi * rbi * born->drobc[i] * dvda[i];
}
}
#define NBOXS asize(boxs_nm)
#define NTRICLBOXS asize(tricl_boxs_nm)
-static gmx_bool bTricl,bDynBox;
-static int f_nre=0,epc,etc,nCrmsd;
-
-
-
-
t_mdebin *init_mdebin(ener_file_t fp_ene,
const gmx_mtop_t *mtop,
}
md->epc = ir->epc;
- for (i=0;i<DIM;i++)
- {
- for (j=0;j<DIM;j++)
- {
- md->ref_p[i][j] = ir->ref_p[i][j];
- }
- }
+ md->bDiagPres = !TRICLINIC(ir->ref_p);
+ md->ref_p = (ir->ref_p[XX][XX]+ir->ref_p[YY][YY]+ir->ref_p[ZZ][ZZ])/DIM;
md->bTricl = TRICLINIC(ir->compress) || TRICLINIC(ir->deform);
md->bDynBox = DYNAMIC_BOX(*ir);
md->etc = ir->etc;
unit_length);
md->ivol = get_ebin_space(md->ebin, 1, vol_nm, unit_volume);
md->idens = get_ebin_space(md->ebin, 1, dens_nm, unit_density_SI);
- md->ipv = get_ebin_space(md->ebin, 1, pv_nm, unit_energy);
- md->ienthalpy = get_ebin_space(md->ebin, 1, enthalpy_nm, unit_energy);
+ if (md->bDiagPres)
+ {
+ md->ipv = get_ebin_space(md->ebin, 1, pv_nm, unit_energy);
+ md->ienthalpy = get_ebin_space(md->ebin, 1, enthalpy_nm, unit_energy);
+ }
}
if (md->bConstrVir)
{
vol = box[XX][XX]*box[YY][YY]*box[ZZ][ZZ];
dens = (tmass*AMU)/(vol*NANO*NANO*NANO);
- /* This is pV (in kJ/mol). The pressure is the reference pressure,
- not the instantaneous pressure */
- pv = 0;
- for (i=0;i<DIM;i++)
- {
- for (j=0;j<DIM;j++)
- {
- if (i>j)
- {
- pv += box[i][j]*md->ref_p[i][j]/PRESFAC;
- }
- else
- {
- pv += box[j][i]*md->ref_p[j][i]/PRESFAC;
- }
- }
- }
-
add_ebin(md->ebin,md->ib ,nboxs,bs ,bSum);
add_ebin(md->ebin,md->ivol ,1 ,&vol ,bSum);
add_ebin(md->ebin,md->idens,1 ,&dens,bSum);
- add_ebin(md->ebin,md->ipv ,1 ,&pv ,bSum);
- enthalpy = pv + enerd->term[F_ETOT];
- add_ebin(md->ebin,md->ienthalpy ,1 ,&enthalpy ,bSum);
+
+ if (md->bDiagPres)
+ {
+ /* This is pV (in kJ/mol). The pressure is the reference pressure,
+ not the instantaneous pressure */
+ pv = vol*md->ref_p/PRESFAC;
+
+ add_ebin(md->ebin,md->ipv ,1 ,&pv ,bSum);
+ enthalpy = pv + enerd->term[F_ETOT];
+ add_ebin(md->ebin,md->ienthalpy ,1 ,&enthalpy ,bSum);
+ }
}
if (md->bConstrVir)
{
{
fprintf(log,"\nUsing charge-group - charge-group neighbor lists and kernels\n\n");
}
- if (!fr->bExcl_IntraCGAll_InterCGNone)
- {
- gmx_fatal(FARGS,"The charge-group - charge-group force loops only support systems with all intra-cg interactions excluded and no inter-cg exclusions, this is not the case for this system.");
- }
}
if (fr->solvent_opt == esolTIP4P) {
static inline void add_j_to_nblist_cg(t_nblist *nlist,
atom_id j_start,int j_end,
- t_excl *bexcl,gmx_bool bLR)
+ t_excl *bexcl,gmx_bool i_is_j,
+ gmx_bool bLR)
{
int nrj=nlist->nrj;
int j;
{
nlist->excl[nrj*MAX_CGCGSIZE + j - j_start] = bexcl[j];
}
+ if (i_is_j)
+ {
+ /* Avoid double counting of intra-cg interactions */
+ for(j=1; j<j_end-j_start; j++)
+ {
+ nlist->excl[nrj*MAX_CGCGSIZE + j] |= (1<<j) - 1;
+ }
+ }
nlist->nrj ++;
}
/* Here we add the j charge group jcg to the list,
* exclusions are also added to the list.
*/
- add_j_to_nblist_cg(vdwc,index[jcg],index[jcg+1],bExcl,bLR);
+ add_j_to_nblist_cg(vdwc,index[jcg],index[jcg+1],bExcl,icg==jcg,bLR);
}
}
}
pdc->nconstraints = cnt;
- /* This should really be calculated, but 1000 is a _lot_ for overlapping constraints... */
- snew(pdc->sendbuf,1000);
- snew(pdc->recvbuf,1000);
+ snew(pdc->sendbuf,max(6*(pd->index[cr->nodeid+1]-pd->constraints->right_range_send),6*(pdc->left_range_send-pd->index[cr->nodeid])));
+ snew(pdc->recvbuf,max(6*(pd->index[cr->nodeid]-pdc->left_range_receive),6*(pdc->right_range_receive-pd->index[cr->nodeid+1])));
}
for(m=0; m<DIM; m++)
{
dr[m] *= pull->dim[m];
- dr2 += dr[m];
+ dr2 += dr[m]*dr[m];
}
if (max_dist2 >= 0 && dr2 > 0.98*0.98*max_dist2)
{
- gmx_fatal(FARGS,"Distance of pull group %d (%f nm) is larger than 0.49 times the box size (%f)",g,sqrt(dr2),max_dist2);
+ gmx_fatal(FARGS,"Distance of pull group %d (%f nm) is larger than 0.49 times the box size (%f)",g,sqrt(dr2),sqrt(max_dist2));
}
if (pull->eGeom == epullgDIRPBC)
}
}
- bConverged_all = TRUE;
+ bConverged_all = FALSE;
while (!bConverged_all && niter < max_iter)
{
bConverged_all = TRUE;
fprintf(fp,"%15.10e %15.10e %15.10e\n",x0,y0,yp);
}
- ffclose(fp);
+ gmx_fio_fclose(fp);
}
/*
at = type[i];
Cd = nbfp[ntw[w]+2*at];
Cr = nbfp[ntw[w]+2*at+1];
- if (!((Cd==0 && Cr==0) || egp_flags[ggid] & EGP_EXCL))
+ if (!((Cd==0 && Cr==0) || (egp_flags[ggid] & EGP_EXCL)))
{
if (w == 0)
{
d->bTryGrid = TRUE;
if (cutoff <= 0)
{
- cutoff = HUGE_VAL;
+ cutoff = GMX_REAL_MAX;
d->bTryGrid = FALSE;
}
d->cutoff = cutoff;
/* Integers to floating point are easy */
if (value->type == INT_VALUE && type == REAL_VALUE)
{
- value->u.r.r1 = (real)value->u.i.i1;
- value->u.r.r2 = (real)value->u.i.i2;
+ real r1 = (real)value->u.i.i1;
+ real r2 = (real)value->u.i.i2;
+ value->u.r.r1 = r1;
+ value->u.r.r2 = r2;
value->type = type;
return 0;
}
&& gmx_within_tol(value->u.r.r1, (int)value->u.r.r1, GMX_REAL_EPS)
&& gmx_within_tol(value->u.r.r2, (int)value->u.r.r2, GMX_REAL_EPS))
{
- value->u.i.i1 = (int)value->u.r.r1;
- value->u.i.i2 = (int)value->u.r.r2;
+ int i1 = (int)value->u.r.r1;
+ int i2 = (int)value->u.r.r2;
+ value->u.i.i1 = i1;
+ value->u.i.i2 = i2;
value->type = type;
return 0;
}
/** Initializes the \p insolidangle selection method. */
static void
init_insolidangle(t_topology *top, int npar, gmx_ana_selparam_t *param, void *data);
-/** Sets the COM/COG data for the \p insolidangle selection method. */
-static void
-set_comg_insolidangle(gmx_ana_pos_t *pos, void *data);
/** Frees the data allocated for the \p insolidangle selection method. */
static void
free_data_insolidangle(void *data);
case ClientMessage:
ew->etype=event->xclient.data.l[0];
ExposeWin(x11->disp,ew->wd.self);
- /* Fall thru... */
+ /* no break */
case ButtonRelease:
hide_menu(x11,ew->selener);
break;
void init_gmx(t_x11 *x11,char *program,int nfile,t_filenm fnm[],
const output_env_t oenv);
-int EventSignaller(t_manager *man);
-
static void dump_xw(char *dispname,Window w,char *fn)
{
char comm[256];
iatoms->resinfo[resind] = atoms->resinfo[atoms->atom[index[i]].resind];
/* allocate some space for the rtp name and copy from name */
snew(iatoms->resinfo[resind].rtp,1);
- iatoms->resinfo[resind].rtp = gmx_strdup(atoms->resinfo[resind].name);
+ *iatoms->resinfo[resind].rtp = gmx_strdup(*atoms->resinfo[resind].name);
iatoms->nres = max(iatoms->nres, iatoms->atom[i].resind+1);
}
gmx_bool bShowTimestep=TRUE,bOK,newline=FALSE;
t_trxstatus *status;
gmx_mtop_t mtop;
- gmx_localtop_t *top;
+ gmx_localtop_t *top=NULL;
t_state state;
t_inputrec ir;
if (tpr) {
read_tpx_state(tpr,&ir,&state,NULL,&mtop);
+ top = gmx_mtop_generate_local_top(&mtop,&ir);
}
new_natoms = -1;
natoms = -1;
}
natoms=new_natoms;
if (tpr) {
- top = gmx_mtop_generate_local_top(&mtop,&ir);
chk_bonds(&top->idef,ir.ePBC,fr.x,fr.box,tol);
}
if (fr.bX)
{
sim_part = sim_part_fn + 1;
}
+
+ if (MULTISIM(cr) && MASTER(cr))
+ {
+ check_multi_int(stdout,cr->ms,sim_part,"simulation part");
+ }
}
else
{
gmx_bool bHDd,bHEd;
rvec xh1,xh2;
int natom;
- int i,nd,na,aj,hisind,his0,type=-1;
+ int i,j,nd,na,aj,hisind,his0,type=-1;
int nd1,ne2,cg,cd2,ce1;
t_blocka *hb;
real d;
char *atomnm;
natom=pdba->nr;
+
+ i = 0;
+ while (i < natom &&
+ gmx_strcasecmp(*pdba->resinfo[pdba->atom[i].resind].name,"HIS") != 0)
+ {
+ i++;
+ }
+ if (natom == i)
+ {
+ return;
+ }
+
+ /* A histidine residue exists that requires automated assignment, so
+ * doing the analysis of donors and acceptors is worthwhile. */
+ fprintf(stderr,
+ "Analysing hydrogen-bonding network for automated assigment of histidine\n"
+ " protonation.");
+
snew(donor,natom);
snew(acceptor,natom);
snew(hbond,natom);
snew(hb,1);
nd=na=0;
- for(i=0; (i<natom); i++) {
- if (in_strings(*pdba->atomname[i],NPA,prot_acc) != -1) {
- acceptor[i] = TRUE;
+ for(j=0; (j<natom); j++) {
+ if (in_strings(*pdba->atomname[j],NPA,prot_acc) != -1) {
+ acceptor[j] = TRUE;
na++;
}
- if (in_strings(*pdba->atomname[i],NPD,prot_don) != -1) {
- donor[i] = TRUE;
+ if (in_strings(*pdba->atomname[j],NPD,prot_don) != -1) {
+ donor[j] = TRUE;
nd++;
}
}
- fprintf(stderr,"There are %d donors and %d acceptors\n",nd,na);
+ fprintf(stderr," %d donors and %d acceptors were found.\n",nd,na);
chk_allhb(pdba,x,hb,donor,acceptor,dist);
if (debug)
pr_hbonds(debug,hb,pdba);
/* Now do the HIS stuff */
hisind=-1;
- for(i=0; (i<natom); ) {
+ while (i < natom)
+ {
if (gmx_strcasecmp(*pdba->resinfo[pdba->atom[i].resind].name,"HIS") != 0)
+ {
i++;
- else {
+ }
+ else
+ {
if (pdba->atom[i].resind != hisind) {
hisind=pdba->atom[i].resind;
int old_prev_chainnum;
int old_this_chainnum;
t_resinfo *ri;
+ char select[STRLEN];
int new_chainnum;
-
+ int this_atomnum;
+ int prev_atomnum;
+ const char * prev_atomname;
+ const char * this_atomname;
+ const char * prev_resname;
+ const char * this_resname;
+ int prev_resnum;
+ int this_resnum;
+ char prev_chainid;
+ char this_chainid;
+ int prev_chainnumber;
+ int this_chainnumber;
+
enum
{
SPLIT_ID_OR_TER,
SPLIT_ID_AND_TER,
SPLIT_ID_ONLY,
- SPLIT_TER_ONLY
+ SPLIT_TER_ONLY,
+ SPLIT_INTERACTIVE
}
splitting;
- printf("Splitting PDB chains based on ");
splitting = SPLIT_TER_ONLY; /* keep compiler happy */
/* Be a bit flexible to catch typos */
- if (!strncmp(chainsep,"id_o",4) || !strncmp(chainsep,"int",3))
+ if (!strncmp(chainsep,"id_o",4))
{
/* For later interactive splitting we tentatively assign new chain numbers at either changing id or ter records */
splitting = SPLIT_ID_OR_TER;
- printf("TER records or changing chain id.\n");
+ printf("Splitting chemical chains based on TER records or chain id changing.\n");
+ }
+ else if (!strncmp(chainsep,"int",3))
+ {
+ /* For later interactive splitting we tentatively assign new chain numbers at either changing id or ter records */
+ splitting = SPLIT_INTERACTIVE;
+ printf("Splitting chemical chains interactively.\n");
}
else if (!strncmp(chainsep,"id_a",4))
{
splitting = SPLIT_ID_AND_TER;
- printf("TER records and chain id.\n");
+ printf("Splitting chemical chains based on TER records and chain id changing.\n");
}
else if (strlen(chainsep)==2 && !strncmp(chainsep,"id",4))
{
splitting = SPLIT_ID_ONLY;
- printf("changing chain id only (ignoring TER records).\n");
+ printf("Splitting chemical chains based on changing chain id only (ignoring TER records).\n");
}
else if (chainsep[0]=='t')
{
splitting = SPLIT_TER_ONLY;
- printf("TER records only (ignoring chain id).\n");
+ printf("Splitting chemical chains based on TER records only (ignoring chain id).\n");
}
else
{
old_prev_chainnum = -1;
new_chainnum = -1;
+ this_atomname = NULL;
+ this_atomnum = -1;
+ this_resname = NULL;
+ this_resnum = -1;
+ this_chainid = '?';
+ this_chainnumber = -1;
+
for(i=0;i<pdba->nres;i++)
{
ri = &pdba->resinfo[i];
- old_this_chainid = ri->chainid;
- old_this_chainnum = ri->chainnum;
+ old_this_chainid = ri->chainid;
+ old_this_chainnum = ri->chainnum;
+
+ prev_atomname = this_atomname;
+ prev_atomnum = this_atomnum;
+ prev_resname = this_resname;
+ prev_resnum = this_resnum;
+ prev_chainid = this_chainid;
+ prev_chainnumber = this_chainnumber;
+
+ this_atomname = *(pdba->atomname[i]);
+ this_atomnum = (pdba->pdbinfo != NULL) ? pdba->pdbinfo[i].atomnr : i+1;
+ this_resname = *ri->name;
+ this_resnum = ri->nr;
+ this_chainid = ri->chainid;
+ this_chainnumber = ri->chainnum;
switch (splitting)
{
new_chainnum++;
}
break;
+ case SPLIT_INTERACTIVE:
+ if(old_this_chainid != old_prev_chainid || old_this_chainnum != old_prev_chainnum)
+ {
+ if(i>0)
+ {
+ printf("Split the chain (and introduce termini) between residue %s%d (chain id '%c', atom %d %s)\n"
+ "and residue %s%d (chain id '%c', atom %d %s) ? [n/y]\n",
+ prev_resname,prev_resnum,prev_chainid,prev_atomnum,prev_atomname,
+ this_resname,this_resnum,this_chainid,this_atomnum,this_atomname);
+
+ if(NULL==fgets(select,STRLEN-1,stdin))
+ {
+ gmx_fatal(FARGS,"Error reading from stdin");
+ }
+ }
+ if(i==0 || select[0] == 'y')
+ {
+ new_chainnum++;
+ }
+ }
+ break;
default:
gmx_fatal(FARGS,"Internal inconsistency - this shouldn't happen...");
break;
"The protonation state of N- and C-termini can be chosen interactively",
"with the [TT]-ter[tt] flag. Default termini are ionized (NH3+ and COO-),",
"respectively. Some force fields support zwitterionic forms for chains of",
- "one residue, but for polypeptides these options should NOT be selected.[PAR]",
-
+ "one residue, but for polypeptides these options should NOT be selected.",
+ "The AMBER force fields have unique forms for the terminal residues,",
+ "and these are incompatible with the [TT]-ter[tt] mechanism. You need",
+ "to prefix your N- or C-terminal residue names with \"N\" or \"C\"",
+ "respectively to use these forms, making sure you preserve the format",
+ "of the coordinate file. Alternatively, use named terminating residues",
+ "(e.g. ACE, NME).[PAR]",
+
"The separation of chains is not entirely trivial since the markup",
"in user-generated PDB files frequently varies and sometimes it",
"is desirable to merge entries across a TER record, for instance",
"two protein chains or if you have a HEME group bound to a protein.",
"In such cases multiple chains should be contained in a single",
"[TT]moleculetype[tt] definition.",
- "To handle this, [TT]pdb2gmx[tt] has an option [TT]-chainsep[tt] so you can",
- "choose whether a new chain should start when we find a TER record,",
- "when the chain id changes, combinations of either or both of these",
- "or fully interactively.[PAR]",
-
+ "To handle this, [TT]pdb2gmx[tt] uses two separate options.",
+ "First, [TT]-chainsep[tt] allows you to choose when a new chemical chain should",
+ "start, and termini added when applicable. This can be done based on the",
+ "existence of TER records, when the chain id changes, or combinations of either",
+ "or both of these. You can also do the selection fully interactively.",
+ "In addition, there is a [TT]-merge[tt] option that controls how multiple chains",
+ "are merged into one moleculetype, after adding all the chemical termini (or not).",
+ "This can be turned off (no merging), all non-water chains can be merged into a",
+ "single molecule, or the selection can be done interactively.[PAR]",
+
"[TT]pdb2gmx[tt] will also check the occupancy field of the [TT].pdb[tt] file.",
"If any of the occupancies are not one, indicating that the atom is",
"not resolved well in the structure, a warning message is issued.",
int nssbonds;
t_ssbond *ssbonds;
rvec *pdbx,*x;
- gmx_bool bVsites=FALSE,bWat,bPrevWat=FALSE,bITP,bVsiteAromatics=FALSE,bMerge;
+ gmx_bool bVsites=FALSE,bWat,bPrevWat=FALSE,bITP,bVsiteAromatics=FALSE,bCheckMerge;
real mHmult=0;
t_hackblock *hb_chain;
t_restp *restp_chain;
int this_chainstart;
int prev_chainstart;
gmx_bool bMerged;
+ int nchainmerges;
gmx_atomprop_t aps;
static const char *vsitestr[] = { NULL, "none", "hydrogens", "aromatics", NULL };
static const char *watstr[] = { NULL, "select", "none", "spc", "spce", "tip3p", "tip4p", "tip5p", NULL };
static const char *chainsep[] = { NULL, "id_or_ter", "id_and_ter", "ter", "id", "interactive", NULL };
+ static const char *merge[] = {NULL, "no", "all", "interactive", NULL };
static const char *ff = "select";
t_pargs pa[] = {
{ "-sb", FALSE, etREAL, {&short_bond_dist},
"HIDDENShort bond warning distance" },
{ "-chainsep", FALSE, etENUM, {chainsep},
- "Condition in PDB files when a new chain and molecule_type should be started" },
+ "Condition in PDB files when a new chain should be started (adding termini)" },
+ { "-merge", FALSE, etENUM, {&merge},
+ "Merge multiple chains into a single [moleculetype]" },
{ "-ff", FALSE, etSTR, {&ff},
"Force field, interactive by default. Use [TT]-h[tt] for information." },
{ "-water", FALSE, etENUM, {watstr},
{ "-ss", FALSE, etBOOL, {&bCysMan},
"Interactive SS bridge selection" },
{ "-ter", FALSE, etBOOL, {&bTerMan},
- "Interactive termini selection, iso charged" },
+ "Interactive termini selection, instead of charged (default)" },
{ "-lys", FALSE, etBOOL, {&bLysMan},
- "Interactive lysine selection, iso charged" },
+ "Interactive lysine selection, instead of charged" },
{ "-arg", FALSE, etBOOL, {&bArgMan},
- "Interactive arginine selection, iso charged" },
+ "Interactive arginine selection, instead of charged" },
{ "-asp", FALSE, etBOOL, {&bAspMan},
- "Interactive aspartic Acid selection, iso charged" },
+ "Interactive aspartic acid selection, instead of charged" },
{ "-glu", FALSE, etBOOL, {&bGluMan},
- "Interactive glutamic Acid selection, iso charged" },
+ "Interactive glutamic acid selection, instead of charged" },
{ "-gln", FALSE, etBOOL, {&bGlnMan},
- "Interactive glutamine selection, iso neutral" },
+ "Interactive glutamine selection, instead of neutral" },
{ "-his", FALSE, etBOOL, {&bHisMan},
- "Interactive histidine selection, iso checking H-bonds" },
+ "Interactive histidine selection, instead of checking H-bonds" },
{ "-angle", FALSE, etREAL, {&angle},
"Minimum hydrogen-donor-acceptor angle for a H-bond (degrees)" },
{ "-dist", FALSE, etREAL, {&distance},
modify_chain_numbers(&pdba_all,chainsep[0]);
-
- bMerge = !strncmp(chainsep[0],"int",3);
+ nchainmerges = 0;
this_atomname = NULL;
this_atomnum = -1;
prev_chainstart = 0;
pdb_ch=NULL;
+
bMerged = FALSE;
for (i=0; (i<natom); i++)
{
if ((i == 0) || (this_chainnumber != prev_chainnumber) || (bWat != bPrevWat))
{
this_chainstart = pdba_all.atom[i].resind;
- if (bMerge && i>0 && !bWat)
+
+ bMerged = FALSE;
+ if (i>0 && !bWat)
{
- printf("Merge chain ending with residue %s%d (chain id '%c', atom %d %s) with\n"
- "chain starting with residue %s%d (chain id '%c', atom %d %s)? [n/y]\n",
- prev_resname,prev_resnum,prev_chainid,prev_atomnum,prev_atomname,
- this_resname,this_resnum,this_chainid,this_atomnum,this_atomname);
-
- if(NULL==fgets(select,STRLEN-1,stdin))
+ if(!strncmp(merge[0],"int",3))
+ {
+ printf("Merge chain ending with residue %s%d (chain id '%c', atom %d %s) and chain starting with\n"
+ "residue %s%d (chain id '%c', atom %d %s) into a single moleculetype (keeping termini)? [n/y]\n",
+ prev_resname,prev_resnum,prev_chainid,prev_atomnum,prev_atomname,
+ this_resname,this_resnum,this_chainid,this_atomnum,this_atomname);
+
+ if(NULL==fgets(select,STRLEN-1,stdin))
+ {
+ gmx_fatal(FARGS,"Error reading from stdin");
+ }
+ bMerged = (select[0] == 'y');
+ }
+ else if(!strncmp(merge[0],"all",3))
{
- gmx_fatal(FARGS,"Error reading from stdin");
+ bMerged = TRUE;
}
- }
- else
- {
- select[0] = 'n';
}
- bMerged = (select[0] == 'y');
- if (bMerged)
- {
+ if (bMerged)
+ {
pdb_ch[nch-1].chainstart[pdb_ch[nch-1].nterpairs] =
- pdba_all.atom[i].resind - prev_chainstart;
+ pdba_all.atom[i].resind - prev_chainstart;
pdb_ch[nch-1].nterpairs++;
srenew(pdb_ch[nch-1].chainstart,pdb_ch[nch-1].nterpairs+1);
+ nchainmerges++;
}
else
{
}
}
- if (bMerge)
- printf("\nMerged %d chains into one molecule definition\n\n",
- pdb_ch[0].nterpairs);
+ if (nchainmerges>0)
+ printf("\nMerged chains into joint molecule definitions at %d places.\n\n",
+ nchainmerges);
printf("There are %d chains and %d blocks of water and "
"%d residues with %d atoms\n",
if (bTraj) {
fprintf(stderr,"\n"
- "NOTE: Reading the state from trajectory is an obsolete feaure of tpbconv.\n"
+ "NOTE: Reading the state from trajectory is an obsolete feature of tpbconv.\n"
" Continuation should be done by loading a checkpoint file with mdrun -cpi\n"
" This guarantees that all state variables are transferred.\n"
" tpbconv is now only useful for increasing nsteps,\n"
gmx_bundle.c gmx_chi.c gmx_cluster.c gmx_confrms.c
gmx_covar.c gmx_current.c
gmx_density.c gmx_densmap.c gmx_dih.c
- gmx_dielectric.c gmx_dos.c
+ gmx_dielectric.c
gmx_kinetics.c gmx_spatial.c gmx_tune_pme.c
gmx_dipoles.c gmx_disre.c gmx_dist.c gmx_dyndom.c
gmx_enemat.c gmx_energy.c gmx_lie.c gmx_filter.c
gmx_polystat.c gmx_potential.c gmx_rama.c
gmx_rdf.c gmx_rms.c gmx_rmsf.c
gmx_rotacf.c gmx_saltbr.c gmx_sas.c
- gmx_rmsdist.c gmx_rotmat.c
+ gmx_rmsdist.c gmx_rotmat.c
gmx_sgangle.c gmx_sorient.c gmx_spol.c gmx_tcaf.c
gmx_traj.c gmx_velacc.c gmx_helixorient.c
gmx_clustsize.c gmx_mdmat.c gmx_wham.c
gmx_editconf.c gmx_genbox.c gmx_genion.c gmx_genconf.c
gmx_genpr.c gmx_eneconv.c gmx_vanhove.c gmx_wheel.c
addconf.c calcpot.c edittop.c gmx_bar.c
- gmx_pme_error.c gmx_options.c
+ gmx_pme_error.c gmx_options.c gmx_dos.c
+ gmx_hydorder.c gmx_densorder.c powerspect.c dens_filter.c
+ binsearch.c
)
make_ndx mk_angndx trjcat trjconv trjorder g_wheel
xpm2ps genion g_anadock make_edi g_analyze g_anaeig
g_angle g_bond g_bundle g_chi g_cluster g_confrms g_covar
- g_current g_density g_densmap g_dih g_dielectric g_dos
+ g_current g_density g_densmap g_dih g_dielectric
g_helixorient g_principal g_dipoles g_disre g_dist
g_dyndom g_enemat g_energy g_lie g_filter g_gyrate
g_h2order g_hbond g_helix g_mindist g_msd g_morph g_nmeig
g_spol g_spatial g_tcaf g_traj g_tune_pme g_vanhove
g_velacc g_clustsize g_mdmat g_wham g_sigeps g_bar
g_pme_error g_rmsdist g_rotmat g_options
+ g_dos g_hydorder g_densorder
)
set(GMX_TOOLS_PROGRAMS_NOT_FOR_INSTALLATION
break;
case 5:
if (i==0)
- data[i] = 1;
+ data[i] = 1;
else
- data[i] = sin(x)/(x);
+ data[i] = sin(x)/(x);
+ break;
default:
/* Data remains 0.0 */
break;
/* just a wrapper; declare extra args, then chuck away at end. */
int maxchi = 0 ;
t_dlist *dlist ;
- int *xity;
+ int *multiplicity;
int nlist = nangles ;
int k ;
snew(dlist,nlist);
- snew(xity,nangles);
+ snew(multiplicity,nangles);
for(k=0; (k<nangles); k++) {
- xity[k]=3 ;
+ multiplicity[k]=3 ;
}
low_ana_dih_trans(TRUE, fn_trans,TRUE, fn_histo, maxchi,
dih, nlist, dlist, nframes,
- nangles, grpname, xity, t0, dt, bRb, 0.5,oenv);
+ nangles, grpname, multiplicity, t0, dt, bRb, 0.5,oenv);
sfree(dlist);
- sfree(xity);
+ sfree(multiplicity);
}
void low_ana_dih_trans(gmx_bool bTrans, const char *fn_trans,
gmx_bool bHisto, const char *fn_histo, int maxchi,
real **dih, int nlist, t_dlist dlist[], int nframes,
- int nangles, const char *grpname, int xity[],
+ int nangles, const char *grpname, int multiplicity[],
real t0, real dt, gmx_bool bRb, real core_frac,
const output_env_t oenv)
{
#ifdef OLDIE
mind = maxd = prev = dih[i][0];
#else
- cur_bin = calc_bin(dih[i][0],xity[i],core_frac);
+ cur_bin = calc_bin(dih[i][0],multiplicity[i],core_frac);
rot_occ[cur_bin][i]++ ;
#endif
for (j=1; (j<nframes); j++)
{
- new_bin = calc_bin(dih[i][j],xity[i],core_frac);
+ new_bin = calc_bin(dih[i][j],multiplicity[i],core_frac);
rot_occ[new_bin][i]++ ;
#ifndef OLDIE
if (cur_bin == 0)
}
-void mk_multiplicity_lookup (int *xity, int maxchi, real **dih,
+void mk_multiplicity_lookup (int *multiplicity, int maxchi, real **dih,
int nlist, t_dlist dlist[],int nangles)
{
/* new by grs - for dihedral j (as in dih[j]) get multiplicity from dlist
- * and store in xity[j]
+ * and store in multiplicity[j]
*/
int j, Dih, i ;
((Dih == edOmega) && (has_dihedral(edOmega,&(dlist[i])))) ||
((Dih > edOmega) && (dlist[i].atm.Cn[Dih-NONCHI+3] != -1))) {
/* default - we will correct the rest below */
- xity[j] = 3 ;
+ multiplicity[j] = 3 ;
/* make omegas 2fold, though doesn't make much more sense than 3 */
if (Dih == edOmega && (has_dihedral(edOmega,&(dlist[i])))) {
- xity[j] = 2 ;
+ multiplicity[j] = 2 ;
}
/* dihedrals to aromatic rings, COO, CONH2 or guanidinium are 2fold*/
((strstr(name,"GLN") != NULL) && (Dih == edChi3)) ||
((strstr(name,"ASN") != NULL) && (Dih == edChi2)) ||
((strstr(name,"ARG") != NULL) && (Dih == edChi4)) ) {
- xity[j] = 2;
+ multiplicity[j] = 2;
}
}
j++ ;
j,nangles);
/* Check for remaining dihedrals */
for(;(j < nangles); j++)
- xity[j] = 3;
+ multiplicity[j] = 3;
}
void get_chi_product_traj (real **dih,int nframes,int nangles, int nlist,
int maxchi, t_dlist dlist[], real time[],
- int **lookup, int *xity,gmx_bool bRb, gmx_bool bNormalize,
+ int **lookup, int *multiplicity,gmx_bool bRb, gmx_bool bNormalize,
real core_frac, gmx_bool bAll, const char *fnall,
const output_env_t oenv)
{
for (Xi = 0 ; Xi < maxchi ; Xi ++ ) {
index = lookup[i][Xi] ; /* chi_(Xi+1) of res i (-1 if off end) */
if ( index >= 0 ) {
- n = xity[index];
+ n = multiplicity[index];
nbin = n*nbin ;
}
}
bRotZero = TRUE ;
bHaveChi = FALSE ;
} else {
- b = calc_bin(dih[index][j],xity[index],core_frac) ;
+ b = calc_bin(dih[index][j],multiplicity[index],core_frac) ;
accum = b - 1 ;
if (b == 0 )
bRotZero = TRUE ;
for (Xi = 1 ; Xi < maxchi ; Xi ++ ) {
index = lookup[i][Xi] ; /* chi_(Xi+1) of res i (-1 if off end) */
if ( index >= 0 ) {
- n = xity[index];
+ n = multiplicity[index];
b = calc_bin(dih[index][j],n,core_frac);
accum = n * accum + b - 1 ;
if (b == 0 )
#endif
#include <stdio.h>
#include "types/simple.h"
+#include "gmx_fatal.h"
/*Make range-array (Permutation identity) for sorting */
void rangeArray(int *ar,int size)
return min-1;
}/*end -ifelse direction*/
+ return -1;
}
}
else
- fprintf(stderr,"Error: startindex=stopindex=%d\n",startindx);
-
+ gmx_fatal(FARGS,"Startindex=stopindex=%d\n",startindx);
+
+ return -1;
}
/* Assuming kernel is shorter than x */
-gmx_bool periodic_convolution(int datasize, real *x, int kernelsize, real *kernel)
+gmx_bool periodic_convolution(int datasize, real *x, int kernelsize,
+ real *kernel)
{
+ int i,j,k,nj;
+ real *filtered;
+
if (!x || !kernel) return FALSE;
if (kernelsize<=0|| datasize<=0|| kernelsize > datasize) return FALSE;
- int i,j,k,nj;
- real *filtered;
snew(filtered,datasize);
for(i=0;(i<datasize); i++){
#include "tpxio.h"
#include "viewit.h"
-/* defined in gmx_wheel.c*/
-extern gmx_bool *bPhobics(int ,char *);
static int strip_dssp(char *dsspfile,int nres,
gmx_bool bPhobres[],real t,
return nr;
}
+static gmx_bool *bPhobics(t_atoms *atoms)
+{
+ int i,nb;
+ char **cb;
+ gmx_bool *bb;
+
+
+ nb = get_strings("phbres.dat",&cb);
+ snew(bb,atoms->nres);
+
+ for (i=0; (i<atoms->nres); i++)
+ {
+ if ( -1 != search_str(nb,cb,*atoms->resinfo[i].name) )
+ {
+ bb[i]=TRUE;
+ }
+ }
+ return bb;
+}
+
static void check_oo(t_atoms *atoms)
{
char *OOO;
read_tps_conf(ftp2fn(efTPS,NFILE,fnm),title,&top,&ePBC,&xp,NULL,box,FALSE);
atoms=&(top.atoms);
check_oo(atoms);
- bPhbres=bPhobics((int)atoms->nres,(char *)atoms->resinfo);
+ bPhbres = bPhobics(atoms);
get_index(atoms,ftp2fn_null(efNDX,NFILE,fnm),1,&gnx,&index,&grpnm);
nres=0;
"y = a2*ee(a1,x) + (1-a2)*ee(a2,x)"
};
-extern gmx_bool mrqmin(real x[],real y[],real sig[],int ndata,real a[],
- int ma,int lista[],int mfit,real **covar,real **alpha,
- real *chisq,
- void (*funcs)(real x,real a[],real *y,real dyda[]),
- real *alamda);
-
extern gmx_bool mrqmin_new(real x[],real y[],real sig[],int ndata,real a[],
int ia[],int ma,real **covar,real **alpha,real *chisq,
void (*funcs)(real, real [], real *, real []),
erfarg=(x-a[3])/(a[4]*a[4]);
erfarg2=erfarg*erfarg;
erfval=gmx_erf(erfarg)/2;
- derf=M_2_SQRTPI*(a[1]-a[2])/2*exp(-erfarg2)/(a[4]*a[4]);
+ derf=(2./sqrt(M_PI))*(a[1]-a[2])/2*exp(-erfarg2)/(a[4]*a[4]);
*y=(a[1]+a[2])/2-(a[1]-a[2])*erfval;
dyda[1]=1/2-erfval;
#include <omp.h>
#endif
-#ifndef isfinite
-#define isfinite(x) (!isinf(x) && !isnan(x))
-#endif
-
/* The first few sections of this file contain functions that were adopted,
* and to some extent modified, by Erik Marklund (erikm[aT]xray.bmc.uu.se,
* http://folding.bmc.uu.se) from code written by Omer Markovitch (email, url).
for(i=0; i<GD->nData; i++)
{
dumpdata[i] = (real)(GD->ctTheory[i]);
+#ifdef HAS_ISFINITE
if (!isfinite(dumpdata[i]))
+#elif defined HAS__ISFINITE
+ if (!_isfinite(dumpdata[i]))
+#else
+ if (0)
+#endif
{
gmx_fatal(FARGS, "Non-finite value in acf.");
}
for (i=0; i<len; i++)
{
- if (!(isinf(ct[i]) || isnan(ct[i]))/* isfinite(ct[i]) */)
+#ifdef HAS_ISFINITE
+ if (isfinite(ct[i]))
+#elif defined(HAS__ISFINITE)
+ if (_isfinite(ct[i]))
+#else
+ if(1)
+#endif
{
if (!bBad)
{
"computed based on the Quasiharmonic approach and based on",
"Schlitter's formula."
};
- static int first=1,last=8,skip=1,nextr=2,nskip=6;
+ static int first=1,last=-1,skip=1,nextr=2,nskip=6;
static real max=0.0,temp=298.15;
static gmx_bool bSplit=FALSE,bEntropy=FALSE;
t_pargs pa[] = {
"and fourth cumulant from those of a Gaussian distribution with the same",
"standard deviation.[PAR]",
- "Option [TT]-ac[tt] produces the autocorrelation function(s).[PAR]",
+ "Option [TT]-ac[tt] produces the autocorrelation function(s).",
+ "Be sure that the time interval between data points is",
+ "much shorter than the time scale of the autocorrelation.[PAR]",
"Option [TT]-cc[tt] plots the resemblance of set i with a cosine of",
"i/2 periods. The formula is:[BR]"
"Option [TT]-gem[tt] fits bimolecular rate constants ka and kb",
"(and optionally kD) to the hydrogen bond autocorrelation function",
"according to the reversible geminate recombination model. Removal of",
- "the ballistic component first is strongly adviced. The model is presented in",
+ "the ballistic component first is strongly advised. The model is presented in",
"O. Markovitch, J. Chem. Phys. 129:084505, 2008.[PAR]",
"Option [TT]-filter[tt] prints the RMS high-frequency fluctuation",
static void dump_dih_trn(int nframes,int nangles,real **dih,const char *fn,
- real dt)
+ real *time)
{
int i,j,k,l,m,na;
t_fileio *trn;
}
}
}
- fwrite_trn(trn,i,(real)i*dt,0,box,na,x,NULL,NULL);
+ fwrite_trn(trn,i,time[i],0,box,na,x,NULL,NULL);
}
close_trn(trn);
sfree(x);
bAver=opt2bSet("-ov",NFILE,fnm);
bTrans=opt2bSet("-ot",NFILE,fnm);
bFrac=opt2bSet("-of",NFILE,fnm);
-
+ if (bTrans && opt[0][0] != 'd') {
+ fprintf(stderr, "Option -ot should only accompany -type dihedral. Disabling -ot.\n");
+ bTrans = FALSE;
+ }
+
if (bChandler && !bCorr)
bCorr=TRUE;
ffclose(out);
}
if (opt2bSet("-or",NFILE,fnm))
- dump_dih_trn(nframes,nangles,dih,opt2fn("-or",NFILE,fnm),dt);
+ dump_dih_trn(nframes,nangles,dih,opt2fn("-or",NFILE,fnm),time);
if (bFrac) {
sprintf(title,"Trans fraction: %s",grpname);
atom_id isize,*index;
int ndih,nactdih,nf;
real **dih,*trans_frac,*aver_angle,*time;
- int i,j,**chi_lookup,*xity;
+ int i,j,**chi_lookup,*multiplicity;
t_filenm fnm[] = {
{ efSTX, "-s", NULL, ffREAD },
*
* added multiplicity */
- snew(xity,ndih) ;
- mk_multiplicity_lookup(xity, maxchi, dih, nlist, dlist,ndih);
+ snew(multiplicity,ndih) ;
+ mk_multiplicity_lookup(multiplicity, maxchi, dih, nlist, dlist,ndih);
strcpy(grpname, "All residues, ");
if(bPhi)
low_ana_dih_trans(bDo_ot, opt2fn("-ot",NFILE,fnm),
bDo_oh, opt2fn("-oh",NFILE,fnm),maxchi,
- dih, nlist, dlist, nf, nactdih, grpname, xity,
+ dih, nlist, dlist, nf, nactdih, grpname, multiplicity,
*time, dt, FALSE, core_frac,oenv) ;
/* Order parameters */
mk_chi_lookup(chi_lookup, maxchi, dih, nlist, dlist);
get_chi_product_traj(dih,nf,nactdih,nlist,
- maxchi,dlist,time,chi_lookup,xity,
+ maxchi,dlist,time,chi_lookup,multiplicity,
FALSE,bNormHisto, core_frac,bAll,
opt2fn("-cp",NFILE,fnm),oenv);
ax1=0,ax2=0, /* tangent directions */
framenr=0, /* frame number in trajectory*/
slicex, slicey, slicez; /*slice # of x y z position */
- real ***Densslice; /* Density-slice in one frame*/
+ real ***Densslice=NULL; /* Density-slice in one frame*/
real dscale; /*physical scaling factor*/
real t,x,y,z; /* time and coordinates*/
rvec bbww;
int eMeth;
char **graphfiles, **rawfiles, **spectra; /* Filenames for xpm-surface maps, rawdata and powerspectra */
- int nfxpm,nfraw, nfspect; /* # files for interface maps and spectra = # interfaces */
+ int nfxpm=-1,nfraw, nfspect; /* # files for interface maps and spectra = # interfaces */
t_pargs pa[] = {
{ "-1d", FALSE, etBOOL, {&b1d},
"[TT]g_dielectric[tt] calculates frequency dependent dielectric constants",
"from the autocorrelation function of the total dipole moment in",
"your simulation. This ACF can be generated by [TT]g_dipoles[tt].",
- "For an estimate of the error you can run g_statistics on the",
- "ACF, and use the output thus generated for this program.",
"The functional forms of the available functions are:[PAR]",
"One parameter: y = Exp[-a1 x],[BR]",
"Two parameters: y = a2 Exp[-a1 x],[BR]",
parse_common_args(&argc,argv,PCA_CAN_TIME | PCA_CAN_VIEW | PCA_BE_NICE,
NFILE,fnm,asize(pa),pa,asize(desc),desc,0,NULL,&oenv);
please_cite(stdout,"Spoel98a");
+ printf("WARNING: non-polarizable models can never yield an infinite\n"
+ "dielectric constant that is different from 1. This is incorrect\n"
+ "in the reference given above (Spoel98a).\n\n");
+
nx = read_xvg(opt2fn("-f",NFILE,fnm),&yd,&ny);
dt = yd[0][1] - yd[0][0];
if (ftp2bSet(efNDX,NFILE,fnm)) {
rd_index(ftp2fn(efNDX,NFILE,fnm),1,&isize,&index,&grpname);
- xvg=xvgropen(opt2fn("-dr",NFILE,fnm),"Inidividual Restraints","Time (ps)",
+ xvg=xvgropen(opt2fn("-dr",NFILE,fnm),"Individual Restraints","Time (ps)",
"nm",oenv);
snew(vvindex,isize);
snew(leg,isize);
"With options [TT]-lt[tt] and [TT]-dist[tt] the number of contacts",
"of all atoms in group 2 that are closer than a certain distance",
"to the center of mass of group 1 are plotted as a function of the time",
- "that the contact was continously present.[PAR]",
+ "that the contact was continuously present.[PAR]",
"Other programs that calculate distances are [TT]g_mindist[tt]",
"and [TT]g_bond[tt]."
};
else
pbc = NULL;
- gpbc = gmx_rmpbc_init(&top->idef,ePBC,natoms,box);
+ gpbc = gmx_rmpbc_init(&top->idef,ePBC,max,box);
do {
/* initialisation for correct distance calculations */
if (pbc) {
set_pbc(pbc,ePBC,box);
/* make molecules whole again */
- gmx_rmpbc(gpbc,natoms,box,x);
+ gmx_rmpbc(gpbc,max,box,x);
}
/* calculate center of masses */
for(g=0;(g<ngrps);g++) {
cP = BOLTZ * evaluate_integral(nframes/4,nu,dos[DOS_CP],NULL,
nframes/4,&stddev);
fprintf(fplog,"Heat capacity %g J/mol K\n",1000*cP/Nmol);
-
+
+ /*
S = BOLTZ * evaluate_integral(nframes/4,nu,dos[DOS_S],NULL,
nframes/4,&stddev);
fprintf(fplog,"Entropy %g J/mol K\n",1000*S/Nmol);
E = BOLTZ * evaluate_integral(nframes/4,nu,dos[DOS_E],NULL,
nframes/4,&stddev);
fprintf(fplog,"Internal energy %g kJ/mol\n",E/Nmol);
+ */
fprintf(fplog,"\nArrivederci!\n");
fclose(fplog);
int nsatm;
t_simat sat[3];
} t_simlist;
-static const char *pdbtp[epdbNR] =
- { "ATOM ", "HETATM" };
real calc_mass(t_atoms *atoms, gmx_bool bGetMass, gmx_atomprop_t aps)
{
}
emid = 0.0;/*(emin+emax)*0.5;*/
- for(m=0; (m<egNR); m++)
- egrp_nm[m]=egrp_nm[m];
egrp_nm[egTotal]="total";
for (m=0; (m<egNR+egSP); m++)
if (egrp_use[m]) {
fprintf(fp,"\nHeat capacities obtained from fluctuations do *not* include\n");
fprintf(fp,"quantum corrections. If you want to get a more accurate estimate\n");
fprintf(fp,"please use the g_dos program.\n\n");
+ fprintf(fp,"WARNING: Please verify that your simulations are converged and perform\n"
+ "a block-averaging error analysis (not implemented in g_energy yet)\n");
if (debug != NULL)
{
rvec *xtop,*x;
matrix box;
real sg,sk, sgintf, pos;
- atom_id **index;
- char **grpname;
+ atom_id **index=NULL;
+ char **grpname=NULL;
int i,j,k,n,*isize,ng, nslicez, framenr;
- real ***sg_grid,***sk_grid, ***sg_fravg, ***sk_fravg, ****sk_4d, ****sg_4d;
+ real ***sg_grid=NULL,***sk_grid=NULL, ***sg_fravg=NULL, ***sk_fravg=NULL, ****sk_4d=NULL, ****sg_4d=NULL;
int *perm;
int ndx1, ndx2;
int bins;
int gmx_hydorder(int argc,char *argv[])
{
static const char *desc[] = {
- "The tetrahedrality order parameters can be determined",
- "around an atom. Both angle an distance order parameters are calculated. See",
+ "g_hydorder computes the tetrahedrality order parameters around a ",
+ "given atom. Both angle an distance order parameters are calculated. See",
"P.-L. Chau and A.J. Hardwick, Mol. Phys., 93, (1998), 511-518.",
"for more details.[BR]"
"This application calculates the orderparameter in a 3d-mesh in the box, and",
"(between any pair of atoms from the respective groups)",
"and the number of contacts within a given",
"distance are written to two separate output files.",
- "With the [TT]-group[tt] option a contact of an atom an other group",
+ "With the [TT]-group[tt] option a contact of an atom in another group",
"with multiple atoms in the first group is counted as one contact",
"instead of as multiple contacts.",
"With [TT]-or[tt], minimum distances to each residue in the first",
fprintf(stderr, "\n");
ffclose(fp);
- close_trj(status);
teller = nframes_read(status);
+
+ close_trj(status);
+
calc_rms(isize,teller,dtot,dtot2,mean,&meanmax,rms,&rmsmax,rmsc,&rmscmax);
fprintf(stderr,"rmsmax = %g, rmscmax = %g\n",rmsmax,rmscmax);
{ efXPM, "-lss", "entropy", ffOPTWR },
{ efXPM, "-map", "map", ffOPTWR },
{ efPDB, "-ls3", "gibbs3", ffOPTWR },
- { efXVG, "-mdata","mapdata", ffOPTWR },
+ { efXVG, "-mdata","mapdata", ffOPTRD },
{ efLOG, "-g", "shamlog", ffOPTWR }
};
#define NFILE asize(fnm)
"[TT]rect[tt] is the ordinary brick shape.",
"[TT]tric[tt] is the triclinic unit cell.",
"[TT]compact[tt] puts all atoms at the closest distance from the center",
- "of the box. This can be useful for visualizing e.g. truncated",
- "octahedra. The center for options [TT]tric[tt] and [TT]compact[tt]",
+ "of the box. This can be useful for visualizing e.g. truncated octahedra",
+ "or rhombic dodecahedra. The center for options [TT]tric[tt] and [TT]compact[tt]",
"is [TT]tric[tt] (see below), unless the option [TT]-boxcenter[tt]",
"is set differently.[PAR]",
" trajectories.\ntry splitting the index file in %d parts.\n"
"FOPEN_MAX = %d",
clust->clust->nr,1+clust->clust->nr/FOPEN_MAX,FOPEN_MAX);
+ gmx_warning("The -sub option could require as many open output files as there are\n"
+ "index groups in the file (%d). If you get I/O errors opening new files,\n"
+ "try reducing the number of index groups in the file, and perhaps\n"
+ "using trjconv -sub several times on different chunks of your index file.\n",
+ clust->clust->nr);
snew(clust_status,clust->clust->nr);
snew(clust_status_id,clust->clust->nr);
}
/* Copy the input trxframe struct to the output trxframe struct */
frout = fr;
+ frout.bV &= bVels;
+ frout.bF &= bForce;
frout.natoms = nout;
if (bNeedPrec && (bSetPrec || !fr.bPrec)) {
frout.bPrec = TRUE;
}
if (bCopy) {
frout.x = xmem;
- if (bVels) {
+ if (frout.bV) {
frout.v = vmem;
}
- if (bForce) {
+ if (frout.bF) {
frout.f = fmem;
}
for(i=0; i<nout; i++) {
copy_rvec(fr.x[index[i]],frout.x[i]);
- if (bVels && fr.bV) {
+ if (frout.bV) {
copy_rvec(fr.v[index[i]],frout.v[i]);
}
- if (bForce && fr.bF) {
+ if (frout.bF) {
copy_rvec(fr.f[index[i]],frout.f[i]);
}
}
(clust->clust->index[my_clust+1]-
clust->clust->index[my_clust])) {
close_trx(clust_status[my_clust]);
+ clust_status[my_clust] = NULL;
clust_status_id[my_clust] = -2;
ntrxopen--;
if (ntrxopen < 0)
switch(ftp) {
case efGRO:
write_hconf_p(out,title,&useatoms,prec2ndec(frout.prec),
- frout.x,fr.bV?frout.v:NULL,frout.box);
+ frout.x,frout.bV?frout.v:NULL,frout.box);
break;
case efPDB:
fprintf(out,"REMARK GENERATED BY TRJCONV\n");
if (!gmx_fexist(opt2fn("-s",nfile,fnm)))
gmx_fatal(FARGS, "File %s not found.", opt2fn("-s",nfile,fnm));
- /* Make sure that the checkpoint file is not overwritten by the benchmark runs */
- if ( (0 == strcmp(opt2fn("-cpi",nfile,fnm), opt2fn("-cpo",nfile,fnm)) ) && (sim_part > 1) )
- gmx_fatal(FARGS, "Checkpoint input and output file must not be identical,\nbecause then the input file might change during the benchmarks.");
-
+ /* Make sure that the checkpoint file is not overwritten during benchmarking */
+ if ( (0 == strcmp(opt2fn("-cpi",nfile,fnm), opt2fn("-bcpo",nfile,fnm)) ) && (sim_part > 1) )
+ gmx_fatal(FARGS, "Checkpoint input (-cpi) and benchmark checkpoint output (-bcpo) files must not be identical.\n"
+ "The checkpoint input file must not be overwritten during the benchmarks.\n");
+
/* Make sure that repeats is >= 0 (if == 0, only write tpr files) */
if (repeats < 0)
gmx_fatal(FARGS, "Number of repeats < 0!");
{ "-simsteps", FALSE, etGMX_LARGE_INT, {&new_sim_nsteps},
"If non-negative, perform this many steps in the real run (overwrites nsteps from [TT].tpr[tt], add [TT].cpt[tt] steps)" },
{ "-launch", FALSE, etBOOL, {&bLaunch},
- "Lauch the real simulation after optimization" },
+ "Launch the real simulation after optimization" },
/******************/
/* mdrun options: */
/******************/
fs, bench_nsteps, fnm, NFILE, sim_part, presteps,
asize(pa),pa);
- /* Determine max and min number of PME nodes to test: */
- if ((nnodes > 2) && (npme_fixed >= -1))
+ /* Determine the maximum and minimum number of PME nodes to test,
+ * the actual list of settings is build in do_the_tests(). */
+ if ((nnodes > 2) && (npme_fixed < -1))
{
maxPMEnodes = floor(maxPMEfraction*nnodes);
minPMEnodes = max(floor(minPMEfraction*nnodes), 0);
"function is calculated.[PAR]",
"With option [TT]-mol[tt] the velocity autocorrelation function of",
"molecules is calculated. In this case the index group should consist",
- "of molecule numbers instead of atom numbers."
+ "of molecule numbers instead of atom numbers.[PAR]",
+ "Be sure that your trajectory contains frames with velocity information",
+ "(i.e. [TT]nstvout[tt] was set in your original [TT].mdp[tt] file),",
+ "and that the time interval between data collection points is",
+ "much shorter than the time scale of the autocorrelation."
};
static gmx_bool bM=FALSE,bMol=FALSE;
"to the file defined with [TT]-oiact[tt]. In verbose mode, all ",
"autocorrelation functions (ACFs) are written to [TT]hist_autocorr.xvg[tt]. ",
"Because the IACTs can be severely underestimated in case of limited ",
- "sampling, option [TT]-acsig[tt] allows to smooth the IACTs along the ",
+ "sampling, option [TT]-acsig[tt] allows one to smooth the IACTs along the ",
"reaction coordinate with a Gaussian ([GRK]sigma[grk] provided with [TT]-acsig[tt], ",
"see output in [TT]iact.xvg[tt]). Note that the IACTs are estimated by simple ",
"integration of the ACFs while the ACFs are larger 0.05.",
#include "strdb.h"
#include "gmx_ana.h"
-gmx_bool *bPhobics(int nres,char *resnm[])
+static gmx_bool *bPhobics(int nres,char *resnm[])
{
int i,nb;
char **cb;
/* format error occured */
case sError:
- gmx_fatal(FARGS,"Error in the list of eigenvectors for %s at pos %d with char %c",listname,pos-startpos,*(pos-1));
-
+ gmx_fatal(FARGS,"Error in the list of eigenvectors for %s at pos %d with char %c",listname,pos-startpos,*(pos-1));
+ break;
/* logical error occured */
case sZero:
- gmx_fatal(FARGS,"Error in the list of eigenvectors for %s at pos %d: eigenvector 0 is not valid",listname,pos-startpos);
+ gmx_fatal(FARGS,"Error in the list of eigenvectors for %s at pos %d: eigenvector 0 is not valid",listname,pos-startpos);
+ break;
case sSmaller:
- gmx_fatal(FARGS,"Error in the list of eigenvectors for %s at pos %d: second index %d is not bigger than %d",listname,pos-startpos,end_number,number);
-
+ gmx_fatal(FARGS,"Error in the list of eigenvectors for %s at pos %d: second index %d is not bigger than %d",listname,pos-startpos,end_number,number);
+ break;
}
++pos; /* read next character */
} /*scanner has finished */
if (opt[0] == 'a') {
*mult = 3;
for(ftype=0; ftype<F_NRE; ftype++) {
- if (interaction_function[ftype].flags & IF_ATYPE ||
+ if ((interaction_function[ftype].flags & IF_ATYPE) ||
ftype == F_TABANGLES) {
(*nft)++;
srenew(ft,*nft);
extern void get_chi_product_traj (real **dih,int nframes,int nangles,
int nlist,int maxchi, t_dlist dlist[], real time[],
- int **lookup,int *xity,gmx_bool bRb,gmx_bool bNormalize,
+ int **lookup,int *multiplicity,gmx_bool bRb,gmx_bool bNormalize,
real core_frac);
#endif