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

Comparing:
trunk/OOPSE/libmdtools/SimSetup.cpp (file contents), Revision 829 by gezelter, Tue Oct 28 16:03:37 2003 UTC vs.
branches/new-templateless/OOPSE/libmdtools/SimSetup.cpp (file contents), Revision 851 by mmeineke, Wed Nov 5 19:18:17 2003 UTC

# Line 1 | Line 1
1 #include <algorithm>
1   #include <stdlib.h>
2   #include <iostream>
3   #include <math.h>
4 < #include <string>
4 > #include <string.h>
5   #include <sprng.h>
6 +
7   #include "SimSetup.hpp"
8   #include "ReadWrite.hpp"
9   #include "parse_me.h"
# Line 103 | Line 103 | void SimSetup::createSim(void){
103  
104    sysObjectsCreation();
105  
106  // check on the post processing info
107
108  finalInfoCheck();
109
106    // initialize the system coordinates
107  
108    if ( !initSuspend ){
# Line 115 | Line 111 | void SimSetup::createSim(void){
111      if( !(globals->getUseInitTime()) )
112        info[0].currentTime = 0.0;
113    }  
114 +
115 +  // check on the post processing info
116 +
117 +  finalInfoCheck();
118  
119    // make the output filenames
120  
# Line 696 | Line 696 | void SimSetup::gatherInfo(void){
696      }
697  
698      // check for the temperature set flag
699 <
699 >    
700      if (globals->haveTempSet())
701        info[i].setTemp = globals->getTempSet();
702 <
703 <    // get some of the tricky things that may still be in the globals
704 <
705 <    double boxVector[3];
706 <    if (globals->haveBox()){
707 <      boxVector[0] = globals->getBox();
708 <      boxVector[1] = globals->getBox();
709 <      boxVector[2] = globals->getBox();
710 <
711 <      info[i].setBox(boxVector);
712 <    }
713 <    else if (globals->haveDensity()){
714 <      double vol;
715 <      vol = (double) tot_nmol / globals->getDensity();
716 <      boxVector[0] = pow(vol, (1.0 / 3.0));
717 <      boxVector[1] = boxVector[0];
718 <      boxVector[2] = boxVector[0];
719 <
720 <      info[i].setBox(boxVector);
721 <    }
722 <    else{
723 <      if (!globals->haveBoxX()){
724 <        sprintf(painCave.errMsg,
725 <                "SimSetup error, no periodic BoxX size given.\n");
726 <        painCave.isFatal = 1;
727 <        simError();
728 <      }
729 <      boxVector[0] = globals->getBoxX();
730 <
731 <      if (!globals->haveBoxY()){
732 <        sprintf(painCave.errMsg,
733 <                "SimSetup error, no periodic BoxY size given.\n");
734 <        painCave.isFatal = 1;
735 <        simError();
736 <      }
737 <      boxVector[1] = globals->getBoxY();
738 <
739 <      if (!globals->haveBoxZ()){
740 <        sprintf(painCave.errMsg,
741 <                "SimSetup error, no periodic BoxZ size given.\n");
742 <        painCave.isFatal = 1;
743 <        simError();
744 <      }
745 <      boxVector[2] = globals->getBoxZ();
746 <
747 <      info[i].setBox(boxVector);
748 <    }
702 >    
703    }
704 <
704 >  
705    //setup seed for random number generator
706    int seedValue;
707  
# Line 851 | Line 805 | void SimSetup::finalInfoCheck(void){
805          theEst = globals->getEST();
806        }
807  
808 <      info[i].setEcr(theEcr, theEst);
808 >      info[i].setDefaultEcr(theEcr, theEst);
809  
810        if (!globals->haveDielectric()){
811          sprintf(painCave.errMsg,
# Line 896 | Line 850 | void SimSetup::finalInfoCheck(void){
850            theEst = globals->getEST();
851          }
852  
853 <        info[i].setEcr(theEcr, theEst);
853 >        info[i].setDefaultEcr(theEcr, theEst);
854        }
855      }
856 +    info[i].checkCutOffs();
857    }
858  
859   #ifdef IS_MPI
# Line 1352 | Line 1307 | void SimSetup::makeIntegrator(void){
1307   void SimSetup::makeIntegrator(void){
1308    int k;
1309  
1310 <  NVE<RealIntegrator>* myNVE = NULL;
1311 <  NVT<RealIntegrator>* myNVT = NULL;
1312 <  NPTi<NPT<RealIntegrator> >* myNPTi = NULL;
1313 <  NPTf<NPT<RealIntegrator> >* myNPTf = NULL;
1314 <  NPTxyz<NPT<RealIntegrator> >* myNPTxyz = NULL;
1310 >  NVE* myNVE = NULL;
1311 >  NVT* myNVT = NULL;
1312 >  NPTi* myNPTi = NULL;
1313 >  NPTf* myNPTf = NULL;
1314 >  NPTxyz* myNPTxyz = NULL;
1315    
1316    for (k = 0; k < nInfo; k++){
1317      switch (ensembleCase){
1318 <      case NVE_ENS:
1319 <        if (globals->haveZconstraints()){
1365 <          setupZConstraint(info[k]);
1366 <          myNVE = new ZConstraint<NVE<RealIntegrator> >(&(info[k]), the_ff);
1367 <        }
1368 <        else{
1369 <          myNVE = new NVE<RealIntegrator>(&(info[k]), the_ff);
1370 <        }
1318 >    case NVE_ENS:
1319 >      if (globals->haveZconstraints()){
1320          
1321 <        info->the_integrator = myNVE;
1322 <        break;
1323 <
1324 <      case NVT_ENS:
1325 <        if (globals->haveZconstraints()){
1326 <          setupZConstraint(info[k]);
1327 <          myNVT = new ZConstraint<NVT<RealIntegrator> >(&(info[k]), the_ff);
1328 <        }
1329 <        else
1330 <          myNVT = new NVT<RealIntegrator>(&(info[k]), the_ff);
1331 <
1332 <        myNVT->setTargetTemp(globals->getTargetTemp());
1333 <
1334 <        if (globals->haveTauThermostat())
1335 <          myNVT->setTauThermostat(globals->getTauThermostat());
1336 <        else{
1337 <          sprintf(painCave.errMsg,
1338 <                  "SimSetup error: If you use the NVT\n"
1339 <                  "    ensemble, you must set tauThermostat.\n");
1340 <          painCave.isFatal = 1;
1341 <          simError();
1342 <        }
1343 <
1344 <        info->the_integrator = myNVT;
1345 <        break;
1346 <
1347 <      case NPTi_ENS:
1348 <        if (globals->haveZconstraints()){
1349 <          setupZConstraint(info[k]);
1350 <          myNPTi = new ZConstraint<NPTi<NPT <RealIntegrator> > >(&(info[k]), the_ff);
1351 <        }
1352 <        else
1353 <          myNPTi = new NPTi<NPT<RealIntegrator> >(&(info[k]), the_ff);
1354 <
1355 <        myNPTi->setTargetTemp(globals->getTargetTemp());
1356 <
1357 <        if (globals->haveTargetPressure())
1358 <          myNPTi->setTargetPressure(globals->getTargetPressure());
1359 <        else{
1360 <          sprintf(painCave.errMsg,
1361 <                  "SimSetup error: If you use a constant pressure\n"
1362 <                  "    ensemble, you must set targetPressure in the BASS file.\n");
1363 <          painCave.isFatal = 1;
1364 <          simError();
1365 <        }
1366 <
1367 <        if (globals->haveTauThermostat())
1368 <          myNPTi->setTauThermostat(globals->getTauThermostat());
1369 <        else{
1370 <          sprintf(painCave.errMsg,
1371 <                  "SimSetup error: If you use an NPT\n"
1372 <                  "    ensemble, you must set tauThermostat.\n");
1373 <          painCave.isFatal = 1;
1374 <          simError();
1375 <        }
1376 <
1377 <        if (globals->haveTauBarostat())
1378 <          myNPTi->setTauBarostat(globals->getTauBarostat());
1379 <        else{
1380 <          sprintf(painCave.errMsg,
1381 <                  "SimSetup error: If you use an NPT\n"
1382 <                  "    ensemble, you must set tauBarostat.\n");
1383 <          painCave.isFatal = 1;
1384 <          simError();
1385 <        }
1386 <
1387 <        info->the_integrator = myNPTi;
1388 <        break;
1321 >        std::cerr << "ZConstraint is temporarily disabled\n";
1322 >        
1323 >        //      setupZConstraint(info[k]);
1324 >        //      myNVE = new ZConstraint<NVE<RealIntegrator> >(&(info[k]), the_ff);
1325 >      }
1326 >      
1327 >      //       else{
1328 >      myNVE = new NVE(&(info[k]), the_ff);
1329 >      //       }
1330 >      
1331 >      info->the_integrator = myNVE;
1332 >      break;
1333 >      
1334 >    case NVT_ENS:
1335 >      if (globals->haveZconstraints()){
1336 >        
1337 >        std::cerr << "ZConstraint is temporarily disabled\n";
1338 >        
1339 >        //      setupZConstraint(info[k]);
1340 >        //      myNVT = new ZConstraint<NVT<RealIntegrator> >(&(info[k]), the_ff);
1341 >      }
1342 >      // else
1343 >      myNVT = new NVT(&(info[k]), the_ff);
1344 >      
1345 >      myNVT->setTargetTemp(globals->getTargetTemp());
1346 >      
1347 >      if (globals->haveTauThermostat())
1348 >        myNVT->setTauThermostat(globals->getTauThermostat());
1349 >      else{
1350 >        sprintf(painCave.errMsg,
1351 >                "SimSetup error: If you use the NVT\n"
1352 >                "    ensemble, you must set tauThermostat.\n");
1353 >        painCave.isFatal = 1;
1354 >        simError();
1355 >      }
1356 >      
1357 >      info->the_integrator = myNVT;
1358 >      break;
1359 >      
1360 >    case NPTi_ENS:
1361 >      if (globals->haveZconstraints()){
1362 >        
1363 >        std::cerr << "ZConstraint is temporarily disabled\n";
1364 >        
1365 >        //        setupZConstraint(info[k]);
1366 >        //           myNPTi = new ZConstraint<NPTi<NPT <RealIntegrator> > >(&(info[k]), the_ff);
1367 >      }
1368 >      // else
1369 >      myNPTi = new NPTi(&(info[k]), the_ff);
1370 >      
1371 >      myNPTi->setTargetTemp(globals->getTargetTemp());
1372 >      
1373 >      if (globals->haveTargetPressure())
1374 >        myNPTi->setTargetPressure(globals->getTargetPressure());
1375 >      else{
1376 >        sprintf(painCave.errMsg,
1377 >                "SimSetup error: If you use a constant pressure\n"
1378 >                "    ensemble, you must set targetPressure in the BASS file.\n");
1379 >        painCave.isFatal = 1;
1380 >        simError();
1381 >      }
1382 >      
1383 >      if (globals->haveTauThermostat())
1384 >        myNPTi->setTauThermostat(globals->getTauThermostat());
1385 >      else{
1386 >        sprintf(painCave.errMsg,
1387 >                "SimSetup error: If you use an NPT\n"
1388 >                "    ensemble, you must set tauThermostat.\n");
1389 >        painCave.isFatal = 1;
1390 >        simError();
1391 >      }
1392 >      
1393 >      if (globals->haveTauBarostat())
1394 >        myNPTi->setTauBarostat(globals->getTauBarostat());
1395 >      else{
1396 >        sprintf(painCave.errMsg,
1397 >                "SimSetup error: If you use an NPT\n"
1398 >                "    ensemble, you must set tauBarostat.\n");
1399 >        painCave.isFatal = 1;
1400 >        simError();
1401 >      }
1402 >      
1403 >      info->the_integrator = myNPTi;
1404 >      break;
1405 >      
1406 >    case NPTf_ENS:
1407 >      if (globals->haveZconstraints()){
1408  
1409 <      case NPTf_ENS:
1442 <        if (globals->haveZconstraints()){
1443 <          setupZConstraint(info[k]);
1444 <          myNPTf = new ZConstraint<NPTf<NPT <RealIntegrator> > >(&(info[k]), the_ff);
1445 <        }
1446 <        else
1447 <          myNPTf = new NPTf<NPT <RealIntegrator> >(&(info[k]), the_ff);
1409 >        std::cerr << "ZConstraint is temporarily disabled\n";
1410  
1411 <        myNPTf->setTargetTemp(globals->getTargetTemp());
1412 <
1413 <        if (globals->haveTargetPressure())
1414 <          myNPTf->setTargetPressure(globals->getTargetPressure());
1415 <        else{
1416 <          sprintf(painCave.errMsg,
1417 <                  "SimSetup error: If you use a constant pressure\n"
1418 <                  "    ensemble, you must set targetPressure in the BASS file.\n");
1419 <          painCave.isFatal = 1;
1420 <          simError();
1421 <        }    
1422 <
1423 <        if (globals->haveTauThermostat())
1424 <          myNPTf->setTauThermostat(globals->getTauThermostat());
1425 <        else{
1426 <          sprintf(painCave.errMsg,
1427 <                  "SimSetup error: If you use an NPT\n"
1428 <                  "    ensemble, you must set tauThermostat.\n");
1429 <          painCave.isFatal = 1;
1430 <          simError();
1431 <        }
1432 <
1433 <        if (globals->haveTauBarostat())
1434 <          myNPTf->setTauBarostat(globals->getTauBarostat());
1435 <        else{
1436 <          sprintf(painCave.errMsg,
1437 <                  "SimSetup error: If you use an NPT\n"
1438 <                  "    ensemble, you must set tauBarostat.\n");
1439 <          painCave.isFatal = 1;
1440 <          simError();
1441 <        }
1442 <
1443 <        info->the_integrator = myNPTf;
1444 <        break;
1445 <
1446 <      case NPTxyz_ENS:
1447 <        if (globals->haveZconstraints()){
1448 <          setupZConstraint(info[k]);
1449 <          myNPTxyz = new ZConstraint<NPTxyz<NPT <RealIntegrator> > >(&(info[k]), the_ff);
1450 <        }
1451 <        else
1452 <          myNPTxyz = new NPTxyz<NPT <RealIntegrator> >(&(info[k]), the_ff);
1453 <
1454 <        myNPTxyz->setTargetTemp(globals->getTargetTemp());
1455 <
1456 <        if (globals->haveTargetPressure())
1457 <          myNPTxyz->setTargetPressure(globals->getTargetPressure());
1458 <        else{
1459 <          sprintf(painCave.errMsg,
1460 <                  "SimSetup error: If you use a constant pressure\n"
1461 <                  "    ensemble, you must set targetPressure in the BASS file.\n");
1462 <          painCave.isFatal = 1;
1463 <          simError();
1502 <        }    
1503 <
1504 <        if (globals->haveTauThermostat())
1505 <          myNPTxyz->setTauThermostat(globals->getTauThermostat());
1506 <        else{
1507 <          sprintf(painCave.errMsg,
1508 <                  "SimSetup error: If you use an NPT\n"
1509 <                  "    ensemble, you must set tauThermostat.\n");
1510 <          painCave.isFatal = 1;
1511 <          simError();
1512 <        }
1411 > //      setupZConstraint(info[k]);
1412 > //      myNPTf = new ZConstraint<NPTf<NPT <RealIntegrator> > >(&(info[k]), the_ff);
1413 >      }
1414 > //       else
1415 >      myNPTf = new NPTf(&(info[k]), the_ff);
1416 >      
1417 >      myNPTf->setTargetTemp(globals->getTargetTemp());
1418 >      
1419 >      if (globals->haveTargetPressure())
1420 >        myNPTf->setTargetPressure(globals->getTargetPressure());
1421 >      else{
1422 >        sprintf(painCave.errMsg,
1423 >                "SimSetup error: If you use a constant pressure\n"
1424 >                "    ensemble, you must set targetPressure in the BASS file.\n");
1425 >        painCave.isFatal = 1;
1426 >        simError();
1427 >      }    
1428 >      
1429 >      if (globals->haveTauThermostat())
1430 >        myNPTf->setTauThermostat(globals->getTauThermostat());
1431 >      
1432 >      else{
1433 >        sprintf(painCave.errMsg,
1434 >                "SimSetup error: If you use an NPT\n"
1435 >                "    ensemble, you must set tauThermostat.\n");
1436 >        painCave.isFatal = 1;
1437 >        simError();
1438 >      }
1439 >      
1440 >      if (globals->haveTauBarostat())
1441 >        myNPTf->setTauBarostat(globals->getTauBarostat());
1442 >      
1443 >      else{
1444 >        sprintf(painCave.errMsg,
1445 >                "SimSetup error: If you use an NPT\n"
1446 >                "    ensemble, you must set tauBarostat.\n");
1447 >        painCave.isFatal = 1;
1448 >        simError();
1449 >      }
1450 >      
1451 >      info->the_integrator = myNPTf;
1452 >      break;
1453 >      
1454 >    case NPTxyz_ENS:
1455 >      if (globals->haveZconstraints()){
1456 >        
1457 >        std::cerr << "ZConstraint is temporarily disabled\n";
1458 >        
1459 >        //      setupZConstraint(info[k]);
1460 >        //      myNPTxyz = new ZConstraint<NPTxyz<NPT <RealIntegrator> > >(&(info[k]), the_ff);
1461 >      }
1462 > //       else
1463 >      myNPTxyz = new NPTxyz(&(info[k]), the_ff);
1464  
1465 <        if (globals->haveTauBarostat())
1466 <          myNPTxyz->setTauBarostat(globals->getTauBarostat());
1467 <        else{
1468 <          sprintf(painCave.errMsg,
1469 <                  "SimSetup error: If you use an NPT\n"
1470 <                  "    ensemble, you must set tauBarostat.\n");
1471 <          painCave.isFatal = 1;
1472 <          simError();
1473 <        }
1474 <
1475 <        info->the_integrator = myNPTxyz;
1476 <        break;
1477 <
1478 <      default:
1479 <        sprintf(painCave.errMsg,
1480 <                "SimSetup Error. Unrecognized ensemble in case statement.\n");
1481 <        painCave.isFatal = 1;
1482 <        simError();
1465 >      myNPTxyz->setTargetTemp(globals->getTargetTemp());
1466 >      
1467 >      if (globals->haveTargetPressure())
1468 >        myNPTxyz->setTargetPressure(globals->getTargetPressure());
1469 >      else{
1470 >        sprintf(painCave.errMsg,
1471 >                "SimSetup error: If you use a constant pressure\n"
1472 >                "    ensemble, you must set targetPressure in the BASS file.\n");
1473 >        painCave.isFatal = 1;
1474 >        simError();
1475 >      }    
1476 >      
1477 >      if (globals->haveTauThermostat())
1478 >        myNPTxyz->setTauThermostat(globals->getTauThermostat());
1479 >      else{
1480 >        sprintf(painCave.errMsg,
1481 >                "SimSetup error: If you use an NPT\n"
1482 >                "    ensemble, you must set tauThermostat.\n");
1483 >        painCave.isFatal = 1;
1484 >        simError();
1485 >      }
1486 >      
1487 >      if (globals->haveTauBarostat())
1488 >        myNPTxyz->setTauBarostat(globals->getTauBarostat());
1489 >      else{
1490 >        sprintf(painCave.errMsg,
1491 >                "SimSetup error: If you use an NPT\n"
1492 >                "    ensemble, you must set tauBarostat.\n");
1493 >        painCave.isFatal = 1;
1494 >        simError();
1495 >      }
1496 >      
1497 >      info->the_integrator = myNPTxyz;
1498 >      break;
1499 >      
1500 >    default:
1501 >      sprintf(painCave.errMsg,
1502 >              "SimSetup Error. Unrecognized ensemble in case statement.\n");
1503 >      painCave.isFatal = 1;
1504 >      simError();
1505      }
1506    }
1507   }
# Line 1556 | Line 1529 | void SimSetup::initFortran(void){
1529   #endif // is_mpi
1530   }
1531  
1532 < void SimSetup::setupZConstraint(SimInfo& theInfo){
1533 <  int nZConstraints;
1534 <  ZconStamp** zconStamp;
1532 > // void SimSetup::setupZConstraint(SimInfo& theInfo){
1533 > //   int nZConstraints;
1534 > //   ZconStamp** zconStamp;
1535  
1536 <  if (globals->haveZconstraintTime()){
1537 <    //add sample time of z-constraint  into SimInfo's property list                    
1538 <    DoubleData* zconsTimeProp = new DoubleData();
1539 <    zconsTimeProp->setID(ZCONSTIME_ID);
1540 <    zconsTimeProp->setData(globals->getZconsTime());
1541 <    theInfo.addProperty(zconsTimeProp);
1542 <  }
1543 <  else{
1544 <    sprintf(painCave.errMsg,
1545 <            "ZConstraint error: If you use an ZConstraint\n"
1546 <            " , you must set sample time.\n");
1547 <    painCave.isFatal = 1;
1548 <    simError();
1549 <  }
1536 > //   if (globals->haveZconstraintTime()){
1537 > //     //add sample time of z-constraint  into SimInfo's property list                    
1538 > //     DoubleData* zconsTimeProp = new DoubleData();
1539 > //     zconsTimeProp->setID(ZCONSTIME_ID);
1540 > //     zconsTimeProp->setData(globals->getZconsTime());
1541 > //     theInfo.addProperty(zconsTimeProp);
1542 > //   }
1543 > //   else{
1544 > //     sprintf(painCave.errMsg,
1545 > //             "ZConstraint error: If you use an ZConstraint\n"
1546 > //             " , you must set sample time.\n");
1547 > //     painCave.isFatal = 1;
1548 > //     simError();
1549 > //   }
1550  
1551 <  //push zconsTol into siminfo, if user does not specify
1552 <  //value for zconsTol, a default value will be used
1553 <  DoubleData* zconsTol = new DoubleData();
1554 <  zconsTol->setID(ZCONSTOL_ID);
1555 <  if (globals->haveZconsTol()){
1556 <    zconsTol->setData(globals->getZconsTol());
1557 <  }
1558 <  else{
1559 <    double defaultZConsTol = 0.01;
1560 <    sprintf(painCave.errMsg,
1561 <            "ZConstraint Waring: Tolerance for z-constraint methodl is not specified\n"
1562 <            " , default value %f is used.\n",
1563 <            defaultZConsTol);
1564 <    painCave.isFatal = 0;
1565 <    simError();      
1551 > //   //push zconsTol into siminfo, if user does not specify
1552 > //   //value for zconsTol, a default value will be used
1553 > //   DoubleData* zconsTol = new DoubleData();
1554 > //   zconsTol->setID(ZCONSTOL_ID);
1555 > //   if (globals->haveZconsTol()){
1556 > //     zconsTol->setData(globals->getZconsTol());
1557 > //   }
1558 > //   else{
1559 > //     double defaultZConsTol = 0.01;
1560 > //     sprintf(painCave.errMsg,
1561 > //             "ZConstraint Waring: Tolerance for z-constraint methodl is not specified\n"
1562 > //             " , default value %f is used.\n",
1563 > //             defaultZConsTol);
1564 > //     painCave.isFatal = 0;
1565 > //     simError();      
1566  
1567 <    zconsTol->setData(defaultZConsTol);
1568 <  }
1569 <  theInfo.addProperty(zconsTol);
1567 > //     zconsTol->setData(defaultZConsTol);
1568 > //   }
1569 > //   theInfo.addProperty(zconsTol);
1570  
1571 <  //set Force Subtraction Policy
1572 <  StringData* zconsForcePolicy = new StringData();
1573 <  zconsForcePolicy->setID(ZCONSFORCEPOLICY_ID);
1571 > //   //set Force Subtraction Policy
1572 > //   StringData* zconsForcePolicy = new StringData();
1573 > //   zconsForcePolicy->setID(ZCONSFORCEPOLICY_ID);
1574  
1575 <  if (globals->haveZconsForcePolicy()){
1576 <    zconsForcePolicy->setData(globals->getZconsForcePolicy());
1577 <  }
1578 <  else{
1579 <    sprintf(painCave.errMsg,
1580 <            "ZConstraint Warning: User does not set force Subtraction policy, "
1581 <            "PolicyByMass is used\n");
1582 <    painCave.isFatal = 0;
1583 <    simError();
1584 <    zconsForcePolicy->setData("BYMASS");
1585 <  }
1575 > //   if (globals->haveZconsForcePolicy()){
1576 > //     zconsForcePolicy->setData(globals->getZconsForcePolicy());
1577 > //   }
1578 > //   else{
1579 > //     sprintf(painCave.errMsg,
1580 > //             "ZConstraint Warning: User does not set force Subtraction policy, "
1581 > //             "PolicyByMass is used\n");
1582 > //     painCave.isFatal = 0;
1583 > //     simError();
1584 > //     zconsForcePolicy->setData("BYMASS");
1585 > //   }
1586  
1587 <  theInfo.addProperty(zconsForcePolicy);
1587 > //   theInfo.addProperty(zconsForcePolicy);
1588  
1589 <  //Determine the name of ouput file and add it into SimInfo's property list
1590 <  //Be careful, do not use inFileName, since it is a pointer which
1591 <  //point to a string at master node, and slave nodes do not contain that string
1589 > //   //Determine the name of ouput file and add it into SimInfo's property list
1590 > //   //Be careful, do not use inFileName, since it is a pointer which
1591 > //   //point to a string at master node, and slave nodes do not contain that string
1592  
1593 <  string zconsOutput(theInfo.finalName);
1593 > //   string zconsOutput(theInfo.finalName);
1594  
1595 <  zconsOutput = zconsOutput.substr(0, zconsOutput.rfind(".")) + ".fz";
1595 > //   zconsOutput = zconsOutput.substr(0, zconsOutput.rfind(".")) + ".fz";
1596  
1597 <  StringData* zconsFilename = new StringData();
1598 <  zconsFilename->setID(ZCONSFILENAME_ID);
1599 <  zconsFilename->setData(zconsOutput);
1597 > //   StringData* zconsFilename = new StringData();
1598 > //   zconsFilename->setID(ZCONSFILENAME_ID);
1599 > //   zconsFilename->setData(zconsOutput);
1600  
1601 <  theInfo.addProperty(zconsFilename);
1601 > //   theInfo.addProperty(zconsFilename);
1602  
1603 <  //setup index, pos and other parameters of z-constraint molecules
1604 <  nZConstraints = globals->getNzConstraints();
1605 <  theInfo.nZconstraints = nZConstraints;
1603 > //   //setup index, pos and other parameters of z-constraint molecules
1604 > //   nZConstraints = globals->getNzConstraints();
1605 > //   theInfo.nZconstraints = nZConstraints;
1606  
1607 <  zconStamp = globals->getZconStamp();
1608 <  ZConsParaItem tempParaItem;
1607 > //   zconStamp = globals->getZconStamp();
1608 > //   ZConsParaItem tempParaItem;
1609  
1610 <  ZConsParaData* zconsParaData = new ZConsParaData();
1611 <  zconsParaData->setID(ZCONSPARADATA_ID);
1610 > //   ZConsParaData* zconsParaData = new ZConsParaData();
1611 > //   zconsParaData->setID(ZCONSPARADATA_ID);
1612  
1613 <  for (int i = 0; i < nZConstraints; i++){
1614 <    tempParaItem.havingZPos = zconStamp[i]->haveZpos();
1615 <    tempParaItem.zPos = zconStamp[i]->getZpos();
1616 <    tempParaItem.zconsIndex = zconStamp[i]->getMolIndex();
1617 <    tempParaItem.kRatio = zconStamp[i]->getKratio();
1613 > //   for (int i = 0; i < nZConstraints; i++){
1614 > //     tempParaItem.havingZPos = zconStamp[i]->haveZpos();
1615 > //     tempParaItem.zPos = zconStamp[i]->getZpos();
1616 > //     tempParaItem.zconsIndex = zconStamp[i]->getMolIndex();
1617 > //     tempParaItem.kRatio = zconStamp[i]->getKratio();
1618  
1619 <    zconsParaData->addItem(tempParaItem);
1620 <  }
1619 > //     zconsParaData->addItem(tempParaItem);
1620 > //   }
1621  
1622 <  //check the uniqueness of index  
1623 <  if(!zconsParaData->isIndexUnique()){
1624 <    sprintf(painCave.errMsg,
1625 <            "ZConstraint Error: molIndex is not unique\n");
1626 <    painCave.isFatal = 1;
1627 <    simError();
1628 <  }
1622 > //   //check the uniqueness of index  
1623 > //   if(!zconsParaData->isIndexUnique()){
1624 > //     sprintf(painCave.errMsg,
1625 > //             "ZConstraint Error: molIndex is not unique\n");
1626 > //     painCave.isFatal = 1;
1627 > //     simError();
1628 > //   }
1629  
1630 <  //sort the parameters by index of molecules
1631 <  zconsParaData->sortByIndex();
1630 > //   //sort the parameters by index of molecules
1631 > //   zconsParaData->sortByIndex();
1632    
1633 <  //push data into siminfo, therefore, we can retrieve later
1634 <  theInfo.addProperty(zconsParaData);
1635 < }
1633 > //   //push data into siminfo, therefore, we can retrieve later
1634 > //   theInfo.addProperty(zconsParaData);
1635 > // }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines