Changeset 4fbca9c for src


Ignore:
Timestamp:
Dec 5, 2010, 12:01:43 AM (14 years ago)
Author:
Frederik Heber <heber@…>
Branches:
Action_Thermostats, Add_AtomRandomPerturbation, Add_FitFragmentPartialChargesAction, Add_RotateAroundBondAction, Add_SelectAtomByNameAction, Added_ParseSaveFragmentResults, AddingActions_SaveParseParticleParameters, Adding_Graph_to_ChangeBondActions, Adding_MD_integration_tests, Adding_ParticleName_to_Atom, Adding_StructOpt_integration_tests, AtomFragments, Automaking_mpqc_open, AutomationFragmentation_failures, Candidate_v1.5.4, Candidate_v1.6.0, Candidate_v1.6.1, ChangeBugEmailaddress, ChangingTestPorts, ChemicalSpaceEvaluator, CombiningParticlePotentialParsing, Combining_Subpackages, Debian_Package_split, Debian_package_split_molecuildergui_only, Disabling_MemDebug, Docu_Python_wait, EmpiricalPotential_contain_HomologyGraph, EmpiricalPotential_contain_HomologyGraph_documentation, Enable_parallel_make_install, Enhance_userguide, Enhanced_StructuralOptimization, Enhanced_StructuralOptimization_continued, Example_ManyWaysToTranslateAtom, Exclude_Hydrogens_annealWithBondGraph, FitPartialCharges_GlobalError, Fix_BoundInBox_CenterInBox_MoleculeActions, Fix_ChargeSampling_PBC, Fix_ChronosMutex, Fix_FitPartialCharges, Fix_FitPotential_needs_atomicnumbers, Fix_ForceAnnealing, Fix_IndependentFragmentGrids, Fix_ParseParticles, Fix_ParseParticles_split_forward_backward_Actions, Fix_PopActions, Fix_QtFragmentList_sorted_selection, Fix_Restrictedkeyset_FragmentMolecule, Fix_StatusMsg, Fix_StepWorldTime_single_argument, Fix_Verbose_Codepatterns, Fix_fitting_potentials, Fixes, ForceAnnealing_goodresults, ForceAnnealing_oldresults, ForceAnnealing_tocheck, ForceAnnealing_with_BondGraph, ForceAnnealing_with_BondGraph_continued, ForceAnnealing_with_BondGraph_continued_betteresults, ForceAnnealing_with_BondGraph_contraction-expansion, FragmentAction_writes_AtomFragments, FragmentMolecule_checks_bonddegrees, GeometryObjects, Gui_Fixes, Gui_displays_atomic_force_velocity, ImplicitCharges, IndependentFragmentGrids, IndependentFragmentGrids_IndividualZeroInstances, IndependentFragmentGrids_IntegrationTest, IndependentFragmentGrids_Sole_NN_Calculation, JobMarket_RobustOnKillsSegFaults, JobMarket_StableWorkerPool, JobMarket_unresolvable_hostname_fix, MoreRobust_FragmentAutomation, ODR_violation_mpqc_open, PartialCharges_OrthogonalSummation, PdbParser_setsAtomName, PythonUI_with_named_parameters, QtGui_reactivate_TimeChanged_changes, Recreated_GuiChecks, Rewrite_FitPartialCharges, RotateToPrincipalAxisSystem_UndoRedo, SaturateAtoms_findBestMatching, SaturateAtoms_singleDegree, StoppableMakroAction, Subpackage_CodePatterns, Subpackage_JobMarket, Subpackage_LinearAlgebra, Subpackage_levmar, Subpackage_mpqc_open, Subpackage_vmg, Switchable_LogView, ThirdParty_MPQC_rebuilt_buildsystem, TrajectoryDependenant_MaxOrder, TremoloParser_IncreasedPrecision, TremoloParser_MultipleTimesteps, TremoloParser_setsAtomName, Ubuntu_1604_changes, stable
Children:
cabb46
Parents:
e828c0
git-author:
Frederik Heber <heber@…> (12/04/10 18:05:33)
git-committer:
Frederik Heber <heber@…> (12/05/10 00:01:43)
Message:

PdbParser::save() fully working.

Location:
src
Files:
5 added
4 edited
2 moved

Legend:

