Changes in src/Parser/PdbParser.cpp [73916f:4c1230]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/PdbParser.cpp
r73916f r4c1230 46 46 PdbParser::PdbParser() { 47 47 knownTokens["ATOM"] = PdbKey::Atom; 48 knownTokens["HETATM"] = PdbKey::Atom;49 48 knownTokens["TER"] = PdbKey::Filler; 50 49 knownTokens["END"] = PdbKey::EndOfFile; … … 52 51 knownTokens["REMARK"] = PdbKey::Remark; 53 52 knownTokens[""] = PdbKey::EndOfFile; 54 55 // argh, why can't just PdbKey::X+(size_t)i56 PositionEnumMap[0] = PdbKey::X;57 PositionEnumMap[1] = PdbKey::Y;58 PositionEnumMap[2] = PdbKey::Z;59 53 } 60 54 … … 105 99 size_t linecount = 0; 106 100 enum PdbKey::KnownTokens token; 107 108 // reset atomIdMap for this file (to correctly parse CONECT entries)109 atomIdMap.clear();110 101 111 102 molecule *newmol = World::getInstance().createMolecule(); … … 145 136 146 137 /** 147 * Saves the \a atomsinto as a PDB file.138 * Saves the World's current state into as a PDB file. 148 139 * 149 140 * \param file where to save the state 150 * \param atoms atoms to store 151 */ 152 void PdbParser::save(ostream* file, const std::vector<atom *> &AtomList) 153 { 141 */ 142 void PdbParser::save(ostream* file) { 154 143 DoLog(0) && (Log() << Verbose(0) << "Saving changes to pdb." << std::endl); 144 155 145 { 156 146 // add initial remark … … 167 157 } 168 158 169 // we distribute serials, hence clear map beforehand159 // we distribute new atom numbers, hence clear map beforehand 170 160 atomIdMap.clear(); 171 161 { 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); 162 vector<atom *> AtomList = World::getInstance().getAllAtoms(); 163 164 std::vector<int> elementNo(MAX_ELEMENTS,1); 186 165 char name[MAXSTRINGSIZE]; 187 std::string ResidueName;188 166 189 167 // write ATOMs 190 168 int AtomNo = 1; // serial number starts at 1 in pdb 191 for (vector<atom *>::const_iterator atomIt = AtomList.begin(); atomIt != AtomList.end(); atomIt++) { 192 PdbAtomInfoContainer &atomInfo = getadditionalAtomData(*atomIt); 193 // gather info about residue 169 int MolNo = 1; // residue number starts at 1 in pdb 170 for (vector<atom *>::iterator atomIt = AtomList.begin(); atomIt != AtomList.end(); atomIt++) { 171 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 194 174 const molecule *mol = (*atomIt)->getMolecule(); 195 if (mol == NULL) { 196 MolNo = 0; 197 atomInfo.set(PdbKey::resSeq, "0"); 175 if (mol == NULL) { // for homeless atoms, MolNo = -1 is reserved 176 MolNo = -1; 198 177 } 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)); 178 MolNo = mol->getId(); 205 179 } 206 // get info about atom 207 const size_t Z = (*atomIt)->getType()->getAtomicNumber(); 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); 212 } 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); 180 saveLine(file, *atomIt, name, AtomNo, MolNo); 181 setAtomId((*atomIt)->getId(), AtomNo); 227 182 AtomNo++; 228 183 } 229 for (size_t i = 0; i < MaxMol; ++i)230 delete elementNo[i];231 delete elementNo;232 184 233 185 // write CONECTs 234 for (vector<atom *>:: const_iterator atomIt = AtomList.begin(); atomIt != AtomList.end(); atomIt++) {186 for (vector<atom *>::iterator atomIt = AtomList.begin(); atomIt != AtomList.end(); atomIt++) { 235 187 writeNeighbors(file, 4, *atomIt); 236 188 } … … 241 193 } 242 194 243 /** Either returns reference to present entry or creates new with default values.244 *245 * @param _atom atom whose entry we desire246 * @return247 */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 father253 additionalAtomData[_atom->getId()] = additionalAtomData[_atom->father->getId()];254 } else if (additionalAtomData.find(_atom->GetTrueFather()->getId()) != additionalAtomData.end()) {255 // use info from topmost father256 additionalAtomData[_atom->getId()] = additionalAtomData[_atom->GetTrueFather()->getId()];257 } else {258 // create new entry use default values if nothing else is known259 additionalAtomData[_atom->getId()] = defaultAdditionalData;260 }261 return additionalAtomData[_atom->getId()];262 }263 264 195 /** 265 196 * Writes one line of PDB-formatted data to the provided stream. … … 267 198 * \param stream where to write the line to 268 199 * \param *currentAtom the atom of which information should be written 200 * \param *name name of atom, i.e. H01 269 201 * \param AtomNo serial number of atom 270 * \param *name name of atom, i.e. H01271 * \param ResidueName Name of molecule272 202 * \param ResidueNo number of residue 273 203 */ 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 */ 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"; 320 225 321 226 *file << endl; … … 335 240 if (MaxNo >= MaxnumberOfNeighbors) { 336 241 *file << "CONECT"; 337 *file << setw(5) << get Serial(currentAtom->getId());242 *file << setw(5) << getAtomId(currentAtom->getId()); 338 243 MaxNo = 0; 339 244 } 340 *file << setw(5) << get Serial((*currentBond)->GetOtherAtom(currentAtom)->getId());245 *file << setw(5) << getAtomId((*currentBond)->GetOtherAtom(currentAtom)->getId()); 341 246 MaxNo++; 342 247 if (MaxNo == MaxnumberOfNeighbors) … … 348 253 } 349 254 255 350 256 /** Retrieves a value from PdbParser::atomIdMap. 351 257 * \param atomid key … … 353 259 */ 354 260 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 key 272 * \return value 273 */ 274 size_t PdbParser::getAtomId(const size_t atomid) const 355 275 { 356 276 ASSERT(atomIdMap.find(atomid) != atomIdMap.end(), "PdbParser::getAtomId: atomid not present in Map."); … … 363 283 * \return true - key not present, false - value present 364 284 */ 365 void PdbParser::set Serial(const size_t localatomid, const size_t atomid)285 void PdbParser::setAtomId(const size_t localatomid, const size_t atomid) 366 286 { 367 287 pair<std::map<size_t,size_t>::iterator, bool > inserter; 368 //DoLog(1) && (Log() << Verbose(1) << "PdbParser::setAtomId() - Inserting ("369 //<< localatomid << " -> " << atomid << ")." << std::endl);288 DoLog(1) && (Log() << Verbose(1) << "PdbParser::setAtomId() - Inserting (" 289 << localatomid << " -> " << atomid << ")." << std::endl); 370 290 inserter = atomIdMap.insert( make_pair(localatomid, atomid) ); 371 291 ASSERT(inserter.second, "PdbParser::setAtomId: atomId already present in Map."); … … 387 307 stringstream lineStream; 388 308 atom* newAtom = World::getInstance().createAtom(); 389 PdbAtomInfoContainer &atomInfo = getadditionalAtomData(newAtom); 309 additionalAtomData[newAtom->getId()] = *(new PdbAtomInfoContainer); 310 PdbAtomInfoContainer &atomInfo = additionalAtomData[newAtom->getId()]; 390 311 string word; 391 312 ConvertTo<size_t> toSize_t; … … 393 314 394 315 lineStream << line; 395 atomInfo.set(PdbKey::token, line.substr(0,6));396 316 atomInfo.set(PdbKey::serial, line.substr(6,5)); 397 317 std::pair< std::set<size_t>::const_iterator, bool> Inserter = 398 SerialSet.insert(toSize_t(atomInfo.get <std::string>(PdbKey::serial)));318 SerialSet.insert(toSize_t(atomInfo.get(PdbKey::serial))); 399 319 ASSERT(Inserter.second, 400 320 "PdbParser::readAtomDataLine() - ATOM contains entry with serial " 401 +atomInfo.get <std::string>(PdbKey::serial)+" already present!");321 +atomInfo.get(PdbKey::serial)+" already present!"); 402 322 // assign hightest+1 instead, but then beware of CONECT entries! Another map needed! 403 323 // if (!Inserter.second) { … … 406 326 // atomInfo.set(PdbKey::serial, toString(id)); 407 327 // DoeLog(2) && (eLog() << Verbose(2) 408 // << "Serial " << atomInfo.get <std::string>(PdbKey::serial) << " already present, "328 // << "Serial " << atomInfo.get(PdbKey::serial) << " already present, " 409 329 // << "assigning " << toString(id) << " instead." << std::endl); 410 330 // } … … 428 348 // << line.substr(78,2) << std::endl); 429 349 430 set Serial(toSize_t(atomInfo.get<std::string>(PdbKey::serial)), newAtom->getId());350 setAtomId(toSize_t(atomInfo.get(PdbKey::serial)), newAtom->getId()); 431 351 atomInfo.set(PdbKey::name, line.substr(12,4)); 432 atomInfo.set(PdbKey::alt Loc, line.substr(16,1));352 atomInfo.set(PdbKey::altloc, line.substr(16,1)); 433 353 atomInfo.set(PdbKey::resName, line.substr(17,3)); 434 354 atomInfo.set(PdbKey::chainID, line.substr(21,1)); … … 444 364 atomInfo.set(PdbKey::tempFactor, line.substr(60,6)); 445 365 atomInfo.set(PdbKey::charge, line.substr(78,2)); 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); 366 PdbAtomInfoContainer::ScanKey(word, line.substr(76,2)); 367 newAtom->setType(World::getInstance().getPeriode()->FindElement(word)); 452 368 453 369 if (newmol != NULL) … … 465 381 466 382 DoLog(1) && (Log() << Verbose(1) << "We know about atom " << newAtom->getId() << ":" << 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); 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); 480 393 DoLog(1) && (Log() << Verbose(1) << "\telement is '" << *(newAtom->getType()) << "'" << std::endl); 481 DoLog(1) && (Log() << Verbose(1) << "\tcharge is " << atomInfo.get <int>(PdbKey::charge) << std::endl);394 DoLog(1) && (Log() << Verbose(1) << "\tcharge is " << atomInfo.get(PdbKey::charge) << std::endl); 482 395 } 483 396 … … 513 426 514 427 // add neighbours 515 atom *_atom = World::getInstance().getAtom(AtomById(get Serial(id)));428 atom *_atom = World::getInstance().getAtom(AtomById(getAtomId(id))); 516 429 for (std::list<size_t>::const_iterator iter = ListOfNeighbors.begin(); 517 430 iter != ListOfNeighbors.end(); 518 431 ++iter) { 519 432 // DoLog(1) && (Log() << Verbose(1) << "Adding Bond (" << getAtomId(id) << "," << getAtomId(*iter) << ")" << std::endl); 520 atom * const _Otheratom = World::getInstance().getAtom(AtomById(get Serial(*iter)));433 atom * const _Otheratom = World::getInstance().getAtom(AtomById(getAtomId(*iter))); 521 434 _atom->addBond(_Otheratom); 522 435 } … … 565 478 const PdbAtomInfoContainer &OtheratomInfo = b.additionalAtomData.at((*iter)->getId()); 566 479 567 status = status && (atomInfo.get <std::string>(PdbKey::serial) == OtheratomInfo.get<std::string>(PdbKey::serial));480 status = status && (atomInfo.get(PdbKey::serial) == OtheratomInfo.get(PdbKey::serial)); 568 481 if (!status) DoeLog(1) && (eLog() << Verbose(1) << "Mismatch in serials!" << std::endl); 569 status = status && (atomInfo.get <std::string>(PdbKey::name) == OtheratomInfo.get<std::string>(PdbKey::name));482 status = status && (atomInfo.get(PdbKey::name) == OtheratomInfo.get(PdbKey::name)); 570 483 if (!status) DoeLog(1) && (eLog() << Verbose(1) << "Mismatch in names!" << std::endl); 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 alt Locs!" << std::endl);573 status = status && (atomInfo.get <std::string>(PdbKey::resName) == OtheratomInfo.get<std::string>(PdbKey::resName));484 status = status && (atomInfo.get(PdbKey::altloc) == OtheratomInfo.get(PdbKey::altloc)); 485 if (!status) DoeLog(1) && (eLog() << Verbose(1) << "Mismatch in altlocs!" << std::endl); 486 status = status && (atomInfo.get(PdbKey::resName) == OtheratomInfo.get(PdbKey::resName)); 574 487 if (!status) DoeLog(1) && (eLog() << Verbose(1) << "Mismatch in resNames!" << std::endl); 575 status = status && (atomInfo.get <std::string>(PdbKey::chainID) == OtheratomInfo.get<std::string>(PdbKey::chainID));488 status = status && (atomInfo.get(PdbKey::chainID) == OtheratomInfo.get(PdbKey::chainID)); 576 489 if (!status) DoeLog(1) && (eLog() << Verbose(1) << "Mismatch in chainIDs!" << std::endl); 577 status = status && (atomInfo.get <std::string>(PdbKey::resSeq) == OtheratomInfo.get<std::string>(PdbKey::resSeq));490 status = status && (atomInfo.get(PdbKey::resSeq) == OtheratomInfo.get(PdbKey::resSeq)); 578 491 if (!status) DoeLog(1) && (eLog() << Verbose(1) << "Mismatch in resSeqs!" << std::endl); 579 status = status && (atomInfo.get <std::string>(PdbKey::iCode) == OtheratomInfo.get<std::string>(PdbKey::iCode));492 status = status && (atomInfo.get(PdbKey::iCode) == OtheratomInfo.get(PdbKey::iCode)); 580 493 if (!status) DoeLog(1) && (eLog() << Verbose(1) << "Mismatch in iCodes!" << std::endl); 581 status = status && (atomInfo.get <std::string>(PdbKey::occupancy) == OtheratomInfo.get<std::string>(PdbKey::occupancy));494 status = status && (atomInfo.get(PdbKey::occupancy) == OtheratomInfo.get(PdbKey::occupancy)); 582 495 if (!status) DoeLog(1) && (eLog() << Verbose(1) << "Mismatch in occupancies!" << std::endl); 583 status = status && (atomInfo.get <std::string>(PdbKey::tempFactor) == OtheratomInfo.get<std::string>(PdbKey::tempFactor));496 status = status && (atomInfo.get(PdbKey::tempFactor) == OtheratomInfo.get(PdbKey::tempFactor)); 584 497 if (!status) DoeLog(1) && (eLog() << Verbose(1) << "Mismatch in tempFactors!" << std::endl); 585 status = status && (atomInfo.get <std::string>(PdbKey::charge) == OtheratomInfo.get<std::string>(PdbKey::charge));498 status = status && (atomInfo.get(PdbKey::charge) == OtheratomInfo.get(PdbKey::charge)); 586 499 if (!status) DoeLog(1) && (eLog() << Verbose(1) << "Mismatch in charges!" << std::endl); 587 500 }
Note:
See TracChangeset
for help on using the changeset viewer.