Changes in src/Parser/PdbParser.cpp [4c1230:73916f]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/PdbParser.cpp
r4c1230 r73916f 46 46 PdbParser::PdbParser() { 47 47 knownTokens["ATOM"] = PdbKey::Atom; 48 knownTokens["HETATM"] = PdbKey::Atom; 48 49 knownTokens["TER"] = PdbKey::Filler; 49 50 knownTokens["END"] = PdbKey::EndOfFile; … … 51 52 knownTokens["REMARK"] = PdbKey::Remark; 52 53 knownTokens[""] = PdbKey::EndOfFile; 54 55 // argh, why can't just PdbKey::X+(size_t)i 56 PositionEnumMap[0] = PdbKey::X; 57 PositionEnumMap[1] = PdbKey::Y; 58 PositionEnumMap[2] = PdbKey::Z; 53 59 } 54 60 … … 99 105 size_t linecount = 0; 100 106 enum PdbKey::KnownTokens token; 107 108 // reset atomIdMap for this file (to correctly parse CONECT entries) 109 atomIdMap.clear(); 101 110 102 111 molecule *newmol = World::getInstance().createMolecule(); … … 136 145 137 146 /** 138 * Saves the World's current stateinto as a PDB file.147 * Saves the \a atoms into as a PDB file. 139 148 * 140 149 * \param file where to save the state 141 */ 142 void PdbParser::save(ostream* file) { 150 * \param atoms atoms to store 151 */ 152 void PdbParser::save(ostream* file, const std::vector<atom *> &AtomList) 153 { 143 154 DoLog(0) && (Log() << Verbose(0) << "Saving changes to pdb." << std::endl); 144 145 155 { 146 156 // add initial remark … … 157 167 } 158 168 159 // we distribute new atom numbers, hence clear map beforehand169 // we distribute serials, hence clear map beforehand 160 170 atomIdMap.clear(); 161 171 { 162 vector<atom *> AtomList = World::getInstance().getAllAtoms(); 163 164 std::vector<int> elementNo(MAX_ELEMENTS,1); 172 std::map<size_t,size_t> MolIdMap; 173 size_t MolNo = 1; // residue number starts at 1 in pdb 174 for (vector<atom *>::const_iterator atomIt = AtomList.begin(); atomIt != AtomList.end(); atomIt++) { 175 const molecule *mol = (*atomIt)->getMolecule(); 176 if ((mol != NULL) && (MolIdMap.find(mol->getId()) == MolIdMap.end())) { 177 MolIdMap[mol->getId()] = MolNo++; 178 } 179 } 180 const size_t MaxMol = MolNo; 181 182 // have a count per element and per molecule (0 is for all homeless atoms) 183 std::vector<int> **elementNo = new std::vector<int>*[MaxMol]; 184 for (size_t i = 0; i < MaxMol; ++i) 185 elementNo[i] = new std::vector<int>(MAX_ELEMENTS,1); 165 186 char name[MAXSTRINGSIZE]; 187 std::string ResidueName; 166 188 167 189 // write ATOMs 168 190 int AtomNo = 1; // serial number starts at 1 in pdb 169 int MolNo = 1; // residue number starts at 1 in pdb 170 for (vector<atom *>::iterator atomIt = AtomList.begin(); atomIt != AtomList.end(); atomIt++) { 191 for (vector<atom *>::const_iterator atomIt = AtomList.begin(); atomIt != AtomList.end(); atomIt++) { 192 PdbAtomInfoContainer &atomInfo = getadditionalAtomData(*atomIt); 193 // gather info about residue 194 const molecule *mol = (*atomIt)->getMolecule(); 195 if (mol == NULL) { 196 MolNo = 0; 197 atomInfo.set(PdbKey::resSeq, "0"); 198 } else { 199 ASSERT(MolIdMap.find(mol->getId()) != MolIdMap.end(), 200 "PdbParser::save() - Mol id "+toString(mol->getId())+" not present despite we set it?!"); 201 MolNo = MolIdMap[mol->getId()]; 202 atomInfo.set(PdbKey::resSeq, toString(MolIdMap[mol->getId()])); 203 if (atomInfo.get<std::string>(PdbKey::resName) == "-") 204 atomInfo.set(PdbKey::resName, mol->getName().substr(0,3)); 205 } 206 // get info about atom 171 207 const size_t Z = (*atomIt)->getType()->getAtomicNumber(); 172 sprintf(name, "%2s%02d",(*atomIt)->getType()->getSymbol().c_str(), elementNo[Z]); 173 elementNo[Z] = (elementNo[Z]+1) % 100; // confine to two digits 174 const molecule *mol = (*atomIt)->getMolecule(); 175 if (mol == NULL) { // for homeless atoms, MolNo = -1 is reserved 176 MolNo = -1; 177 } else { 178 MolNo = mol->getId(); 208 if (atomInfo.get<std::string>(PdbKey::name) == "-") { // if no name set, give it a new name 209 sprintf(name, "%2s%02d",(*atomIt)->getType()->getSymbol().c_str(), (*elementNo[MolNo])[Z]); 210 (*elementNo[MolNo])[Z] = ((*elementNo[MolNo])[Z]+1) % 100; // confine to two digits 211 atomInfo.set(PdbKey::name, name); 179 212 } 180 saveLine(file, *atomIt, name, AtomNo, MolNo); 181 setAtomId((*atomIt)->getId(), AtomNo); 213 // set position 214 for (size_t i=0; i<NDIM;++i) { 215 stringstream position; 216 position << setw(8) << fixed << setprecision(3) << (*atomIt)->getPosition().at(i); 217 atomInfo.set(PositionEnumMap[i], position.str()); 218 } 219 // change element and charge if changed 220 if (atomInfo.get<std::string>(PdbKey::element) != (*atomIt)->getType()->getSymbol()) 221 atomInfo.set(PdbKey::element, (*atomIt)->getType()->getSymbol()); 222 setSerial((*atomIt)->getId(), AtomNo); 223 atomInfo.set(PdbKey::serial, toString(AtomNo)); 224 225 // finally save the line 226 saveLine(file, atomInfo); 182 227 AtomNo++; 183 228 } 229 for (size_t i = 0; i < MaxMol; ++i) 230 delete elementNo[i]; 231 delete elementNo; 184 232 185 233 // write CONECTs 186 for (vector<atom *>:: iterator atomIt = AtomList.begin(); atomIt != AtomList.end(); atomIt++) {234 for (vector<atom *>::const_iterator atomIt = AtomList.begin(); atomIt != AtomList.end(); atomIt++) { 187 235 writeNeighbors(file, 4, *atomIt); 188 236 } … … 193 241 } 194 242 243 /** Either returns reference to present entry or creates new with default values. 244 * 245 * @param _atom atom whose entry we desire 246 * @return 247 */ 248 PdbAtomInfoContainer& PdbParser::getadditionalAtomData(atom *_atom) 249 { 250 if (additionalAtomData.find(_atom->getId()) != additionalAtomData.end()) { 251 } else if (additionalAtomData.find(_atom->father->getId()) != additionalAtomData.end()) { 252 // use info from direct father 253 additionalAtomData[_atom->getId()] = additionalAtomData[_atom->father->getId()]; 254 } else if (additionalAtomData.find(_atom->GetTrueFather()->getId()) != additionalAtomData.end()) { 255 // use info from topmost father 256 additionalAtomData[_atom->getId()] = additionalAtomData[_atom->GetTrueFather()->getId()]; 257 } else { 258 // create new entry use default values if nothing else is known 259 additionalAtomData[_atom->getId()] = defaultAdditionalData; 260 } 261 return additionalAtomData[_atom->getId()]; 262 } 263 195 264 /** 196 265 * Writes one line of PDB-formatted data to the provided stream. … … 198 267 * \param stream where to write the line to 199 268 * \param *currentAtom the atom of which information should be written 269 * \param AtomNo serial number of atom 200 270 * \param *name name of atom, i.e. H01 201 * \param AtomNo serial number of atom271 * \param ResidueName Name of molecule 202 272 * \param ResidueNo number of residue 203 273 */ 204 void PdbParser::saveLine(ostream* file, const atom* currentAtom, const char *name, const int AtomNo, const int ResidueNo) { 205 *file << "ATOM "; 206 *file << setw(6) << AtomNo; /* atom serial number */ 207 *file << setw(1) << " "; 208 *file << setfill(' ') << left << setw(4) << name << right; /* atom name */ 209 *file << setw(1) << " "; 210 *file << setfill(' ') << setw(3) << ((currentAtom->getMolecule() != NULL) ? currentAtom->getMolecule()->getName().substr(0,3) : "-"); /* residue name */ 211 *file << setw(1) << " "; 212 *file << setfill(' ') << setw(1) << (char)('a'+(unsigned char)(AtomNo % 26)); /* letter for chain */ 213 *file << setw(4) << ResidueNo; /* residue sequence number */ 214 *file << setw(4) << " "; 215 for (int i=0;i<NDIM;i++) { 216 *file << setw(8) << setprecision(3) << showpoint << currentAtom->at(i); /* positional coordinate in Angstroem */ 217 } 218 *file << setw(6) << setprecision(2) << showpoint << (double)currentAtom->getType()->getValence(); /* occupancy */ 219 *file << setw(6) << setprecision(2) << showpoint << (double)currentAtom->getType()->getNoValenceOrbitals(); /* temperature factor */ 220 *file << noshowpoint; 221 *file << setw(6) << " "; 222 *file << setw(4) << "0"; 223 *file << setfill(' ') << setw(2) << currentAtom->getType()->getSymbol(); 224 *file << setw(2) << "0"; 274 void PdbParser::saveLine( 275 ostream* file, 276 const PdbAtomInfoContainer &atomInfo) 277 { 278 *file << setfill(' ') << left << setw(6) 279 << atomInfo.get<std::string>(PdbKey::token); 280 *file << setfill(' ') << right << setw(5) 281 << atomInfo.get<int>(PdbKey::serial); /* atom serial number */ 282 *file << " "; /* char 12 is empty */ 283 *file << setfill(' ') << left << setw(4) 284 << atomInfo.get<std::string>(PdbKey::name); /* atom name */ 285 *file << setfill(' ') << left << setw(1) 286 << atomInfo.get<std::string>(PdbKey::altLoc); /* alternate location/conformation */ 287 *file << setfill(' ') << left << setw(3) 288 << atomInfo.get<std::string>(PdbKey::resName); /* residue name */ 289 *file << " "; /* char 21 is empty */ 290 *file << setfill(' ') << left << setw(1) 291 << atomInfo.get<std::string>(PdbKey::chainID); /* chain identifier */ 292 *file << setfill(' ') << left << setw(4) 293 << atomInfo.get<int>(PdbKey::resSeq); /* residue sequence number */ 294 *file << setfill(' ') << left << setw(1) 295 << atomInfo.get<std::string>(PdbKey::iCode); /* iCode */ 296 *file << " "; /* char 28-30 are empty */ 297 // have the following operate on stringstreams such that format specifiers 298 // only act on these 299 for (size_t i=0;i<NDIM;++i) { 300 stringstream position; 301 position << fixed << setprecision(3) << showpoint 302 << atomInfo.get<double>(PositionEnumMap[i]); 303 *file << setfill(' ') << right << setw(8) << position.str(); 304 } 305 { 306 stringstream occupancy; 307 occupancy << fixed << setprecision(2) << showpoint 308 << atomInfo.get<double>(PdbKey::occupancy); /* occupancy */ 309 *file << setfill(' ') << right << setw(6) << occupancy.str(); 310 } 311 { 312 stringstream tempFactor; 313 tempFactor << fixed << setprecision(2) << showpoint 314 << atomInfo.get<double>(PdbKey::tempFactor); /* temperature factor */ 315 *file << setfill(' ') << right << setw(6) << tempFactor.str(); 316 } 317 *file << " "; /* char 68-76 are empty */ 318 *file << setfill(' ') << right << setw(2) << atomInfo.get<std::string>(PdbKey::element); /* element */ 319 *file << setfill(' ') << right << setw(2) << atomInfo.get<int>(PdbKey::charge); /* charge */ 225 320 226 321 *file << endl; … … 240 335 if (MaxNo >= MaxnumberOfNeighbors) { 241 336 *file << "CONECT"; 242 *file << setw(5) << get AtomId(currentAtom->getId());337 *file << setw(5) << getSerial(currentAtom->getId()); 243 338 MaxNo = 0; 244 339 } 245 *file << setw(5) << get AtomId((*currentBond)->GetOtherAtom(currentAtom)->getId());340 *file << setw(5) << getSerial((*currentBond)->GetOtherAtom(currentAtom)->getId()); 246 341 MaxNo++; 247 342 if (MaxNo == MaxnumberOfNeighbors) … … 253 348 } 254 349 255 256 350 /** Retrieves a value from PdbParser::atomIdMap. 257 351 * \param atomid key … … 259 353 */ 260 354 size_t PdbParser::getSerial(const size_t atomid) const 261 {262 ConvertTo<size_t> toSize_t;263 ASSERT(additionalAtomData.find(atomid) != additionalAtomData.end(),264 "PdbParser::getSerial: atomid "+toString(atomid)+" not present in Map.");265 const PdbAtomInfoContainer &atomInfo = additionalAtomData.at(atomid);266 267 return toSize_t(atomInfo.get(PdbKey::serial));268 }269 270 /** Retrieves a value from PdbParser::atomIdMap.271 * \param atomid key272 * \return value273 */274 size_t PdbParser::getAtomId(const size_t atomid) const275 355 { 276 356 ASSERT(atomIdMap.find(atomid) != atomIdMap.end(), "PdbParser::getAtomId: atomid not present in Map."); … … 283 363 * \return true - key not present, false - value present 284 364 */ 285 void PdbParser::set AtomId(const size_t localatomid, const size_t atomid)365 void PdbParser::setSerial(const size_t localatomid, const size_t atomid) 286 366 { 287 367 pair<std::map<size_t,size_t>::iterator, bool > inserter; 288 DoLog(1) && (Log() << Verbose(1) << "PdbParser::setAtomId() - Inserting ("289 << localatomid << " -> " << atomid << ")." << std::endl);368 // DoLog(1) && (Log() << Verbose(1) << "PdbParser::setAtomId() - Inserting (" 369 // << localatomid << " -> " << atomid << ")." << std::endl); 290 370 inserter = atomIdMap.insert( make_pair(localatomid, atomid) ); 291 371 ASSERT(inserter.second, "PdbParser::setAtomId: atomId already present in Map."); … … 307 387 stringstream lineStream; 308 388 atom* newAtom = World::getInstance().createAtom(); 309 additionalAtomData[newAtom->getId()] = *(new PdbAtomInfoContainer); 310 PdbAtomInfoContainer &atomInfo = additionalAtomData[newAtom->getId()]; 389 PdbAtomInfoContainer &atomInfo = getadditionalAtomData(newAtom); 311 390 string word; 312 391 ConvertTo<size_t> toSize_t; … … 314 393 315 394 lineStream << line; 395 atomInfo.set(PdbKey::token, line.substr(0,6)); 316 396 atomInfo.set(PdbKey::serial, line.substr(6,5)); 317 397 std::pair< std::set<size_t>::const_iterator, bool> Inserter = 318 SerialSet.insert(toSize_t(atomInfo.get (PdbKey::serial)));398 SerialSet.insert(toSize_t(atomInfo.get<std::string>(PdbKey::serial))); 319 399 ASSERT(Inserter.second, 320 400 "PdbParser::readAtomDataLine() - ATOM contains entry with serial " 321 +atomInfo.get (PdbKey::serial)+" already present!");401 +atomInfo.get<std::string>(PdbKey::serial)+" already present!"); 322 402 // assign hightest+1 instead, but then beware of CONECT entries! Another map needed! 323 403 // if (!Inserter.second) { … … 326 406 // atomInfo.set(PdbKey::serial, toString(id)); 327 407 // DoeLog(2) && (eLog() << Verbose(2) 328 // << "Serial " << atomInfo.get (PdbKey::serial) << " already present, "408 // << "Serial " << atomInfo.get<std::string>(PdbKey::serial) << " already present, " 329 409 // << "assigning " << toString(id) << " instead." << std::endl); 330 410 // } … … 348 428 // << line.substr(78,2) << std::endl); 349 429 350 set AtomId(toSize_t(atomInfo.get(PdbKey::serial)), newAtom->getId());430 setSerial(toSize_t(atomInfo.get<std::string>(PdbKey::serial)), newAtom->getId()); 351 431 atomInfo.set(PdbKey::name, line.substr(12,4)); 352 atomInfo.set(PdbKey::alt loc, line.substr(16,1));432 atomInfo.set(PdbKey::altLoc, line.substr(16,1)); 353 433 atomInfo.set(PdbKey::resName, line.substr(17,3)); 354 434 atomInfo.set(PdbKey::chainID, line.substr(21,1)); … … 364 444 atomInfo.set(PdbKey::tempFactor, line.substr(60,6)); 365 445 atomInfo.set(PdbKey::charge, line.substr(78,2)); 366 PdbAtomInfoContainer::ScanKey(word, line.substr(76,2)); 367 newAtom->setType(World::getInstance().getPeriode()->FindElement(word)); 446 atomInfo.set(PdbKey::element, line.substr(76,2)); 447 const element *elem = World::getInstance().getPeriode() 448 ->FindElement(atomInfo.get<std::string>(PdbKey::element)); 449 ASSERT(elem != NULL, 450 "PdbParser::readAtomDataLine() - element "+atomInfo.get<std::string>(PdbKey::element)+" is unknown!"); 451 newAtom->setType(elem); 368 452 369 453 if (newmol != NULL) … … 381 465 382 466 DoLog(1) && (Log() << Verbose(1) << "We know about atom " << newAtom->getId() << ":" << std::endl); 383 DoLog(1) && (Log() << Verbose(1) << "\tserial is " << atomInfo.get(PdbKey::serial) << std::endl); 384 DoLog(1) && (Log() << Verbose(1) << "\tname is " << atomInfo.get(PdbKey::name) << std::endl); 385 DoLog(1) && (Log() << Verbose(1) << "\taltloc is " << atomInfo.get(PdbKey::altloc) << std::endl); 386 DoLog(1) && (Log() << Verbose(1) << "\tresName is " << atomInfo.get(PdbKey::resName) << std::endl); 387 DoLog(1) && (Log() << Verbose(1) << "\tchainID is " << atomInfo.get(PdbKey::chainID) << std::endl); 388 DoLog(1) && (Log() << Verbose(1) << "\tresSeq is " << atomInfo.get(PdbKey::resSeq) << std::endl); 389 DoLog(1) && (Log() << Verbose(1) << "\tiCode is " << atomInfo.get(PdbKey::iCode) << std::endl); 390 DoLog(1) && (Log() << Verbose(1) << "\tx is " << newAtom->getPosition() << std::endl); 391 DoLog(1) && (Log() << Verbose(1) << "\toccupancy is " << atomInfo.get(PdbKey::occupancy) << std::endl); 392 DoLog(1) && (Log() << Verbose(1) << "\ttempFactor is " << atomInfo.get(PdbKey::tempFactor) << std::endl); 467 DoLog(1) && (Log() << Verbose(1) << "\ttoken is " << atomInfo.get<std::string>(PdbKey::token) << std::endl); 468 DoLog(1) && (Log() << Verbose(1) << "\tserial is " << atomInfo.get<int>(PdbKey::serial) << std::endl); 469 DoLog(1) && (Log() << Verbose(1) << "\tname is " << atomInfo.get<std::string>(PdbKey::name) << std::endl); 470 DoLog(1) && (Log() << Verbose(1) << "\taltLoc is " << atomInfo.get<std::string>(PdbKey::altLoc) << std::endl); 471 DoLog(1) && (Log() << Verbose(1) << "\tresName is " << atomInfo.get<std::string>(PdbKey::resName) << std::endl); 472 DoLog(1) && (Log() << Verbose(1) << "\tchainID is " << atomInfo.get<std::string>(PdbKey::chainID) << std::endl); 473 DoLog(1) && (Log() << Verbose(1) << "\tresSeq is " << atomInfo.get<int>(PdbKey::resSeq) << std::endl); 474 DoLog(1) && (Log() << Verbose(1) << "\tiCode is " << atomInfo.get<std::string>(PdbKey::iCode) << std::endl); 475 DoLog(1) && (Log() << Verbose(1) << "\tX is " << atomInfo.get<double>(PdbKey::X) << std::endl); 476 DoLog(1) && (Log() << Verbose(1) << "\tY is " << atomInfo.get<double>(PdbKey::Y) << std::endl); 477 DoLog(1) && (Log() << Verbose(1) << "\tZ is " << atomInfo.get<double>(PdbKey::Z) << std::endl); 478 DoLog(1) && (Log() << Verbose(1) << "\toccupancy is " << atomInfo.get<double>(PdbKey::occupancy) << std::endl); 479 DoLog(1) && (Log() << Verbose(1) << "\ttempFactor is " << atomInfo.get<double>(PdbKey::tempFactor) << std::endl); 393 480 DoLog(1) && (Log() << Verbose(1) << "\telement is '" << *(newAtom->getType()) << "'" << std::endl); 394 DoLog(1) && (Log() << Verbose(1) << "\tcharge is " << atomInfo.get (PdbKey::charge) << std::endl);481 DoLog(1) && (Log() << Verbose(1) << "\tcharge is " << atomInfo.get<int>(PdbKey::charge) << std::endl); 395 482 } 396 483 … … 426 513 427 514 // add neighbours 428 atom *_atom = World::getInstance().getAtom(AtomById(get AtomId(id)));515 atom *_atom = World::getInstance().getAtom(AtomById(getSerial(id))); 429 516 for (std::list<size_t>::const_iterator iter = ListOfNeighbors.begin(); 430 517 iter != ListOfNeighbors.end(); 431 518 ++iter) { 432 519 // DoLog(1) && (Log() << Verbose(1) << "Adding Bond (" << getAtomId(id) << "," << getAtomId(*iter) << ")" << std::endl); 433 atom * const _Otheratom = World::getInstance().getAtom(AtomById(get AtomId(*iter)));520 atom * const _Otheratom = World::getInstance().getAtom(AtomById(getSerial(*iter))); 434 521 _atom->addBond(_Otheratom); 435 522 } … … 478 565 const PdbAtomInfoContainer &OtheratomInfo = b.additionalAtomData.at((*iter)->getId()); 479 566 480 status = status && (atomInfo.get (PdbKey::serial) == OtheratomInfo.get(PdbKey::serial));567 status = status && (atomInfo.get<std::string>(PdbKey::serial) == OtheratomInfo.get<std::string>(PdbKey::serial)); 481 568 if (!status) DoeLog(1) && (eLog() << Verbose(1) << "Mismatch in serials!" << std::endl); 482 status = status && (atomInfo.get (PdbKey::name) == OtheratomInfo.get(PdbKey::name));569 status = status && (atomInfo.get<std::string>(PdbKey::name) == OtheratomInfo.get<std::string>(PdbKey::name)); 483 570 if (!status) DoeLog(1) && (eLog() << Verbose(1) << "Mismatch in names!" << std::endl); 484 status = status && (atomInfo.get (PdbKey::altloc) == OtheratomInfo.get(PdbKey::altloc));485 if (!status) DoeLog(1) && (eLog() << Verbose(1) << "Mismatch in alt locs!" << std::endl);486 status = status && (atomInfo.get (PdbKey::resName) == OtheratomInfo.get(PdbKey::resName));571 status = status && (atomInfo.get<std::string>(PdbKey::altLoc) == OtheratomInfo.get<std::string>(PdbKey::altLoc)); 572 if (!status) DoeLog(1) && (eLog() << Verbose(1) << "Mismatch in altLocs!" << std::endl); 573 status = status && (atomInfo.get<std::string>(PdbKey::resName) == OtheratomInfo.get<std::string>(PdbKey::resName)); 487 574 if (!status) DoeLog(1) && (eLog() << Verbose(1) << "Mismatch in resNames!" << std::endl); 488 status = status && (atomInfo.get (PdbKey::chainID) == OtheratomInfo.get(PdbKey::chainID));575 status = status && (atomInfo.get<std::string>(PdbKey::chainID) == OtheratomInfo.get<std::string>(PdbKey::chainID)); 489 576 if (!status) DoeLog(1) && (eLog() << Verbose(1) << "Mismatch in chainIDs!" << std::endl); 490 status = status && (atomInfo.get (PdbKey::resSeq) == OtheratomInfo.get(PdbKey::resSeq));577 status = status && (atomInfo.get<std::string>(PdbKey::resSeq) == OtheratomInfo.get<std::string>(PdbKey::resSeq)); 491 578 if (!status) DoeLog(1) && (eLog() << Verbose(1) << "Mismatch in resSeqs!" << std::endl); 492 status = status && (atomInfo.get (PdbKey::iCode) == OtheratomInfo.get(PdbKey::iCode));579 status = status && (atomInfo.get<std::string>(PdbKey::iCode) == OtheratomInfo.get<std::string>(PdbKey::iCode)); 493 580 if (!status) DoeLog(1) && (eLog() << Verbose(1) << "Mismatch in iCodes!" << std::endl); 494 status = status && (atomInfo.get (PdbKey::occupancy) == OtheratomInfo.get(PdbKey::occupancy));581 status = status && (atomInfo.get<std::string>(PdbKey::occupancy) == OtheratomInfo.get<std::string>(PdbKey::occupancy)); 495 582 if (!status) DoeLog(1) && (eLog() << Verbose(1) << "Mismatch in occupancies!" << std::endl); 496 status = status && (atomInfo.get (PdbKey::tempFactor) == OtheratomInfo.get(PdbKey::tempFactor));583 status = status && (atomInfo.get<std::string>(PdbKey::tempFactor) == OtheratomInfo.get<std::string>(PdbKey::tempFactor)); 497 584 if (!status) DoeLog(1) && (eLog() << Verbose(1) << "Mismatch in tempFactors!" << std::endl); 498 status = status && (atomInfo.get (PdbKey::charge) == OtheratomInfo.get(PdbKey::charge));585 status = status && (atomInfo.get<std::string>(PdbKey::charge) == OtheratomInfo.get<std::string>(PdbKey::charge)); 499 586 if (!status) DoeLog(1) && (eLog() << Verbose(1) << "Mismatch in charges!" << std::endl); 500 587 }
Note:
See TracChangeset
for help on using the changeset viewer.