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

Comparing branches/new-templateless/OOPSE/libmdtools/SimSetup.cpp (file contents):
Revision 848, Fri Oct 31 18:28:53 2003 UTC vs.
Revision 850 by mmeineke, Mon Nov 3 22:07:17 2003 UTC

# Line 4 | Line 4
4   #include <math.h>
5   #include <string>
6   #include <sprng.h>
7 +
8   #include "SimSetup.hpp"
9   #include "ReadWrite.hpp"
10   #include "parse_me.h"
# Line 1307 | Line 1308 | void SimSetup::makeIntegrator(void){
1308   void SimSetup::makeIntegrator(void){
1309    int k;
1310  
1311 <  NVE<RealIntegrator>* myNVE = NULL;
1312 <  NVT<RealIntegrator>* myNVT = NULL;
1313 <  NPTi<NPT<RealIntegrator> >* myNPTi = NULL;
1314 <  NPTf<NPT<RealIntegrator> >* myNPTf = NULL;
1315 <  NPTxyz<NPT<RealIntegrator> >* myNPTxyz = NULL;
1311 >  NVE* myNVE = NULL;
1312 >  NVT* myNVT = NULL;
1313 >  NPTi* myNPTi = NULL;
1314 >  NPTf* myNPTf = NULL;
1315 >  NPTxyz* myNPTxyz = NULL;
1316    
1317    for (k = 0; k < nInfo; k++){
1318      switch (ensembleCase){
1319 <      case NVE_ENS:
1320 <        if (globals->haveZconstraints()){
1320 <          setupZConstraint(info[k]);
1321 <          myNVE = new ZConstraint<NVE<RealIntegrator> >(&(info[k]), the_ff);
1322 <        }
1323 <        else{
1324 <          myNVE = new NVE<RealIntegrator>(&(info[k]), the_ff);
1325 <        }
1319 >    case NVE_ENS:
1320 >      if (globals->haveZconstraints()){
1321          
1322 <        info->the_integrator = myNVE;
1323 <        break;
1324 <
1325 <      case NVT_ENS:
1326 <        if (globals->haveZconstraints()){
1327 <          setupZConstraint(info[k]);
1328 <          myNVT = new ZConstraint<NVT<RealIntegrator> >(&(info[k]), the_ff);
1329 <        }
1330 <        else
1331 <          myNVT = new NVT<RealIntegrator>(&(info[k]), the_ff);
1332 <
1333 <        myNVT->setTargetTemp(globals->getTargetTemp());
1334 <
1335 <        if (globals->haveTauThermostat())
1336 <          myNVT->setTauThermostat(globals->getTauThermostat());
1337 <        else{
1338 <          sprintf(painCave.errMsg,
1339 <                  "SimSetup error: If you use the NVT\n"
1340 <                  "    ensemble, you must set tauThermostat.\n");
1341 <          painCave.isFatal = 1;
1342 <          simError();
1343 <        }
1344 <
1345 <        info->the_integrator = myNVT;
1346 <        break;
1347 <
1348 <      case NPTi_ENS:
1349 <        if (globals->haveZconstraints()){
1350 <          setupZConstraint(info[k]);
1351 <          myNPTi = new ZConstraint<NPTi<NPT <RealIntegrator> > >(&(info[k]), the_ff);
1352 <        }
1353 <        else
1354 <          myNPTi = new NPTi<NPT<RealIntegrator> >(&(info[k]), the_ff);
1322 >        std::cerr << "ZConstraint is temporarily disabled\n";
1323 >        
1324 >        //      setupZConstraint(info[k]);
1325 >        //      myNVE = new ZConstraint<NVE<RealIntegrator> >(&(info[k]), the_ff);
1326 >      }
1327 >      
1328 >      //       else{
1329 >      myNVE = new NVE(&(info[k]), the_ff);
1330 >      //       }
1331 >      
1332 >      info->the_integrator = myNVE;
1333 >      break;
1334 >      
1335 >    case NVT_ENS:
1336 >      if (globals->haveZconstraints()){
1337 >        
1338 >        std::cerr << "ZConstraint is temporarily disabled\n";
1339 >        
1340 >        //      setupZConstraint(info[k]);
1341 >        //      myNVT = new ZConstraint<NVT<RealIntegrator> >(&(info[k]), the_ff);
1342 >      }
1343 >      // else
1344 >      myNVT = new NVT(&(info[k]), the_ff);
1345 >      
1346 >      myNVT->setTargetTemp(globals->getTargetTemp());
1347 >      
1348 >      if (globals->haveTauThermostat())
1349 >        myNVT->setTauThermostat(globals->getTauThermostat());
1350 >      else{
1351 >        sprintf(painCave.errMsg,
1352 >                "SimSetup error: If you use the NVT\n"
1353 >                "    ensemble, you must set tauThermostat.\n");
1354 >        painCave.isFatal = 1;
1355 >        simError();
1356 >      }
1357 >      
1358 >      info->the_integrator = myNVT;
1359 >      break;
1360 >      
1361 >    case NPTi_ENS:
1362 >      if (globals->haveZconstraints()){
1363 >        
1364 >        std::cerr << "ZConstraint is temporarily disabled\n";
1365 >        
1366 >        //        setupZConstraint(info[k]);
1367 >        //           myNPTi = new ZConstraint<NPTi<NPT <RealIntegrator> > >(&(info[k]), the_ff);
1368 >      }
1369 >      // else
1370 >      myNPTi = new NPTi(&(info[k]), the_ff);
1371 >      
1372 >      myNPTi->setTargetTemp(globals->getTargetTemp());
1373 >      
1374 >      if (globals->haveTargetPressure())
1375 >        myNPTi->setTargetPressure(globals->getTargetPressure());
1376 >      else{
1377 >        sprintf(painCave.errMsg,
1378 >                "SimSetup error: If you use a constant pressure\n"
1379 >                "    ensemble, you must set targetPressure in the BASS file.\n");
1380 >        painCave.isFatal = 1;
1381 >        simError();
1382 >      }
1383 >      
1384 >      if (globals->haveTauThermostat())
1385 >        myNPTi->setTauThermostat(globals->getTauThermostat());
1386 >      else{
1387 >        sprintf(painCave.errMsg,
1388 >                "SimSetup error: If you use an NPT\n"
1389 >                "    ensemble, you must set tauThermostat.\n");
1390 >        painCave.isFatal = 1;
1391 >        simError();
1392 >      }
1393 >      
1394 >      if (globals->haveTauBarostat())
1395 >        myNPTi->setTauBarostat(globals->getTauBarostat());
1396 >      else{
1397 >        sprintf(painCave.errMsg,
1398 >                "SimSetup error: If you use an NPT\n"
1399 >                "    ensemble, you must set tauBarostat.\n");
1400 >        painCave.isFatal = 1;
1401 >        simError();
1402 >      }
1403 >      
1404 >      info->the_integrator = myNPTi;
1405 >      break;
1406 >      
1407 >    case NPTf_ENS:
1408 >      if (globals->haveZconstraints()){
1409  
1410 <        myNPTi->setTargetTemp(globals->getTargetTemp());
1410 >        std::cerr << "ZConstraint is temporarily disabled\n";
1411  
1412 <        if (globals->haveTargetPressure())
1413 <          myNPTi->setTargetPressure(globals->getTargetPressure());
1414 <        else{
1415 <          sprintf(painCave.errMsg,
1416 <                  "SimSetup error: If you use a constant pressure\n"
1417 <                  "    ensemble, you must set targetPressure in the BASS file.\n");
1418 <          painCave.isFatal = 1;
1419 <          simError();
1420 <        }
1421 <
1422 <        if (globals->haveTauThermostat())
1423 <          myNPTi->setTauThermostat(globals->getTauThermostat());
1424 <        else{
1425 <          sprintf(painCave.errMsg,
1426 <                  "SimSetup error: If you use an NPT\n"
1427 <                  "    ensemble, you must set tauThermostat.\n");
1428 <          painCave.isFatal = 1;
1429 <          simError();
1430 <        }
1431 <
1432 <        if (globals->haveTauBarostat())
1433 <          myNPTi->setTauBarostat(globals->getTauBarostat());
1434 <        else{
1435 <          sprintf(painCave.errMsg,
1436 <                  "SimSetup error: If you use an NPT\n"
1437 <                  "    ensemble, you must set tauBarostat.\n");
1438 <          painCave.isFatal = 1;
1439 <          simError();
1440 <        }
1441 <
1442 <        info->the_integrator = myNPTi;
1443 <        break;
1444 <
1445 <      case NPTf_ENS:
1446 <        if (globals->haveZconstraints()){
1447 <          setupZConstraint(info[k]);
1448 <          myNPTf = new ZConstraint<NPTf<NPT <RealIntegrator> > >(&(info[k]), the_ff);
1449 <        }
1450 <        else
1451 <          myNPTf = new NPTf<NPT <RealIntegrator> >(&(info[k]), the_ff);
1452 <
1453 <        myNPTf->setTargetTemp(globals->getTargetTemp());
1454 <
1455 <        if (globals->haveTargetPressure())
1456 <          myNPTf->setTargetPressure(globals->getTargetPressure());
1457 <        else{
1458 <          sprintf(painCave.errMsg,
1459 <                  "SimSetup error: If you use a constant pressure\n"
1460 <                  "    ensemble, you must set targetPressure in the BASS file.\n");
1461 <          painCave.isFatal = 1;
1462 <          simError();
1463 <        }    
1464 <
1416 <        if (globals->haveTauThermostat())
1417 <          myNPTf->setTauThermostat(globals->getTauThermostat());
1418 <
1419 <        else{
1420 <          sprintf(painCave.errMsg,
1421 <                  "SimSetup error: If you use an NPT\n"
1422 <                  "    ensemble, you must set tauThermostat.\n");
1423 <          painCave.isFatal = 1;
1424 <          simError();
1425 <        }
1426 <
1427 <        if (globals->haveTauBarostat())
1428 <          myNPTf->setTauBarostat(globals->getTauBarostat());
1429 <
1430 <        else{
1431 <          sprintf(painCave.errMsg,
1432 <                  "SimSetup error: If you use an NPT\n"
1433 <                  "    ensemble, you must set tauBarostat.\n");
1434 <          painCave.isFatal = 1;
1435 <          simError();
1436 <        }
1437 <
1438 <        info->the_integrator = myNPTf;
1439 <        break;
1440 <
1441 <      case NPTxyz_ENS:
1442 <        if (globals->haveZconstraints()){
1443 <          setupZConstraint(info[k]);
1444 <          myNPTxyz = new ZConstraint<NPTxyz<NPT <RealIntegrator> > >(&(info[k]), the_ff);
1445 <        }
1446 <        else
1447 <          myNPTxyz = new NPTxyz<NPT <RealIntegrator> >(&(info[k]), the_ff);
1448 <
1449 <        myNPTxyz->setTargetTemp(globals->getTargetTemp());
1450 <
1451 <        if (globals->haveTargetPressure())
1452 <          myNPTxyz->setTargetPressure(globals->getTargetPressure());
1453 <        else{
1454 <          sprintf(painCave.errMsg,
1455 <                  "SimSetup error: If you use a constant pressure\n"
1456 <                  "    ensemble, you must set targetPressure in the BASS file.\n");
1457 <          painCave.isFatal = 1;
1458 <          simError();
1459 <        }    
1460 <
1461 <        if (globals->haveTauThermostat())
1462 <          myNPTxyz->setTauThermostat(globals->getTauThermostat());
1463 <        else{
1464 <          sprintf(painCave.errMsg,
1465 <                  "SimSetup error: If you use an NPT\n"
1466 <                  "    ensemble, you must set tauThermostat.\n");
1467 <          painCave.isFatal = 1;
1468 <          simError();
1469 <        }
1470 <
1471 <        if (globals->haveTauBarostat())
1472 <          myNPTxyz->setTauBarostat(globals->getTauBarostat());
1473 <        else{
1474 <          sprintf(painCave.errMsg,
1475 <                  "SimSetup error: If you use an NPT\n"
1476 <                  "    ensemble, you must set tauBarostat.\n");
1477 <          painCave.isFatal = 1;
1478 <          simError();
1479 <        }
1480 <
1481 <        info->the_integrator = myNPTxyz;
1482 <        break;
1412 > //      setupZConstraint(info[k]);
1413 > //      myNPTf = new ZConstraint<NPTf<NPT <RealIntegrator> > >(&(info[k]), the_ff);
1414 >      }
1415 > //       else
1416 >      myNPTf = new NPTf(&(info[k]), the_ff);
1417 >      
1418 >      myNPTf->setTargetTemp(globals->getTargetTemp());
1419 >      
1420 >      if (globals->haveTargetPressure())
1421 >        myNPTf->setTargetPressure(globals->getTargetPressure());
1422 >      else{
1423 >        sprintf(painCave.errMsg,
1424 >                "SimSetup error: If you use a constant pressure\n"
1425 >                "    ensemble, you must set targetPressure in the BASS file.\n");
1426 >        painCave.isFatal = 1;
1427 >        simError();
1428 >      }    
1429 >      
1430 >      if (globals->haveTauThermostat())
1431 >        myNPTf->setTauThermostat(globals->getTauThermostat());
1432 >      
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 >        myNPTf->setTauBarostat(globals->getTauBarostat());
1443 >      
1444 >      else{
1445 >        sprintf(painCave.errMsg,
1446 >                "SimSetup error: If you use an NPT\n"
1447 >                "    ensemble, you must set tauBarostat.\n");
1448 >        painCave.isFatal = 1;
1449 >        simError();
1450 >      }
1451 >      
1452 >      info->the_integrator = myNPTf;
1453 >      break;
1454 >      
1455 >    case NPTxyz_ENS:
1456 >      if (globals->haveZconstraints()){
1457 >        
1458 >        std::cerr << "ZConstraint is temporarily disabled\n";
1459 >        
1460 >        //      setupZConstraint(info[k]);
1461 >        //      myNPTxyz = new ZConstraint<NPTxyz<NPT <RealIntegrator> > >(&(info[k]), the_ff);
1462 >      }
1463 > //       else
1464 >      myNPTxyz = new NPTxyz(&(info[k]), the_ff);
1465  
1466 <      default:
1467 <        sprintf(painCave.errMsg,
1468 <                "SimSetup Error. Unrecognized ensemble in case statement.\n");
1469 <        painCave.isFatal = 1;
1470 <        simError();
1466 >      myNPTxyz->setTargetTemp(globals->getTargetTemp());
1467 >      
1468 >      if (globals->haveTargetPressure())
1469 >        myNPTxyz->setTargetPressure(globals->getTargetPressure());
1470 >      else{
1471 >        sprintf(painCave.errMsg,
1472 >                "SimSetup error: If you use a constant pressure\n"
1473 >                "    ensemble, you must set targetPressure in the BASS file.\n");
1474 >        painCave.isFatal = 1;
1475 >        simError();
1476 >      }    
1477 >      
1478 >      if (globals->haveTauThermostat())
1479 >        myNPTxyz->setTauThermostat(globals->getTauThermostat());
1480 >      else{
1481 >        sprintf(painCave.errMsg,
1482 >                "SimSetup error: If you use an NPT\n"
1483 >                "    ensemble, you must set tauThermostat.\n");
1484 >        painCave.isFatal = 1;
1485 >        simError();
1486 >      }
1487 >      
1488 >      if (globals->haveTauBarostat())
1489 >        myNPTxyz->setTauBarostat(globals->getTauBarostat());
1490 >      else{
1491 >        sprintf(painCave.errMsg,
1492 >                "SimSetup error: If you use an NPT\n"
1493 >                "    ensemble, you must set tauBarostat.\n");
1494 >        painCave.isFatal = 1;
1495 >        simError();
1496 >      }
1497 >      
1498 >      info->the_integrator = myNPTxyz;
1499 >      break;
1500 >      
1501 >    default:
1502 >      sprintf(painCave.errMsg,
1503 >              "SimSetup Error. Unrecognized ensemble in case statement.\n");
1504 >      painCave.isFatal = 1;
1505 >      simError();
1506      }
1507    }
1508   }
# Line 1513 | Line 1530 | void SimSetup::initFortran(void){
1530   #endif // is_mpi
1531   }
1532  
1533 < void SimSetup::setupZConstraint(SimInfo& theInfo){
1534 <  int nZConstraints;
1535 <  ZconStamp** zconStamp;
1533 > // void SimSetup::setupZConstraint(SimInfo& theInfo){
1534 > //   int nZConstraints;
1535 > //   ZconStamp** zconStamp;
1536  
1537 <  if (globals->haveZconstraintTime()){
1538 <    //add sample time of z-constraint  into SimInfo's property list                    
1539 <    DoubleData* zconsTimeProp = new DoubleData();
1540 <    zconsTimeProp->setID(ZCONSTIME_ID);
1541 <    zconsTimeProp->setData(globals->getZconsTime());
1542 <    theInfo.addProperty(zconsTimeProp);
1543 <  }
1544 <  else{
1545 <    sprintf(painCave.errMsg,
1546 <            "ZConstraint error: If you use an ZConstraint\n"
1547 <            " , you must set sample time.\n");
1548 <    painCave.isFatal = 1;
1549 <    simError();
1550 <  }
1537 > //   if (globals->haveZconstraintTime()){
1538 > //     //add sample time of z-constraint  into SimInfo's property list                    
1539 > //     DoubleData* zconsTimeProp = new DoubleData();
1540 > //     zconsTimeProp->setID(ZCONSTIME_ID);
1541 > //     zconsTimeProp->setData(globals->getZconsTime());
1542 > //     theInfo.addProperty(zconsTimeProp);
1543 > //   }
1544 > //   else{
1545 > //     sprintf(painCave.errMsg,
1546 > //             "ZConstraint error: If you use an ZConstraint\n"
1547 > //             " , you must set sample time.\n");
1548 > //     painCave.isFatal = 1;
1549 > //     simError();
1550 > //   }
1551  
1552 <  //push zconsTol into siminfo, if user does not specify
1553 <  //value for zconsTol, a default value will be used
1554 <  DoubleData* zconsTol = new DoubleData();
1555 <  zconsTol->setID(ZCONSTOL_ID);
1556 <  if (globals->haveZconsTol()){
1557 <    zconsTol->setData(globals->getZconsTol());
1558 <  }
1559 <  else{
1560 <    double defaultZConsTol = 0.01;
1561 <    sprintf(painCave.errMsg,
1562 <            "ZConstraint Waring: Tolerance for z-constraint methodl is not specified\n"
1563 <            " , default value %f is used.\n",
1564 <            defaultZConsTol);
1565 <    painCave.isFatal = 0;
1566 <    simError();      
1552 > //   //push zconsTol into siminfo, if user does not specify
1553 > //   //value for zconsTol, a default value will be used
1554 > //   DoubleData* zconsTol = new DoubleData();
1555 > //   zconsTol->setID(ZCONSTOL_ID);
1556 > //   if (globals->haveZconsTol()){
1557 > //     zconsTol->setData(globals->getZconsTol());
1558 > //   }
1559 > //   else{
1560 > //     double defaultZConsTol = 0.01;
1561 > //     sprintf(painCave.errMsg,
1562 > //             "ZConstraint Waring: Tolerance for z-constraint methodl is not specified\n"
1563 > //             " , default value %f is used.\n",
1564 > //             defaultZConsTol);
1565 > //     painCave.isFatal = 0;
1566 > //     simError();      
1567  
1568 <    zconsTol->setData(defaultZConsTol);
1569 <  }
1570 <  theInfo.addProperty(zconsTol);
1568 > //     zconsTol->setData(defaultZConsTol);
1569 > //   }
1570 > //   theInfo.addProperty(zconsTol);
1571  
1572 <  //set Force Subtraction Policy
1573 <  StringData* zconsForcePolicy = new StringData();
1574 <  zconsForcePolicy->setID(ZCONSFORCEPOLICY_ID);
1572 > //   //set Force Subtraction Policy
1573 > //   StringData* zconsForcePolicy = new StringData();
1574 > //   zconsForcePolicy->setID(ZCONSFORCEPOLICY_ID);
1575  
1576 <  if (globals->haveZconsForcePolicy()){
1577 <    zconsForcePolicy->setData(globals->getZconsForcePolicy());
1578 <  }
1579 <  else{
1580 <    sprintf(painCave.errMsg,
1581 <            "ZConstraint Warning: User does not set force Subtraction policy, "
1582 <            "PolicyByMass is used\n");
1583 <    painCave.isFatal = 0;
1584 <    simError();
1585 <    zconsForcePolicy->setData("BYMASS");
1586 <  }
1576 > //   if (globals->haveZconsForcePolicy()){
1577 > //     zconsForcePolicy->setData(globals->getZconsForcePolicy());
1578 > //   }
1579 > //   else{
1580 > //     sprintf(painCave.errMsg,
1581 > //             "ZConstraint Warning: User does not set force Subtraction policy, "
1582 > //             "PolicyByMass is used\n");
1583 > //     painCave.isFatal = 0;
1584 > //     simError();
1585 > //     zconsForcePolicy->setData("BYMASS");
1586 > //   }
1587  
1588 <  theInfo.addProperty(zconsForcePolicy);
1588 > //   theInfo.addProperty(zconsForcePolicy);
1589  
1590 <  //Determine the name of ouput file and add it into SimInfo's property list
1591 <  //Be careful, do not use inFileName, since it is a pointer which
1592 <  //point to a string at master node, and slave nodes do not contain that string
1590 > //   //Determine the name of ouput file and add it into SimInfo's property list
1591 > //   //Be careful, do not use inFileName, since it is a pointer which
1592 > //   //point to a string at master node, and slave nodes do not contain that string
1593  
1594 <  string zconsOutput(theInfo.finalName);
1594 > //   string zconsOutput(theInfo.finalName);
1595  
1596 <  zconsOutput = zconsOutput.substr(0, zconsOutput.rfind(".")) + ".fz";
1596 > //   zconsOutput = zconsOutput.substr(0, zconsOutput.rfind(".")) + ".fz";
1597  
1598 <  StringData* zconsFilename = new StringData();
1599 <  zconsFilename->setID(ZCONSFILENAME_ID);
1600 <  zconsFilename->setData(zconsOutput);
1598 > //   StringData* zconsFilename = new StringData();
1599 > //   zconsFilename->setID(ZCONSFILENAME_ID);
1600 > //   zconsFilename->setData(zconsOutput);
1601  
1602 <  theInfo.addProperty(zconsFilename);
1602 > //   theInfo.addProperty(zconsFilename);
1603  
1604 <  //setup index, pos and other parameters of z-constraint molecules
1605 <  nZConstraints = globals->getNzConstraints();
1606 <  theInfo.nZconstraints = nZConstraints;
1604 > //   //setup index, pos and other parameters of z-constraint molecules
1605 > //   nZConstraints = globals->getNzConstraints();
1606 > //   theInfo.nZconstraints = nZConstraints;
1607  
1608 <  zconStamp = globals->getZconStamp();
1609 <  ZConsParaItem tempParaItem;
1608 > //   zconStamp = globals->getZconStamp();
1609 > //   ZConsParaItem tempParaItem;
1610  
1611 <  ZConsParaData* zconsParaData = new ZConsParaData();
1612 <  zconsParaData->setID(ZCONSPARADATA_ID);
1611 > //   ZConsParaData* zconsParaData = new ZConsParaData();
1612 > //   zconsParaData->setID(ZCONSPARADATA_ID);
1613  
1614 <  for (int i = 0; i < nZConstraints; i++){
1615 <    tempParaItem.havingZPos = zconStamp[i]->haveZpos();
1616 <    tempParaItem.zPos = zconStamp[i]->getZpos();
1617 <    tempParaItem.zconsIndex = zconStamp[i]->getMolIndex();
1618 <    tempParaItem.kRatio = zconStamp[i]->getKratio();
1614 > //   for (int i = 0; i < nZConstraints; i++){
1615 > //     tempParaItem.havingZPos = zconStamp[i]->haveZpos();
1616 > //     tempParaItem.zPos = zconStamp[i]->getZpos();
1617 > //     tempParaItem.zconsIndex = zconStamp[i]->getMolIndex();
1618 > //     tempParaItem.kRatio = zconStamp[i]->getKratio();
1619  
1620 <    zconsParaData->addItem(tempParaItem);
1621 <  }
1620 > //     zconsParaData->addItem(tempParaItem);
1621 > //   }
1622  
1623 <  //check the uniqueness of index  
1624 <  if(!zconsParaData->isIndexUnique()){
1625 <    sprintf(painCave.errMsg,
1626 <            "ZConstraint Error: molIndex is not unique\n");
1627 <    painCave.isFatal = 1;
1628 <    simError();
1629 <  }
1623 > //   //check the uniqueness of index  
1624 > //   if(!zconsParaData->isIndexUnique()){
1625 > //     sprintf(painCave.errMsg,
1626 > //             "ZConstraint Error: molIndex is not unique\n");
1627 > //     painCave.isFatal = 1;
1628 > //     simError();
1629 > //   }
1630  
1631 <  //sort the parameters by index of molecules
1632 <  zconsParaData->sortByIndex();
1631 > //   //sort the parameters by index of molecules
1632 > //   zconsParaData->sortByIndex();
1633    
1634 <  //push data into siminfo, therefore, we can retrieve later
1635 <  theInfo.addProperty(zconsParaData);
1636 < }
1634 > //   //push data into siminfo, therefore, we can retrieve later
1635 > //   theInfo.addProperty(zconsParaData);
1636 > // }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines