--- trunk/mdtools/interface_implementation/bassDiag.cpp 2002/10/03 21:52:46 128 +++ trunk/mdtools/interface_implementation/bassDiag.cpp 2003/01/27 21:28:19 249 @@ -2,6 +2,7 @@ #include #include #include + #include "bassDiag.hpp" void bassDiag::dumpStamps(void){ @@ -108,7 +109,7 @@ void bassDiag::dumpStamps(void){ } if (globals->haveTempSet()){ - sprintf(msg,"TempSet = %lf\n",globals->getTempSet()); + sprintf(msg,"TempSet = %d\n",globals->getTempSet()); dumpFormater(msg); } @@ -116,7 +117,7 @@ void bassDiag::dumpStamps(void){ n_components = globals->getNComponents(); sprintf(msg,"\nWriting out %d components\n",n_components); dumpFormater(msg); - components = globals-getComponents(); + components = globals->getComponents(); for(int i=0; i < n_components ; i++){ @@ -126,7 +127,7 @@ void bassDiag::dumpStamps(void){ sprintf(msg," Type = %s\n",components[i]->getType()); dumpFormater(msg); - if (components[i]->haveNmol){ + if (components[i]->haveNMol()){ sprintf(msg," Nmol = %d\n",components[i]->getNMol()); dumpFormater(msg); @@ -136,121 +137,131 @@ void bassDiag::dumpStamps(void){ dumpFormater(msg); } - testMolecule = stamps->getMolecule("tester"); - sprintf(msg,"\nWriting out tester..... \n\n"); - dumpFormater(msg); + //testMolecule = stamps->getMolecule("tester"); + testMolecule = NULL; // fix me!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - 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"); + + sprintf(msg," NBonds = %d\n",testMolecule->getNBonds()); dumpFormater(msg); - } - - sprintf(msg," NBonds = %d\n",testMolecule->getNBonds()); - dumpFormater(msg); - - int nBonds = testMolecule->getNBonds(); - BondStamp* boStamp; - for(int i=0; igetBond(i); + 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," Bond[%d]{\n",i); + sprintf(msg," NBends = %d\n",testMolecule->getNBends()); 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; igetNBends(); + 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); + } - beStamp = testMolecule->getBend(i); - - sprintf(msg," Bend[%d]{\n",i); + sprintf(msg," NTorsions = %d\n",testMolecule->getNTorsions()); 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," NTorsions = %d\n",testMolecule->getNTorsions()); - dumpFormater(msg); - - int nTorsions = testMolecule->getNTorsions(); - TorsionStamp* tStamp; - for(int i=0; igetNTorsions(); + 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); + } - tStamp = testMolecule->getTorsion(i); - - sprintf(msg," Torsion[%d]{\n",i); + sprintf(msg,"}\n\n"); 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); + else{ + sprintf(msg, "\n**************** Tester.mdl not included *************\n"); + dumpFormater( msg ); + } } - + void bassDiag::dumpFormater(char * theString){ std::cout << theString;