Unmodified
Added
Removed
  • src/Parser/Makefile.am

    re828c0 r4fbca9c  
    1414  MpqcParser.cpp \
    1515  PcpParser.cpp \
     16  PdbAtomInfoContainer.cpp \
    1617  PdbParser.cpp \
    1718  TremoloParser.cpp \
     
    2425  MpqcParser.hpp \
    2526  PcpParser.hpp \
     27  PdbAtomInfoContainer.hpp \
     28  PdbKey.hpp \
    2629  PdbParser.hpp \
    2730  TremoloParser.hpp \
  • src/Parser/PdbParser.cpp

    re828c0 r4fbca9c  
    2222#include "Helpers/Assert.hpp"
    2323#include "Helpers/Log.hpp"
     24#include "Helpers/toString.hpp"
    2425#include "Helpers/Verbose.hpp"
    25 #include "PdbParser.hpp"
    2626#include "World.hpp"
    2727#include "atom.hpp"
     
    3131#include "periodentafel.hpp"
    3232#include "Descriptors/AtomIdDescriptor.hpp"
     33#include "Parser/PdbParser.hpp"
    3334
    3435#include <map>
     
    4445 */
    4546PdbParser::PdbParser() {
    46   knownKeys[" "] = PdbKey::noKey; // with this we can detect invalid keys
    47   knownKeys["x"] = PdbKey::x;
    48   knownKeys["Id"] = PdbKey::Id;
    49   knownKeys["Type"] = PdbKey::Type;
    50   knownKeys["extType"] = PdbKey::extType;
    51   knownKeys["name"] = PdbKey::name;
    52   knownKeys["resName"] = PdbKey::resName;
    53   knownKeys["chainID"] = PdbKey::chainID;
    54   knownKeys["resSeq"] = PdbKey::resSeq;
    55   knownKeys["occupancy"] = PdbKey::occupancy;
    56   knownKeys["tempFactor"] = PdbKey::tempFactor;
    57   knownKeys["segID"] = PdbKey::segID;
    58   knownKeys["charge"] = PdbKey::charge;
     47  knownTokens["ATOM"] = PdbKey::Atom;
     48  knownTokens["TER"] = PdbKey::Filler;
     49  knownTokens["END"] = PdbKey::EndOfFile;
     50  knownTokens["CONECT"] = PdbKey::Connect;
     51  knownTokens["REMARK"] = PdbKey::Remark;
     52  knownTokens[""] = PdbKey::EndOfFile;
    5953}
    6054
     
    6559  additionalAtomData.clear();
    6660  atomIdMap.clear();
    67   knownKeys.clear();
    68 }
    69 
    70 /**
    71  * Loads atoms from a tremolo-formatted file.
    72  *
    73  * \param tremolo file
     61}
     62
     63
     64/** Parses the initial word of the given \a line and returns the token type.
     65 *
     66 * @param line line to scan
     67 * @return token type
     68 */
     69enum PdbKey::KnownTokens PdbParser::getToken(string &line)
     70{
     71  // look for first space
     72  const size_t space_location = line.find(' ');
     73  const size_t tab_location = line.find('\t');
     74  size_t location = space_location < tab_location ? space_location : tab_location;
     75  string token;
     76  if (location != string::npos) {
     77    //DoLog(1) && (Log() << Verbose(1) << "Found space at position " << space_location << std::endl);
     78    token = line.substr(0,space_location);
     79  } else {
     80    token = line;
     81  }
     82
     83  //DoLog(1) && (Log() << Verbose(1) << "Token is " << token << std::endl);
     84  if (knownTokens.count(token) == 0)
     85    return PdbKey::NoToken;
     86  else
     87    return knownTokens[token];
     88
     89  return PdbKey::NoToken;
     90}
     91
     92/**
     93 * Loads atoms from a PDB-formatted file.
     94 *
     95 * \param PDB file
    7496 */
    7597void PdbParser::load(istream* file) {
    76   // TODO: PdbParser::load implementation
    77   ASSERT(false, "Not implemented yet");
    78 //  string line;
    79 //  string::size_type location;
    80 //
    81 //  usedFields.clear();
    82 //  while (file->good()) {
    83 //    std::getline(*file, line, '\n');
    84 //    if (usedFields.empty()) {
    85 //      location = line.find("ATOMDATA", 0);
    86 //      if (location != string::npos) {
    87 //       parseAtomDataKeysLine(line, location + 8);
    88 //      }
    89 //    }
    90 //    if (line.length() > 0 && line.at(0) != '#') {
    91 //      readAtomDataLine(line);
    92 //    }
    93 //  }
    94 //
    95 //  processNeighborInformation();
    96 //  adaptImprData();
    97 //  adaptTorsion();
    98 }
    99 
    100 /**
    101  * Saves the World's current state into as a tremolo file.
     98  string line;
     99  size_t linecount  = 0;
     100  enum PdbKey::KnownTokens token;
     101
     102  molecule *newmol = World::getInstance().createMolecule();
     103  newmol->ActiveFlag = true;
     104  bool NotEndOfFile = true;
     105  // TODO: Remove the insertion into molecule when saving does not depend on them anymore. Also, remove molecule.hpp include
     106  World::getInstance().getMolecules()->insert(newmol);
     107  while (NotEndOfFile) {
     108    std::getline(*file, line, '\n');
     109    // extract first token
     110    token = getToken(line);
     111    //DoLog(1) && (Log() << Verbose(1) << " Recognized token of type : " << token << std::endl);
     112    switch (token) {
     113      case PdbKey::Atom:
     114        readAtomDataLine(line, newmol);
     115        break;
     116      case PdbKey::Remark:
     117        break;
     118      case PdbKey::Connect:
     119        readNeighbors(line);
     120        break;
     121      case PdbKey::Filler:
     122        break;
     123      case PdbKey::EndOfFile:
     124        NotEndOfFile = false;
     125        break;
     126      default:
     127        // TODO: put a throw here
     128        DoeLog(2) && (eLog() << Verbose(2) << "Unknown token: '" << line << "'" << std::endl);
     129        //ASSERT(0, "PdbParser::load() - Unknown token in line "+toString(linecount)+": "+line+".");
     130        break;
     131    }
     132    NotEndOfFile = NotEndOfFile && (file->good());
     133    linecount++;
     134  }
     135}
     136
     137/**
     138 * Saves the World's current state into as a PDB file.
    102139 *
    103140 * \param file where to save the state
     
    120157  }
    121158
     159  // we distribute new atom numbers, hence clear map beforehand
     160  atomIdMap.clear();
    122161  {
    123162    vector<atom *> AtomList = World::getInstance().getAllAtoms();
     
    155194
    156195/**
    157  * Writes one line of tremolo-formatted data to the provided stream.
     196 * Writes one line of PDB-formatted data to the provided stream.
    158197 *
    159198 * \param stream where to write the line to
     
    198237  if (!currentAtom->ListOfBonds.empty()) {
    199238    *file << "CONECT";
    200     *file << setw(5) << getAtomId(currentAtom->getId());
     239    *file << setw(5) << getSerial(currentAtom->getId());
    201240    int MaxNo = 0;
    202241    for(BondList::iterator currentBond = currentAtom->ListOfBonds.begin(); currentBond != currentAtom->ListOfBonds.end(); ++currentBond) {
    203242      if (MaxNo < MaxnumberOfNeighbors) {
    204         *file << setw(5) << getAtomId((*currentBond)->GetOtherAtom(currentAtom)->getId());
     243        *file << setw(5) << getSerial((*currentBond)->GetOtherAtom(currentAtom)->getId());
    205244      }
    206245      MaxNo++;
     
    215254 * \return value
    216255 */
    217 int PdbParser::getAtomId(int atomid) const
     256size_t PdbParser::getSerial(const size_t atomid) const
     257{
     258  ConvertTo<size_t> toSize_t;
     259  ASSERT(additionalAtomData.find(atomid) != additionalAtomData.end(),
     260      "PdbParser::getSerial: atomid "+toString(atomid)+" not present in Map.");
     261  const PdbAtomInfoContainer &atomInfo = additionalAtomData.at(atomid);
     262
     263  return toSize_t(atomInfo.get(PdbKey::serial));
     264}
     265
     266/** Retrieves a value from PdbParser::atomIdMap.
     267 * \param atomid key
     268 * \return value
     269 */
     270size_t PdbParser::getAtomId(const size_t atomid) const
    218271{
    219272  ASSERT(atomIdMap.find(atomid) != atomIdMap.end(), "PdbParser::getAtomId: atomid not present in Map.");
     
    226279 * \return true - key not present, false - value present
    227280 */
    228 void PdbParser::setAtomId(int localatomid, int atomid)
    229 {
    230   pair<std::map<int,int>::iterator, bool > inserter;
    231   inserter = atomIdMap.insert( pair<int, int>(localatomid, atomid) );
     281void PdbParser::setAtomId(const size_t localatomid, const size_t atomid)
     282{
     283  pair<std::map<size_t,size_t>::iterator, bool > inserter;
     284  inserter = atomIdMap.insert( make_pair(localatomid, atomid) );
    232285  ASSERT(inserter.second, "PdbParser::setAtomId: atomId already present in Map.");
    233286}
    234287
    235 /**
    236  * Reads one data line of a tremolo file and interprets it according to the keys
    237  * obtained from the ATOMDATA line.
     288/** Parse an ATOM line from a PDB file.
     289 *
     290 * Reads one data line of a pdstatus file and interprets it according to the
     291 * specifications of the PDB 3.2 format: http://www.wwpdb.org/docs.html
     292 *
     293 *  A new atom is created and filled with available information, non-
     294 *  standard information is placed in additionalAtomData at the atom's id.
    238295 *
    239296 * \param line to parse as an atom
    240  */
    241 void PdbParser::readAtomDataLine(string line) {
    242 //  vector<string>::iterator it;
    243 //  stringstream lineStream;
    244 //  atom* newAtom = World::getInstance().createAtom();
    245 //  PdbAtomInfoContainer *atomInfo = NULL;
    246 //  additionalAtomData[newAtom->getId()] = *(new PdbAtomInfoContainer);
    247 //  atomInfo = &additionalAtomData[newAtom->getId()];
    248 //  PdbKey::atomDataKey currentField;
    249 //  string word;
    250 //  int oldId;
    251 //  double tmp;
    252 //
    253 //  lineStream << line;
    254 //  for (it = usedFields.begin(); it < usedFields.end(); it++) {
    255 //    currentField = knownKeys[it->substr(0, it->find("="))];
    256 //    switch (currentField) {
    257 //      case PdbKey::x :
    258 //        // for the moment, assume there are always three dimensions
    259 //        for (int i=0;i<NDIM;i++) {
    260 //          lineStream >> tmp;
    261 //          newAtom->set(i, tmp);
    262 //        }
    263 //        break;
    264 //      case PdbKey::u :
    265 //        // for the moment, assume there are always three dimensions
    266 //        lineStream >> newAtom->AtomicVelocity[0];
    267 //        lineStream >> newAtom->AtomicVelocity[1];
    268 //        lineStream >> newAtom->AtomicVelocity[2];
    269 //        break;
    270 //      case PdbKey::Type :
    271 //        char type[3];
    272 //        lineStream >> type;
    273 //        newAtom->setType(World::getInstance().getPeriode()->FindElement(type));
    274 //        ASSERT(newAtom->getType(), "Type was not set for this atom");
    275 //        break;
    276 //      case PdbKey::Id :
    277 //        lineStream >> oldId;
    278 //        atomIdMap[oldId] = newAtom->getId();
    279 //        break;
    280 //      case PdbKey::neighbors :
    281 //        readNeighbors(&lineStream,
    282 //            atoi(it->substr(it->find("=") + 1, 1).c_str()), newAtom->getId());
    283 //        break;
    284 //      default :
    285 //        lineStream >> word;
    286 //        atomInfo->set(currentField, word);
    287 //        break;
    288 //    }
     297 * \param newmol molecule to add parsed atoms to
     298 */
     299void PdbParser::readAtomDataLine(std::string &line, molecule *newmol = NULL) {
     300  vector<string>::iterator it;
     301  stringstream lineStream;
     302  atom* newAtom = World::getInstance().createAtom();
     303  additionalAtomData[newAtom->getId()] = *(new PdbAtomInfoContainer);
     304  PdbAtomInfoContainer &atomInfo = additionalAtomData[newAtom->getId()];
     305  string word;
     306  ConvertTo<size_t> toSize_t;
     307  double tmp;
     308
     309  lineStream << line;
     310  atomInfo.set(PdbKey::serial, line.substr(6,5));
     311  std::pair< std::set<size_t>::const_iterator, bool> Inserter =
     312    SerialSet.insert(toSize_t(atomInfo.get(PdbKey::serial)));
     313  ASSERT(Inserter.second,
     314      "PdbParser::readAtomDataLine() - ATOM contains entry with serial "
     315      +atomInfo.get(PdbKey::serial)+" already present!");
     316  // assign hightest+1 instead, but then beware of CONECT entries! Another map needed!
     317//  if (!Inserter.second) {
     318//    const size_t id = (*SerialSet.rbegin())+1;
     319//    SerialSet.insert(id);
     320//    atomInfo.set(PdbKey::serial, toString(id));
     321//    DoeLog(2) && (eLog() << Verbose(2)
     322//        << "Serial " << atomInfo.get(PdbKey::serial) << " already present, "
     323//        << "assigning " << toString(id) << " instead." << std::endl);
    289324//  }
     325
     326  // check whether serial exists, if so, assign next available
     327
     328//  DoLog(2) && (Log() << Verbose(2) << "Split line:"
     329//      << line.substr(6,5) << "|"
     330//      << line.substr(12,4) << "|"
     331//      << line.substr(16,1) << "|"
     332//      << line.substr(17,3) << "|"
     333//      << line.substr(21,1) << "|"
     334//      << line.substr(22,4) << "|"
     335//      << line.substr(26,1) << "|"
     336//      << line.substr(30,8) << "|"
     337//      << line.substr(38,8) << "|"
     338//      << line.substr(46,8) << "|"
     339//      << line.substr(54,6) << "|"
     340//      << line.substr(60,6) << "|"
     341//      << line.substr(76,2) << "|"
     342//      << line.substr(78,2) << std::endl);
     343
     344  setAtomId(toSize_t(atomInfo.get(PdbKey::serial)), newAtom->getId());
     345  atomInfo.set(PdbKey::name, line.substr(12,4));
     346  atomInfo.set(PdbKey::altloc, line.substr(16,1));
     347  atomInfo.set(PdbKey::resName, line.substr(17,3));
     348  atomInfo.set(PdbKey::chainID, line.substr(21,1));
     349  atomInfo.set(PdbKey::resSeq, line.substr(22,4));
     350  atomInfo.set(PdbKey::iCode, line.substr(26,1));
     351  PdbAtomInfoContainer::ScanKey(tmp, line.substr(30,8));
     352  newAtom->set(0, tmp);
     353  PdbAtomInfoContainer::ScanKey(tmp, line.substr(38,8));
     354  newAtom->set(1, tmp);
     355  PdbAtomInfoContainer::ScanKey(tmp, line.substr(46,8));
     356  newAtom->set(2, tmp);
     357  atomInfo.set(PdbKey::occupancy, line.substr(54,6));
     358  atomInfo.set(PdbKey::tempFactor, line.substr(60,6));
     359  atomInfo.set(PdbKey::charge, line.substr(78,2));
     360  PdbAtomInfoContainer::ScanKey(word, line.substr(76,2));
     361  newAtom->setType(World::getInstance().getPeriode()->FindElement(word));
     362
     363  if (newmol != NULL)
     364    newmol->AddAtom(newAtom);
     365
     366//  printAtomInfo(newAtom);
     367}
     368
     369/** Prints all PDB-specific information known about an atom.
     370 *
     371 */
     372void PdbParser::printAtomInfo(const atom * const newAtom) const
     373{
     374  const PdbAtomInfoContainer &atomInfo = additionalAtomData.at(newAtom->getId()); // operator[] const does not exist
     375
     376  DoLog(1) && (Log() << Verbose(1) << "We know about atom " << newAtom->getId() << ":" << std::endl);
     377  DoLog(1) && (Log() << Verbose(1) << "\tserial is " << atomInfo.get(PdbKey::serial) << std::endl);
     378  DoLog(1) && (Log() << Verbose(1) << "\tname is " << atomInfo.get(PdbKey::name) << std::endl);
     379  DoLog(1) && (Log() << Verbose(1) << "\taltloc is " << atomInfo.get(PdbKey::altloc) << std::endl);
     380  DoLog(1) && (Log() << Verbose(1) << "\tresName is " << atomInfo.get(PdbKey::resName) << std::endl);
     381  DoLog(1) && (Log() << Verbose(1) << "\tchainID is " << atomInfo.get(PdbKey::chainID) << std::endl);
     382  DoLog(1) && (Log() << Verbose(1) << "\tresSeq is " << atomInfo.get(PdbKey::resSeq) << std::endl);
     383  DoLog(1) && (Log() << Verbose(1) << "\tiCode is " << atomInfo.get(PdbKey::iCode) << std::endl);
     384  DoLog(1) && (Log() << Verbose(1) << "\tx is " << newAtom->getPosition() << std::endl);
     385  DoLog(1) && (Log() << Verbose(1) << "\toccupancy is " << atomInfo.get(PdbKey::occupancy) << std::endl);
     386  DoLog(1) && (Log() << Verbose(1) << "\ttempFactor is " << atomInfo.get(PdbKey::tempFactor) << std::endl);
     387  DoLog(1) && (Log() << Verbose(1) << "\telement is '" << *(newAtom->getType()) << "'" << std::endl);
     388  DoLog(1) && (Log() << Verbose(1) << "\tcharge is " << atomInfo.get(PdbKey::charge) << std::endl);
    290389}
    291390
     
    293392 * Reads neighbor information for one atom from the input.
    294393 *
    295  * \param stream where to read the information from
    296  * \param number of neighbors to read
    297  * \param world id of the atom the information belongs to
    298  */
    299 void PdbParser::readNeighbors(stringstream* line, int numberOfNeighbors, int atomId) {
    300 //  int neighborId = 0;
    301 //  for (int i = 0; i < numberOfNeighbors; i++) {
    302 //    *line >> neighborId;
    303 //    // 0 is used to fill empty neighbor positions in the tremolo file.
    304 //    if (neighborId > 0) {
    305 //      additionalAtomData[atomId].neighbors.push_back(neighborId);
    306 //    }
    307 //  }
    308 }
    309 
    310 /**
    311  * Adds the collected neighbor information to the atoms in the world. The atoms
    312  * are found by their current ID and mapped to the corresponding atoms with the
    313  * Id found in the parsed file.
    314  */
    315 void PdbParser::processNeighborInformation() {
    316 //  if (!isUsedField("neighbors")) {
    317 //    return;
    318 //  }
    319 //
    320 //  for(map<int, PdbAtomInfoContainer>::iterator currentInfo = additionalAtomData.begin();
    321 //    currentInfo != additionalAtomData.end(); currentInfo++
    322 //  ) {
    323 //    for(vector<int>::iterator neighbor = currentInfo->second.neighbors.begin();
    324 //      neighbor != currentInfo->second.neighbors.end(); neighbor++
    325 //    ) {
    326 //      World::getInstance().getAtom(AtomById(currentInfo->first))
    327 //          ->addBond(World::getInstance().getAtom(AtomById(atomIdMap[*neighbor])));
    328 //    }
    329 //  }
     394 * \param line to parse as an atom
     395 */
     396void PdbParser::readNeighbors(std::string &line)
     397{
     398  const size_t length = line.length();
     399  std::list<size_t> ListOfNeighbors;
     400  ConvertTo<size_t> toSize_t;
     401
     402  // obtain neighbours
     403  // show split line for debugging
     404  string output;
     405  ASSERT(length >=16,
     406      "PdbParser::readNeighbors() - CONECT entry has not enough entries: "+line+"!");
     407//  output = "Split line:|";
     408//  output += line.substr(6,5) + "|";
     409  const size_t id = toSize_t(line.substr(6,5));
     410  for (size_t index = 11; index <= 26; index+=5) {
     411    if (index+5 <= length) {
     412//      output += line.substr(index,5) + "|";
     413      const size_t otherid = toSize_t(line.substr(index,5));
     414      ListOfNeighbors.push_back(otherid);
     415    } else  {
     416      break;
     417    }
     418  }
     419//  DoLog(2) && (Log() << Verbose(2) << output << std::endl);
     420
     421  // add neighbours
     422  atom *_atom = World::getInstance().getAtom(AtomById(getAtomId(id)));
     423  for (std::list<size_t>::const_iterator iter = ListOfNeighbors.begin();
     424      iter != ListOfNeighbors.end();
     425      ++iter) {
     426//    DoLog(1) && (Log() << Verbose(1) << "Adding Bond (" << getAtomId(id) << "," << getAtomId(*iter) << ")" << std::endl);
     427    atom * const _Otheratom = World::getInstance().getAtom(AtomById(getAtomId(*iter)));
     428    _atom->addBond(_Otheratom);
     429  }
    330430}
    331431
     
    339439 * \return input string with modified atom IDs
    340440 */
    341 string PdbParser::adaptIdDependentDataString(string data) {
     441//string PdbParser::adaptIdDependentDataString(string data) {
    342442//  // there might be no IDs
    343443//  if (data == "-") {
     
    358458//
    359459//  return result.str();
    360   return "";
    361 }
    362 
    363 
    364 PdbAtomInfoContainer::PdbAtomInfoContainer() :
    365   name("-"),
    366   resName("-"),
    367   chainID("0"),
    368   resSeq("0"),
    369   occupancy("0"),
    370   tempFactor("0"),
    371   segID("0"),
    372   charge("0")
    373 {}
    374 
    375 void PdbAtomInfoContainer::set(PdbKey::PdbDataKey key, string value) {
    376   switch (key) {
    377     case PdbKey::extType :
    378       extType = value;
    379       break;
    380     case PdbKey::name :
    381       name = value;
    382       break;
    383     case PdbKey::resName :
    384       resName = value;
    385       break;
    386     case PdbKey::chainID :
    387       chainID = value;
    388       break;
    389     case PdbKey::resSeq :
    390       resSeq = value;
    391       break;
    392     case PdbKey::occupancy :
    393       occupancy = value;
    394       break;
    395     case PdbKey::tempFactor :
    396       tempFactor = value;
    397       break;
    398     case PdbKey::segID :
    399       segID = value;
    400       break;
    401     case PdbKey::charge :
    402       charge = value;
    403       break;
    404     default :
    405       cout << "Unknown key: " << key << ", value: " << value << endl;
    406       break;
    407   }
    408 }
    409 
    410 string PdbAtomInfoContainer::get(PdbKey::PdbDataKey key) {
    411   switch (key) {
    412     case PdbKey::extType :
    413       return extType;
    414     case PdbKey::name :
    415       return name;
    416     case PdbKey::resName :
    417       return resName;
    418     case PdbKey::chainID :
    419       return chainID;
    420     case PdbKey::resSeq :
    421       return resSeq;
    422     case PdbKey::occupancy :
    423       return occupancy;
    424     case PdbKey::tempFactor :
    425       return tempFactor;
    426     case PdbKey::segID :
    427       return segID;
    428     case PdbKey::charge :
    429       return charge;
    430     default :
    431       cout << "Unknown key: " << key << endl;
    432       return "";
    433   }
    434 }
    435 
     460//  return "";
     461//}
     462
     463
     464bool PdbParser::operator==(const PdbParser& b) const
     465{
     466  bool status = true;
     467  World::AtomComposite atoms = World::getInstance().getAllAtoms();
     468  for (World::AtomComposite::const_iterator iter = atoms.begin(); iter != atoms.end(); ++iter) {
     469    if ((additionalAtomData.find((*iter)->getId()) != additionalAtomData.end())
     470        && (b.additionalAtomData.find((*iter)->getId()) != b.additionalAtomData.end())) {
     471      const PdbAtomInfoContainer &atomInfo = additionalAtomData.at((*iter)->getId());
     472      const PdbAtomInfoContainer &OtheratomInfo = b.additionalAtomData.at((*iter)->getId());
     473
     474      status = status && (atomInfo.get(PdbKey::serial) == OtheratomInfo.get(PdbKey::serial));
     475      if (!status) DoeLog(1) && (eLog() << Verbose(1) << "Mismatch in serials!" << std::endl);
     476      status = status && (atomInfo.get(PdbKey::name) == OtheratomInfo.get(PdbKey::name));
     477      if (!status) DoeLog(1) && (eLog() << Verbose(1) << "Mismatch in names!" << std::endl);
     478      status = status && (atomInfo.get(PdbKey::altloc) == OtheratomInfo.get(PdbKey::altloc));
     479      if (!status) DoeLog(1) && (eLog() << Verbose(1) << "Mismatch in altlocs!" << std::endl);
     480      status = status && (atomInfo.get(PdbKey::resName) == OtheratomInfo.get(PdbKey::resName));
     481      if (!status) DoeLog(1) && (eLog() << Verbose(1) << "Mismatch in resNames!" << std::endl);
     482      status = status && (atomInfo.get(PdbKey::chainID) == OtheratomInfo.get(PdbKey::chainID));
     483      if (!status) DoeLog(1) && (eLog() << Verbose(1) << "Mismatch in chainIDs!" << std::endl);
     484      status = status && (atomInfo.get(PdbKey::resSeq) == OtheratomInfo.get(PdbKey::resSeq));
     485      if (!status) DoeLog(1) && (eLog() << Verbose(1) << "Mismatch in resSeqs!" << std::endl);
     486      status = status && (atomInfo.get(PdbKey::iCode) == OtheratomInfo.get(PdbKey::iCode));
     487      if (!status) DoeLog(1) && (eLog() << Verbose(1) << "Mismatch in iCodes!" << std::endl);
     488      status = status && (atomInfo.get(PdbKey::occupancy) == OtheratomInfo.get(PdbKey::occupancy));
     489      if (!status) DoeLog(1) && (eLog() << Verbose(1) << "Mismatch in occupancies!" << std::endl);
     490      status = status && (atomInfo.get(PdbKey::tempFactor) == OtheratomInfo.get(PdbKey::tempFactor));
     491      if (!status) DoeLog(1) && (eLog() << Verbose(1) << "Mismatch in tempFactors!" << std::endl);
     492      status = status && (atomInfo.get(PdbKey::charge) == OtheratomInfo.get(PdbKey::charge));
     493      if (!status) DoeLog(1) && (eLog() << Verbose(1) << "Mismatch in charges!" << std::endl);
     494    }
     495  }
     496
     497  return status;
     498}
     499
  • src/Parser/PdbParser.hpp

    re828c0 r4fbca9c  
    1010
    1111#include <string>
    12 #include "Parser/FormatParser.hpp"
     12#include "FormatParser.hpp"
     13#include "PdbAtomInfoContainer.hpp"
     14#include "PdbKey.hpp"
    1315
    1416/**
    15  * Known keys for the Pdb line.
    16  */
    17 class PdbKey {
    18 public:
    19   enum PdbDataKey {
    20     noKey,
    21     x,
    22     Id,
    23     Type,
    24     extType,
    25     name,
    26     resName,
    27     chainID,
    28     resSeq,
    29     occupancy,
    30     tempFactor,
    31     segID,
    32     charge
    33   };
    34 };
    35 
    36 /**
    37  * Holds tremolo-specific information which is not store in the atom class.
    38  */
    39 class PdbAtomInfoContainer {
    40 public:
    41   PdbAtomInfoContainer();
    42   void set(PdbKey::PdbDataKey key, std::string value);
    43   std::string get(PdbKey::PdbDataKey key);
    44   std::string name;
    45   std::string extType;
    46   std::string resName;
    47   std::string chainID;
    48   std::string resSeq;
    49   std::string occupancy;
    50   std::string tempFactor;
    51   std::string segID;
    52   std::string charge;
    53 };
    54 
    55 /**
    56  * Loads a tremolo file into the World and saves the World as a tremolo file.
     17 * Loads a PDB format 3.2 file into the World and saves the World as a PDB file.
    5718 */
    5819class PdbParser : public FormatParser
     
    6425  void save(std::ostream* file);
    6526
     27  bool operator==(const PdbParser& b) const;
     28  void printAtomInfo(const atom *newAtom) const;
    6629
    6730private:
    68   void readAtomDataLine(string line);
     31  enum PdbKey::KnownTokens getToken(string &line);
     32  void readAtomDataLine(string &line, molecule *newmol);
    6933  void parseAtomDataKeysLine(string line, int offset);
    70   void readNeighbors(std::stringstream* line, int numberOfNeighbors, int atomId);
    71   void processNeighborInformation();
    72   void adaptImprData();
    73   void adaptTorsion();
    74   std::string adaptIdDependentDataString(std::string data);
     34  void readNeighbors(std::string &line);
     35//  void adaptImprData();
     36//  void adaptTorsion();
     37//  std::string adaptIdDependentDataString(std::string data);
    7538  bool isUsedField(std::string fieldName);
    7639  void writeNeighbors(std::ostream* file, int numberOfNeighbors, atom* currentAtom);
    7740  void saveLine(ostream* file, const atom* currentAtom, const char *name, const int AtomNo, const int ResdueNo);
    78   int getAtomId(int atomid) const;
    79   void setAtomId(int localatomid, int atomid);
     41
     42  // internal getter and setter
     43  size_t getSerial(const size_t atomid) const;
     44  size_t getAtomId(const size_t atomid) const;
     45  void setAtomId(const size_t localatomid, const size_t atomid);
    8046
    8147  /**
    8248   * Map to associate the known keys with numbers.
    8349   */
    84   std::map<std::string, PdbKey::PdbDataKey> knownKeys;
     50  std::map<std::string, PdbKey::KnownTokens> knownTokens;
    8551
    8652  /**
     
    8854   * file.
    8955   */
    90   std::map<int, PdbAtomInfoContainer> additionalAtomData;
     56  std::map<size_t, PdbAtomInfoContainer> additionalAtomData;
    9157
    9258  /**
     
    9965   * world.
    10066   */
    101   std::map<int, int> atomIdMap;
     67  std::map<size_t, size_t> atomIdMap;
     68
     69  /**
     70   * Maps original atom IDs received from the parsed file to atom IDs in the
     71   * world.
     72   */
     73  std::set<size_t> SerialSet;
     74
    10275};
    10376
  • src/unittests/Makefile.am

    re828c0 r4fbca9c  
    3535  MoleculeDescriptorTest \
    3636  ObserverTest \
    37   ParserUnitTest \
     37  ParserCommonUnitTest \
     38  ParserTremoloUnitTest \
    3839  periodentafelTest \
    3940  PlaneUnittest \
     
    4849  VectorContentUnitTest \
    4950  VectorUnitTest
    50  
    51  
     51
     52
    5253check_PROGRAMS = $(TESTS)
    5354noinst_PROGRAMS = $(TESTS) TestRunner
     
    9697  MoleculeDescriptorTest.cpp \
    9798  ObserverTest.cpp \
    98   ParserUnitTest.cpp \
     99  ParserCommonUnitTest.cpp \
     100  ParserTremoloUnitTest.cpp \
    99101  periodentafelTest.cpp \
    100102  PlaneUnittest.cpp \
     
    137139  ObserverTest.hpp \
    138140  periodentafelTest.hpp \
    139   ParserUnitTest.hpp \
     141  ParserCommonUnitTest.hpp \
     142  ParserTremoloUnitTest.hpp \
    140143  PlaneUnittest.hpp \
    141144  RegistryUnitTest.hpp \
     
    203206LineUnittest_LDADD = ${ALLLIBS}
    204207
    205 LinkedCellUnitTest_SOURCES = UnitTestMain.cpp LinkedCellUnitTest.cpp LinkedCellUnitTest.hpp 
     208LinkedCellUnitTest_SOURCES = UnitTestMain.cpp LinkedCellUnitTest.cpp LinkedCellUnitTest.hpp
    206209LinkedCellUnitTest_LDADD = ${ALLLIBS}
    207210
     
    209212ListOfBondsUnitTest_LDADD = ${ALLLIBS}
    210213
    211 LogUnitTest_SOURCES = UnitTestMain.cpp logunittest.cpp logunittest.hpp 
     214LogUnitTest_SOURCES = UnitTestMain.cpp logunittest.cpp logunittest.hpp
    212215LogUnitTest_LDADD = ${ALLLIBS}
    213216
     
    227230ObserverTest_LDADD = ${ALLLIBS}
    228231
    229 ParserUnitTest_SOURCES = UnitTestMain.cpp ParserUnitTest.cpp ParserUnitTest.hpp
    230 ParserUnitTest_LDADD = ${ALLLIBS}
     232ParserCommonUnitTest_SOURCES = UnitTestMain.cpp ParserCommonUnitTest.cpp ParserCommonUnitTest.hpp
     233ParserCommonUnitTest_LDADD = ${ALLLIBS}
     234
     235ParserTremoloUnitTest_SOURCES = UnitTestMain.cpp ParserTremoloUnitTest.cpp ParserTremoloUnitTest.hpp
     236ParserTremoloUnitTest_LDADD = ${ALLLIBS}
    231237
    232238periodentafelTest_SOURCES = UnitTestMain.cpp periodentafelTest.cpp periodentafelTest.hpp
  • src/unittests/ParserCommonUnitTest.cpp

    re828c0 r4fbca9c  
    77
    88/*
    9  * ParserUnitTest.cpp
     9 * ParserCommonUnitTest.cpp
    1010 *
    1111 *  Created on: Mar 3, 2010
     
    1818#endif
    1919
    20 #include "ParserUnitTest.hpp"
     20#include "ParserCommonUnitTest.hpp"
    2121
    2222#include <cppunit/CompilerOutputter.h>
     
    2525
    2626#include "Parser/MpqcParser.hpp"
     27#include "Parser/PdbParser.hpp"
    2728#include "Parser/PcpParser.hpp"
    2829#include "Parser/TremoloParser.hpp"
     
    4142
    4243// Registers the fixture into the 'registry'
    43 CPPUNIT_TEST_SUITE_REGISTRATION( ParserUnitTest );
     44CPPUNIT_TEST_SUITE_REGISTRATION( ParserCommonUnitTest );
    4445
    4546static string waterPcp = "# ParallelCarParinello - main configuration file - created with molecuilder\n\
     
    117118Ion_Type1_1\t0.758602\t0.000000000\t0.504284\t0 # molecule nr 1\n\
    118119Ion_Type1_2\t0.758602\t0.000000000\t-0.504284\t0 # molecule nr 2\n";
     120//----|----*|---||--*||---|***|-------|-------|-------|-----|---------------|-|-
     121//000000011111111112222222222333333333344444444445555555555666666666677777777778
     122//345678901234567890123456789012345678901234567890123456789012345678901234567890
     123static string waterPdb = "\
     124REMARK  This is a test water molecule as written by TREMOLO.\n\
     125ATOM      1  OT  GMT-    0       1.583   1.785   1.480  1.00178.02           O-2\n\
     126ATOM      2  HT  GMT-    0       1.186   1.643   2.213  1.00103.58           H+1\n\
     127ATOM      3  HT  GMT-    0       2.642   1.896   1.730  1.00126.00           H+1\n\
     128ATOM      4  OT  GMT-    1       3.583   1.785   1.480  1.00178.02           O-2\n\
     129ATOM      5  HT  GMT-    1       3.186   1.643   2.213  1.00103.58           H+1\n\
     130ATOM      6  HT  GMT-    1       4.642   1.896   1.730  1.00126.00           H+1\n\
     131CONECT    1    2    3\n\
     132CONECT    2    1\n\
     133CONECT    3    1\n\
     134CONECT    4    5    6\n\
     135CONECT    5    4\n\
     136CONECT    6    4\n\
     137END";
    119138static string waterMpqc ="% Created by MoleCuilder\n\
    120139mpqc: (\n\
     
    144163)\n";
    145164static string waterXyz = "3\n\tH2O: water molecule\nO\t0\t0\t0\nH\t0.758602\t0\t0.504284\nH\t0.758602\t0\t-0.504284\n";
    146 static string Tremolo_Atomdata1 = "# ATOMDATA\tId\tname\tType\tx=3\n";
    147 static string Tremolo_Atomdata2 = "#\n#ATOMDATA Id name Type x=3\n1 hydrogen H 3.0 4.5 0.1\n\n";
    148 static string Tremolo_invalidkey = "#\n#ATOMDATA Id name foo Type x=3\n\n\n";
    149 static string Tremolo_velocity = "#\n#ATOMDATA Id name Type u=3\n1 hydrogen H 3.0 4.5 0.1\n\n";
    150 static string Tremolo_neighbours = "#\n#ATOMDATA Id Type neighbors=2\n1 H 3 0\n2 H 3 0\n3 O 1 2\n";
    151 static string Tremolo_improper = "#\n#ATOMDATA Id Type imprData\n8 H 9-10\n9 H 10-8,8-10\n10 O -\n";
    152 static string Tremolo_torsion = "#\n#ATOMDATA Id Type torsion\n8 H 9-10\n9 H 10-8,8-10\n10 O -\n";
    153 static string Tremolo_full = "# ATOMDATA\tx=3\tu=3\tF\tstress\tId\tneighbors=5\timprData\tGroupMeasureTypeNo\tType\textType\tname\tresName\tchainID\tresSeq\toccupancy\ttempFactor\tsegID\tCharge\tcharge\tGrpTypeNo\ttorsion\n0\t0\t0\t0\t0\t0\t0\t0\t1\t0\t0\t0\t0\t0\t-\t0\tH\t-\t-\t-\t0\t0\t0\t0\t0\t0\t0\t0\t-\t\n";
    154 
    155 void ParserUnitTest::setUp() {
     165
     166void ParserCommonUnitTest::setUp() {
    156167  World::getInstance();
     168
     169  setVerbosity(2);
    157170
    158171  // we need hydrogens and oxygens in the following tests
     
    161174}
    162175
    163 void ParserUnitTest::tearDown() {
     176void ParserCommonUnitTest::tearDown() {
    164177  ChangeTracker::purgeInstance();
    165178  World::purgeInstance();
     
    168181/************************************ tests ***********************************/
    169182
    170 void ParserUnitTest::rewriteAnXyzTest() {
     183void ParserCommonUnitTest::rewriteAnXyzTest() {
    171184  cout << "Testing the XYZ parser." << endl;
    172185  XyzParser* testParser = new XyzParser();
     
    185198}
    186199
    187 void ParserUnitTest::readTremoloPreliminaryCommentsTest() {
    188   cout << "Testing the tremolo parser." << endl;
    189   TremoloParser* testParser = new TremoloParser();
    190   stringstream input, output;
    191 
    192   // Atomdata beginning with "# ATOMDATA"
    193   input << Tremolo_Atomdata1;
    194   testParser->load(&input);
    195   testParser->save(&output);
    196   CPPUNIT_ASSERT(Tremolo_Atomdata1 == output.str());
    197   input.clear();
    198   output.clear();
    199 
    200   // Atomdata beginning with "#ATOMDATA"
    201   input << Tremolo_Atomdata2;
    202   testParser->load(&input);
    203   testParser->save(&output);
    204   CPPUNIT_ASSERT(output.str().find("hydrogen") != string::npos);
    205   input.clear();
    206   output.clear();
    207 
    208   // Invalid key in Atomdata line
    209   input << Tremolo_invalidkey;
    210   testParser->load(&input);
    211   //TODO: proove invalidity
    212   input.clear();
    213 }
    214 
    215 void ParserUnitTest::readTremoloCoordinatesTest() {
    216   TremoloParser* testParser = new TremoloParser();
    217   stringstream input;
    218 
    219   // One simple data line
    220   input << Tremolo_Atomdata2;
    221   testParser->load(&input);
    222   CPPUNIT_ASSERT(World::getInstance().getAtom(AtomByType(1))->at(0) == 3.0);
    223   input.clear();
    224 }
    225 
    226 void ParserUnitTest::readTremoloVelocityTest() {
    227   TremoloParser* testParser = new TremoloParser();
    228   stringstream input;
    229 
    230   // One simple data line
    231   input << Tremolo_velocity;
    232   testParser->load(&input);
    233   CPPUNIT_ASSERT(World::getInstance().getAtom(AtomByType(1))->AtomicVelocity[0] == 3.0);
    234   input.clear();
    235 }
    236 
    237 void ParserUnitTest::readTremoloNeighborInformationTest() {
    238   TremoloParser* testParser = new TremoloParser();
    239   stringstream input;
    240 
    241   // Neighbor data
    242   input << Tremolo_neighbours;
    243   testParser->load(&input);
    244 
    245   CPPUNIT_ASSERT_EQUAL(3, World::getInstance().numAtoms());
    246   CPPUNIT_ASSERT(World::getInstance().getAtom(AtomByType(8))->
    247       IsBondedTo(World::getInstance().getAtom(AtomByType(1))));
    248   input.clear();
    249 }
    250 
    251 void ParserUnitTest::readAndWriteTremoloImprDataInformationTest() {
    252   TremoloParser* testParser = new TremoloParser();
    253   stringstream input, output;
    254 
    255   // Neighbor data
    256   input << Tremolo_improper;
    257   testParser->load(&input);
    258   testParser->save(&output);
    259   CPPUNIT_ASSERT_EQUAL(3, World::getInstance().numAtoms());
    260   CPPUNIT_ASSERT(output.str().find("2-0,0-2") != string::npos);
    261   input.clear();
    262   output.clear();
    263 }
    264 
    265 void ParserUnitTest::readAndWriteTremoloTorsionInformationTest() {
    266   TremoloParser* testParser = new TremoloParser();
    267   stringstream input, output;
    268 
    269   // Neighbor data
    270   input << Tremolo_torsion;
    271   testParser->load(&input);
    272   testParser->save(&output);
    273   CPPUNIT_ASSERT_EQUAL(3, World::getInstance().numAtoms());
    274   CPPUNIT_ASSERT(output.str().find("2-0,0-2") != string::npos);
    275   input.clear();
    276   output.clear();
    277 }
    278 
    279 void ParserUnitTest::writeTremoloTest() {
    280   TremoloParser* testParser = new TremoloParser();
    281   stringstream output;
    282 
    283   // with the maximum number of fields and minimal information, default values are printed
    284   atom* newAtom = World::getInstance().createAtom();
    285   newAtom->setType(1);
    286   testParser->setFieldsForSave("x=3 u=3 F stress Id neighbors=5 imprData GroupMeasureTypeNo Type extType name resName chainID resSeq occupancy tempFactor segID Charge charge GrpTypeNo torsion");
    287   testParser->save(&output);
    288   CPPUNIT_ASSERT(output.str() == Tremolo_full);
    289 
    290   cout << "testing the tremolo parser is done" << endl;
    291 }
    292 
    293 void ParserUnitTest::readwritePcpTest() {
     200void ParserCommonUnitTest::readwritePcpTest() {
    294201  stringstream input(waterPcp);
    295202  PcpParser* testParser = new PcpParser();
     
    299206  CPPUNIT_ASSERT_EQUAL(3, World::getInstance().numAtoms());
    300207
    301   string newWaterPcp = "";
    302   stringstream output;
    303   testParser->save(&output);
    304 
    305   input << output;
     208  // check that equality function is ok
     209  CPPUNIT_ASSERT(*testParser == *testParser);
     210
     211  stringstream output;
     212  testParser->save(&output);
     213
     214  input << output.str();
    306215  PcpParser* testParser2 = new PcpParser();
    307216  testParser2->load(&input);
     
    312221}
    313222
    314 void ParserUnitTest::writeMpqcTest() {
     223void ParserCommonUnitTest::readwritePdbTest() {
     224  stringstream input;
     225  input << waterPdb;
     226  PdbParser* testParser = new PdbParser();
     227  testParser->load(&input);
     228  input.clear();
     229
     230  CPPUNIT_ASSERT_EQUAL(6, World::getInstance().numAtoms());
     231
     232  stringstream output;
     233  testParser->save(&output);
     234
     235//  std::cout << "Save PDB is:" << std::endl;
     236//  std::cout << output.str() << std::endl;
     237
     238  input << output.str();
     239  PdbParser* testParser2 = new PdbParser();
     240  testParser2->load(&input);
     241
     242  CPPUNIT_ASSERT_EQUAL(12, World::getInstance().numAtoms());
     243}
     244
     245void ParserCommonUnitTest::writeMpqcTest() {
    315246  // build up water molecule
    316247  atom *Walker = NULL;
  • src/unittests/ParserTremoloUnitTest.hpp

    re828c0 r4fbca9c  
    11/*
    2  * ParserUnitTest.hpp
     2 * ParserTremoloUnitTest.hpp
    33 *
    44 *  Created on: Mar 3, 2010
    55 *      Author: metzler
    66 */
    7 #ifndef PARSERUNITTEST_HPP_
    8 #define PARSERUNITTEST_HPP_
     7#ifndef PARSERTREMOLOUNITTEST_HPP_
     8#define PARSERTREMOLOUNITTEST_HPP_
    99
    1010#include <cppunit/extensions/HelperMacros.h>
    1111#include <string>
    1212
    13 class ParserUnitTest :  public CppUnit::TestFixture
     13class ParserTremoloUnitTest :  public CppUnit::TestFixture
    1414{
    15   CPPUNIT_TEST_SUITE( ParserUnitTest ) ;
    16   CPPUNIT_TEST ( rewriteAnXyzTest );
     15  CPPUNIT_TEST_SUITE( ParserTremoloUnitTest ) ;
    1716  CPPUNIT_TEST ( readTremoloPreliminaryCommentsTest );
    1817  CPPUNIT_TEST ( readTremoloCoordinatesTest );
     
    2221  CPPUNIT_TEST ( readAndWriteTremoloTorsionInformationTest );
    2322  CPPUNIT_TEST ( writeTremoloTest );
    24   CPPUNIT_TEST ( readwritePcpTest );
    25   CPPUNIT_TEST ( writeMpqcTest );
    2623  CPPUNIT_TEST_SUITE_END();
    2724
     
    3027  void tearDown();
    3128
    32   void rewriteAnXyzTest();
    3329  void readTremoloPreliminaryCommentsTest();
    3430  void readTremoloCoordinatesTest();
     
    3834  void readAndWriteTremoloTorsionInformationTest();
    3935  void writeTremoloTest();
    40   void readwritePcpTest();
    41   void writeMpqcTest();
    4236};
    4337
    44 #endif /* PARSERUNITTEST_HPP_ */
     38#endif /* PARSERTREMOLOUNITTEST_HPP_ */
Note: See TracChangeset for help on using the changeset viewer.