--- trunk/OOPSE/libmdtools/DumpReader.cpp 2003/10/28 16:03:37 829 +++ trunk/OOPSE/libmdtools/DumpReader.cpp 2003/10/31 18:28:52 847 @@ -686,6 +686,8 @@ char* DumpReader::parseCommentLine(char* readLine, dou char *foo; // the pointer to the current string token int j; + double chi, integralOfChidt; + double eta[9]; // set the string tokenizer @@ -785,7 +787,61 @@ char* DumpReader::parseCommentLine(char* readLine, dou } boxMat[8] = atof( foo ); + return NULL; + + //get chi and integralOfChidt, they should appear by pair + foo = strtok(NULL, " ,;\t\n"); + if(foo != NULL){ + chi = atof(foo); + + foo = strtok(NULL, " ,;\t\n"); + if(foo == NULL){ + sprintf( painCave.errMsg, + "chi and integralOfChidt should appear by pair in %s\n", inName ); + return strdup( painCave.errMsg ); + } + integralOfChidt = atof( foo ); + + //push chi and integralOfChidt into SimInfo::properties which can be + //retrieved by integrator later + DoubleData* chiValue = new DoubleData(); + chiValue->setID(CHIVALUE_ID); + chiValue->setData(chi); + simnfo->addProperty(chiValue); + + DoubleData* integralOfChidtValue = new DoubleData(); + integralOfChidtValue->setID(INTEGRALOFCHIDT_ID); + integralOfChidtValue->setData(integralOfChidt); + simnfo->addProperty(integralOfChidtValue); + + } + else + return NULL; + + //get eta + for(int i = 0 ; i < 9; i++){ + foo = strtok(NULL, " ,;\t"); + if(foo == NULL){ + sprintf( painCave.errMsg, + "error in reading eta[%d] from %s\n", i, inName ); + return strdup( painCave.errMsg ); + } + eta[i] = atof( foo ); + } + + //push eta into SimInfo::properties which can be + //retrieved by integrator later + //simnfo->setBoxM( theBoxMat3 ); + DoubleArrayData* etaValue = new DoubleArrayData(); + etaValue->setID(ETAVALUE_ID); + etaValue->setData(eta, 9); + simnfo->addProperty(etaValue); + + return NULL; + + + }