/* -*- mode: c; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; c-file-style: "stroustrup"; -*-
*
- *
+ *
* This source code is part of
- *
+ *
* G R O M A C S
- *
+ *
* GROningen MAchine for Chemical Simulations
- *
+ *
* VERSION 3.2.0
* Written by David van der Spoel, Erik Lindahl, Berk Hess, and others.
* Copyright (c) 1991-2000, University of Groningen, The Netherlands.
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
- *
+ *
* If you want to redistribute modifications, please consider that
* scientific software is very special. Version control is crucial -
* bugs must be traceable. We will be happy to consider code for
* inclusion in the official distribution, but derived work must not
* be called official GROMACS. Details are found in the README & COPYING
* files - if they are missing, get the official version at www.gromacs.org.
- *
+ *
* To help us fund GROMACS development, we humbly ask that you cite
* the papers on the package - you can find them in the top README file.
- *
+ *
* For more info, check our website at http://www.gromacs.org
- *
+ *
* And Hey:
* Gallium Rubidium Oxygen Manganese Argon Carbon Silicon
*/
#include "gmx_fatal.h"
#include "vec.h"
-void reset_nlistheuristics(gmx_nlheur_t *nlh,gmx_large_int_t step)
+void reset_nlistheuristics(gmx_nlheur_t *nlh, gmx_large_int_t step)
{
- nlh->lt_runav = 0;
- nlh->lt_runav2 = 0;
+ nlh->lt_runav = 0;
+ nlh->lt_runav2 = 0;
nlh->step_nscheck = step;
}
void init_nlistheuristics(gmx_nlheur_t *nlh,
- gmx_bool bGStatEveryStep,gmx_large_int_t step)
+ gmx_bool bGStatEveryStep, gmx_large_int_t step)
{
nlh->bGStatEveryStep = bGStatEveryStep;
- nlh->nns = 0;
- nlh->nabnsb = 0;
- nlh->s1 = 0;
- nlh->s2 = 0;
- nlh->ab = 0;
+ nlh->nns = 0;
+ nlh->nabnsb = 0;
+ nlh->s1 = 0;
+ nlh->s2 = 0;
+ nlh->ab = 0;
- reset_nlistheuristics(nlh,step);
+ reset_nlistheuristics(nlh, step);
}
-void update_nliststatistics(gmx_nlheur_t *nlh,gmx_large_int_t step)
+void update_nliststatistics(gmx_nlheur_t *nlh, gmx_large_int_t step)
{
gmx_large_int_t nl_lt;
- char sbuf[STEPSTRSIZE],sbuf2[STEPSTRSIZE];
+ char sbuf[STEPSTRSIZE], sbuf2[STEPSTRSIZE];
/* Determine the neighbor list life time */
nl_lt = step - nlh->step_ns;
if (debug)
{
- fprintf(debug,"%d atoms beyond ns buffer, updating neighbor list after %s steps\n",nlh->nabnsb,gmx_step_str(nl_lt,sbuf));
+ fprintf(debug, "%d atoms beyond ns buffer, updating neighbor list after %s steps\n", nlh->nabnsb, gmx_step_str(nl_lt, sbuf));
}
nlh->nns++;
nlh->s1 += nl_lt;
* prefers exact integration over performance.
*/
nlh->step_nscheck = step
- + (int)(nlh->lt_runav - 2.0*sqrt(nlh->lt_runav2)) - 1;
+ + (int)(nlh->lt_runav - 2.0*sqrt(nlh->lt_runav2)) - 1;
}
if (debug)
{
- fprintf(debug,"nlist life time %s run av. %4.1f sig %3.1f check %s check with -gcom %d\n",
- gmx_step_str(nl_lt,sbuf),nlh->lt_runav,sqrt(nlh->lt_runav2),
- gmx_step_str(nlh->step_nscheck-step+1,sbuf2),
+ fprintf(debug, "nlist life time %s run av. %4.1f sig %3.1f check %s check with -gcom %d\n",
+ gmx_step_str(nl_lt, sbuf), nlh->lt_runav, sqrt(nlh->lt_runav2),
+ gmx_step_str(nlh->step_nscheck-step+1, sbuf2),
(int)(nlh->lt_runav - 2.0*sqrt(nlh->lt_runav2)));
}
}
-void set_nlistheuristics(gmx_nlheur_t *nlh,gmx_bool bReset,gmx_large_int_t step)
+void set_nlistheuristics(gmx_nlheur_t *nlh, gmx_bool bReset, gmx_large_int_t step)
{
int d;
if (bReset)
{
- reset_nlistheuristics(nlh,step);
+ reset_nlistheuristics(nlh, step);
}
else
{
- update_nliststatistics(nlh,step);
+ update_nliststatistics(nlh, step);
}
nlh->step_ns = step;
/* Initialize the cumulative coordinate scaling matrix */
clear_mat(nlh->scale_tot);
- for(d=0; d<DIM; d++)
+ for (d = 0; d < DIM; d++)
{
nlh->scale_tot[d][d] = 1.0;
}