#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);
/** 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;
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;
}
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;
"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 []),
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);