Merge "Added an option to easily compile contrib programs with cmake" into release-4-6
authorRoland Schulz <roland@utk.edu>
Thu, 8 Dec 2011 19:59:20 +0000 (20:59 +0100)
committerGerrit Code Review <gerrit@gerrit.gromacs.org>
Thu, 8 Dec 2011 19:59:20 +0000 (20:59 +0100)
59 files changed:
CMakeLists.txt
CTestConfig.cmake [new file with mode: 0644]
admin/GerritBuild [new file with mode: 0755]
admin/GerritBuild.bat [new file with mode: 0644]
cmake/FindGit.cmake [new file with mode: 0644]
cmake/gmxGenerateVersionInfo.cmake
cmake/gmxTestRetSigType.cmake [deleted file]
cmake/gmxTestSignal.cmake
include/gstat.h
include/mtxio.h
include/types/ifunc.h
share/html/online/xpm.html
share/top/charmm27.ff/ions.itp
src/config.h.cmakein
src/gmxlib/CMakeLists.txt
src/gmxlib/bondfree.c
src/gmxlib/checkpoint.c
src/gmxlib/mtxio.c
src/gmxlib/names.c
src/gmxlib/nonbonded/nb_kernel_bluegene/nb_kernel_gen_bluegene.h
src/gmxlib/nonbonded/nb_kernel_bluegene/nb_kernel_w3_bluegene.h
src/gmxlib/nonbonded/nb_kernel_bluegene/nb_kernel_w3w3_bluegene.h
src/gmxlib/nonbonded/nb_kernel_bluegene/nb_kernel_w4_bluegene.h
src/gmxlib/nonbonded/nb_kernel_bluegene/nb_kernel_w4w4_bluegene.h
src/gmxlib/selection/sm_insolidangle.c
src/gmxlib/sighandler.c
src/gmxlib/tcontrol.c
src/gmxlib/trxio.c
src/gmxlib/txtdump.c
src/gmxlib/wman.c
src/kernel/gen_vsite.c
src/kernel/gmxcheck.c
src/kernel/mdrun.c
src/kernel/readir.c
src/kernel/topdirs.c
src/mdlib/domdec.c
src/mdlib/edsam.c
src/mdlib/fft5d.c
src/mdlib/genborn.c
src/mdlib/pull.c
src/mdlib/wall.c
src/ngmx/nener.c
src/ngmx/ngmx.c
src/tools/acf.test.c
src/tools/anadih.c
src/tools/do_dssp.c
src/tools/expfit.c
src/tools/gmx_analyze.c
src/tools/gmx_angle.c
src/tools/gmx_chi.c
src/tools/gmx_editconf.c
src/tools/gmx_enemat.c
src/tools/gmx_trjconv.c
src/tools/gmx_tune_pme.c
src/tools/gmx_velacc.c
src/tools/gmx_wheel.c
src/tools/make_edi.c
src/tools/mk_angndx.c
src/tools/pp2shift.h

index 7ba2641292fbfe8e0465de814cb3b6dc14de1b59..0b84abe054b713f6c941c6abf23cb142604f7fc0 100644 (file)
@@ -189,10 +189,6 @@ endif(GMX_POWERPC_INVSQRT)
 ########################################################################
 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 
@@ -219,6 +215,30 @@ if(GMX_MPI)
         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)
@@ -517,7 +537,6 @@ gmx_test_large_files(GMX_LARGEFILES)
 check_function_exists(fseeko     HAVE_FSEEKO)
 
 include(gmxTestSignal)
-gmx_test_retsigtype(RETSIGTYPE)
 gmx_test_sigusr1(HAVE_SIGUSR1)
 
 include(gmxTestInline)
@@ -535,7 +554,7 @@ gmx_test_inline_asm_msvc_x86(GMX_X86_MSVC_INLINE_ASM)
 
 # 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)
     
@@ -622,9 +641,6 @@ elseif(${GMX_ACCELERATION} STREQUAL "BLUEGENE")
     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)
@@ -872,7 +888,6 @@ include(CTest)
 mark_as_advanced(BUILD_TESTING)
 IF(BUILD_TESTING)
        enable_testing()
