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)
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 . &&
+export CMAKE_LIBRARY_PATH=/usr/lib/atlas-base
+export CC=gcc-${CompilerVersion}
+export CXX=g++-${CompilerVersion}
+export FC=gfortran-${CompilerVersion}
+cmake -D GMX_DOUBLE=${GMX_DOUBLE} -D GMX_MPI=${GMX_MPI} -D GMX_OPENMP=${GMX_OPENMP} \
+ -DGMX_EXTERNAL_BLAS=${GMX_EXTERNAL} -DGMX_EXTERNAL_LAPACK=${GMX_EXTERNAL} \
+ -DGMX_DEFAULT_SUFFIX=off -DCMAKE_BUILD_TYPE=Debug . &&
make &&
ctest -D ExperimentalTest -V
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
if(_libraries_work)
# Test this combination of libraries.
if(UNIX AND BLA_STATIC)
- set(CMAKE_REQUIRED_LIBRARIES ${_flags} "-Wl,--start-group ${${LIBRARIES}} ${_blas} -Wl,--end-group" ${_threads})
+ set(CMAKE_REQUIRED_LIBRARIES ${_flags} "-Wl,--start-group" ${${LIBRARIES}} ${_blas} "-Wl,--end-group" ${_threads})
else(UNIX AND BLA_STATIC)
set(CMAKE_REQUIRED_LIBRARIES ${_flags} ${${LIBRARIES}} ${_blas} ${_threads})
endif(UNIX AND BLA_STATIC)
GMX_TEST_CXXFLAG(CFLAGS_OPT "-qarch=auto -qtune=auto" GMXC_CXXFLAGS)
endif()
+ #msvc
+ if (MSVC)
+ # disable warnings for:
+ # inconsistent dll linkage
+ GMX_TEST_CFLAG(CFLAGS_WARN "/wd4273" GMXC_CFLAGS)
+ GMX_TEST_CFLAG(CXXFLAGS_WARN "/wd4273" GMXC_CXXFLAGS)
+ endif()
+
# now actually set the flags:
# C
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 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 multiplicity[]
* (1..nangles, corresp to dih[this][], so can have non-3 multiplicity of
#include <types/simple.h>
+#ifdef _MSC_VER
+#pragma warning(disable: 4723) /*division by zero - is used on purpose here*/
+#endif
+
void
F77_FUNC(dlasq2,DLASQ2)(int *n,
double *z__,
#include <types/simple.h>
+#ifdef _MSC_VER
+#pragma warning(disable: 4723) /*division by zero - is used on purpose here*/
+#endif
+
void
F77_FUNC(slasq2,SLASQ2)(int *n,
float *z__,
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. */
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, multiplicity, time, bRb, 0.5,oenv);
sfree(dlist);
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 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");
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);
}
"If this is not the case, the program will crash.[PAR]",
"With option [TT]-or[tt] a trajectory file is dumped containing cos and",
"sin of selected dihedral angles which subsequently can be used as",
- "input for a PCA analysis using [TT]g_covar[tt]."
+ "input for a PCA analysis using [TT]g_covar[tt].[PAR]",
+ "Option [TT]-ot[tt] plots when transitions occur between",
+ "dihedral rotamers of multiplicity 3 and [TT]-oh[tt]",
+ "records a histogram of the times between such transitions,",
+ "assuming the input trajectory frames are equally spaced in time."
};
static const char *opt[] = { NULL, "angle", "dihedral", "improper", "ryckaert-bellemans", NULL };
static gmx_bool bALL=FALSE,bChandler=FALSE,bAverCorr=FALSE,bPBC=TRUE;
if (bTrans)
ana_dih_trans(opt2fn("-ot",NFILE,fnm),opt2fn("-oh",NFILE,fnm),
- dih,nframes,nangles,grpname,time[0],dt,bRb,oenv);
+ dih,nframes,nangles,grpname,time,bRb,oenv);
if (bCorr) {
/* Autocorrelation function */
"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 ",
low_ana_dih_trans(bDo_ot, opt2fn("-ot",NFILE,fnm),
bDo_oh, opt2fn("-oh",NFILE,fnm),maxchi,
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,