| 4 | 
  | 
#include <cmath> | 
| 5 | 
  | 
#include <string> | 
| 6 | 
  | 
#include <sprng.h>  | 
| 7 | 
– | 
 | 
| 7 | 
  | 
#include "SimSetup.hpp" | 
| 8 | 
  | 
#include "ReadWrite.hpp" | 
| 9 | 
  | 
#include "parse_me.h" | 
| 21 | 
  | 
#define NVT_ENS        1 | 
| 22 | 
  | 
#define NPTi_ENS       2 | 
| 23 | 
  | 
#define NPTf_ENS       3 | 
| 24 | 
+ | 
#define NPTxyz_ENS     4 | 
| 25 | 
+ | 
 | 
| 26 | 
  | 
 | 
| 27 | 
  | 
#define FF_DUFF 0 | 
| 28 | 
  | 
#define FF_LJ   1 | 
| 604 | 
  | 
  } | 
| 605 | 
  | 
  else if (!strcasecmp(ensemble, "NPTf")){ | 
| 606 | 
  | 
    ensembleCase = NPTf_ENS; | 
| 607 | 
+ | 
  } | 
| 608 | 
+ | 
  else if (!strcasecmp(ensemble, "NPTxyz")){ | 
| 609 | 
+ | 
    ensembleCase = NPTxyz_ENS; | 
| 610 | 
  | 
  } | 
| 611 | 
  | 
  else{ | 
| 612 | 
  | 
    sprintf(painCave.errMsg, | 
| 1353 | 
  | 
  NVT<RealIntegrator>* myNVT = NULL; | 
| 1354 | 
  | 
  NPTi<NPT<RealIntegrator> >* myNPTi = NULL; | 
| 1355 | 
  | 
  NPTf<NPT<RealIntegrator> >* myNPTf = NULL; | 
| 1356 | 
+ | 
  NPTxyz<NPT<RealIntegrator> >* myNPTxyz = NULL; | 
| 1357 | 
  | 
   | 
| 1358 | 
  | 
  for (k = 0; k < nInfo; k++){ | 
| 1359 | 
  | 
    switch (ensembleCase){ | 
| 1476 | 
  | 
        } | 
| 1477 | 
  | 
 | 
| 1478 | 
  | 
        info->the_integrator = myNPTf; | 
| 1479 | 
+ | 
        break; | 
| 1480 | 
+ | 
 | 
| 1481 | 
+ | 
      case NPTxyz_ENS: | 
| 1482 | 
+ | 
        if (globals->haveZconstraints()){ | 
| 1483 | 
+ | 
          setupZConstraint(info[k]); | 
| 1484 | 
+ | 
          myNPTxyz = new ZConstraint<NPTxyz<NPT <RealIntegrator> > >(&(info[k]), the_ff); | 
| 1485 | 
+ | 
        } | 
| 1486 | 
+ | 
        else | 
| 1487 | 
+ | 
          myNPTxyz = new NPTxyz<NPT <RealIntegrator> >(&(info[k]), the_ff); | 
| 1488 | 
+ | 
 | 
| 1489 | 
+ | 
        myNPTxyz->setTargetTemp(globals->getTargetTemp()); | 
| 1490 | 
+ | 
 | 
| 1491 | 
+ | 
        if (globals->haveTargetPressure()) | 
| 1492 | 
+ | 
          myNPTxyz->setTargetPressure(globals->getTargetPressure()); | 
| 1493 | 
+ | 
        else{ | 
| 1494 | 
+ | 
          sprintf(painCave.errMsg, | 
| 1495 | 
+ | 
                  "SimSetup error: If you use a constant pressure\n" | 
| 1496 | 
+ | 
                  "    ensemble, you must set targetPressure in the BASS file.\n"); | 
| 1497 | 
+ | 
          painCave.isFatal = 1; | 
| 1498 | 
+ | 
          simError(); | 
| 1499 | 
+ | 
        }     | 
| 1500 | 
+ | 
 | 
| 1501 | 
+ | 
        if (globals->haveTauThermostat()) | 
| 1502 | 
+ | 
          myNPTxyz->setTauThermostat(globals->getTauThermostat()); | 
| 1503 | 
+ | 
        else{ | 
| 1504 | 
+ | 
          sprintf(painCave.errMsg, | 
| 1505 | 
+ | 
                  "SimSetup error: If you use an NPT\n" | 
| 1506 | 
+ | 
                  "    ensemble, you must set tauThermostat.\n"); | 
| 1507 | 
+ | 
          painCave.isFatal = 1; | 
| 1508 | 
+ | 
          simError(); | 
| 1509 | 
+ | 
        } | 
| 1510 | 
+ | 
 | 
| 1511 | 
+ | 
        if (globals->haveTauBarostat()) | 
| 1512 | 
+ | 
          myNPTxyz->setTauBarostat(globals->getTauBarostat()); | 
| 1513 | 
+ | 
        else{ | 
| 1514 | 
+ | 
          sprintf(painCave.errMsg, | 
| 1515 | 
+ | 
                  "SimSetup error: If you use an NPT\n" | 
| 1516 | 
+ | 
                  "    ensemble, you must set tauBarostat.\n"); | 
| 1517 | 
+ | 
          painCave.isFatal = 1; | 
| 1518 | 
+ | 
          simError(); | 
| 1519 | 
+ | 
        } | 
| 1520 | 
+ | 
 | 
| 1521 | 
+ | 
        info->the_integrator = myNPTxyz; | 
| 1522 | 
  | 
        break; | 
| 1523 | 
  | 
 | 
| 1524 | 
  | 
      default: |