-       add_test(TestBuildAll make)
        add_subdirectory(tests)
 ENDIF()
 
diff --git a/CTestConfig.cmake b/CTestConfig.cmake
new file mode 100644 (file)
index 0000000..c31b87a
--- /dev/null
@@ -0,0 +1,13 @@
+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")
+
diff --git a/admin/GerritBuild b/admin/GerritBuild
new file mode 100755 (executable)
index 0000000..58ebefa
--- /dev/null
@@ -0,0 +1,7 @@
+#!/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
diff --git a/admin/GerritBuild.bat b/admin/GerritBuild.bat
new file mode 100644 (file)
index 0000000..6cd95bb
--- /dev/null
@@ -0,0 +1,8 @@
+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 && ^
+REM currently the test one example test doesn't work on Windows
+REM ctest -D ExperimentalTest -V
+
diff --git a/cmake/FindGit.cmake b/cmake/FindGit.cmake
new file mode 100644 (file)
index 0000000..2d82142
--- /dev/null
@@ -0,0 +1,46 @@
+# The module defines the following variables:
+#   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()
+
+#=============================================================================
+# 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.)
+
+# Look for 'git' or 'eg' (easy git)
+#
+set(git_names git eg)
+
+# 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()
+
+find_program(GIT_EXECUTABLE
+  NAMES ${git_names}
+  DOC "git command line client"
+  )
+mark_as_advanced(GIT_EXECUTABLE)
+
+# Handle the QUIETLY and REQUIRED arguments and set GIT_FOUND to TRUE if
+# all listed variables are TRUE
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(Git DEFAULT_MSG GIT_EXECUTABLE)
index e1359cb968b54ec8262a1d34d8e5645ed4d0c5d1..165a941d34c7f37370808b3259686f6f623d3296 100644 (file)
@@ -7,8 +7,8 @@
 # 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
@@ -48,9 +48,9 @@ endif()
 # 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
@@ -59,7 +59,7 @@ if(EXISTS ${Git_EXECUTABLE} AND NOT Git_VERSION STRLESS "1.5.1")
     ) 
 
    # 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
@@ -69,7 +69,7 @@ if(EXISTS ${Git_EXECUTABLE} AND NOT Git_VERSION STRLESS "1.5.1")
     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
@@ -83,8 +83,8 @@ if(EXISTS ${Git_EXECUTABLE} AND NOT Git_VERSION STRLESS "1.5.1")
     # 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
@@ -111,7 +111,7 @@ if(EXISTS ${Git_EXECUTABLE} AND NOT Git_VERSION STRLESS "1.5.1")
         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
@@ -126,7 +126,7 @@ if(EXISTS ${Git_EXECUTABLE} AND NOT Git_VERSION STRLESS "1.5.1")
     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
@@ -143,7 +143,7 @@ if(EXISTS ${Git_EXECUTABLE} AND NOT Git_VERSION STRLESS "1.5.1")
         # 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
         )
@@ -152,7 +152,7 @@ if(EXISTS ${Git_EXECUTABLE} AND NOT Git_VERSION STRLESS "1.5.1")
         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
diff --git a/cmake/gmxTestRetSigType.cmake b/cmake/gmxTestRetSigType.cmake
deleted file mode 100644 (file)
index ae18418..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-# - 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)
-
-
-
index fd40fd0644b76c69cfa15597f553e8f8a469f3e3..77df3bf9aff1d99bd4a00e0d7508678c4ac2bfb2 100644 (file)
@@ -1,33 +1,3 @@
-# - 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)
index 574892ec686c4cbb4de4306023760c07301046d7..719fe625125e43794b70da7347e3013086b7c9f0 100644 (file)
@@ -269,9 +269,9 @@ 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[], 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 
@@ -402,12 +402,12 @@ int pr_trans(FILE *fp,int nl,t_dlist dl[],real dt,int Xi);
 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); 
