Merge branch 'rotation-4-5' into rotation
authorCarsten Kutzner <ckutzne@gwdg.de>
Mon, 15 Nov 2010 09:58:10 +0000 (10:58 +0100)
committerCarsten Kutzner <ckutzne@gwdg.de>
Mon, 15 Nov 2010 09:58:10 +0000 (10:58 +0100)
CMakeLists.txt
configure.ac
share/top/charmm27.ff/dna.r2b [deleted file]
src/gmxlib/CMakeLists.txt
src/gmxlib/tpxio.c
src/gmxlib/trxio.c
src/kernel/pdb2gmx.c
src/kernel/tpbconv.c
src/tools/gmx_densmap.c
src/tools/gmx_editconf.c

index 0d49a828f7584c5d3a90a3d5747161c2fea02e68..d045126b09d34e6eebbda8c9fe988e67b018f184 100644 (file)
@@ -12,7 +12,7 @@ mark_as_advanced(DART_ROOT)
 # machine with no git. 
 #
 # NOTE: when releasing the "-dev" suffix needs to be stripped off!
-set(PROJECT_VERSION "4.5.2-dev")
+set(PROJECT_VERSION "4.5.3-dev")
 set(CUSTOM_VERSION_STRING ""
     CACHE STRING "Custom version string (if empty, use hard-coded default)")
 mark_as_advanced(CUSTOM_VERSION_STRING)
@@ -23,7 +23,7 @@ set(SOVERSION 6)
 # It is a bit irritating, but this has to be set separately for now!
 SET(CPACK_PACKAGE_VERSION_MAJOR "4")
 SET(CPACK_PACKAGE_VERSION_MINOR "5")
-SET(CPACK_PACKAGE_VERSION_PATCH "2")
+SET(CPACK_PACKAGE_VERSION_PATCH "3")
 
 
 # Cmake modules/macros are in a subdirectory to keep this file cleaner
@@ -88,7 +88,7 @@ option(GMX_MPI    "Build a parallel (message-passing) version of GROMACS" OFF)
 option(GMX_THREADS    "Build a parallel (thread-based) version of GROMACS (cannot be combined with MPI yet)" ON)
 option(GMX_SOFTWARE_INVSQRT "Use GROMACS software 1/sqrt" ON)
 mark_as_advanced(GMX_SOFTWARE_INVSQRT)
-option(GMX_POWERPC_INVSQRT "Use PowerPC hardware 1/sqrt" ON)
+option(GMX_POWERPC_INVSQRT "Use PowerPC hardware 1/sqrt" OFF)
 mark_as_advanced(GMX_POWERPC_INVSQRT)
 option(GMX_FAHCORE "Build a library with mdrun functionality" OFF)
 mark_as_advanced(GMX_FAHCORE)
@@ -752,7 +752,7 @@ set(GMXLIBDIR        ${DATA_INSTALL_DIR}/top)
 ##################################################################
 if(NOT CMAKE_SYSTEM_NAME STREQUAL "Darwin")
     set(CMAKE_SKIP_BUILD_RPATH  FALSE)
