ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE/libmdtools/SimSetup.cpp
(Generate patch)

Comparing trunk/OOPSE/libmdtools/SimSetup.cpp (file contents):
Revision 811 by mmeineke, Tue Oct 21 19:33:19 2003 UTC vs.
Revision 812 by mmeineke, Wed Oct 22 21:17:32 2003 UTC

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

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines