| 916 | 
  | 
         painCave.isFatal = 1; | 
| 917 | 
  | 
         simError(); | 
| 918 | 
  | 
  } | 
| 919 | 
< | 
 | 
| 920 | 
< | 
    // get the ensemble | 
| 919 | 
> | 
  if (globals->haveForceFieldVariant()) { | 
| 920 | 
> | 
    strcpy(forcefield_variant, globals->getForceFieldVariant()); | 
| 921 | 
> | 
    has_forcefield_variant = 1; | 
| 922 | 
> | 
  } | 
| 923 | 
> | 
   | 
| 924 | 
> | 
  // get the ensemble | 
| 925 | 
  | 
 | 
| 926 | 
  | 
  strcpy(ensemble, globals->getEnsemble()); | 
| 927 | 
  | 
 | 
| 1518 | 
  | 
void SimSetup::createFF(void){ | 
| 1519 | 
  | 
  switch (ffCase){ | 
| 1520 | 
  | 
    case FF_DUFF: | 
| 1521 | 
< | 
      the_ff = new DUFF(); | 
| 1521 | 
> | 
        the_ff = new DUFF(); | 
| 1522 | 
  | 
      break; | 
| 1523 | 
  | 
 | 
| 1524 | 
  | 
    case FF_LJ: | 
| 1526 | 
  | 
      break; | 
| 1527 | 
  | 
 | 
| 1528 | 
  | 
    case FF_EAM: | 
| 1529 | 
< | 
      the_ff = new EAM_FF(); | 
| 1529 | 
> | 
      if (has_forcefield_variant)  | 
| 1530 | 
> | 
        the_ff = new EAM_FF(forcefield_variant); | 
| 1531 | 
> | 
      else | 
| 1532 | 
> | 
        the_ff = new EAM_FF(); | 
| 1533 | 
  | 
      break; | 
| 1534 | 
  | 
 | 
| 1535 | 
  | 
    case FF_H2O: | 
| 1543 | 
  | 
      simError(); | 
| 1544 | 
  | 
  } | 
| 1545 | 
  | 
 | 
| 1546 | 
+ | 
 | 
| 1547 | 
  | 
#ifdef IS_MPI | 
| 1548 | 
  | 
  strcpy(checkPointMsg, "ForceField creation successful"); | 
| 1549 | 
  | 
  MPIcheckPoint(); | 
| 1820 | 
  | 
void SimSetup::makeIntegrator(void){ | 
| 1821 | 
  | 
  int k; | 
| 1822 | 
  | 
 | 
| 1823 | 
< | 
  NVE<RealIntegrator>* myNVE = NULL; | 
| 1824 | 
< | 
  NVT<RealIntegrator>* myNVT = NULL; | 
| 1825 | 
< | 
  NPTi<NPT<RealIntegrator> >* myNPTi = NULL; | 
| 1826 | 
< | 
  NPTf<NPT<RealIntegrator> >* myNPTf = NULL; | 
| 1827 | 
< | 
  NPTxyz<NPT<RealIntegrator> >* myNPTxyz = NULL; | 
| 1823 | 
> | 
  NVE<Integrator<BaseIntegrator> >* myNVE = NULL; | 
| 1824 | 
> | 
  NVT<Integrator<BaseIntegrator> >* myNVT = NULL; | 
| 1825 | 
> | 
  NPTi<NPT<Integrator<BaseIntegrator> > >* myNPTi = NULL; | 
| 1826 | 
> | 
  NPTf<NPT<Integrator<BaseIntegrator> > >* myNPTf = NULL; | 
| 1827 | 
> | 
  NPTxyz<NPT<Integrator<BaseIntegrator> > >* myNPTxyz = NULL; | 
| 1828 | 
  | 
   | 
| 1829 | 
  | 
  for (k = 0; k < nInfo; k++){ | 
| 1830 | 
  | 
    switch (ensembleCase){ | 
| 1834 | 
  | 
          myNVE = new ZConstraint<NVE<RealIntegrator> >(&(info[k]), the_ff); | 
| 1835 | 
  | 
        } | 
| 1836 | 
  | 
        else{ | 
| 1837 | 
< | 
          myNVE = new NVE<RealIntegrator>(&(info[k]), the_ff); | 
| 1837 | 
> | 
          if (globals->haveQuaternion()){ | 
| 1838 | 
> | 
            if (globals->getUseQuaternion()) | 
| 1839 | 
> | 
              info->the_integrator = new NVE<SQSIntegrator<RealIntegrator> >(&(info[k]), the_ff); | 
| 1840 | 
> | 
          } | 
| 1841 | 
> | 
          else | 
| 1842 | 
> | 
            info->the_integrator = new NVE<RealIntegrator>(&(info[k]), the_ff); | 
| 1843 | 
> | 
          break; | 
| 1844 | 
> | 
 | 
| 1845 | 
> | 
          //myNVE = new NVE<RealIntegrator>(&(info[k]), the_ff); | 
| 1846 | 
  | 
        } | 
| 1847 | 
  | 
         | 
| 1848 | 
  | 
        info->the_integrator = myNVE; |