mark_as_advanced(BUILD_TESTING)
IF(BUILD_TESTING)
enable_testing()
- add_test(TestBuildAll make)
add_subdirectory(tests)
ENDIF()
--- /dev/null
+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")
+
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
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);
#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)
/* 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) {
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;
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);
};
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] = {
/** 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);
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;
for(i=0; i<nind; i++)
copy_rvec(fr->f[ind[i]],fout[i]);
}
+ /* no break */
case efXTC:
case efG87:
if (fr->bX) {
case efTRR:
if (vout) sfree(vout);
if (fout) sfree(fout);
+ /* no break */
case efXTC:
case efG87:
sfree(xout);
}
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;
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");
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");
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");
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);
{
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]);
}
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);
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));
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);
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
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;
}
{
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);
}
}
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);
}
/* 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);
}
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) {
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)
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;
}
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");
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);
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");
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");
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");
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");
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");
/* 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);
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);
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);
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");
}
}
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));
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;
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) ||
{
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);
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);
}
}
}
/* 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)
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++) {
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))
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);
}
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);
}
}
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) {
gmx_fatal(FARGS,"Invalid bond type %d",type);
break;
}
+ break;
case d_angles:
case d_angletypes:
switch (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;
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:
default:
gmx_fatal(FARGS,"Invalid vsites3 type %d",type);
}
+ break;
case d_vsites4:
switch (type) {
case 1:
default:
gmx_fatal(FARGS,"Invalid vsites4 type %d",type);
}
+ break;
case d_vsitesn:
return F_VSITEN;
case d_constraints:
default:
gmx_fatal(FARGS,"Invalid constraints type %d",type);
}
+ break;
case d_settles:
return F_SETTLE;
case d_position_restraints:
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:
}
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:
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:
}
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:
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 */
/* 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)
{
{
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);
}
int i;
for (i=sqrt(z);;i--)
if (z%i==0) return i;
+ return 1;
}
/* largest factor */
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 */
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];
}
}
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;
}
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)
{
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;
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];
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;
/* 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)
{
#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)
}
-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 )
"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 []),
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) ;
/* Order parameters */
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);
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)
{
}
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]) {
/* 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 */
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);
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