-    set(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
+    set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
     set(CMAKE_INSTALL_RPATH "${LIB_INSTALL_DIR}")
     set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
 endif()
index f9b9ef1d5b45b70b598829e8958dbaf9c86d087f..6d949e031a081671279a57816324640906638cb4 100644 (file)
@@ -9,7 +9,7 @@ AC_PREREQ(2.50)
 # machine with no git. 
 #
 # NOTE: when releasing the "-dev" suffix needs to be stripped off!
-AC_INIT(gromacs, 4.5.2-dev, [gmx-users@gromacs.org])
+AC_INIT(gromacs, 4.5.3-dev, [gmx-users@gromacs.org])
 AC_CONFIG_SRCDIR(src/gmxlib/3dview.c)
 AC_CONFIG_AUX_DIR(config)
 AC_CANONICAL_HOST
diff --git a/share/top/charmm27.ff/dna.r2b b/share/top/charmm27.ff/dna.r2b
deleted file mode 100644 (file)
index e7bed5d..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-; rtp residue to rtp building block table
-;GMX   Force-field
-A    DA
-G    DG
-C    DC
-T    DT
-
index 21bdd4c4236583e43d039fbd1ca368b7b935bac4..42def36bf5f31f85c59c04d21a7df8180b2e45dd 100644 (file)
@@ -78,6 +78,10 @@ if(GMX_BLUEGENE)
   file(GLOB GMX_BLUEGENE_C_SRC nonbonded/nb_kernel_bluegene/*.c)
 endif(GMX_BLUEGENE)
 
+if(GMX_PPC_ALTIVEC)
+  file(GLOB GMX_PPC_ALTIVEC_SRC nonbonded/nb_kernel_ppc_altivec/*.c)
+endif(GMX_PPC_ALTIVEC)
+
 if(NOT GMX_EXTERNAL_BLAS)
   file(GLOB BLAS_SOURCES gmx_blas/*.c)
 endif(NOT GMX_EXTERNAL_BLAS)
@@ -134,7 +138,7 @@ else(GMX_ASM_USEASM-NASM)
 endif(GMX_ASM_USEASM-NASM)
 endif(NOT GMX_OPENMM)
 
-add_library(gmx ${GMXLIB_SOURCES} ${BLAS_SOURCES} ${LAPACK_SOURCES} ${GMX_SSEKERNEL_C_SRC} ${GMX_SSEKERNEL_ASM_SRC} ${FORTRAN_SOURCES} ${GMX_BLUEGENE_C_SRC} ${THREAD_MPI_SRC})
+add_library(gmx ${GMXLIB_SOURCES} ${BLAS_SOURCES} ${LAPACK_SOURCES} ${GMX_SSEKERNEL_C_SRC} ${GMX_SSEKERNEL_ASM_SRC} ${FORTRAN_SOURCES} ${GMX_BLUEGENE_C_SRC} ${GMX_PPC_ALTIVEC_SRC} ${THREAD_MPI_SRC})
 target_link_libraries(gmx ${GMX_EXTRA_LIBRARIES}  ${THREAD_LIB})
 if(USE_VERSION_H)
        add_dependencies(gmx gmx_version) 
index 908538b0653d8c0c7bc2c8bdc993d65a754f0166..a7b7054a8b3e6b56afc83a371a62d3e1e116874d 100644 (file)
@@ -64,7 +64,7 @@
 #include "mtop_util.h"
 
 /* This number should be increased whenever the file format changes! */
-static const int tpx_version = 9999; /* TODO: set the right number if rotation is merged */
+static const int tpx_version = 74;
 
 /* This number should only be increased when you edit the TOPOLOGY section
  * of the tpx format. This way we can maintain forward compatibility too
@@ -797,7 +797,7 @@ static void do_inputrec(t_fileio *fio, t_inputrec *ir,gmx_bool bRead,
     }
     
     /* Enforced rotation */
-    if (file_version >= 9999) { /* TODO: set the right number here */
+    if (file_version >= 74) {
         gmx_fio_do_int(fio,ir->bRot);
         if (ir->bRot == TRUE) {
             if (bRead)
index 15673782dc9067fce43184fe04391d41d1bcf874..d414d36a746c7bb41d4db32b36a695a1b1a9a931 100644 (file)
@@ -857,13 +857,19 @@ int read_first_frame(const output_env_t oenv,t_trxstatus **status,
     break;
   default:
 #ifdef GMX_DLOPEN
+      fprintf(stderr,"The file format of %s is not a known trajectory format to GROMACS.\n"
+             "Please make sure that the file is a trajectory!\n"
+             "GROMACS will now assume it to be a trajectory and will try to open it using the VMD plug-ins.\n"
+             "This will only work in case the VMD plugins are found and it is a trajectory format supported by VMD.\n",fn);
       gmx_fio_fp_close(fio); /*only close the file without removing FIO entry*/
       if (!read_first_vmd_frame(&dummy,fn,fr,flags))
       {
          gmx_fatal(FARGS,"Not supported in read_first_frame: %s",fn);
       }
 #else
-      gmx_fatal(FARGS,"Not supported in read_first_frame: %s",fn);
+      gmx_fatal(FARGS,"Not supported in read_first_frame: %s. Please make sure that the file is a trajectory.\n"
+               "GROMACS is not compiled with DLOPEN. Thus it cannot read non-GROMACS trajectory formats.\n"
+               "Please compile with DLOPEN support if you want to read non-GROMACS trajectory formats.\n",fn);
 #endif
       break;
   }
index 38229c61569d3463187bb972a92f56a906681d18..fed7af9055a179a0c420f4461c0063d01fa3a4a6 100644 (file)
@@ -1331,6 +1331,8 @@ int main(int argc, char *argv[])
   this_chainid        = '?';
   this_chainnumber    = -1;
   this_chainstart     = 0;
+  /* Keep the compiler happy */
+  prev_chainstart     = 0;
     
   pdb_ch=NULL;
   bMerged = FALSE;
index 5961cca88ed5c7a66e05a252de18e82b6ecf32c2..74d3acacc3a1ee1f236308c77c66969074e2d2e2 100644 (file)
@@ -308,7 +308,7 @@ int main (int argc, char *argv[])
     "[BB]3rd.[bb] by creating a tpx file for a subset of your original",
     "tpx file, which is useful when you want to remove the solvent from",
     "your tpx file, or when you want to make e.g. a pure Ca tpx file.",
-    "[BB]WARNING: this tpx file is not fully functional[bb].",
+    "[BB]WARNING: this tpx file is not fully functional[bb].[PAR]",
     "[BB]4th.[bb] by setting the charges of a specified group",
     "to zero. This is useful when doing free energy estimates",
     "using the LIE (Linear Interaction Energy) method."
index cd0c207d45c358c4db1dd6dec419e9b8c896153a..a8cb298ae32ce002fe256bf028b5f6288ae27a0a 100644 (file)
@@ -69,7 +69,7 @@ int gmx_densmap(int argc,char *argv[])
     "It can make planar and axial-radial density maps.",
     "The output [TT].xpm[tt] file can be visualized with for instance xv",
     "and can be converted to postscript with xpm2ps.",
-       "Optionally, output can be in text form to a .dat file.",
+    "Optionally, output can be in text form to a .dat file with -od, instead of the usual .xpm file with -o.",
     "[PAR]",
     "The default analysis is a 2-D number-density map for a selected",
     "group of atoms in the x-y plane.",
index d0088ed036d4a17c2d0ded1cda53c1f898272798..e236753a22617681d9294f2cc9b714847e6d9352 100644 (file)
@@ -448,6 +448,24 @@ void calc_rotmatrix(rvec principal_axis, rvec targetvec, matrix rotmatrix)
                rotmatrix[2][0],rotmatrix[2][1],rotmatrix[2][2]);
 }
 
+static void renum_resnr(t_atoms *atoms,int isize,const int *index,
+                        int resnr_start)
+{
+    int i,resind_prev,resind;
+
+    resind_prev = -1;
+    for(i=0; i<isize; i++)
+    {
+        resind = atoms->atom[index == NULL ? i : index[i]].resind;
+        if (resind != resind_prev)
+        {
+            atoms->resinfo[resind].nr = resnr_start;
+            resnr_start++;
+        }
+        resind_prev = resind;
+    }
+}
+
 int gmx_editconf(int argc, char *argv[])
 {
     const char
@@ -560,6 +578,7 @@ int gmx_editconf(int argc, char *argv[])
         *label = "A";
     static rvec visbox =
         { 0, 0, 0 };
+    static int resnr_start = -1;
     t_pargs
         pa[] =
             {
@@ -602,6 +621,9 @@ int gmx_editconf(int argc, char *argv[])
                     { "-pbc", FALSE, etBOOL,
                         { &bRMPBC },
                         "Remove the periodicity (make molecule whole again)" },
+                    { "-resnr", FALSE, etINT,
+                        { &resnr_start },
+                        " Renumber residues starting from resnr" },
                     { "-grasp", FALSE, etBOOL,
                         { &bGrasp },
                         "Store the charge of the atom in the B-factor field and the radius of the atom in the occupancy field" },
@@ -1038,6 +1060,12 @@ int gmx_editconf(int argc, char *argv[])
         fprintf(stderr,"\nSelect a group for output:\n");
         get_index(&atoms,opt2fn_null("-n",NFILE,fnm),
                   1,&isize,&index,&grpname);
+
+        if (resnr_start >= 0)
+        {
+            renum_resnr(&atoms,isize,index,resnr_start);
+        }
+
         if (opt2parg_bSet("-label",NPA,pa)) {
             for(i=0; (i<atoms.nr); i++) 
                 atoms.resinfo[atoms.atom[i].resind].chainid=label[0];
@@ -1059,7 +1087,13 @@ int gmx_editconf(int argc, char *argv[])
             write_sto_conf_indexed(outfile,title,&atoms,x,bHaveV?v:NULL,ePBC,box,isize,index); 
         }
     }
-    else {
+    else
+    {
+        if (resnr_start >= 0)
+        {
+            renum_resnr(&atoms,atoms.nr,NULL,resnr_start);
+        }
+
         if ((outftp == efPDB) || (outftp == efPQR)) {
             out=ffopen(outfile,"w");
             if (bMead) {