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 841 by mmeineke, Wed Oct 29 17:55:28 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 853 | Line 853 | void SimSetup::finalInfoCheck(void){
853          info[i].setDefaultEcr(theEcr, theEst);
854        }
855      }
856 +    info[i].checkCutOffs();
857    }
858  
859   #ifdef IS_MPI
# Line 1306 | 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()){
1319 <          setupZConstraint(info[k]);
1320 <          myNVE = new ZConstraint<NVE<RealIntegrator> >(&(info[k]), the_ff);
1321 <        }
1322 <        else{
1323 <          myNVE = new NVE<RealIntegrator>(&(info[k]), the_ff);
1324 <        }
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 <        }
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 <        info->the_integrator = myNVT;
1350 <        break;
1409 >        std::cerr << "ZConstraint is temporarily disabled\n";
1410  
1411 <      case NPTi_ENS:
1412 <        if (globals->haveZconstraints()){
1413 <          setupZConstraint(info[k]);
1414 <          myNPTi = new ZConstraint<NPTi<NPT <RealIntegrator> > >(&(info[k]), the_ff);
1415 <        }
1416 <        else
1417 <          myNPTi = new NPTi<NPT<RealIntegrator> >(&(info[k]), the_ff);
1418 <
1419 <        myNPTi->setTargetTemp(globals->getTargetTemp());
1420 <
1421 <        if (globals->haveTargetPressure())
1422 <          myNPTi->setTargetPressure(globals->getTargetPressure());
1423 <        else{
1424 <          sprintf(painCave.errMsg,
1425 <                  "SimSetup error: If you use a constant pressure\n"
1426 <                  "    ensemble, you must set targetPressure in the BASS file.\n");
1427 <          painCave.isFatal = 1;
1428 <          simError();
1429 <        }
1430 <
1431 <        if (globals->haveTauThermostat())
1432 <          myNPTi->setTauThermostat(globals->getTauThermostat());
1433 <        else{
1434 <          sprintf(painCave.errMsg,
1435 <                  "SimSetup error: If you use an NPT\n"
1436 <                  "    ensemble, you must set tauThermostat.\n");
1437 <          painCave.isFatal = 1;
1438 <          simError();
1439 <        }
1440 <
1441 <        if (globals->haveTauBarostat())
1442 <          myNPTi->setTauBarostat(globals->getTauBarostat());
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 = myNPTi;
1452 <        break;
1453 <
1454 <      case NPTf_ENS:
1455 <        if (globals->haveZconstraints()){
1456 <          setupZConstraint(info[k]);
1457 <          myNPTf = new ZConstraint<NPTf<NPT <RealIntegrator> > >(&(info[k]), the_ff);
1458 <        }
1459 <        else
1460 <          myNPTf = new NPTf<NPT <RealIntegrator> >(&(info[k]), the_ff);
1461 <
1462 <        myNPTf->setTargetTemp(globals->getTargetTemp());
1463 <
1405 <        if (globals->haveTargetPressure())
1406 <          myNPTf->setTargetPressure(globals->getTargetPressure());
1407 <        else{
1408 <          sprintf(painCave.errMsg,
1409 <                  "SimSetup error: If you use a constant pressure\n"
1410 <                  "    ensemble, you must set targetPressure in the BASS file.\n");
1411 <          painCave.isFatal = 1;
1412 <          simError();
1413 <        }    
1414 <
1415 <        if (globals->haveTauThermostat())
1416 <          myNPTf->setTauThermostat(globals->getTauThermostat());
1417 <        else{
1418 <          sprintf(painCave.errMsg,
1419 <                  "SimSetup error: If you use an NPT\n"
1420 <                  "    ensemble, you must set tauThermostat.\n");
1421 <          painCave.isFatal = 1;
1422 <          simError();
1423 <        }
1424 <
1425 <        if (globals->haveTauBarostat())
1426 <          myNPTf->setTauBarostat(globals->getTauBarostat());
1427 <        else{
1428 <          sprintf(painCave.errMsg,
1429 <                  "SimSetup error: If you use an NPT\n"
1430 <                  "    ensemble, you must set tauBarostat.\n");
1431 <          painCave.isFatal = 1;
1432 <          simError();
1433 <        }
1434 <
1435 <        info->the_integrator = myNPTf;
1436 <        break;
1437 <
1438 <      case NPTxyz_ENS:
1439 <        if (globals->haveZconstraints()){
1440 <          setupZConstraint(info[k]);
1441 <          myNPTxyz = new ZConstraint<NPTxyz<NPT <RealIntegrator> > >(&(info[k]), the_ff);
1442 <        }
1443 <        else
1444 <          myNPTxyz = new NPTxyz<NPT <RealIntegrator> >(&(info[k]), the_ff);
1445 <
1446 <        myNPTxyz->setTargetTemp(globals->getTargetTemp());
1447 <
1448 <        if (globals->haveTargetPressure())
1449 <          myNPTxyz->setTargetPressure(globals->getTargetPressure());
1450 <        else{
1451 <          sprintf(painCave.errMsg,
1452 <                  "SimSetup error: If you use a constant pressure\n"
1453 <                  "    ensemble, you must set targetPressure in the BASS file.\n");
1454 <          painCave.isFatal = 1;
1455 <          simError();
1456 <        }    
1457 <
1458 <        if (globals->haveTauThermostat())
1459 <          myNPTxyz->setTauThermostat(globals->getTauThermostat());
1460 <        else{
1461 <          sprintf(painCave.errMsg,
1462 <                  "SimSetup error: If you use an NPT\n"
1463 <                  "    ensemble, you must set tauThermostat.\n");
1464 <          painCave.isFatal = 1;
1465 <          simError();
1466 <        }
1467 <
1468 <        if (globals->haveTauBarostat())
1469 <          myNPTxyz->setTauBarostat(globals->getTauBarostat());
1470 <        else{
1471 <          sprintf(painCave.errMsg,
1472 <                  "SimSetup error: If you use an NPT\n"
1473 <                  "    ensemble, you must set tauBarostat.\n");
1474 <          painCave.isFatal = 1;
1475 <          simError();
1476 <        }
1477 <
1478 <        info->the_integrator = myNPTxyz;
1479 <        break;
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 <      default:
1466 <        sprintf(painCave.errMsg,
1467 <                "SimSetup Error. Unrecognized ensemble in case statement.\n");
1468 <        painCave.isFatal = 1;
1469 <        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 1510 | 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