-cmake_minimum_required(VERSION 2.6)
+cmake_minimum_required(VERSION 2.8)
project(Gromacs)
include(Dart)
# machine with no git.
#
# NOTE: when releasing the "-dev" suffix needs to be stripped off!
-set(PROJECT_VERSION "4.5.5-dev")
+set(PROJECT_VERSION "4.6-dev")
set(CUSTOM_VERSION_STRING ""
CACHE STRING "Custom version string (if empty, use hard-coded default)")
mark_as_advanced(CUSTOM_VERSION_STRING)
set(SOVERSION 6)
# It is a bit irritating, but this has to be set separately for now!
SET(CPACK_PACKAGE_VERSION_MAJOR "4")
-SET(CPACK_PACKAGE_VERSION_MINOR "5")
-SET(CPACK_PACKAGE_VERSION_PATCH "5")
+SET(CPACK_PACKAGE_VERSION_MINOR "6")
+#SET(CPACK_PACKAGE_VERSION_PATCH "0")
# Cmake modules/macros are in a subdirectory to keep this file cleaner
set(GMX_THREADS OFF CACHE BOOL
"Thread-based parallelization conflicts with MPI." FORCE)
endif(GMX_THREADS)
- find_package(MPI)
+
+ # Work-around for Cray MPI
+ TRY_COMPILE(MPI_FOUND ${CMAKE_BINARY_DIR}
+ "${CMAKE_SOURCE_DIR}/cmake/TestMPI.c"
+ COMPILE_DEFINITIONS )
+ if(NOT MPI_FOUND)
+ # search for normal MPI installations
+ find_package(MPI)
+ endif(NOT MPI_FOUND)
+
if(MPI_FOUND)
set(GROMACS_C_FLAGS ${GROMACS_FLAGS} ${MPI_COMPILE_FLAGS})
set(GROMACS_LINKER_FLAGS ${GROMACS_LINKER_FLAGS} ${MPI_LINK_FLAGS})
if(EXISTS "${CMAKE_SOURCE_DIR}/.git")
if(USE_VERSION_H)
# We need at least git v1.5.1 be able to parse git's date output. If not
- # fund or the version is too small, we can't generate version information.
- find_package(Git 1.5.1)
- # this should at some point become VERSION_LESS
- if(NOT Git_FOUND OR Git_VERSION STRLESS "1.5.1")
- message("No compatible git version found, won't be able to generate proper development version information.")
- set(USE_VERSION_H OFF)
+ # found or the version is too small, we can't generate version information.
+ find_package(Git)
+
+ # Find out the git version
+ if(GIT_FOUND AND NOT GIT_VERSION)
+ execute_process(COMMAND ${GIT_EXECUTABLE} "--version"
+ OUTPUT_VARIABLE _exec_out
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+ string(REGEX REPLACE "git version (.*)" "\\1" GIT_VERSION ${_exec_out})
+ set(GIT_VERSION ${GIT_VERSION} CACHE STRING "Git version")
+ mark_as_advanced(GIT_VERSION)
+ endif()
+
+ if(NOT GIT_FOUND OR GIT_VERSION VERSION_LESS "1.5.1")
+ message("No compatible git version found, won't be able to generate proper development version information.")
+ set(USE_VERSION_H OFF)
endif()
endif()
else()
check_function_exists(fseeko HAVE_FSEEKO)
include(gmxTestSignal)
-gmx_test_retsigtype(RETSIGTYPE)
gmx_test_sigusr1(HAVE_SIGUSR1)
include(gmxTestInline)
set(GMX_ACCELERATION "SSE" CACHE STRING "Accelerated kernels. Pick one of: auto, none, SSE, BlueGene, Power6, ia64, altivec, fortran" FORCE)
- if (GMX_64_BIT)
- set(GMX_X86_64_ASM ON CACHE BOOL "Add SSE assembly files for x86_64" FORCE)
- else (GMX_64_BIT)
- set(GMX_IA32_ASM ON CACHE BOOL "Add SSE assembly files for i386" FORCE)
- endif (GMX_64_BIT)
-
# Determine the assembler/compiler to use
else()
set(GMX_ACCELERATION "none" CACHE STRING "Accelerated kernels. Pick one of: auto, none, SSE, BlueGene, Power6, ia64, altivec, fortran" FORCE)
if(${GMX_ACCELERATION} STREQUAL "NONE")
# nothing to do
elseif(${GMX_ACCELERATION} STREQUAL "SSE")
+
+ if (GMX_64_BIT)
+ set(GMX_X86_64_ASM ON CACHE BOOL "Add SSE assembly files for x86_64" FORCE)
+ else (GMX_64_BIT)
+ set(GMX_IA32_ASM ON CACHE BOOL "Add SSE assembly files for i386" FORCE)
+ endif (GMX_64_BIT)
if(CMAKE_GENERATOR MATCHES "Visual Studio")
option(GMX_ASM_USEASM-NASM "Use Nasm for assembly instead of compiler (necessary on windows)" ON)
REM Requires Windows SDK and CMake to be in the path
REM Run Windows SDK SetEnv script
- SetEnv && ^
- cmake -G "Visual Studio 10 Win64" -D GMX_DOUBLE=%GMX_DOUBLE% -D GMX_MPI=%GMX_MPI% -D GMX_OPENMP=%GMX_OPENMP% -DGMX_DEFAULT_SUFFIX=off -DCMAKE_BUILD_TYPE=Debug . && ^
- msbuild All_Build.vcxproj && ^
- ctest -D ExperimentalTest -C Debug -V
+ SetEnv /Release && ^
+ 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 . && ^
+ msbuild /m:2 /p:Configuration=MinSizeRel All_Build.vcxproj && ^
+ ctest -D ExperimentalTest -C MinSizeRel -V
-
void ana_dih_trans(const char *fn_trans,const char *fn_histo,
real **dih,int nframes,int nangles,
- const char *grpname,real t0,real dt,gmx_bool bRb,
+ const char *grpname,real *time,gmx_bool bRb,
const output_env_t oenv);
/*
* Analyse dihedral transitions, by counting transitions per dihedral
* nframes number of times frames
* nangles number of angles
* grpname a string for the header of plots
- * t0,dt starting time resp. time between time frames
+ * time array (size nframes) of times of trajectory frames
* bRb determines whether the polymer convention is used
* (trans = 0)
*/
gmx_bool bHisto, const char *fn_histo, int maxchi,
real **dih, int nlist, t_dlist dlist[],
int nframes, int nangles, const char *grpname,
- int multiplicity[], real t0, real dt, gmx_bool bRb,
- int xity[], real *time, gmx_bool bRb,
++ int multiplicity[], real *time, gmx_bool bRb,
real core_frac, const output_env_t oenv);
- /* as above but passes dlist so can copy occupancies into it, and xity[]
+ /* as above but passes dlist so can copy occupancies into it, and multiplicity[]
* (1..nangles, corresp to dih[this][], so can have non-3 multiplicity of
* rotamers. Also production of xvg output files is conditional
* and the fractional width of each rotamer can be set ie for a 3 fold
void mk_chi_lookup (int **lookup, int maxchi, real **dih,
int nlist, t_dlist dlist[]) ;
-void mk_multiplicity_lookup (int *xity, int maxchi, real **dih,
+void mk_multiplicity_lookup (int *multiplicity, int maxchi, real **dih,
int nlist, t_dlist dlist[],int nangle) ;
void get_chi_product_traj (real **dih,int nframes,int nangles,
int nlist,int maxchi, t_dlist dlist[],
- real time[], int **lookup,int *xity,
+ real time[], int **lookup,int *multiplicity,
gmx_bool bRb,gmx_bool bNormalize,
real core_frac,gmx_bool bAll,const char *fnall,
const output_env_t oenv);
void ana_dih_trans(const char *fn_trans,const char *fn_histo,
real **dih,int nframes,int nangles,
- const char *grpname,real t0,real dt,gmx_bool bRb,
+ const char *grpname,real *time,gmx_bool bRb,
const output_env_t oenv)
{
/* 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, multiplicity, t0, dt, bRb, 0.5,oenv);
- nangles, grpname, xity, time, bRb, 0.5,oenv);
++ nangles, grpname, multiplicity, time, 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 multiplicity[],
- real t0, real dt, gmx_bool bRb, real core_frac,
- int nangles, const char *grpname, int xity[],
++ int nangles, const char *grpname, int multiplicity[],
+ real *time, gmx_bool bRb, real core_frac,
const output_env_t oenv)
{
FILE *fp;
real ttime,tt;
real *rot_occ[NROT] ;
int (*calc_bin)(real,int,real);
+ real dt;
+
+ if (1 <= nframes) {
+ return;
+ }
+ /* Assumes the frames are equally spaced in time */
+ dt=(time[nframes-1]-time[0])/(nframes-1);
/* Analysis of dihedral transitions */
fprintf(stderr,"Now calculating transitions...\n");
#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)
sprintf(title,"Number of transitions: %s",grpname);
fp=xvgropen(fn_trans,title,"Time (ps)","# transitions/timeframe",oenv);
for(j=0; (j<nframes); j++) {
- tt = t0+j*dt;
- fprintf(fp,"%10.3f %10d\n",tt,tr_f[j]);
+ fprintf(fp,"%10.3f %10d\n",time[j],tr_f[j]);
}
ffclose(fp);
}
}
-void mk_multiplicity_lookup (int *xity, int maxchi, real **dih,
+void mk_multiplicity_lookup (int *multiplicity, int maxchi, real **dih,
int nlist, t_dlist dlist[],int nangles)
{
/* new by grs - for dihedral j (as in dih[j]) get multiplicity from dlist
- * and store in xity[j]
+ * and store in multiplicity[j]
*/
int j, Dih, i ;
((Dih == edOmega) && (has_dihedral(edOmega,&(dlist[i])))) ||
((Dih > edOmega) && (dlist[i].atm.Cn[Dih-NONCHI+3] != -1))) {
/* default - we will correct the rest below */
- xity[j] = 3 ;
+ multiplicity[j] = 3 ;
/* make omegas 2fold, though doesn't make much more sense than 3 */
if (Dih == edOmega && (has_dihedral(edOmega,&(dlist[i])))) {
- xity[j] = 2 ;
+ multiplicity[j] = 2 ;
}
/* dihedrals to aromatic rings, COO, CONH2 or guanidinium are 2fold*/
((strstr(name,"GLN") != NULL) && (Dih == edChi3)) ||
((strstr(name,"ASN") != NULL) && (Dih == edChi2)) ||
((strstr(name,"ARG") != NULL) && (Dih == edChi4)) ) {
- xity[j] = 2;
+ multiplicity[j] = 2;
}
}
j++ ;
j,nangles);
/* Check for remaining dihedrals */
for(;(j < nangles); j++)
- xity[j] = 3;
+ multiplicity[j] = 3;
}
void get_chi_product_traj (real **dih,int nframes,int nangles, int nlist,
int maxchi, t_dlist dlist[], real time[],
- int **lookup, int *xity,gmx_bool bRb, gmx_bool bNormalize,
+ int **lookup, int *multiplicity,gmx_bool bRb, gmx_bool bNormalize,
real core_frac, gmx_bool bAll, const char *fnall,
const output_env_t oenv)
{
for (Xi = 0 ; Xi < maxchi ; Xi ++ ) {
index = lookup[i][Xi] ; /* chi_(Xi+1) of res i (-1 if off end) */
if ( index >= 0 ) {
- n = xity[index];
+ n = multiplicity[index];
nbin = n*nbin ;
}
}
bRotZero = TRUE ;
bHaveChi = FALSE ;
} else {
- b = calc_bin(dih[index][j],xity[index],core_frac) ;
+ b = calc_bin(dih[index][j],multiplicity[index],core_frac) ;
accum = b - 1 ;
if (b == 0 )
bRotZero = TRUE ;
for (Xi = 1 ; Xi < maxchi ; Xi ++ ) {
index = lookup[i][Xi] ; /* chi_(Xi+1) of res i (-1 if off end) */
if ( index >= 0 ) {
- n = xity[index];
+ n = multiplicity[index];
b = calc_bin(dih[index][j],n,core_frac);
accum = n * accum + b - 1 ;
if (b == 0 )
"The total number of rotamer transitions per timestep",
"(argument [TT]-ot[tt]), the number of transitions per rotamer",
"(argument [TT]-rt[tt]), and the ^3J couplings (argument [TT]-jc[tt]), ",
- "can also be written to [TT].xvg[tt] files.[PAR]",
+ "can also be written to [TT].xvg[tt] files. Note that the analysis",
+ "of rotamer transitions assumes that the supplied trajectory frames",
+ "are equally spaced in time.[PAR]",
"If [TT]-chi_prod[tt] is set (and [TT]-maxchi[tt] > 0), cumulative rotamers, e.g.",
"1+9([GRK]chi[grk]1-1)+3([GRK]chi[grk]2-1)+([GRK]chi[grk]3-1) (if the residue has three 3-fold ",
atom_id isize,*index;
int ndih,nactdih,nf;
real **dih,*trans_frac,*aver_angle,*time;
- int i,j,**chi_lookup,*xity;
+ int i,j,**chi_lookup,*multiplicity;
t_filenm fnm[] = {
{ efSTX, "-s", NULL, ffREAD },
*
* added multiplicity */
- snew(xity,ndih) ;
- mk_multiplicity_lookup(xity, maxchi, dih, nlist, dlist,ndih);
+ snew(multiplicity,ndih) ;
+ mk_multiplicity_lookup(multiplicity, maxchi, dih, nlist, dlist,ndih);
strcpy(grpname, "All residues, ");
if(bPhi)
low_ana_dih_trans(bDo_ot, opt2fn("-ot",NFILE,fnm),
bDo_oh, opt2fn("-oh",NFILE,fnm),maxchi,
- dih, nlist, dlist, nf, nactdih, grpname, xity,
+ dih, nlist, dlist, nf, nactdih, grpname, multiplicity,
- *time, dt, FALSE, core_frac,oenv) ;
+ time, FALSE, core_frac,oenv);
/* Order parameters */
order_params(log,opt2fn("-o",NFILE,fnm),maxchi,nlist,dlist,
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);