| [cee0b57] | 1 | /** \file molecule.hpp | 
|---|
| [14de469] | 2 | * | 
|---|
| [69eb71] | 3 | * Class definitions of atom and molecule, element and periodentafel | 
|---|
| [14de469] | 4 | */ | 
|---|
|  | 5 |  | 
|---|
|  | 6 | #ifndef MOLECULES_HPP_ | 
|---|
|  | 7 | #define MOLECULES_HPP_ | 
|---|
|  | 8 |  | 
|---|
| [f66195] | 9 | /*********************************************** includes ***********************************/ | 
|---|
|  | 10 |  | 
|---|
| [962d8d] | 11 | #ifdef HAVE_CONFIG_H | 
|---|
|  | 12 | #include <config.h> | 
|---|
|  | 13 | #endif | 
|---|
|  | 14 |  | 
|---|
| [edb93c] | 15 | //// STL headers | 
|---|
| [14de469] | 16 | #include <map> | 
|---|
|  | 17 | #include <set> | 
|---|
| [a564be] | 18 | #include <stack> | 
|---|
| [14de469] | 19 | #include <deque> | 
|---|
| [d7e30c] | 20 | #include <list> | 
|---|
| [5e0d1f] | 21 | #include <vector> | 
|---|
| [14de469] | 22 |  | 
|---|
| [520c8b] | 23 | #include <string> | 
|---|
|  | 24 |  | 
|---|
| [68d781] | 25 | #include "types.hpp" | 
|---|
| [f66195] | 26 | #include "graph.hpp" | 
|---|
| [ad011c] | 27 | #include "CodePatterns/Observer.hpp" | 
|---|
|  | 28 | #include "CodePatterns/ObservedIterator.hpp" | 
|---|
|  | 29 | #include "CodePatterns/Cacheable.hpp" | 
|---|
| [389cc8] | 30 | #include "Formula.hpp" | 
|---|
| [14d541] | 31 | #include "AtomSet.hpp" | 
|---|
| [14de469] | 32 |  | 
|---|
| [97ebf8] | 33 | #include "Descriptors/MoleculeDescriptor_impl.hpp" | 
|---|
|  | 34 |  | 
|---|
| [f66195] | 35 | /****************************************** forward declarations *****************************/ | 
|---|
|  | 36 |  | 
|---|
|  | 37 | class atom; | 
|---|
|  | 38 | class bond; | 
|---|
| [b70721] | 39 | class BondedParticle; | 
|---|
|  | 40 | class BondGraph; | 
|---|
| [f66195] | 41 | class element; | 
|---|
|  | 42 | class ForceMatrix; | 
|---|
|  | 43 | class LinkedCell; | 
|---|
| [14de469] | 44 | class molecule; | 
|---|
| [2319ed] | 45 | class MoleculeLeafClass; | 
|---|
| [14de469] | 46 | class MoleculeListClass; | 
|---|
| [f66195] | 47 | class periodentafel; | 
|---|
| [1f91f4] | 48 | class RealSpaceMatrix; | 
|---|
| [f66195] | 49 | class Vector; | 
|---|
| [c550dd] | 50 | class Shape; | 
|---|
| [14de469] | 51 |  | 
|---|
|  | 52 | /******************************** Some definitions for easier reading **********************************/ | 
|---|
|  | 53 |  | 
|---|
| [edb93c] | 54 | #define MoleculeList list <molecule *> | 
|---|
|  | 55 | #define MoleculeListTest pair <MoleculeList::iterator, bool> | 
|---|
|  | 56 |  | 
|---|
| [ed060e] | 57 | #define DistancePair pair < double, atom* > | 
|---|
|  | 58 | #define DistanceMap multimap < double, atom* > | 
|---|
|  | 59 | #define DistanceTestPair pair < DistanceMap::iterator, bool> | 
|---|
|  | 60 |  | 
|---|
| [1907a7] | 61 |  | 
|---|
| [14de469] | 62 | /************************************* Class definitions ****************************************/ | 
|---|
|  | 63 |  | 
|---|
| [ccd9f5] | 64 | /** Structure to contain parameters needed for evaluation of constraint potential. | 
|---|
|  | 65 | */ | 
|---|
|  | 66 | struct EvaluatePotential | 
|---|
|  | 67 | { | 
|---|
| [e4afb4] | 68 | int startstep; //!< start configuration (MDStep in atom::trajectory) | 
|---|
|  | 69 | int endstep; //!< end configuration (MDStep in atom::trajectory) | 
|---|
|  | 70 | atom **PermutationMap; //!< gives target ptr for each atom, array of size molecule::AtomCount (this is "x" in \f$ V^{con}(x) \f$ ) | 
|---|
| [ccd9f5] | 71 | DistanceMap **DistanceList; //!< distance list of each atom to each atom | 
|---|
|  | 72 | DistanceMap::iterator *StepList; //!< iterator to ascend through NearestNeighbours \a **DistanceList | 
|---|
| [e4afb4] | 73 | int *DoubleList; //!< count of which sources want to move to this target, basically the injective measure (>1 -> not injective) | 
|---|
| [ccd9f5] | 74 | DistanceMap::iterator *DistanceIterators; //!< marks which was the last picked target as injective candidate with smallest distance | 
|---|
| [e4afb4] | 75 | bool IsAngstroem; //!< whether coordinates are in angstroem (true) or bohrradius (false) | 
|---|
|  | 76 | double *PenaltyConstants; //!<  penalty constant in front of each term | 
|---|
| [ccd9f5] | 77 | }; | 
|---|
| [14de469] | 78 |  | 
|---|
|  | 79 | /** The complete molecule. | 
|---|
|  | 80 | * Class incorporates number of types | 
|---|
|  | 81 | */ | 
|---|
| [34c43a] | 82 | class molecule : public Observable | 
|---|
| [e4afb4] | 83 | { | 
|---|
| [cbc5fb] | 84 | friend molecule *NewMolecule(); | 
|---|
|  | 85 | friend void DeleteMolecule(molecule *); | 
|---|
| [bd58fb] | 86 |  | 
|---|
| [e4afb4] | 87 | public: | 
|---|
|  | 88 | typedef ATOMSET(std::list) atomSet; | 
|---|
|  | 89 | typedef std::set<atomId_t> atomIdSet; | 
|---|
|  | 90 | typedef ObservedIterator<atomSet> iterator; | 
|---|
|  | 91 | typedef atomSet::const_iterator const_iterator; | 
|---|
|  | 92 |  | 
|---|
|  | 93 | const periodentafel * const elemente; //!< periodic table with each element | 
|---|
|  | 94 | // old deprecated atom handling | 
|---|
|  | 95 | //atom *start;        //!< start of atom list | 
|---|
|  | 96 | //atom *end;          //!< end of atom list | 
|---|
|  | 97 | //bond *first;        //!< start of bond list | 
|---|
|  | 98 | //bond *last;         //!< end of bond list | 
|---|
|  | 99 | int MDSteps; //!< The number of MD steps in Trajectories | 
|---|
|  | 100 | mutable int NoNonHydrogen; //!< number of non-hydrogen atoms in molecule | 
|---|
|  | 101 | mutable int NoNonBonds; //!< number of non-hydrogen bonds in molecule | 
|---|
|  | 102 | mutable int NoCyclicBonds; //!< number of cyclic bonds in molecule, by DepthFirstSearchAnalysis() | 
|---|
|  | 103 | bool ActiveFlag; //!< in a MoleculeListClass used to discern active from inactive molecules | 
|---|
|  | 104 | //Vector Center;      //!< Center of molecule in a global box | 
|---|
|  | 105 | int IndexNr; //!< index of molecule in a MoleculeListClass | 
|---|
|  | 106 | char name[MAXSTRINGSIZE]; //!< arbitrary name | 
|---|
|  | 107 |  | 
|---|
|  | 108 | private: | 
|---|
|  | 109 | Formula formula; | 
|---|
| [458c31] | 110 | Cacheable<int> AtomCount; //!< number of atoms, brought up-to-date by doCountAtoms() | 
|---|
|  | 111 | Cacheable<int> BondCount; //!< number of atoms, brought up-to-date by doCountBonds() | 
|---|
| [e4afb4] | 112 | moleculeId_t id; | 
|---|
|  | 113 | atomSet atoms; //<!list of atoms | 
|---|
|  | 114 | atomIdSet atomIds; //<!set of atomic ids to check uniqueness of atoms | 
|---|
|  | 115 | protected: | 
|---|
|  | 116 | //void CountAtoms(); | 
|---|
|  | 117 | /** | 
|---|
|  | 118 | * this iterator type should be used for internal variables, \ | 
|---|
| [d3347e] | 119 | * since it will not lock | 
|---|
| [e4afb4] | 120 | */ | 
|---|
|  | 121 | typedef atomSet::iterator internal_iterator; | 
|---|
| [ac9b56] | 122 |  | 
|---|
| [e4afb4] | 123 | molecule(const periodentafel * const teil); | 
|---|
|  | 124 | virtual ~molecule(); | 
|---|
| [042f82] | 125 |  | 
|---|
| [cbc5fb] | 126 | public: | 
|---|
| [520c8b] | 127 | //getter and setter | 
|---|
| [73a857] | 128 | const std::string getName() const; | 
|---|
| [ea7176] | 129 | int getAtomCount() const; | 
|---|
|  | 130 | int doCountAtoms(); | 
|---|
| [458c31] | 131 | int getBondCount() const; | 
|---|
|  | 132 | int doCountBonds() const; | 
|---|
| [73a857] | 133 | moleculeId_t getId() const; | 
|---|
| [cbc5fb] | 134 | void setId(moleculeId_t); | 
|---|
| [520c8b] | 135 | void setName(const std::string); | 
|---|
| [73a857] | 136 | const Formula &getFormula() const; | 
|---|
|  | 137 | unsigned int getElementCount() const; | 
|---|
| [389cc8] | 138 | bool hasElement(const element*) const; | 
|---|
|  | 139 | bool hasElement(atomicNumber_t) const; | 
|---|
|  | 140 | bool hasElement(const std::string&) const; | 
|---|
|  | 141 |  | 
|---|
| [a7a087] | 142 | virtual bool changeId(atomId_t newId); | 
|---|
| [520c8b] | 143 |  | 
|---|
| [bd58fb] | 144 | iterator begin(); | 
|---|
|  | 145 | const_iterator begin() const; | 
|---|
| [e87acf] | 146 | iterator end(); | 
|---|
|  | 147 | const_iterator end() const; | 
|---|
| [9879f6] | 148 | bool empty() const; | 
|---|
|  | 149 | size_t size() const; | 
|---|
| [e4afb4] | 150 | const_iterator erase(const_iterator loc); | 
|---|
|  | 151 | const_iterator erase(atom * key); | 
|---|
|  | 152 | const_iterator find(atom * key) const; | 
|---|
|  | 153 | pair<iterator, bool> insert(atom * const key); | 
|---|
| [6cfa36] | 154 | bool containsAtom(atom* key); | 
|---|
| [bd58fb] | 155 |  | 
|---|
| [042f82] | 156 | /// remove atoms from molecule. | 
|---|
|  | 157 | bool AddAtom(atom *pointer); | 
|---|
|  | 158 | bool RemoveAtom(atom *pointer); | 
|---|
|  | 159 | bool UnlinkAtom(atom *pointer); | 
|---|
|  | 160 | bool CleanupMolecule(); | 
|---|
| [9df680] | 161 | void removeAtomsinMolecule(); | 
|---|
| [042f82] | 162 |  | 
|---|
|  | 163 | /// Add/remove atoms to/from molecule. | 
|---|
|  | 164 | atom * AddCopyAtom(atom *pointer); | 
|---|
|  | 165 | bool AddXYZFile(string filename); | 
|---|
| [e138de] | 166 | bool AddHydrogenReplacementAtom(bond *Bond, atom *BottomOrigin, atom *TopOrigin, atom *TopReplacement, bool IsAngstroem); | 
|---|
| [cee0b57] | 167 | bond * AddBond(atom *first, atom *second, int degree = 1); | 
|---|
| [042f82] | 168 | bool RemoveBond(bond *pointer); | 
|---|
|  | 169 | bool RemoveBonds(atom *BondPartner); | 
|---|
| [e4afb4] | 170 | bool hasBondStructure() const; | 
|---|
| [042f82] | 171 |  | 
|---|
|  | 172 | /// Find atoms. | 
|---|
|  | 173 | atom * FindAtom(int Nr) const; | 
|---|
|  | 174 | atom * AskAtom(string text); | 
|---|
|  | 175 |  | 
|---|
|  | 176 | /// Count and change present atoms' coordination. | 
|---|
| [e138de] | 177 | bool CenterInBox(); | 
|---|
|  | 178 | bool BoundInBox(); | 
|---|
|  | 179 | void CenterEdge(Vector *max); | 
|---|
|  | 180 | void CenterOrigin(); | 
|---|
|  | 181 | void CenterPeriodic(); | 
|---|
|  | 182 | void CenterAtVector(Vector *newcenter); | 
|---|
| [042f82] | 183 | void Translate(const Vector *x); | 
|---|
|  | 184 | void TranslatePeriodically(const Vector *trans); | 
|---|
|  | 185 | void Mirror(const Vector *x); | 
|---|
|  | 186 | void Align(Vector *n); | 
|---|
| [776b64] | 187 | void Scale(const double ** const factor); | 
|---|
| [437922] | 188 | void DeterminePeriodicCenter(Vector ¢er); | 
|---|
| [4bb63c] | 189 | Vector * DetermineCenterOfGravity() const; | 
|---|
| [e138de] | 190 | Vector * DetermineCenterOfAll() const; | 
|---|
| [eddea2] | 191 | Vector * DetermineCenterOfBox() const; | 
|---|
| [437922] | 192 | void SetNameFromFilename(const char *filename); | 
|---|
| [042f82] | 193 | void SetBoxDimension(Vector *dim); | 
|---|
| [3c58f8] | 194 | bool ScanForPeriodicCorrection(); | 
|---|
| [ef7d30] | 195 | bool VerletForceIntegration(char *file, config &configuration, const size_t offset); | 
|---|
| [e138de] | 196 | double VolumeOfConvexEnvelope(bool IsAngstroem); | 
|---|
| [1f91f4] | 197 | RealSpaceMatrix getInertiaTensor() const; | 
|---|
|  | 198 | void RotateToPrincipalAxisSystem(Vector &Axis); | 
|---|
| [042f82] | 199 |  | 
|---|
| [e138de] | 200 | double ConstrainedPotential(struct EvaluatePotential &Params); | 
|---|
|  | 201 | double MinimiseConstrainedPotential(atom **&permutation, int startstep, int endstep, bool IsAngstroem); | 
|---|
|  | 202 | void EvaluateConstrainedForces(int startstep, int endstep, atom **PermutationMap, ForceMatrix *Force); | 
|---|
| [e4afb4] | 203 | bool LinearInterpolationBetweenConfiguration(int startstep, int endstep, std::string prefix, config &configuration, bool MapByIdentity); | 
|---|
|  | 204 |  | 
|---|
| [042f82] | 205 | bool CheckBounds(const Vector *x) const; | 
|---|
|  | 206 | void GetAlignvector(struct lsq_params * par) const; | 
|---|
|  | 207 |  | 
|---|
|  | 208 | /// Initialising routines in fragmentation | 
|---|
| [e138de] | 209 | void CreateAdjacencyListFromDbondFile(ifstream *output); | 
|---|
| [4092c5] | 210 | void CreateAdjacencyList(double bonddistance, bool IsAngstroem, void (BondGraph::*minmaxdistance)(const BondedParticle * const , const BondedParticle * const , double &, double &, bool), BondGraph *BG = NULL); | 
|---|
| [e138de] | 211 | int CorrectBondDegree() const; | 
|---|
|  | 212 | void OutputBondsList() const; | 
|---|
| [fa649a] | 213 | void CyclicBondAnalysis() const; | 
|---|
| [e138de] | 214 | void OutputGraphInfoPerAtom() const; | 
|---|
|  | 215 | void OutputGraphInfoPerBond() const; | 
|---|
| [b8b75d] | 216 |  | 
|---|
| [042f82] | 217 | // Graph analysis | 
|---|
| [a564be] | 218 | MoleculeLeafClass * DepthFirstSearchAnalysis(std::deque<bond *> *&BackEdgeStack) const; | 
|---|
|  | 219 | void CyclicStructureAnalysis(std::deque<bond *> *BackEdgeStack, int *&MinimumRingSize) const; | 
|---|
|  | 220 | bool PickLocalBackEdges(atom **ListOfLocalAtoms, std::deque<bond *> *&ReferenceStack, std::deque<bond *> *&LocalStack) const; | 
|---|
| [fa649a] | 221 | bond * FindNextUnused(atom *vertex) const; | 
|---|
|  | 222 | void SetNextComponentNumber(atom *vertex, int nr) const; | 
|---|
|  | 223 | void ResetAllBondsToUnused() const; | 
|---|
| [e138de] | 224 | int CountCyclicBonds(); | 
|---|
|  | 225 | bool CheckForConnectedSubgraph(KeySet *Fragment); | 
|---|
| [fa649a] | 226 | string GetColor(enum Shading color) const; | 
|---|
| [266237] | 227 | bond * CopyBond(atom *left, atom *right, bond *CopyBond); | 
|---|
|  | 228 |  | 
|---|
| [e4afb4] | 229 | molecule *CopyMolecule() const; | 
|---|
| [c550dd] | 230 | molecule* CopyMoleculeFromSubRegion(const Shape&) const; | 
|---|
| [042f82] | 231 |  | 
|---|
|  | 232 | /// Fragment molecule by two different approaches: | 
|---|
| [35b698] | 233 | int FragmentMolecule(int Order, std::string &prefix); | 
|---|
|  | 234 | bool CheckOrderAtSite(bool *AtomMask, Graph *GlobalKeySetList, int Order, int *MinimumRingSize, std::string path = ""); | 
|---|
| [e4afb4] | 235 | bool StoreBondsToFile(std::string filename, std::string path = ""); | 
|---|
|  | 236 | bool StoreAdjacencyToFile(std::string filename, std::string path = ""); | 
|---|
| [35b698] | 237 | bool CheckAdjacencyFileAgainstMolecule(std::string &path, atom **ListOfAtoms); | 
|---|
|  | 238 | bool ParseOrderAtSiteFromFile(std::string &path); | 
|---|
|  | 239 | bool StoreOrderAtSiteFile(std::string &path); | 
|---|
|  | 240 | bool StoreForcesFile(MoleculeListClass *BondFragments, std::string &path, int *SortIndex); | 
|---|
| [e138de] | 241 | bool CreateMappingLabelsToConfigSequence(int *&SortIndex); | 
|---|
| [9879f6] | 242 | bool CreateFatherLookupTable(atom **&LookupTable, int count = 0); | 
|---|
| [e138de] | 243 | void BreadthFirstSearchAdd(molecule *Mol, atom **&AddedAtomList, bond **&AddedBondList, atom *Root, bond *Bond, int BondOrder, bool IsAngstroem); | 
|---|
| [b9772a] | 244 |  | 
|---|
| [042f82] | 245 | /// -# BOSSANOVA | 
|---|
| [e138de] | 246 | void FragmentBOSSANOVA(Graph *&FragmentList, KeyStack &RootStack, int *MinimumRingSize); | 
|---|
|  | 247 | int PowerSetGenerator(int Order, struct UniqueFragments &FragmentSearch, KeySet RestrictedKeySet); | 
|---|
|  | 248 | bool BuildInducedSubgraph(const molecule *Father); | 
|---|
|  | 249 | molecule * StoreFragmentFromKeySet(KeySet &Leaflet, bool IsAngstroem); | 
|---|
| [03c77c] | 250 | void SPFragmentGenerator(struct UniqueFragments *FragmentSearch, int RootDistance, std::vector<bond *> &BondsSet, int SetDimension, int SubOrder); | 
|---|
| [e138de] | 251 | int LookForRemovalCandidate(KeySet *&Leaf, int *&ShortestPathList); | 
|---|
|  | 252 | int GuesstimateFragmentCount(int order); | 
|---|
| [042f82] | 253 |  | 
|---|
|  | 254 | // Recognize doubly appearing molecules in a list of them | 
|---|
| [e138de] | 255 | int * GetFatherSonAtomicMap(molecule *OtherMolecule); | 
|---|
| [042f82] | 256 |  | 
|---|
|  | 257 | // Output routines. | 
|---|
| [e4afb4] | 258 | bool Output(std::ostream * const output) const; | 
|---|
|  | 259 | bool OutputTrajectories(ofstream * const output) const; | 
|---|
| [e138de] | 260 | void OutputListOfBonds() const; | 
|---|
|  | 261 | bool OutputXYZ(ofstream * const output) const; | 
|---|
|  | 262 | bool OutputTrajectoriesXYZ(ofstream * const output); | 
|---|
|  | 263 | bool Checkout(ofstream * const output) const; | 
|---|
|  | 264 | bool OutputTemperatureFromTrajectories(ofstream * const output, int startstep, int endstep); | 
|---|
| [042f82] | 265 |  | 
|---|
| [c68025] | 266 | // Manipulation routines | 
|---|
|  | 267 | void flipActiveFlag(); | 
|---|
|  | 268 |  | 
|---|
| [e4afb4] | 269 | private: | 
|---|
| [00ef5c] | 270 | void init_DFS(struct DFSAccounting&) const; | 
|---|
| [e4afb4] | 271 | int last_atom; //!< number given to last atom | 
|---|
| [14de469] | 272 | }; | 
|---|
|  | 273 |  | 
|---|
| [cbc5fb] | 274 | molecule *NewMolecule(); | 
|---|
|  | 275 | void DeleteMolecule(molecule* mol); | 
|---|
|  | 276 |  | 
|---|
| [14de469] | 277 | /** A list of \a molecule classes. | 
|---|
|  | 278 | */ | 
|---|
| [e4afb4] | 279 | class MoleculeListClass : public Observable | 
|---|
|  | 280 | { | 
|---|
|  | 281 | public: | 
|---|
|  | 282 | MoleculeList ListOfMolecules; //!< List of the contained molecules | 
|---|
|  | 283 | int MaxIndex; | 
|---|
| [042f82] | 284 |  | 
|---|
| [cbc5fb] | 285 | MoleculeListClass(World *world); | 
|---|
| [042f82] | 286 | ~MoleculeListClass(); | 
|---|
|  | 287 |  | 
|---|
| [35b698] | 288 | bool AddHydrogenCorrection(std::string &path); | 
|---|
|  | 289 | bool StoreForcesFile(std::string &path, int *SortIndex); | 
|---|
| [437922] | 290 | void insert(molecule *mol); | 
|---|
| [bd6bfa] | 291 | void erase(molecule *mol); | 
|---|
| [042f82] | 292 | molecule * ReturnIndex(int index); | 
|---|
| [35b698] | 293 | bool OutputConfigForListOfFragments(std::string &prefix, int *SortIndex); | 
|---|
| [042f82] | 294 | int NumberOfActiveMolecules(); | 
|---|
| [24a5e0] | 295 | void Enumerate(ostream *out); | 
|---|
| [042f82] | 296 | void Output(ofstream *out); | 
|---|
| [568be7] | 297 | int CountAllAtoms() const; | 
|---|
| [042f82] | 298 |  | 
|---|
| [477bb2] | 299 | // Methods moved here from the menus | 
|---|
|  | 300 | // TODO: more refactoring needed on these methods | 
|---|
|  | 301 | void createNewMolecule(periodentafel *periode); | 
|---|
|  | 302 | void loadFromXYZ(periodentafel *periode); | 
|---|
|  | 303 | void setMoleculeFilename(); | 
|---|
|  | 304 | void parseXYZIntoMolecule(); | 
|---|
|  | 305 | void eraseMolecule(); | 
|---|
|  | 306 |  | 
|---|
| [e4afb4] | 307 | private: | 
|---|
| [cbc5fb] | 308 | World *world; //!< The world this List belongs to. Needed to avoid deadlocks in the destructor | 
|---|
| [14de469] | 309 | }; | 
|---|
|  | 310 |  | 
|---|
|  | 311 | /** A leaf for a tree of \a molecule class | 
|---|
|  | 312 | * Wraps molecules in a tree structure | 
|---|
|  | 313 | */ | 
|---|
| [e4afb4] | 314 | class MoleculeLeafClass | 
|---|
|  | 315 | { | 
|---|
|  | 316 | public: | 
|---|
|  | 317 | molecule *Leaf; //!< molecule of this leaf | 
|---|
|  | 318 | //MoleculeLeafClass *UpLeaf;        //!< Leaf one level up | 
|---|
|  | 319 | //MoleculeLeafClass *DownLeaf;      //!< First leaf one level down | 
|---|
|  | 320 | MoleculeLeafClass *previous; //!< Previous leaf on this level | 
|---|
|  | 321 | MoleculeLeafClass *next; //!< Next leaf on this level | 
|---|
| [042f82] | 322 |  | 
|---|
|  | 323 | //MoleculeLeafClass(MoleculeLeafClass *Up, MoleculeLeafClass *Previous); | 
|---|
|  | 324 | MoleculeLeafClass(MoleculeLeafClass *PreviousLeaf); | 
|---|
|  | 325 | ~MoleculeLeafClass(); | 
|---|
|  | 326 |  | 
|---|
|  | 327 | bool AddLeaf(molecule *ptr, MoleculeLeafClass *Previous); | 
|---|
| [c27778] | 328 | bool FillBondStructureFromReference(const molecule * const reference, atom **&ListOfLocalAtoms, bool FreeList = false); | 
|---|
| [e138de] | 329 | bool FillRootStackForSubgraphs(KeyStack *&RootStack, bool *AtomMask, int &FragmentCounter); | 
|---|
|  | 330 | bool AssignKeySetsToFragment(molecule *reference, Graph *KeySetList, atom ***&ListOfLocalAtoms, Graph **&FragmentList, int &FragmentCounter, bool FreeList = false); | 
|---|
| [c27778] | 331 | bool FillListOfLocalAtoms(atom **&ListOfLocalAtoms, const int GlobalAtomCount, bool &FreeList); | 
|---|
| [e138de] | 332 | void TranslateIndicesToGlobalIDs(Graph **FragmentList, int &FragmentCounter, int &TotalNumberOfKeySets, Graph &TotalGraph); | 
|---|
| [042f82] | 333 | int Count() const; | 
|---|
| [14de469] | 334 | }; | 
|---|
|  | 335 |  | 
|---|
|  | 336 | #endif /*MOLECULES_HPP_*/ | 
|---|
|  | 337 |  | 
|---|