index dff41a569d8af81806f4fa60dd2e8d2919d6af67..88c0545421c90ea532d7cd95c152d6b17546f1dd 100644 (file)
@@ -70,7 +70,7 @@ gmx_mtxio_write(const char *             filename,
  * 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
index 41230b02c3237390e1482074ee3c9a3abc54467e..72026c57c023a1f733e3cef406c89da79438eb2c 100644 (file)
@@ -105,13 +105,13 @@ typedef struct
 #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)
index e44b9fe2dc1a2425144591c769e855abbff231dc..9715a4fbe0b698a3054a70f85bed4fccaf4f277f 100644 (file)
@@ -12,6 +12,8 @@
 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
index 38e71c3bcc59c820fa56b3da68f1b8696c092508..f7156691dd96dc8173a528226db7079975fdc75a 100644 (file)
@@ -65,4 +65,4 @@ ZN          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
index 89c9c8a567b5a86a856c90c6535a2a716c12503f..b15f8987fdd60f455cb090d3d0398d3ec89de646 100644 (file)
    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
 
index 021ed19ad138962f38f83df5185f93193b09a5b8..4a681b24aee8ebeb67f6a1f2b9b96cb3765ea216 100644 (file)
@@ -6,8 +6,8 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR})
 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_SOURCE_DIR}/src/gmxlib/version.c.cmakein"
index f27df6d4790fb925c4366de6b3c8f1d67894a69f..273804f7010efec7e8c0c56245f693dae4fddbea 100644 (file)
@@ -2611,7 +2611,7 @@ void calc_bonds(FILE *fplog,const gmx_multisim_t *ms,
   /* 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) {
@@ -2699,7 +2699,7 @@ void calc_bonds_lambda(FILE *fplog,
   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;
index b29034741ff81fe655ad6c035a722f1c0b0f8930..41a6a517531ceba57f036ddbfaba2c45b0794464 100644 (file)
@@ -1666,7 +1666,7 @@ static void read_checkpoint(const char *fn,FILE **pfplog,
         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);
index 1b9e8a975dbb41af7e55737070ba9a498bdab09b..19780797cf4162b953bf8abf6c5226efc79cdbba 100644 (file)
@@ -202,7 +202,7 @@ gmx_mtxio_read (const char *            filename,
 
     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);
 
@@ -210,7 +210,7 @@ gmx_mtxio_read (const char *            filename,
         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);
index 4f6c1862384062b6a36758deeb3f269e67a49f55..9f9ad810af810eb234eb1c88ef15d42224dd8f2c 100644 (file)
@@ -181,11 +181,11 @@ const char *ewt_names[ewtNR+1] = {
 };
 
 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 *eQMmethod_names[eQMmethodNR+1] = {
index 1dd9318d117021151834f676cb1891216a717162..a8cdc3440fa00cf7deccdd3859f5eac6108fbb5c 100644 (file)
@@ -69,10 +69,23 @@ void NB_KERNEL (
     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++)
@@ -108,7 +121,11 @@ void NB_KERNEL (
        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
 
@@ -211,7 +228,7 @@ void NB_KERNEL (
 
 #if COULOMB == GENERALIZED_BORN
            dvda[jnr11] -= __creal(dvdaj);
-           dvda[jnr21] -= __creal(dvdaj);
+           dvda[jnr21] -= __cimag(dvdaj);
 
            dvdaj = __cmplx(dvda[jnr12],dvda[jnr22]);
 #endif
@@ -236,7 +253,7 @@ void NB_KERNEL (
                         
 #if COULOMB == GENERALIZED_BORN
            dvda[jnr12] -= __creal(dvdaj);
-           dvda[jnr22] -= __creal(dvdaj);
+           dvda[jnr22] -= __cimag(dvdaj);
 
            dvdaj = __cmplx(dvda[jnr13],dvda[jnr23]);
 #endif
@@ -260,7 +277,7 @@ void NB_KERNEL (
 
 #if COULOMB == GENERALIZED_BORN
            dvda[jnr13] -= __creal(dvdaj);
-           dvda[jnr23] -= __creal(dvdaj);
+           dvda[jnr23] -= __cimag(dvdaj);
 #endif
 
 #ifndef NO_FORCE
index 663a5df1ca91fa925f841d9614fadf4c2bf41a7f..fe3a657afcd8fb2dcc9dbc09c0b16f81442996c5 100644 (file)
@@ -72,10 +72,23 @@ void NB_KERNEL (
     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];     
index 9001f7f09d5893e89d6358c20acd08d3eb6c0556..55599ea0e57a49b23f660c70d9b1adca65ce6df3 100644 (file)
@@ -78,10 +78,23 @@ void NB_KERNEL (
     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];        
 
index 0a07e8ef6b2e662d6e679333f466ec4a6fc4859d..826df2a672fee9e4509084b7d0781a9baf358342 100644 (file)
@@ -78,10 +78,23 @@ void NB_KERNEL (
     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];   
index 1d9b3a2c69683ccb1d65ea6c48ddfc54afac2d1e..e2d389434b40bce604704e3a49194c126df0fd23 100644 (file)
@@ -85,10 +85,23 @@ void NB_KERNEL (
     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];        
 
index 1f72fcf1815b40d5a71d681dd5fc80c65042d333..9ed4aaad3e3967e849add22163430483627c484e 100644 (file)
@@ -208,9 +208,6 @@ init_data_insolidangle(int npar, gmx_ana_selparam_t *param);
 /** Initializes the \p insolidangle selection method. */
 static int
 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);
