--- trunk/mdtools/interface_implementation/bassDiag.cpp 2002/10/03 21:52:46 128 +++ trunk/mdtools/interface_implementation/bassDiag.cpp 2002/10/03 21:57:57 129 @@ -137,120 +137,129 @@ void bassDiag::dumpStamps(void){ } testMolecule = stamps->getMolecule("tester"); - sprintf(msg,"\nWriting out tester..... \n\n"); - dumpFormater(msg); - sprintf(msg,"Molecule{\n"); - dumpFormater(msg); - - sprintf(msg," ID = %s\n",testMolecule->getID()); - dumpFormater(msg); - - sprintf(msg," NAtoms = %d\n",testMolecule->getNAtoms()); - dumpFormater(msg); - - int nAtoms = testMolecule->getNAtoms(); - AtomStamp* aStamp; - for(int i=0; igetAtom(i); + sprintf(msg,"\nWriting out tester..... \n\n"); + dumpFormater(msg); - sprintf(msg," Atom[%d]{\n",i); + sprintf(msg,"Molecule{\n"); dumpFormater(msg); - - sprintf(msg," type = %s\n",aStamp->getType); + + sprintf(msg," ID = %s\n",testMolecule->getID()); dumpFormater(msg); - if(aStamp->havePosition()){ - sprintf(msg," position = < %lf, %lf, %lf>\n", - aStamp->getPosX(), - aStamp->getPosY(), - aStamp->getPosZ()); + sprintf(msg," NAtoms = %d\n",testMolecule->getNAtoms()); + dumpFormater(msg); + + int nAtoms = testMolecule->getNAtoms(); + AtomStamp* aStamp; + for(int i=0; igetAtom(i); + + sprintf(msg," Atom[%d]{\n",i); dumpFormater(msg); - } - - if(aStamp->haveOrientation()){ - sprintf(msg," orientation = < %lf, %lf, %lf>\n", - aStamp->getOrntX(), - aStamp->getOrntY(), - aStamp->getOrntZ()); + + sprintf(msg," type = %s\n",aStamp->getType); dumpFormater(msg); + + if(aStamp->havePosition()){ + sprintf(msg," position = < %lf, %lf, %lf>\n", + aStamp->getPosX(), + aStamp->getPosY(), + aStamp->getPosZ()); + dumpFormater(msg); + } + + if(aStamp->haveOrientation()){ + sprintf(msg," orientation = < %lf, %lf, %lf>\n", + aStamp->getOrntX(), + aStamp->getOrntY(), + aStamp->getOrntZ()); + dumpFormater(msg); + } + sprintf(msg," }\n\n"); + dumpFormater(msg); } - sprintf(msg," }\n\n"); - dumpFormater(msg); - } - - sprintf(msg," NBonds = %d\n",testMolecule->getNBonds()); - dumpFormater(msg); - - int nBonds = testMolecule->getNBonds(); - BondStamp* boStamp; - for(int i=0; igetBond(i); - - sprintf(msg," Bond[%d]{\n",i); + sprintf(msg," NBonds = %d\n",testMolecule->getNBonds()); dumpFormater(msg); - - sprintf(msg," members = %d, %d\n", - boStamp->getA(), - boStamp->getB()); - dumpFormater(msg); - sprintf(msg," }\n\n"); - dumpFormater(msg); - } - - sprintf(msg," NBends = %d\n",testMolecule->getNBends()); - dumpFormater(msg); - - int nBends = testMolecule->getNBends(); - BendStamp* beStamp; - for(int i=0; igetBend(i); - - sprintf(msg," Bend[%d]{\n",i); - dumpFormater(msg); - - sprintf(msg," members = %d, %d, %d\n", - beStamp->getA(), - beStamp->getB(), - beStamp->getC()); - dumpFormater(msg); + int nBonds = testMolecule->getNBonds(); + BondStamp* boStamp; + for(int i=0; igetBond(i); + + sprintf(msg," Bond[%d]{\n",i); + dumpFormater(msg); + + sprintf(msg," members = %d, %d\n", + boStamp->getA(), + boStamp->getB()); + dumpFormater(msg); + + sprintf(msg," }\n\n"); + dumpFormater(msg); + } - sprintf(msg," }\n\n"); + sprintf(msg," NBends = %d\n",testMolecule->getNBends()); dumpFormater(msg); - } - - sprintf(msg," NTorsions = %d\n",testMolecule->getNTorsions()); - dumpFormater(msg); - - int nTorsions = testMolecule->getNTorsions(); - TorsionStamp* tStamp; - for(int i=0; igetTorsion(i); + int nBends = testMolecule->getNBends(); + BendStamp* beStamp; + for(int i=0; igetBend(i); + + sprintf(msg," Bend[%d]{\n",i); + dumpFormater(msg); + + sprintf(msg," members = %d, %d, %d\n", + beStamp->getA(), + beStamp->getB(), + beStamp->getC()); + dumpFormater(msg); + + sprintf(msg," }\n\n"); + dumpFormater(msg); + } - sprintf(msg," Torsion[%d]{\n",i); + sprintf(msg," NTorsions = %d\n",testMolecule->getNTorsions()); dumpFormater(msg); - - sprintf(msg," members = %d, %d, %d, %d\n", - tStamp->getA(), - tStamp->getB(), - tStamp->getC(), - tStamp->getD()); - dumpFormater(msg); - sprintf(msg," }\n\n"); + int nTorsions = testMolecule->getNTorsions(); + TorsionStamp* tStamp; + for(int i=0; igetTorsion(i); + + sprintf(msg," Torsion[%d]{\n",i); + dumpFormater(msg); + + sprintf(msg," members = %d, %d, %d, %d\n", + tStamp->getA(), + tStamp->getB(), + tStamp->getC(), + tStamp->getD()); + dumpFormater(msg); + + sprintf(msg," }\n\n"); + dumpFormater(msg); + } + + sprintf(msg,"}\n\n"); dumpFormater(msg); + } - - sprintf(msg,"}\n\n"); - dumpFormater(msg); + else{ + sprintf(msg, "\n**************** Tester.mdl not included *************\n"); + dumpFormatter( msg ); + } } - + void bassDiag::dumpFormater(char * theString){ std::cout << theString;