Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/PdbParser.cpp

    r4c1230 r73916f  
    4646PdbParser::PdbParser() {
    4747  knownTokens["ATOM"] = PdbKey::Atom;
     48  knownTokens["HETATM"] = PdbKey::Atom;
    4849  knownTokens["TER"] = PdbKey::Filler;
    4950  knownTokens["END"] = PdbKey::EndOfFile;
     
    5152  knownTokens["REMARK"] = PdbKey::Remark;
    5253  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;
    5359}
    5460
     
    99105  size_t linecount  = 0;
    100106  enum PdbKey::KnownTokens token;
     107
     108  // reset atomIdMap for this file (to correctly parse CONECT entries)
     109  atomIdMap.clear();
    101110
    102111  molecule *newmol = World::getInstance().createMolecule();
     
    136145
    137146/**
    138  * Saves the World's current state into as a PDB file.
     147 * Saves the \a atoms into as a PDB file.
    139148 *
    140149 * \param file where to save the state
    141  */
    142 void PdbParser::save(ostream* file) {
     150 * \param atoms atoms to store
     151 */
     152void PdbParser::save(ostream* file, const std::vector<atom *> &AtomList)
     153{
    143154  DoLog(0) && (Log() << Verbose(0) << "Saving changes to pdb." << std::endl);
    144 
    145155  {
    146156    // add initial remark
     
    157167  }
    158168
    159   // we distribute new atom numbers, hence clear map beforehand
     169  // we distribute serials, hence clear map beforehand
    160170  atomIdMap.clear();
    161171  {
    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);
    165186    char name[MAXSTRINGSIZE];
     187    std::string ResidueName;
    166188
    167189    // write ATOMs
    168190    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
    171207      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);
    179212      }
    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);
    182227      AtomNo++;
    183228    }
     229    for (size_t i = 0; i < MaxMol; ++i)
     230      delete elementNo[i];
     231    delete elementNo;
    184232
    185233    // 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++) {
    187235      writeNeighbors(file, 4, *atomIt);
    188236    }
     
    193241}
    194242
     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 */
     248PdbAtomInfoContainer& 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
    195264/**
    196265 * Writes one line of PDB-formatted data to the provided stream.
     
    198267 * \param stream where to write the line to
    199268 * \param *currentAtom the atom of which information should be written
     269 * \param AtomNo serial number of atom
    200270 * \param *name name of atom, i.e. H01
    201  * \param AtomNo serial number of atom
     271 * \param ResidueName Name of molecule
    202272 * \param ResidueNo number of residue
    203273 */
    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";
     274void 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 */
    225320
    226321  *file << endl;
     
    240335      if (MaxNo >= MaxnumberOfNeighbors) {
    241336        *file << "CONECT";
    242         *file << setw(5) << getAtomId(currentAtom->getId());
     337        *file << setw(5) << getSerial(currentAtom->getId());
    243338        MaxNo = 0;
    244339      }
    245       *file << setw(5) << getAtomId((*currentBond)->GetOtherAtom(currentAtom)->getId());
     340      *file << setw(5) << getSerial((*currentBond)->GetOtherAtom(currentAtom)->getId());
    246341      MaxNo++;
    247342      if (MaxNo == MaxnumberOfNeighbors)
     
    253348}
    254349
    255 
    256350/** Retrieves a value from PdbParser::atomIdMap.
    257351 * \param atomid key
     
    259353 */
    260354size_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
    275355{
    276356  ASSERT(atomIdMap.find(atomid) != atomIdMap.end(), "PdbParser::getAtomId: atomid not present in Map.");
     
    283363 * \return true - key not present, false - value present
    284364 */
    285 void PdbParser::setAtomId(const size_t localatomid, const size_t atomid)
     365void PdbParser::setSerial(const size_t localatomid, const size_t atomid)
    286366{
    287367  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);
    290370  inserter = atomIdMap.insert( make_pair(localatomid, atomid) );
    291371  ASSERT(inserter.second, "PdbParser::setAtomId: atomId already present in Map.");
     
    307387  stringstream lineStream;
    308388  atom* newAtom = World::getInstance().createAtom();
    309   additionalAtomData[newAtom->getId()] = *(new PdbAtomInfoContainer);
    310   PdbAtomInfoContainer &atomInfo = additionalAtomData[newAtom->getId()];
     389  PdbAtomInfoContainer &atomInfo = getadditionalAtomData(newAtom);
    311390  string word;
    312391  ConvertTo<size_t> toSize_t;
     
    314393
    315394  lineStream << line;
     395  atomInfo.set(PdbKey::token, line.substr(0,6));
    316396  atomInfo.set(PdbKey::serial, line.substr(6,5));
    317397  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)));
    319399  ASSERT(Inserter.second,
    320400      "PdbParser::readAtomDataLine() - ATOM contains entry with serial "
    321       +atomInfo.get(PdbKey::serial)+" already present!");
     401      +atomInfo.get<std::string>(PdbKey::serial)+" already present!");
    322402  // assign hightest+1 instead, but then beware of CONECT entries! Another map needed!
    323403//  if (!Inserter.second) {
     
    326406//    atomInfo.set(PdbKey::serial, toString(id));
    327407//    DoeLog(2) && (eLog() << Verbose(2)
    328 //        << "Serial " << atomInfo.get(PdbKey::serial) << " already present, "
     408//        << "Serial " << atomInfo.get<std::string>(PdbKey::serial) << " already present, "
    329409//        << "assigning " << toString(id) << " instead." << std::endl);
    330410//  }
     
    348428//      << line.substr(78,2) << std::endl);
    349429
    350   setAtomId(toSize_t(atomInfo.get(PdbKey::serial)), newAtom->getId());
     430  setSerial(toSize_t(atomInfo.get<std::string>(PdbKey::serial)), newAtom->getId());
    351431  atomInfo.set(PdbKey::name, line.substr(12,4));
    352   atomInfo.set(PdbKey::altloc, line.substr(16,1));
     432  atomInfo.set(PdbKey::altLoc, line.substr(16,1));
    353433  atomInfo.set(PdbKey::resName, line.substr(17,3));
    354434  atomInfo.set(PdbKey::chainID, line.substr(21,1));
     
    364444  atomInfo.set(PdbKey::tempFactor, line.substr(60,6));
    365445  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);
    368452
    369453  if (newmol != NULL)
     
    381465
    382466  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);
    393480  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);
    395482}
    396483
     
    426513
    427514  // add neighbours
    428   atom *_atom = World::getInstance().getAtom(AtomById(getAtomId(id)));
     515  atom *_atom = World::getInstance().getAtom(AtomById(getSerial(id)));
    429516  for (std::list<size_t>::const_iterator iter = ListOfNeighbors.begin();
    430517      iter != ListOfNeighbors.end();
    431518      ++iter) {
    432519//    DoLog(1) && (Log() << Verbose(1) << "Adding Bond (" << getAtomId(id) << "," << getAtomId(*iter) << ")" << std::endl);
    433     atom * const _Otheratom = World::getInstance().getAtom(AtomById(getAtomId(*iter)));
     520    atom * const _Otheratom = World::getInstance().getAtom(AtomById(getSerial(*iter)));
    434521    _atom->addBond(_Otheratom);
    435522  }
     
    478565      const PdbAtomInfoContainer &OtheratomInfo = b.additionalAtomData.at((*iter)->getId());
    479566
    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));
    481568      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));
    483570      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 altlocs!" << 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));
    487574      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));
    489576      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));
    491578      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));
    493580      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));
    495582      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));
    497584      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));
    499586      if (!status) DoeLog(1) && (eLog() << Verbose(1) << "Mismatch in charges!" << std::endl);
    500587    }
Note: See TracChangeset for help on using the changeset viewer.