source: src/molecule.hpp@ b8b75d

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
Last change on this file since b8b75d was b8b75d, checked in by Frederik Heber <heber@…>, 15 years ago

Refactored CreateAdjacencyList().

  • Property mode set to 100755
File size: 19.8 KB
Line 
1/** \file molecule.hpp
2 *
3 * Class definitions of atom and molecule, element and periodentafel
4 */
5
6#ifndef MOLECULES_HPP_
7#define MOLECULES_HPP_
8
9using namespace std;
10
11/*********************************************** includes ***********************************/
12
13// GSL headers
14#include <gsl/gsl_eigen.h>
15#include <gsl/gsl_heapsort.h>
16#include <gsl/gsl_linalg.h>
17#include <gsl/gsl_matrix.h>
18#include <gsl/gsl_multimin.h>
19#include <gsl/gsl_vector.h>
20#include <gsl/gsl_randist.h>
21
22//// STL headers
23#include <map>
24#include <set>
25#include <deque>
26#include <list>
27#include <vector>
28
29#include "graph.hpp"
30#include "stackclass.hpp"
31#include "tesselation.hpp"
32
33/****************************************** forward declarations *****************************/
34
35class atom;
36class bond;
37class element;
38class ForceMatrix;
39class LinkedCell;
40class molecule;
41class MoleculeLeafClass;
42class MoleculeListClass;
43class periodentafel;
44class Vector;
45
46/******************************** Some definitions for easier reading **********************************/
47
48#define MoleculeList list <molecule *>
49#define MoleculeListTest pair <MoleculeList::iterator, bool>
50
51#define DistancePair pair < double, atom* >
52#define DistanceMap multimap < double, atom* >
53#define DistanceTestPair pair < DistanceMap::iterator, bool>
54
55
56/************************************* Class definitions ****************************************/
57
58/** Structure to contain parameters needed for evaluation of constraint potential.
59 */
60struct EvaluatePotential
61{
62 int startstep; //!< start configuration (MDStep in atom::trajectory)
63 int endstep; //!< end configuration (MDStep in atom::trajectory)
64 atom **PermutationMap; //!< gives target ptr for each atom, array of size molecule::AtomCount (this is "x" in \f$ V^{con}(x) \f$ )
65 DistanceMap **DistanceList; //!< distance list of each atom to each atom
66 DistanceMap::iterator *StepList; //!< iterator to ascend through NearestNeighbours \a **DistanceList
67 int *DoubleList; //!< count of which sources want to move to this target, basically the injective measure (>1 -> not injective)
68 DistanceMap::iterator *DistanceIterators; //!< marks which was the last picked target as injective candidate with smallest distance
69 bool IsAngstroem; //!< whether coordinates are in angstroem (true) or bohrradius (false)
70 double *PenaltyConstants; //!< penalty constant in front of each term
71};
72
73#define MaxThermostats 6 //!< maximum number of thermostat entries in Ions#ThermostatNames and Ions#ThermostatImplemented
74enum thermostats { None, Woodcock, Gaussian, Langevin, Berendsen, NoseHoover }; //!< Thermostat names for output
75
76
77/** The complete molecule.
78 * Class incorporates number of types
79 */
80class molecule : public PointCloud {
81 public:
82 double cell_size[6];//!< cell size
83 periodentafel *elemente; //!< periodic table with each element
84 atom *start; //!< start of atom list
85 atom *end; //!< end of atom list
86 bond *first; //!< start of bond list
87 bond *last; //!< end of bond list
88 bond ***ListOfBondsPerAtom; //!< pointer list for each atom and each bond it has
89 int MDSteps; //!< The number of MD steps in Trajectories
90 int *NumberOfBondsPerAtom; //!< Number of Bonds each atom has
91 int AtomCount; //!< number of atoms, brought up-to-date by CountAtoms()
92 int BondCount; //!< number of atoms, brought up-to-date by CountBonds()
93 int ElementCount; //!< how many unique elements are therein
94 int ElementsInMolecule[MAX_ELEMENTS]; //!< list whether element (sorted by atomic number) is alread present or not
95 int NoNonHydrogen; //!< number of non-hydrogen atoms in molecule
96 int NoNonBonds; //!< number of non-hydrogen bonds in molecule
97 int NoCyclicBonds; //!< number of cyclic bonds in molecule, by DepthFirstSearchAnalysis()
98 double BondDistance; //!< typical bond distance used in CreateAdjacencyList() and furtheron
99 bool ActiveFlag; //!< in a MoleculeListClass used to discern active from inactive molecules
100 Vector Center; //!< Center of molecule in a global box
101 char name[MAXSTRINGSIZE]; //!< arbitrary name
102 int IndexNr; //!< index of molecule in a MoleculeListClass
103 class Tesselation *TesselStruct;
104
105 molecule(periodentafel *teil);
106 virtual ~molecule();
107
108 // re-definition of virtual functions from PointCloud
109 Vector *GetCenter(ofstream *out);
110 TesselPoint *GetPoint();
111 TesselPoint *GetTerminalPoint();
112 void GoToNext();
113 void GoToPrevious();
114 void GoToFirst();
115 void GoToLast();
116 bool IsEmpty();
117 bool IsEnd();
118
119 // templates for allowing global manipulation of all vectors
120 template <typename res> void ActOnAllVectors( res (Vector::*f)() );
121 template <typename res> void ActOnAllVectors( res (Vector::*f)() const);
122 template <typename res> void ActOnAllVectors( res (Vector::*f)() ) const;
123 template <typename res> void ActOnAllVectors( res (Vector::*f)() const) const;
124 template <typename res, typename T> void ActOnAllVectors( res (Vector::*f)(T), T t );
125 template <typename res, typename T> void ActOnAllVectors( res (Vector::*f)(T) const, T t );
126 template <typename res, typename T> void ActOnAllVectors( res (Vector::*f)(T), T t ) const;
127 template <typename res, typename T> void ActOnAllVectors( res (Vector::*f)(T) const, T t ) const;
128 template <typename res, typename T, typename U> void ActOnAllVectors( res (Vector::*f)(T, U), T t, U u );
129 template <typename res, typename T, typename U> void ActOnAllVectors( res (Vector::*f)(T, U) const, T t, U u );
130 template <typename res, typename T, typename U> void ActOnAllVectors( res (Vector::*f)(T, U), T t, U u ) const;
131 template <typename res, typename T, typename U> void ActOnAllVectors( res (Vector::*f)(T, U) const, T t, U u ) const;
132 template <typename res, typename T, typename U, typename V> void ActOnAllVectors( res (Vector::*f)(T, U, V), T t, U u, V v);
133 template <typename res, typename T, typename U, typename V> void ActOnAllVectors( res (Vector::*f)(T, U, V) const, T t, U u, V v);
134 template <typename res, typename T, typename U, typename V> void ActOnAllVectors( res (Vector::*f)(T, U, V), T t, U u, V v) const;
135 template <typename res, typename T, typename U, typename V> void ActOnAllVectors( res (Vector::*f)(T, U, V) const, T t, U u, V v) const;
136
137 // templates for allowing global manipulation of molecule with each atom as single argument
138 template <typename res> void ActWithEachAtom( res (molecule::*f)(atom *) );
139 template <typename res> void ActWithEachAtom( res (molecule::*f)(atom *) const);
140 template <typename res> void ActWithEachAtom( res (molecule::*f)(atom *) ) const;
141 template <typename res> void ActWithEachAtom( res (molecule::*f)(atom *) const) const;
142
143 // templates for allowing global copying of molecule with each atom as single argument
144 template <typename res> void ActOnCopyWithEachAtom( res (molecule::*f)(atom *) , molecule *copy);
145 template <typename res> void ActOnCopyWithEachAtom( res (molecule::*f)(atom *) const , molecule *copy);
146 template <typename res> void ActOnCopyWithEachAtom( res (molecule::*f)(atom *) , molecule *copy) const;
147 template <typename res> void ActOnCopyWithEachAtom( res (molecule::*f)(atom *) const, molecule *copy) const;
148
149 // templates for allowing global manipulation of all atoms
150 template <typename res> void ActOnAllAtoms( res (atom::*f)() );
151 template <typename res> void ActOnAllAtoms( res (atom::*f)() const );
152 template <typename res> void ActOnAllAtoms( res (atom::*f)() ) const;
153 template <typename res> void ActOnAllAtoms( res (atom::*f)() const) const;
154 template <typename res, typename T> void ActOnAllAtoms( res (atom::*f)(T), T t );
155 template <typename res, typename T> void ActOnAllAtoms( res (atom::*f)(T) const, T t );
156 template <typename res, typename T> void ActOnAllAtoms( res (atom::*f)(T), T t ) const;
157 template <typename res, typename T> void ActOnAllAtoms( res (atom::*f)(T) const, T t ) const;
158 template <typename res, typename T, typename U> void ActOnAllAtoms( res (atom::*f)(T, U), T t, U u );
159 template <typename res, typename T, typename U> void ActOnAllAtoms( res (atom::*f)(T, U) const, T t, U u );
160 template <typename res, typename T, typename U> void ActOnAllAtoms( res (atom::*f)(T, U), T t, U u ) const;
161 template <typename res, typename T, typename U> void ActOnAllAtoms( res (atom::*f)(T, U) const, T t, U u ) const;
162 template <typename res, typename T, typename U, typename V> void ActOnAllAtoms( res (atom::*f)(T, U, V), T t, U u, V v);
163 template <typename res, typename T, typename U, typename V> void ActOnAllAtoms( res (atom::*f)(T, U, V) const, T t, U u, V v);
164 template <typename res, typename T, typename U, typename V> void ActOnAllAtoms( res (atom::*f)(T, U, V), T t, U u, V v) const;
165 template <typename res, typename T, typename U, typename V> void ActOnAllAtoms( res (atom::*f)(T, U, V) const, T t, U u, V v) const;
166 template <typename res, typename T, typename U, typename V, typename W> void ActOnAllAtoms( res (atom::*f)(T, U, V, W), T t, U u, V v, W w);
167 template <typename res, typename T, typename U, typename V, typename W> void ActOnAllAtoms( res (atom::*f)(T, U, V, W) const, T t, U u, V v, W w);
168 template <typename res, typename T, typename U, typename V, typename W> void ActOnAllAtoms( res (atom::*f)(T, U, V, W), T t, U u, V v, W w) const;
169 template <typename res, typename T, typename U, typename V, typename W> void ActOnAllAtoms( res (atom::*f)(T, U, V, W) const, T t, U u, V v, W w) const;
170
171 // templates for allowing conditional global copying of molecule with each atom as single argument
172 template <typename res> void ActOnCopyWithEachAtomIfTrue( res (molecule::*f)(atom *) , molecule *copy, bool (atom::*condition) () );
173 template <typename res, typename T> void ActOnCopyWithEachAtomIfTrue( res (molecule::*f)(atom *) , molecule *copy, bool (atom::*condition) (T), T t );
174 template <typename res, typename T, typename U> void ActOnCopyWithEachAtomIfTrue( res (molecule::*f)(atom *) , molecule *copy, bool (atom::*condition) (T, U), T t, U u );
175 template <typename res, typename T, typename U, typename V> void ActOnCopyWithEachAtomIfTrue( res (molecule::*f)(atom *) , molecule *copy, bool (atom::*condition) (T, U, V), T t, U u, V v );
176
177 // templates for allowing global manipulation of an array with one entry per atom
178 void SetIndexedArrayForEachAtomTo ( atom **array, int TesselPoint::* index);
179 template <typename T> void SetIndexedArrayForEachAtomTo ( T *array, int TesselPoint::* index, void (*Setor)(T *, T *));
180 template <typename T> void SetIndexedArrayForEachAtomTo ( T *array, int TesselPoint::* index, void (*Setor)(T *, T *), T t);
181 template <typename T> void SetIndexedArrayForEachAtomTo ( T *array, int TesselPoint::* index, void (*Setor)(T *, T *), T *t);
182 template <typename T> void SetIndexedArrayForEachAtomTo ( T *array, int element::*index, void (*Setor)(T *, T *));
183 template <typename T> void SetIndexedArrayForEachAtomTo ( T *array, int element::*index, void (*Setor)(T *, T *), T t);
184 template <typename T> void SetIndexedArrayForEachAtomTo ( T *array, int element::*index, void (*Setor)(T *, T *), T *t);
185 template <typename T> void SetIndexedArrayForEachAtomTo ( T *array, int TesselPoint::* index, T (atom::*Setor)(Vector &), Vector atom::*value);
186 template <typename T> void SetIndexedArrayForEachAtomTo ( T *array, int TesselPoint::*index, T (atom::*Setor)(Vector &), Vector &vect );
187
188 // templates for allowing global manipulation of each atom by entries in an array
189 template <typename T> void SetAtomValueToIndexedArray ( T *array, int TesselPoint::*index, T atom::*value );
190 template <typename T> void SetAtomValueToIndexedArray ( T *array, int element::*index, T atom::*value );
191
192 /// remove atoms from molecule.
193 bool AddAtom(atom *pointer);
194 bool RemoveAtom(atom *pointer);
195 bool UnlinkAtom(atom *pointer);
196 bool CleanupMolecule();
197
198 /// Add/remove atoms to/from molecule.
199 atom * AddCopyAtom(atom *pointer);
200 bool AddXYZFile(string filename);
201 bool AddHydrogenReplacementAtom(ofstream *out, bond *Bond, atom *BottomOrigin, atom *TopOrigin, atom *TopReplacement, bond **BondList, int NumBond, bool IsAngstroem);
202 bond * AddBond(atom *first, atom *second, int degree = 1);
203 bool RemoveBond(bond *pointer);
204 bool RemoveBonds(atom *BondPartner);
205
206 /// Find atoms.
207 atom * FindAtom(int Nr) const;
208 atom * AskAtom(string text);
209
210 /// Count and change present atoms' coordination.
211 void CountAtoms(ofstream *out);
212 void CountElements();
213 void CalculateOrbitals(class config &configuration);
214 bool CenterInBox(ofstream *out);
215 bool BoundInBox(ofstream *out);
216 void CenterEdge(ofstream *out, Vector *max);
217 void CenterOrigin(ofstream *out);
218 void CenterPeriodic(ofstream *out);
219 void CenterAtVector(ofstream *out, Vector *newcenter);
220 void Translate(const Vector *x);
221 void TranslatePeriodically(const Vector *trans);
222 void Mirror(const Vector *x);
223 void Align(Vector *n);
224 void Scale(double **factor);
225 void DeterminePeriodicCenter(Vector &center);
226 Vector * DetermineCenterOfGravity(ofstream *out);
227 Vector * DetermineCenterOfAll(ofstream *out);
228 void SetNameFromFilename(const char *filename);
229 void SetBoxDimension(Vector *dim);
230 void ScanForPeriodicCorrection(ofstream *out);
231 bool VerletForceIntegration(ofstream *out, char *file, config &configuration);
232 void Thermostats(config &configuration, double ActualTemp, int Thermostat);
233 void PrincipalAxisSystem(ofstream *out, bool DoRotate);
234 double VolumeOfConvexEnvelope(ofstream *out, bool IsAngstroem);
235 Vector* FindEmbeddingHole(ofstream *out, molecule *srcmol);
236
237
238 double ConstrainedPotential(ofstream *out, struct EvaluatePotential &Params);
239 double MinimiseConstrainedPotential(ofstream *out, atom **&permutation, int startstep, int endstep, bool IsAngstroem);
240 void EvaluateConstrainedForces(ofstream *out, int startstep, int endstep, atom **PermutationMap, ForceMatrix *Force);
241 bool LinearInterpolationBetweenConfiguration(ofstream *out, int startstep, int endstep, const char *prefix, config &configuration, bool MapByIdentity);
242
243 bool CheckBounds(const Vector *x) const;
244 void GetAlignvector(struct lsq_params * par) const;
245
246 /// Initialising routines in fragmentation
247 void CreateAdjacencyListFromDbondFile(ofstream *out, ifstream *output);
248 void CreateAdjacencyList(ofstream *out, double bonddistance, bool IsAngstroem);
249 void CreateListOfBondsPerAtom(ofstream *out);
250 int CorrectBondDegree(ofstream *out);
251 void OutputBondsList(ofstream *out);
252 int CountAtomsBonds(int nr);
253
254
255 // Graph analysis
256 MoleculeLeafClass * DepthFirstSearchAnalysis(ofstream *out, class StackClass<bond *> *&BackEdgeStack);
257 void CyclicStructureAnalysis(ofstream *out, class StackClass<bond *> *BackEdgeStack, int *&MinimumRingSize);
258 bool PickLocalBackEdges(ofstream *out, atom **ListOfLocalAtoms, class StackClass<bond *> *&ReferenceStack, class StackClass<bond *> *&LocalStack);
259 bond * FindNextUnused(atom *vertex);
260 void SetNextComponentNumber(atom *vertex, int nr);
261 void InitComponentNumbers();
262 void OutputComponentNumber(ofstream *out, atom *vertex);
263 void ResetAllBondsToUnused();
264 void ResetAllAtomNumbers();
265 int CountCyclicBonds(ofstream *out);
266 bool CheckForConnectedSubgraph(ofstream *out, KeySet *Fragment);
267 string GetColor(enum Shading color);
268
269 molecule *CopyMolecule();
270 molecule* CopyMoleculeFromSubRegion(Vector offset, double *parallelepiped);
271
272 /// Fragment molecule by two different approaches:
273 int FragmentMolecule(ofstream *out, int Order, config *configuration);
274 bool CheckOrderAtSite(ofstream *out, bool *AtomMask, Graph *GlobalKeySetList, int Order, int *MinimumRingSize, char *path = NULL);
275 bool StoreAdjacencyToFile(ofstream *out, char *path);
276 bool CheckAdjacencyFileAgainstMolecule(ofstream *out, char *path, atom **ListOfAtoms);
277 bool ParseOrderAtSiteFromFile(ofstream *out, char *path);
278 bool StoreOrderAtSiteFile(ofstream *out, char *path);
279 bool StoreForcesFile(ofstream *out, MoleculeListClass *BondFragments, char *path, int *SortIndex);
280 bool CreateMappingLabelsToConfigSequence(ofstream *out, int *&SortIndex);
281 void BreadthFirstSearchAdd(ofstream *out, molecule *Mol, atom **&AddedAtomList, bond **&AddedBondList, atom *Root, bond *Bond, int BondOrder, bool IsAngstroem);
282 /// -# BOSSANOVA
283 void FragmentBOSSANOVA(ofstream *out, Graph *&FragmentList, KeyStack &RootStack, int *MinimumRingSize);
284 int PowerSetGenerator(ofstream *out, int Order, struct UniqueFragments &FragmentSearch, KeySet RestrictedKeySet);
285 bool BuildInducedSubgraph(ofstream *out, const molecule *Father);
286 molecule * StoreFragmentFromKeySet(ofstream *out, KeySet &Leaflet, bool IsAngstroem);
287 void SPFragmentGenerator(ofstream *out, struct UniqueFragments *FragmentSearch, int RootDistance, bond **BondsSet, int SetDimension, int SubOrder);
288 int LookForRemovalCandidate(ofstream *&out, KeySet *&Leaf, int *&ShortestPathList);
289 int GuesstimateFragmentCount(ofstream *out, int order);
290
291 // Recognize doubly appearing molecules in a list of them
292 int * IsEqualToWithinThreshold(ofstream *out, molecule *OtherMolecule, double threshold);
293 int * GetFatherSonAtomicMap(ofstream *out, molecule *OtherMolecule);
294
295 // Output routines.
296 bool Output(ofstream *out);
297 bool OutputTrajectories(ofstream *out);
298 void OutputListOfBonds(ofstream *out) const;
299 bool OutputXYZ(ofstream *out) const;
300 bool OutputTrajectoriesXYZ(ofstream *out);
301 bool Checkout(ofstream *out) const;
302 bool OutputTemperatureFromTrajectories(ofstream *out, int startstep, int endstep, ofstream *output);
303
304 private:
305 int last_atom; //!< number given to last atom
306 atom *InternalPointer; //!< internal pointer for PointCloud
307};
308
309#include "molecule_template.hpp"
310
311/** A list of \a molecule classes.
312 */
313class MoleculeListClass {
314 public:
315 MoleculeList ListOfMolecules; //!< List of the contained molecules
316 int MaxIndex;
317
318 MoleculeListClass();
319 ~MoleculeListClass();
320
321 bool AddHydrogenCorrection(ofstream *out, char *path);
322 bool StoreForcesFile(ofstream *out, char *path, int *SortIndex);
323 void insert(molecule *mol);
324 molecule * ReturnIndex(int index);
325 bool OutputConfigForListOfFragments(ofstream *out, config *configuration, int *SortIndex);
326 int NumberOfActiveMolecules();
327 void Enumerate(ofstream *out);
328 void Output(ofstream *out);
329
330 // merging of molecules
331 bool SimpleMerge(molecule *mol, molecule *srcmol);
332 bool SimpleAdd(molecule *mol, molecule *srcmol);
333 bool SimpleMultiMerge(molecule *mol, int *src, int N);
334 bool SimpleMultiAdd(molecule *mol, int *src, int N);
335 bool ScatterMerge(molecule *mol, int *src, int N);
336 bool EmbedMerge(molecule *mol, molecule *srcmol);
337
338 private:
339};
340
341
342/** A leaf for a tree of \a molecule class
343 * Wraps molecules in a tree structure
344 */
345class MoleculeLeafClass {
346 public:
347 molecule *Leaf; //!< molecule of this leaf
348 //MoleculeLeafClass *UpLeaf; //!< Leaf one level up
349 //MoleculeLeafClass *DownLeaf; //!< First leaf one level down
350 MoleculeLeafClass *previous; //!< Previous leaf on this level
351 MoleculeLeafClass *next; //!< Next leaf on this level
352
353 //MoleculeLeafClass(MoleculeLeafClass *Up, MoleculeLeafClass *Previous);
354 MoleculeLeafClass(MoleculeLeafClass *PreviousLeaf);
355 ~MoleculeLeafClass();
356
357 bool AddLeaf(molecule *ptr, MoleculeLeafClass *Previous);
358 bool FillBondStructureFromReference(ofstream *out, molecule *reference, int &FragmentCounter, atom ***&ListOfLocalAtoms, bool FreeList = false);
359 bool FillRootStackForSubgraphs(ofstream *out, KeyStack *&RootStack, bool *AtomMask, int &FragmentCounter);
360 bool AssignKeySetsToFragment(ofstream *out, molecule *reference, Graph *KeySetList, atom ***&ListOfLocalAtoms, Graph **&FragmentList, int &FragmentCounter, bool FreeList = false);
361 bool FillListOfLocalAtoms(ofstream *out, atom ***&ListOfLocalAtoms, const int FragmentCounter, const int GlobalAtomCount, bool &FreeList);
362 void TranslateIndicesToGlobalIDs(ofstream *out, Graph **FragmentList, int &FragmentCounter, int &TotalNumberOfKeySets, Graph &TotalGraph);
363 int Count() const;
364};
365
366
367#endif /*MOLECULES_HPP_*/
368
Note: See TracBrowser for help on using the repository browser.