/* * CheckAgainstAdjacencyFile.hpp * * Created on: Mar 3, 2011 * Author: heber */ #ifndef CHECKAGAINSTADJACENCYFILE_HPP_ #define CHECKAGAINSTADJACENCYFILE_HPP_ // include config.h #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include "types.hpp" #include "World.hpp" class atom; /** This class contains the bond structure inside an internal map of atoms which * each bond neighbor parsed from an external file. * * We may compare a subset of atoms against this internal bond structure. It is * true it is a true subset of the bond structure. */ class CheckAgainstAdjacencyFile { //!> Unit test is granted access to internal data friend class CheckAgainstAdjacencyFileTest; public: CheckAgainstAdjacencyFile(std::istream &File); ~CheckAgainstAdjacencyFile(); typedef std::vector atomids_t; bool operator()(const atomids_t &atoms); private: typedef std::set KeysSet; typedef std::set ValuesSet; typedef std::pair AtomBondPair; typedef std::multimap< atomId_t, atomId_t > AtomBondMap; typedef std::pair AtomBondRange; AtomBondMap InternalAtomBondMap; AtomBondMap ExternalAtomBondMap; int NonMatchNumber; KeysSet getKeys(const AtomBondRange &_range) const; ValuesSet getValues(const AtomBondRange&_range) const; void CreateExternalMap(const atomids_t &atoms); bool ParseInInternalMap(std::istream &File); bool CompareInternalExternalMap(); }; #endif /* CHECKAGAINSTADJACENCYFILE_HPP_ */