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 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 1307 | 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()){
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 <        }
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;
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 NPTi_ENS:
1354 <        if (globals->haveZconstraints()){
1355 <          setupZConstraint(info[k]);
1356 <          myNPTi = new ZConstraint<NPTi<NPT <RealIntegrator> > >(&(info[k]), the_ff);
1357 <        }
1358 <        else
1359 <          myNPTi = new NPTi<NPT<RealIntegrator> >(&(info[k]), the_ff);
1409 >        std::cerr << "ZConstraint is temporarily disabled\n";
1410  
1411 <        myNPTi->setTargetTemp(globals->getTargetTemp());
1412 <
1413 <        if (globals->haveTargetPressure())
1414 <          myNPTi->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 <          myNPTi->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 <          myNPTi->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 = myNPTi;
1444 <        break;
1445 <
1446 <      case NPTf_ENS:
1447 <        if (globals->haveZconstraints()){
1448 <          setupZConstraint(info[k]);
1449 <          myNPTf = new ZConstraint<NPTf<NPT <RealIntegrator> > >(&(info[k]), the_ff);
1450 <        }
1451 <        else
1452 <          myNPTf = new NPTf<NPT <RealIntegrator> >(&(info[k]), the_ff);
1453 <
1454 <        myNPTf->setTargetTemp(globals->getTargetTemp());
1455 <
1456 <        if (globals->haveTargetPressure())
1457 <          myNPTf->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();
1414 <        }    
1415 <
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;
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 1513 | 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