real *xproj; /* instantaneous x projections */
real *fproj; /* instantaneous f projections */
real radius; /* instantaneous radius */
- real *refproj; /* starting or target projecions */
+ real *refproj; /* starting or target projections */
/* When using flooding as harmonic restraint: The current reference projection
* is at each step calculated from the initial refproj0 and the slope. */
real *refproj0, *refprojslope;
t_edvecs vecs; /* eigenvectors */
real slope; /* minimal slope in acceptance radexp */
- gmx_bool bNeedDoEdsam; /* if any of the options mon, linfix, ...
- * is used (i.e. apart from flooding) */
t_edflood flood; /* parameters especially for flooding */
struct t_ed_buffer *buf; /* handle to local buffers */
struct edpar *next_edi; /* Pointer to another ED group */
/* End function declarations */
+/* Do we have to perform essential dynamics constraints or possibly only flooding
+ * for any of the ED groups? */
+static gmx_bool bNeedDoEdsam(t_edpar *edi)
+{
+ return edi->vecs.mon.neig
+ || edi->vecs.linfix.neig
+ || edi->vecs.linacc.neig
+ || edi->vecs.radfix.neig
+ || edi->vecs.radacc.neig
+ || edi->vecs.radcon.neig;
+}
+
+
/* Multiple ED groups will be labeled with letters instead of numbers
* to avoid confusion with eigenvector indices */
static char get_EDgroupChar(int nr_edi, int nED)
t_edpar *edi) /* edi data set */
{
/* It is not more work to subtract the average position in every
- * subroutine again, because these routines are rarely used simultanely */
+ * subroutine again, because these routines are rarely used simultaneously */
project_to_eigvectors(x, &edi->vecs.mon, edi);
project_to_eigvectors(x, &edi->vecs.linfix, edi);
project_to_eigvectors(x, &edi->vecs.linacc, edi);
for (nr_edi = 1; nr_edi <= nED; nr_edi++)
{
- /* Remember for each ED group whether we have to do essential dynamics
- * constraints or possibly only flooding */
- edi->bNeedDoEdsam = edi->vecs.mon.neig
- || edi->vecs.linfix.neig
- || edi->vecs.linacc.neig
- || edi->vecs.radfix.neig
- || edi->vecs.radacc.neig
- || edi->vecs.radcon.neig;
-
fprintf(ed->edo, "#\n");
fprintf(ed->edo, "# Summary of applied con/restraints for the ED group %c\n", get_EDgroupChar(nr_edi, nED));
fprintf(ed->edo, "# Atoms in average structure: %d\n", edi->sav.nr);
edi = ed->edpar;
for (nr_edi = 1; nr_edi <= nED; nr_edi++)
{
- if (edi->bNeedDoEdsam) /* Only print ED legend if at least one ED option is on */
+ if ( bNeedDoEdsam(edi) ) /* Only print ED legend if at least one ED option is on */
{
nice_legend(&setname, &nsets, &LegendStr, "RMSD to ref", "nm", get_EDgroupChar(nr_edi, nED) );
while (edi != NULL)
{
edinr++;
- if (edi->bNeedDoEdsam)
+ if ( bNeedDoEdsam(edi) )
{
buf = edi->buf->do_edsam;
if (ed->bFirst)
{
- /* initialise radacc radius for slope criterion */
+ /* initialize radacc radius for slope criterion */
buf->oldrad = calc_radius(&edi->vecs.radacc);
}
copy_rvec(x_unsh, xs[edi->sav.anrs_loc[i]]);
}
}
- } /* END of if (edi->bNeedDoEdsam) */
+ } /* END of if ( bNeedDoEdsam(edi) ) */
/* Prepare for the next ED group */
edi = edi->next_edi;