########################################################################
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
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)
# turn on SSE if supported with reasonable defaults.
if (${GMX_ACCELERATION} STREQUAL "auto" AND NOT GMX_OPENMM)
- if(CMAKE_SYSTEM_PROCESSOR MATCHES "^(i.86|x86|x64|x86_64|AMD64|amd64)")
+ if(CMAKE_SYSTEM_PROCESSOR MATCHES "^(i.86|x86|x64|x86_64|AMD64|amd64)" OR CYGWIN)
set(GMX_ACCELERATION "SSE" CACHE STRING "Accelerated kernels. Pick one of: auto, none, SSE, BlueGene, Power6, ia64, altivec, fortran" FORCE)
set(GMX_X11 OFF CACHE BOOL "X11 not compatible with BlueGene, disabled!" FORCE)
set(GMX_THREADS OFF CACHE BOOL "Threads not compatible with BlueGene, disabled!" FORCE)
set(GMX_MPI ON CACHE BOOL "Use MPI on BlueGene" FORCE)
- set(GMX_EXTERNAL_BLAS TRUE CACHE BOOL "Use MASSV for BLAS on BlueGene" FORCE)
- set(GMX_EXTERNAL_LAPACK TRUE CACHE BOOL "Use MASSV for LAPACK on BlueGene" FORCE)
- list(APPEND GMX_EXTRA_LIBRARIES massv)
elseif(${GMX_ACCELERATION} STREQUAL "POWER6")
set(GMX_POWER6 1)
set(GMX_SOFTWARE_INVSQRT OFF CACHE BOOL "Do not use software reciprocal square root on Power6" FORCE)
* 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
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
[ 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
gmx_fio_do_int(fio, i);
- if(i==GMX_MTXIO_FULL_MATRIX)
+ if(i==GMX_MTXIO_FULL_MATRIX && NULL != full_matrix)
{
printf("Full matrix storage format, nrow=%d, ncols=%d\n",*nrow,*ncol);
snew((*full_matrix),sz);
bDum=gmx_fio_ndo_real(fio, (*full_matrix),sz);
}
- else
+ else if (NULL != sparse_matrix)
{
/* Sparse storage */
printf("Sparse matrix storage format, nrow=%d, ncols=%d\n",*nrow,*ncol);
ntype = *p_ntype;
nthreads = *p_nthreads;
_facel = *p_facel;
- _tabscale = *p_tabscale;
- _gbtabscale = *p_gbtabscale;
- _krf = *p_krf;
- _crf = *p_crf;
+#if (COULOMB == COULOMB_TAB || VDW == VDW_TAB)
+ _tabscale = *p_tabscale;
+#else
+ _tabscale = 0.0;
+#endif
+#if COULOMB == REACTION_FIELD
+ _krf = *p_krf;
+ _crf = *p_crf;
+#else
+ _krf = 0.0;
+ _crf = 0.0;
+#endif
+#if COULOMB == GENERALIZED_BORN
+ _gbtabscale = *p_gbtabscale;
+#else
+ _gbtabscale = 0.0;
+#endif
nj1 = 0;
for(n=0; (n<nri); n++)
int k,ggid;
real _iq = _facel * charge[ii];
+#if COULOMB == GENERALIZED_BORN
real _isai = invsqrta[ii];
+#else
+ real _isai = 0.0;
+#endif
// add the shift vector to all water atoms
#if COULOMB == GENERALIZED_BORN
dvda[jnr11] -= __creal(dvdaj);
- dvda[jnr21] -= __creal(dvdaj);
+ dvda[jnr21] -= __cimag(dvdaj);
dvdaj = __cmplx(dvda[jnr12],dvda[jnr22]);
#endif
#if COULOMB == GENERALIZED_BORN
dvda[jnr12] -= __creal(dvdaj);
- dvda[jnr22] -= __creal(dvdaj);
+ dvda[jnr22] -= __cimag(dvdaj);
dvdaj = __cmplx(dvda[jnr13],dvda[jnr23]);
#endif
#if COULOMB == GENERALIZED_BORN
dvda[jnr13] -= __creal(dvdaj);
- dvda[jnr23] -= __creal(dvdaj);
+ dvda[jnr23] -= __cimag(dvdaj);
#endif
#ifndef NO_FORCE
ntype = *p_ntype;
nthreads = *p_nthreads;
_facel = *p_facel;
+#if (COULOMB == COULOMB_TAB || VDW == VDW_TAB)
_tabscale = *p_tabscale;
- _gbtabscale = *p_gbtabscale;
+#else
+ _tabscale = 0.0;
+#endif
+#if COULOMB == REACTION_FIELD
_krf = *p_krf;
_crf = *p_crf;
+#else
+ _krf = 0.0;
+ _crf = 0.0;
+#endif
+#if COULOMB == GENERALIZED_BORN
+ _gbtabscale = *p_gbtabscale;
+#else
+ _gbtabscale = 0.0;
+#endif
ii = iinr[0];
_qO = _facel * charge[ii];
ntype = *p_ntype;
nthreads = *p_nthreads;
_facel = *p_facel;
+#if (COULOMB == COULOMB_TAB || VDW == VDW_TAB)
_tabscale = *p_tabscale;
+#else
+ _tabscale = 0.0;
+#endif
+#if COULOMB == REACTION_FIELD
_krf = *p_krf;
_crf = *p_crf;
- _gbtabscale = *p_gbtabscale;
+#else
+ _krf = 0.0;
+ _crf = 0.0;
+#endif
+#if COULOMB == GENERALIZED_BORN
+ _gbtabscale = *p_gbtabscale;
+#else
+ _gbtabscale = 0.0;
+#endif
ii = iinr[0];
ntype = *p_ntype;
nthreads = *p_nthreads;
_facel = *p_facel;
+#if (COULOMB == COULOMB_TAB || VDW == VDW_TAB)
_tabscale = *p_tabscale;
- _gbtabscale = *p_gbtabscale;
+#else
+ _tabscale = 0.0;
+#endif
+#if COULOMB == REACTION_FIELD
_krf = *p_krf;
_crf = *p_crf;
+#else
+ _krf = 0.0;
+ _crf = 0.0;
+#endif
+#if COULOMB == GENERALIZED_BORN
+ _gbtabscale = *p_gbtabscale;
+#else
+ _gbtabscale = 0.0;
+#endif
ii = iinr[0];
_qH = _facel * charge[ii+1];
ntype = *p_ntype;
nthreads = *p_nthreads;
_facel = *p_facel;
+#if (COULOMB == COULOMB_TAB || VDW == VDW_TAB)
_tabscale = *p_tabscale;
+#else
+ _tabscale = 0.0;
+#endif
+#if COULOMB == REACTION_FIELD
_krf = *p_krf;
_crf = *p_crf;
- _gbtabscale = *p_gbtabscale;
+#else
+ _krf = 0.0;
+ _crf = 0.0;
+#endif
+#if COULOMB == GENERALIZED_BORN
+ _gbtabscale = *p_gbtabscale;
+#else
+ _gbtabscale = 0.0;
+#endif
ii = iinr[0];
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 */
gmx_bool bShowTimestep=TRUE,bOK,newline=FALSE;
t_trxstatus *status;
gmx_mtop_t mtop;
- gmx_localtop_t *top;
+ gmx_localtop_t *top=NULL;
t_state state;
t_inputrec ir;
if (tpr) {
read_tpx_state(tpr,&ir,&state,NULL,&mtop);
+ top = gmx_mtop_generate_local_top(&mtop,&ir);
}
new_natoms = -1;
natoms = -1;
}
natoms=new_natoms;
if (tpr) {
- top = gmx_mtop_generate_local_top(&mtop,&ir);
chk_bonds(&top->idef,ir.ePBC,fr.x,fr.box,tol);
}
if (fr.bX)
sim_part = sim_part_fn + 1;
}
- if (MULTISIM(cr))
+ if (MULTISIM(cr) && MASTER(cr))
{
check_multi_int(stdout,cr->ms,sim_part,"simulation part");
}
/* 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.
case egbSTILL:
if(fr->UseOptimizedKernels)
{
- calc_gb_rad_still_sse2_double(cr,fr,md->nr,top, atype, x[0], nl, born);
+ calc_gb_rad_still_sse2_double(cr,fr,born->nr,top, atype, x[0], nl, born);
}
else
{
for(m=0; m<DIM; m++)
{
dr[m] *= pull->dim[m];
- dr2 += dr[m];
+ dr2 += dr[m]*dr[m];
}
if (max_dist2 >= 0 && dr2 > 0.98*0.98*max_dist2)
{
- gmx_fatal(FARGS,"Distance of pull group %d (%f nm) is larger than 0.49 times the box size (%f)",g,sqrt(dr2),max_dist2);
+ gmx_fatal(FARGS,"Distance of pull group %d (%f nm) is larger than 0.49 times the box size (%f)",g,sqrt(dr2),sqrt(max_dist2));
}
if (pull->eGeom == epullgDIRPBC)
}
}
- bConverged_all = TRUE;
+ bConverged_all = FALSE;
while (!bConverged_all && niter < max_iter)
{
bConverged_all = TRUE;
#include "tpxio.h"
#include "viewit.h"
-/* defined in gmx_wheel.c*/
-extern gmx_bool *bPhobics(int ,char *);
static int strip_dssp(char *dsspfile,int nres,
gmx_bool bPhobres[],real t,
return nr;
}
+static gmx_bool *bPhobics(t_atoms *atoms)
+{
+ int i,nb;
+ char **cb;
+ gmx_bool *bb;
+
+
+ nb = get_strings("phbres.dat",&cb);
+ snew(bb,atoms->nres);
+
+ for (i=0; (i<atoms->nres); i++)
+ {
+ if ( -1 != search_str(nb,cb,*atoms->resinfo[i].name) )
+ {
+ bb[i]=TRUE;
+ }
+ }
+ return bb;
+}
+
static void check_oo(t_atoms *atoms)
{
char *OOO;
read_tps_conf(ftp2fn(efTPS,NFILE,fnm),title,&top,&ePBC,&xp,NULL,box,FALSE);
atoms=&(top.atoms);
check_oo(atoms);
- bPhbres=bPhobics((int)atoms->nres,(char *)atoms->resinfo);
+ bPhbres = bPhobics(atoms);
get_index(atoms,ftp2fn_null(efNDX,NFILE,fnm),1,&gnx,&index,&grpnm);
nres=0;
"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]"
static void dump_dih_trn(int nframes,int nangles,real **dih,const char *fn,
- real dt)
+ real *time)
{
int i,j,k,l,m,na;
t_fileio *trn;
}
}
}
- fwrite_trn(trn,i,(real)i*dt,0,box,na,x,NULL,NULL);
+ fwrite_trn(trn,i,time[i],0,box,na,x,NULL,NULL);
}
close_trn(trn);
sfree(x);
bAver=opt2bSet("-ov",NFILE,fnm);
bTrans=opt2bSet("-ot",NFILE,fnm);
bFrac=opt2bSet("-of",NFILE,fnm);
-
+ if (bTrans && opt[0][0] != 'd') {
+ fprintf(stderr, "Option -ot should only accompany -type dihedral. Disabling -ot.\n");
+ bTrans = FALSE;
+ }
+
if (bChandler && !bCorr)
bCorr=TRUE;
ffclose(out);
}
if (opt2bSet("-or",NFILE,fnm))
- dump_dih_trn(nframes,nangles,dih,opt2fn("-or",NFILE,fnm),dt);
+ dump_dih_trn(nframes,nangles,dih,opt2fn("-or",NFILE,fnm),time);
if (bFrac) {
sprintf(title,"Trans fraction: %s",grpname);
"[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]",
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!");
"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;
#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;