Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/PdbParser.cpp

    r73916f r4c1230  
    4646PdbParser::PdbParser() {
    4747  knownTokens["ATOM"] = PdbKey::Atom;
    48   knownTokens["HETATM"] = PdbKey::Atom;
    4948  knownTokens["TER"] = PdbKey::Filler;
    5049  knownTokens["END"] = PdbKey::EndOfFile;
     
    5251  knownTokens["REMARK"] = PdbKey::Remark;
    5352  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;
    5953}
    6054
     
    10599  size_t linecount  = 0;
    106100  enum PdbKey::KnownTokens token;
    107 
    108   // reset atomIdMap for this file (to correctly parse CONECT entries)
    109   atomIdMap.clear();
    110101
    111102  molecule *newmol = World::getInstance().createMolecule();
     
    145136
    146137/**
    147  * Saves the \a atoms into as a PDB file.
     138 * Saves the World's current state into as a PDB file.
    148139 *
    149140 * \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 */
     142void PdbParser::save(ostream* file) {
    154143  DoLog(0) && (Log() << Verbose(0) << "Saving changes to pdb." << std::endl);
     144
    155145  {
    156146    // add initial remark
     
    167157  }
    168158
    169   // we distribute serials, hence clear map beforehand
     159  // we distribute new atom numbers, hence clear map beforehand
    170160  atomIdMap.clear();
    171161  {
    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);
    186165    char name[MAXSTRINGSIZE];
    187     std::string ResidueName;
    188166
    189167    // write ATOMs
    190168    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
    194174      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;
    198177      } 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();
    205179      }
    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);
    227182      AtomNo++;
    228183    }
    229     for (size_t i = 0; i < MaxMol; ++i)
    230       delete elementNo[i];
    231     delete elementNo;
    232184
    233185    // 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++) {
    235187      writeNeighbors(file, 4, *atomIt);
    236188    }
     
    241193}
    242194
    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 
    264195/**
    265196 * Writes one line of PDB-formatted data to the provided stream.
     
    267198 * \param stream where to write the line to
    268199 * \param *currentAtom the atom of which information should be written
     200 * \param *name name of atom, i.e. H01
    269201 * \param AtomNo serial number of atom
    270  * \param *name name of atom, i.e. H01
    271  * \param ResidueName Name of molecule
    272202 * \param ResidueNo number of residue
    273203 */
    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 */
     204void 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";
    320225
    321226  *file << endl;
     
    335240      if (MaxNo >= MaxnumberOfNeighbors) {
    336241        *file << "CONECT";
    337         *file << setw(5) << getSerial(currentAtom->getId());
     242        *file << setw(5) << getAtomId(currentAtom->getId());
    338243        MaxNo = 0;
    339244      }
    340       *file << setw(5) << getSerial((*currentBond)->GetOtherAtom(currentAtom)->getId());
     245      *file << setw(5) << getAtomId((*currentBond)->GetOtherAtom(currentAtom)->getId());
    341246      MaxNo++;
    342247      if (MaxNo == MaxnumberOfNeighbors)
     
    348253}
    349254
     255
    350256/** Retrieves a value from PdbParser::atomIdMap.
    351257 * \param atomid key
     
    353259 */
    354260size_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 */
     274size_t PdbParser::getAtomId(const size_t atomid) const
    355275{
    356276  ASSERT(atomIdMap.find(atomid) != atomIdMap.end(), "PdbParser::getAtomId: atomid not present in Map.");
     
    363283 * \return true - key not present, false - value present
    364284 */
    365 void PdbParser::setSerial(const size_t localatomid, const size_t atomid)
     285void PdbParser::setAtomId(const size_t localatomid, const size_t atomid)
    366286{
    367287  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);
    370290  inserter = atomIdMap.insert( make_pair(localatomid, atomid) );
    371291  ASSERT(inserter.second, "PdbParser::setAtomId: atomId already present in Map.");
     
    387307  stringstream lineStream;
    388308  atom* newAtom = World::getInstance().createAtom();
    389   PdbAtomInfoContainer &atomInfo = getadditionalAtomData(newAtom);
     309  additionalAtomData[newAtom->getId()] = *(new PdbAtomInfoContainer);
     310  PdbAtomInfoContainer &atomInfo = additionalAtomData[newAtom->getId()];
    390311  string word;
    391312  ConvertTo<size_t> toSize_t;
     
    393314
    394315  lineStream << line;
    395   atomInfo.set(PdbKey::token, line.substr(0,6));
    396316  atomInfo.set(PdbKey::serial, line.substr(6,5));
    397317  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)));
    399319  ASSERT(Inserter.second,
    400320      "PdbParser::readAtomDataLine() - ATOM contains entry with serial "
    401       +atomInfo.get<std::string>(PdbKey::serial)+" already present!");
     321      +atomInfo.get(PdbKey::serial)+" already present!");
    402322  // assign hightest+1 instead, but then beware of CONECT entries! Another map needed!
    403323//  if (!Inserter.second) {
     
    406326//    atomInfo.set(PdbKey::serial, toString(id));
    407327//    DoeLog(2) && (eLog() << Verbose(2)
    408 //        << "Serial " << atomInfo.get<std::string>(PdbKey::serial) << " already present, "
     328//        << "Serial " << atomInfo.get(PdbKey::serial) << " already present, "
    409329//        << "assigning " << toString(id) << " instead." << std::endl);
    410330//  }
     
    428348//      << line.substr(78,2) << std::endl);
    429349
    430   setSerial(toSize_t(atomInfo.get<std::string>(PdbKey::serial)), newAtom->getId());
     350  setAtomId(toSize_t(atomInfo.get(PdbKey::serial)), newAtom->getId());
    431351  atomInfo.set(PdbKey::name, line.substr(12,4));
    432   atomInfo.set(PdbKey::altLoc, line.substr(16,1));
     352  atomInfo.set(PdbKey::altloc, line.substr(16,1));
    433353  atomInfo.set(PdbKey::resName, line.substr(17,3));
    434354  atomInfo.set(PdbKey::chainID, line.substr(21,1));
     
    444364  atomInfo.set(PdbKey::tempFactor, line.substr(60,6));
    445365  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));
    452368
    453369  if (newmol != NULL)
     
    465381
    466382  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);
    480393  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);
    482395}
    483396
     
    513426
    514427  // add neighbours
    515   atom *_atom = World::getInstance().getAtom(AtomById(getSerial(id)));
     428  atom *_atom = World::getInstance().getAtom(AtomById(getAtomId(id)));
    516429  for (std::list<size_t>::const_iterator iter = ListOfNeighbors.begin();
    517430      iter != ListOfNeighbors.end();
    518431      ++iter) {
    519432//    DoLog(1) && (Log() << Verbose(1) << "Adding Bond (" << getAtomId(id) << "," << getAtomId(*iter) << ")" << std::endl);
    520     atom * const _Otheratom = World::getInstance().getAtom(AtomById(getSerial(*iter)));
     433    atom * const _Otheratom = World::getInstance().getAtom(AtomById(getAtomId(*iter)));
    521434    _atom->addBond(_Otheratom);
    522435  }
     
    565478      const PdbAtomInfoContainer &OtheratomInfo = b.additionalAtomData.at((*iter)->getId());
    566479
    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));
    568481      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));
    570483      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 altLocs!" << 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));
    574487      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));
    576489      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));
    578491      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));
    580493      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));
    582495      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));
    584497      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));
    586499      if (!status) DoeLog(1) && (eLog() << Verbose(1) << "Mismatch in charges!" << std::endl);
    587500    }
Note: See TracChangeset for help on using the changeset viewer.