index 10e5e2d7250ca0d3a6d1c6e5459bd807e31c6e25..178f5c87bc37eb91c658fdf058d98d2ac9545a04 100644 (file)
@@ -68,7 +68,7 @@ static volatile sig_atomic_t last_signal_name=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 
index 3c609b90a7966f7ed26cc874cf6906dbd8e9fcbc..f4c2a39e30761ac1ce18b77d965b9f3fd350da65 100644 (file)
@@ -63,24 +63,6 @@ static t_timecontrol timecontrol[TNR] = {
 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;
index 9874339d3e61adfcccf238f1721ea29573d11b68..a4dadff37b461c6447120b3710afa677857bcca3 100644 (file)
@@ -222,6 +222,7 @@ int write_trxframe_indexed(t_trxstatus *status,t_trxframe *fr,int nind,
       for(i=0; i<nind; i++) 
        copy_rvec(fr->f[ind[i]],fout[i]);
     }
+  /* no break */
   case efXTC:
   case efG87:
     if (fr->bX) {
@@ -277,6 +278,7 @@ int write_trxframe_indexed(t_trxstatus *status,t_trxframe *fr,int nind,
   case efTRR:
     if (vout) sfree(vout);
     if (fout) sfree(fout);
+  /* no break */
   case efXTC:
   case efG87:
     sfree(xout);
@@ -747,13 +749,13 @@ gmx_bool read_next_frame(const output_env_t oenv,t_trxstatus *status,t_trxframe
     }
     
     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;
index 1314861cacebe010595bf232c374fdccd39e2237..0221e2f36fed35ffbe2f101942971d14d0a1acfc 100644 (file)
@@ -373,13 +373,13 @@ static void pr_grp_opts(FILE *out,int indent,const char *title,t_grpopts *opts,
   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");  
@@ -390,7 +390,7 @@ static void pr_grp_opts(FILE *out,int indent,const char *title,t_grpopts *opts,
     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");  
@@ -425,7 +425,7 @@ static void pr_grp_opts(FILE *out,int indent,const char *title,t_grpopts *opts,
 
   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");
@@ -480,7 +480,7 @@ static void pr_cosine(FILE *fp,int indent,const char *title,t_cosines *cos,
 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);
@@ -496,14 +496,14 @@ static void pr_pull(FILE *fp,int indent,t_pull *pull)
 {
   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]);
 }
@@ -519,12 +519,12 @@ void pr_inputrec(FILE *fp,int indent,const char *title,t_inputrec *ir,
       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);
@@ -532,18 +532,18 @@ void pr_inputrec(FILE *fp,int indent,const char *title,t_inputrec *ir,
     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));
@@ -553,119 +553,119 @@ void pr_inputrec(FILE *fp,int indent,const char *title,t_inputrec *ir,
     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_pull(fp,indent,ir->pull);
 
     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);
@@ -686,7 +686,7 @@ void pr_inputrec(FILE *fp,int indent,const char *title,t_inputrec *ir,
     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
index 4b42bb11ee87bd2eb6c5b289b6753522f68d3de4..4c51f10a80cdea832bc640db35d9bccac44394be 100644 (file)
@@ -1025,6 +1025,7 @@ static void write_py(FILE *out,const char *program,
       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;
     }
index 72d40360ba2319388726ec321ffa06a8e0d53ca3..f3fffdd685cd0c02d78710bd03c277d6cdebca02 100644 (file)
@@ -1210,6 +1210,8 @@ static int gen_vsites_his(t_atoms *at, int *vsite_type[], t_params plist[],
   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 */
 
index 86fb415c3b05efe79816526aad4bcc52b3020c1d..f3efce54f1050f6e27015cba4206bd84339536ac 100644 (file)
@@ -249,12 +249,13 @@ void chk_trj(const output_env_t oenv,const char *fn,const char *tpr,real tol)
   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;  
@@ -314,7 +315,6 @@ void chk_trj(const output_env_t oenv,const char *fn,const char *tpr,real tol)
     }
     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)
index 7b1b396e58ef31d2db3c13421cd29443655f6cd8..1a6021a4fe5877883fe2ca21b2ddb863854413ce 100644 (file)
@@ -596,7 +596,7 @@ int main(int argc,char *argv[])
           sim_part = sim_part_fn + 1;
       }
 
-      if (MULTISIM(cr))
+      if (MULTISIM(cr) && MASTER(cr))
       {
           check_multi_int(stdout,cr->ms,sim_part,"simulation part");
       }
index aad2f4cdfe62151f8fb1fa733de2878246fa2e82..50f6a8a75307e4831bd24242e4c3f4775cea673f 100644 (file)
@@ -414,12 +414,12 @@ void check_ir(const char *mdparin,t_inputrec *ir, t_gromppopts *opts,
     {
         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);
         }      
@@ -467,19 +467,19 @@ void check_ir(const char *mdparin,t_inputrec *ir, t_gromppopts *opts,
   }
 
   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);
   }
   
@@ -487,16 +487,16 @@ void check_ir(const char *mdparin,t_inputrec *ir, t_gromppopts *opts,
     /* 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);
     }
@@ -541,23 +541,23 @@ void check_ir(const char *mdparin,t_inputrec *ir, t_gromppopts *opts,
 
   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) {
@@ -634,7 +634,7 @@ void check_ir(const char *mdparin,t_inputrec *ir, t_gromppopts *opts,
     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)
@@ -767,14 +767,14 @@ static void do_wall_params(t_inputrec *ir,
             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;
             }
@@ -838,9 +838,9 @@ void get_ir(const char *mdparin,const char *mdparout,
   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");
@@ -858,7 +858,7 @@ void get_ir(const char *mdparin,const char *mdparout,
   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);
@@ -899,7 +899,7 @@ void get_ir(const char *mdparin,const char *mdparout,
   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");
@@ -913,8 +913,8 @@ void get_ir(const char *mdparin,const char *mdparout,
   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");
@@ -925,44 +925,44 @@ void get_ir(const char *mdparin,const char *mdparout,
   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");
@@ -975,19 +975,19 @@ void get_ir(const char *mdparin,const char *mdparout,
   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");
@@ -1023,11 +1023,11 @@ void get_ir(const char *mdparin,const char *mdparout,
   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");
@@ -1061,21 +1061,21 @@ void get_ir(const char *mdparin,const char *mdparout,
   /* 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);
@@ -1111,7 +1111,7 @@ void get_ir(const char *mdparin,const char *mdparout,
   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);
@@ -1119,8 +1119,8 @@ void get_ir(const char *mdparin,const char *mdparout,
   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);
@@ -1238,7 +1238,7 @@ void get_ir(const char *mdparin,const char *mdparout,
        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");
     }
   }
 
@@ -1820,8 +1820,8 @@ void do_index(const char* mdparin, const char *ndx,
   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));
@@ -1833,14 +1833,14 @@ void do_index(const char* mdparin, const char *ndx,
   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;
@@ -1849,7 +1849,7 @@ void do_index(const char* mdparin, const char *ndx,
           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) || 
@@ -1882,7 +1882,7 @@ void do_index(const char* mdparin, const char *ndx,
       {
           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);
@@ -1894,7 +1894,7 @@ void do_index(const char* mdparin, const char *ndx,
           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);
           }
       }
   }
@@ -1933,7 +1933,7 @@ void do_index(const char* mdparin, const char *ndx,
        /* 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)
@@ -1945,10 +1945,10 @@ void do_index(const char* mdparin, const char *ndx,
 
        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++) {
          
@@ -2171,11 +2171,11 @@ void do_index(const char* mdparin, const char *ndx,
   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))
@@ -2368,7 +2368,7 @@ void triple_check(const char *mdparin,t_inputrec *ir,gmx_mtop_t *sys,
     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);
     }
@@ -2460,7 +2460,7 @@ void double_check(t_inputrec *ir,matrix box,gmx_bool bConstr,warninp_t wi)
 
   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);
     }
@@ -2484,7 +2484,7 @@ void double_check(t_inputrec *ir,matrix box,gmx_bool bConstr,warninp_t wi)
     }
     
     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) {
index b5c3c0a1fb37e84ffa9275041ed26c4fefa6285a..14dd59fc00a7388bf45795a81912836e442d6509 100644 (file)
@@ -76,6 +76,7 @@ int ifunc_index(directive d,int type)
       gmx_fatal(FARGS,"Invalid bond type %d",type);
       break;
     }
+    break;
   case d_angles:
   case d_angletypes:
     switch (type) {
@@ -97,7 +98,8 @@ int ifunc_index(directive d,int 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;
@@ -105,6 +107,7 @@ int ifunc_index(directive d,int type)
       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:
@@ -152,6 +155,7 @@ int ifunc_index(directive d,int type)
     default:
       gmx_fatal(FARGS,"Invalid vsites3 type %d",type);
     }
+    break;
   case d_vsites4:
       switch (type) {
           case 1:
@@ -161,6 +165,7 @@ int ifunc_index(directive d,int type)
           default:
               gmx_fatal(FARGS,"Invalid vsites4 type %d",type);
       }
+      break;
   case d_vsitesn:
     return F_VSITEN; 
   case d_constraints:
@@ -173,6 +178,7 @@ int ifunc_index(directive d,int type)
     default:
       gmx_fatal(FARGS,"Invalid constraints type %d",type);
     }
+    break;
   case d_settles:
     return F_SETTLE;
   case d_position_restraints:
@@ -181,9 +187,11 @@ int ifunc_index(directive d,int type)
       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:
index 2bae6564136acc54860a52c3e5bcae0ca01241ad..abed24fd224a3d9d4e818ef2d49db8cb2dbe12ea 100644 (file)
@@ -1481,7 +1481,7 @@ void dd_collect_state(gmx_domdec_t *dd,
     }
     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:
@@ -1563,7 +1563,7 @@ static void dd_realloc_state(t_state *state,rvec **f,int nalloc)
     
     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:
@@ -1756,7 +1756,7 @@ static void dd_distribute_state(gmx_domdec_t *dd,t_block *cgs,
     }
     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:
@@ -4132,7 +4132,7 @@ static void rotate_state_atom(t_state *state,int a)
 
     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 */
@@ -7993,7 +7993,7 @@ static void dd_sort_state(gmx_domdec_t *dd,int ePBC,
     /* 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)
             {
@@ -8257,7 +8257,8 @@ void dd_partition_system(FILE            *fplog,
         /* 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.
index f4e770aca4343c26682ff277af8ec0b17194c167..8359863d3b2081edc924c8c267fe3b0b61a3ba36 100644 (file)
@@ -1497,9 +1497,7 @@ static int read_edi(FILE* in, gmx_edsam_t ed,t_edpar *edi,int nr_mdatoms, int ed
     {
         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);
     }
 
index dbbcdaf4e053e177836f8c1b45735abaf2909f95..e2f5266ec423b9eeb791f11034034274a3031be8 100644 (file)
@@ -101,6 +101,7 @@ static int lfactor(int z) {
        int i;
        for (i=sqrt(z);;i--)
                if (z%i==0) return i;
+       return 1;
 }
 
 /* largest factor */
@@ -109,6 +110,7 @@ static int l2factor(int z) {
        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 */
@@ -795,7 +797,7 @@ static void compute_offsets(fft5d_plan plan, int xs[], int xl[], int xc[], int N
             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];
     }
 }
@@ -1033,7 +1035,7 @@ void fft5d_compare_data(const t_complex* lin, const t_complex* in, fft5d_plan pl
     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;
     }
index 6fa2d7b6b048d625d086c9fc3a216e630e9047d8..f314bc30c3e2f709972c250b0d1ef00f37444679 100644 (file)
@@ -1196,7 +1196,7 @@ int calc_gb_rad(t_commrec *cr, t_forcerec *fr, t_inputrec *ir,gmx_localtop_t *to
         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
             {
index 8c2ffbee8a812c5b1db333686038613a29036d6a..2d4db43a422bd253c731d28a2978402c408e77b7 100644 (file)
@@ -322,11 +322,11 @@ static void get_pullgrps_dr(const t_pull *pull,const t_pbc *pbc,int g,double t,
     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)
@@ -524,7 +524,7 @@ static void do_constraint(t_pull *pull, t_mdatoms *md, t_pbc *pbc,
         }
     }
     
-    bConverged_all = TRUE;
+    bConverged_all = FALSE;
     while (!bConverged_all && niter < max_iter)
     {
         bConverged_all = TRUE;
index 168d56a532d677e23800db06d6e673fc5024ec71..beb4d7cf5c34483e11bb6c93af59c9c12cef3c9d 100644 (file)
@@ -169,7 +169,7 @@ real do_walls(t_inputrec *ir,t_forcerec *fr,matrix box,t_mdatoms *md,
                 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)
                     {
index 42b7d0d306e3fb6382ca289dfcfa006b0bda53f9..b21c72695b4a4337c7f0830038323520b54f45e3 100644 (file)
@@ -125,7 +125,7 @@ static gmx_bool EWCallBack(t_x11 *x11,XEvent *event, Window w, 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;
index 5c399573129135acffbd65f7f6b4a1d8e04d107f..a3ce8e14b9843b587b2c935c4594fd3129ac4631 100644 (file)
@@ -60,8 +60,6 @@
 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];
index 6bde6ce9ee54a382b5f3d4618423c00b606c760c..5babfe2aabd60bf05f3d09c383762511b38440b5 100644 (file)
@@ -106,9 +106,10 @@ int main(int argc,char *argv[])
       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;
index 91a67c102c53b13de22d7fcb581ff35edacfea43..c3c32dbaff19ae14d63ec0afab02f1a0563e1cdd 100644 (file)
@@ -119,28 +119,28 @@ void ana_dih_trans(const char *fn_trans,const char *fn_histo,
   /* 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)
 {
@@ -178,12 +178,12 @@ void low_ana_dih_trans(gmx_bool bTrans, const char *fn_trans,
 #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)
@@ -281,11 +281,11 @@ void low_ana_dih_trans(gmx_bool bTrans, const char *fn_trans,
 
 }
 
-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 ; 
@@ -300,11 +300,11 @@ void mk_multiplicity_lookup (int *xity, int maxchi, real **dih,
          ((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*/
@@ -319,7 +319,7 @@ void mk_multiplicity_lookup (int *xity, int maxchi, real **dih,
               ((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++ ; 
@@ -331,7 +331,7 @@ void mk_multiplicity_lookup (int *xity, int maxchi, real **dih,
            j,nangles);
   /* Check for remaining dihedrals */
   for(;(j < nangles); j++)
-    xity[j] = 3;
+    multiplicity[j] = 3;
 
 }
 
@@ -369,7 +369,7 @@ void mk_chi_lookup (int **lookup, int maxchi, real **dih,
 
 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) 
 {
@@ -407,7 +407,7 @@ void get_chi_product_traj (real **dih,int nframes,int nangles, int nlist,
     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 ; 
       }
     }
@@ -423,14 +423,14 @@ void get_chi_product_traj (real **dih,int nframes,int nangles, int nlist,
        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 ) 
index 1a1b07f945ff8d6486960f11b91ed00d444fe539..561dc2fe05164e3e4ba03023dc05872f076fb76c 100644 (file)
@@ -55,8 +55,6 @@
 #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,
@@ -171,6 +169,26 @@ static int strip_dssp(char *dsspfile,int nres,
   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;
@@ -462,7 +480,7 @@ int main(int argc,char *argv[])
   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;
index 7ea7566b18809394dee4edda6d5cc287524e4e31..c16144ddb9903c47027d9b1ba58d20378c2ea443 100644 (file)
@@ -69,12 +69,6 @@ const char *longs_ffn[effnNR] = {
   "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 []), 
index 842e3f2ce5a57d4c6fd97b1be8d2aefe4dca5aac..bdecaf8870cb39f784a978016579fe3fc4faf0ee 100644 (file)
@@ -906,7 +906,9 @@ int gmx_analyze(int argc,char *argv[])
     "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]"
index e5365ab16d24ad83560ca620c3d91ee3c57ef8b3..fa7b4fe10ceaf772c7f32295f3faa9542f7e3bf3 100644 (file)
@@ -56,7 +56,7 @@
 
 
 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;
@@ -84,7 +84,7 @@ static void dump_dih_trn(int nframes,int nangles,real **dih,const char *fn,
        }
       }
     }
-    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);
@@ -213,7 +213,11 @@ int gmx_g_angle(int argc,char *argv[])
   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;
     
@@ -265,7 +269,7 @@ int gmx_g_angle(int argc,char *argv[])
     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);
index c3971e575ebb4c9928fe16dd1ad0b67f76eef506..94db178b6b71ba096df2def57e8b4baedccd8b13 100644 (file)
@@ -1133,7 +1133,7 @@ int gmx_chi(int argc,char *argv[])
   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  },
@@ -1252,8 +1252,8 @@ int gmx_chi(int argc,char *argv[])
    *
    * 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) 
@@ -1270,7 +1270,7 @@ int gmx_chi(int argc,char *argv[])
 
   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 */  
@@ -1303,7 +1303,7 @@ int gmx_chi(int argc,char *argv[])
     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); 
 
index 3662585b71abc74a999c76e3d5e2581d1f37abb1..7d33eb4a251442bd3068a21697e0e9a4d0363a2b 100644 (file)
@@ -79,8 +79,6 @@ typedef struct
     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)
 {
index 480e4ded1c97073aae828c0b8efde4bc2b11c8e4..48b6bd7497c0ba3748e3bedd16ab34e6a81fd404 100644 (file)
@@ -352,8 +352,6 @@ int gmx_enemat(int argc,char *argv[])
     }
    
     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]) {
index ee42aa343742072905dc811ae6c48de8c888aa21..ac8eff3d7b4b11c2d9e763a145599b6dd07c7f44 100644 (file)
@@ -603,8 +603,8 @@ int gmx_trjconv(int argc,char *argv[])
         "[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]",
 
index 318738757d4f2637866794d6add1e831d714f2f2..5e00f8351da548a9d643f934c131d0540f3970cd 100644 (file)
@@ -1578,10 +1578,11 @@ static void check_input(
     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!");
index 8dfcdef3594bd184f2144ea53363ff05411ea67c..0151928643e5568d32f2db18a93267004dba27ec 100644 (file)
@@ -116,7 +116,11 @@ int gmx_velacc(int argc,char *argv[])
     "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;
index 2a3dbd1baa69da7f63b08733e423052801766ea9..513cc093aaf5fd78c1476e32c8522ffeee335c78 100644 (file)
@@ -60,7 +60,7 @@
 #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;
index 409fb4764c9d9819e7dae4addb8aac640b68d481..22694d0f2a900e912ce717243306a97d613ced3e 100644 (file)
@@ -235,14 +235,15 @@ int sscan_list(int *list[], const char *str, const char *listname) {
 
        /* 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 */
index d4b3cfda8bfa4c9c07c8c2d4384188b050b7119d..25215fdcefea4656615449f417efc4e145392edd 100644 (file)
@@ -173,7 +173,7 @@ static int *select_ftype(const char *opt,int *nft,int *mult)
   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);
index 5736ab85916bf9876bde0656d75bb92f70c1afe0..d61b532eb9f752604cc218be5d96f6ed31aca802 100644 (file)
@@ -85,7 +85,7 @@ extern void mk_chi_lookup (int **lookup, int maxchi, real **dih,
 
 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