{
int i;
- {
- gs->nstms = 1;
- }
+ gs->nstms = 1;
for(i=0; i<eglsNR; i++)
{
bLastStep = (step_rel == ir->nsteps);
t = t0 + step*ir->delta_t;
- if (gs.set[eglsTERM] > 0 )
+ if (gs.set[eglsTERM] != 0 )
{
bLastStep = TRUE;
}
(handledSignal!=last_signal_number_recvd) &&
MASTERTHREAD(cr))
{
- if (bGotStopNextStepSignal || ir->nstlist == 0)
+ if (bGotStopNextStepSignal)
{
- gs.sig[eglsTERM] = 1;
+ gs.set[eglsTERM] = 1;
}
else
{
- gs.sig[eglsTERM] = -1;
+ gs.set[eglsTERM] = -1;
}
if (fplog)
{
fprintf(fplog,
"\n\nReceived the %s signal, stopping at the next %sstep\n\n",
signal_name[last_signal_number_recvd],
- gs.sig[eglsTERM]==-1 ? "NS " : "");
+ gs.set[eglsTERM]==-1 ? "NS " : "");
fflush(fplog);
}
fprintf(stderr,
"\n\nReceived the %s signal, stopping at the next %sstep\n\n",
signal_name[last_signal_number_recvd],
- gs.sig[eglsTERM]==-1 ? "NS " : "");
+ gs.set[eglsTERM]==-1 ? "NS " : "");
fflush(stderr);
handledSignal=last_signal_number_recvd;
}
-
else if (MASTER(cr) &&
(max_hours > 0 && run_time > max_hours*60.0*60.0*0.99) &&
- gs.sig[eglsTERM] == 0)
+ gs.set[eglsTERM] == 0)
{
/* Signal to terminate the run */
- gs.sig[eglsTERM] = 1;
+ gs.set[eglsTERM] = 1;
if (fplog)
{
fprintf(fplog,"\nStep %s: Run time exceeded %.3f hours, will terminate the run\n",gmx_step_str(step,sbuf),max_hours*0.99);
run_time >= nchkpt*cpt_period*60.0)) &&
gs.set[eglsCHKPT] == 0)
{
- gs.sig[eglsCHKPT] = 1;
+ gs.set[eglsCHKPT] = 1;
}
}
/* Electroctstics */
- if ((ir->coulombtype != eelPME) && (ir->coulombtype != eelRF) && (ir->coulombtype != eelEWALD))
+ if (
+ (ir->coulombtype != eelPME) &&
+ (ir->coulombtype != eelRF) &&
+ (ir->coulombtype != eelEWALD) &&
+ // no-cutoff
+ ( !(ir->coulombtype == eelCUT && ir->rcoulomb == 0 && ir->rvdw == 0))
+ )
{
gmx_fatal(FARGS,"OpenMM supports only the following methods for electrostatics: NoCutoff (i.e. rcoulomb = rvdw = 0 ),Reaction-Field, Ewald or PME.\n");
}
- if ( (ir->etc != etcNO) && (ir->etc != etcANDERSEN) && (ir->etc != etcANDERSENINTERVAL))
- gmx_fatal(FARGS,"In OpenMM temperature coupling can be achieved by "
- "using either \n\t(1)\t\"md-vv\" or \"md-vvak\" integrators with \"andersen\" or "
- "\"andersen-interval\" thermostat, or \n\t(2)\t\"sd\",\"sd1\" or \"bd\" integrators\n");
+ if ( (ir->etc != etcNO) &&
+ (ir->eI != eiSD1) &&
+ (ir->eI != eiSD2) &&
+ (ir->eI != eiBD) )
+ gmx_warning("OpenMM supports only Andersen thermostat with the md-vv/md-vvak integrators\n");
if (ir->opts.ngtc > 1)
gmx_fatal(FARGS,"OpenMM does not support multiple temperature coupling groups.\n");
if (ir->eConstrAlg != econtSHAKE)
gmx_warning("Constraints in OpenMM are done by a combination "
"of SHAKE, SETTLE and CCMA. Accuracy is based on the SHAKE tolerance set "
- "by the \"shake_tol\" option.");
+ "by the \"shake_tol\" option.\n");
if (ir->nwall != 0)
gmx_fatal(FARGS,"OpenMM does not support walls.\n");
Integrator* integ;
if (ir->eI == eiVV || ir->eI == eiVVAK) {
integ = new VerletIntegrator(ir->delta_t);
- if ( ir->etc == etcANDERSEN) {
+ if ( ir->etc != etcNO) {
real collisionFreq = ir->opts.tau_t[0] / 1000; /* tau_t (ps) / 1000 = collisionFreq (fs^-1) */
AndersenThermostat* thermostat = new AndersenThermostat(ir->opts.ref_t[0], friction); /* TODO test this */
sys->addForce(thermostat);