Changes in molecuilder/src/molecules.hpp [848729:f89a9e]
- File:
-
- 1 edited
-
molecuilder/src/molecules.hpp (modified) (22 diffs, 1 prop)
Legend:
- Unmodified
- Added
- Removed
-
molecuilder/src/molecules.hpp
-
Property mode
changed from
100755to100644
r848729 rf89a9e 1 1 /** \file molecules.hpp 2 2 * 3 * Class definitions of atom and molecule, element and periodentafel 3 * Class definitions of atom and molecule, element and periodentafel 4 4 */ 5 5 … … 54 54 #define BoundariesTestPair pair< Boundaries::iterator, bool> 55 55 56 #define PointMap map < int, class BoundaryPointSet * > 57 #define PointPair pair < int, class BoundaryPointSet * > 58 #define PointTestPair pair < PointMap::iterator, bool > 59 60 #define LineMap map < int, class BoundaryLineSet * > 61 #define LinePair pair < int, class BoundaryLineSet * > 62 #define LineTestPair pair < Line Map::iterator, bool >63 64 #define TriangleMap map < int, class BoundaryTriangleSet * > 65 #define TrianglePair pair < int, class BoundaryTriangleSet * > 66 #define TriangleTestPair pair < TrianglePair::iterator, bool > 56 #define PointMap map < int, class BoundaryPointSet * > 57 #define PointPair pair < int, class BoundaryPointSet * > 58 #define PointTestPair pair < PointMap::iterator, bool > 59 60 #define LineMap map < int, class BoundaryLineSet * > 61 #define LinePair pair < int, class BoundaryLineSet * > 62 #define LineTestPair pair < LinePair::iterator, bool > 63 64 #define TriangleMap map < int, class BoundaryTriangleSet * > 65 #define TrianglePair pair < int, class BoundaryTriangleSet * > 66 #define TriangleTestPair pair < TrianglePair::iterator, bool > 67 67 68 68 #define DistanceMultiMap multimap <double, pair < PointMap::iterator, PointMap::iterator> > … … 86 86 //bool operator < (KeySet SubgraphA, KeySet SubgraphB); //note: this declaration is important, otherwise normal < is used (producing wrong order) 87 87 inline void InsertFragmentIntoGraph(ofstream *out, struct UniqueFragments *Fragment); // Insert a KeySet into a Graph 88 inline void InsertGraphIntoGraph(ofstream *out, Graph &graph1, Graph &graph2, int *counter); // Insert all KeySet's in a Graph into another Graph 88 inline void InsertGraphIntoGraph(ofstream *out, Graph &graph1, Graph &graph2, int *counter); // Insert all KeySet's in a Graph into another Graph 89 89 int CompareDoubles (const void * a, const void * b); 90 90 … … 140 140 unsigned char AdaptiveOrder; //!< current present bond order at site (0 means "not set") 141 141 bool MaxOrder; //!< whether this atom as a root in fragmentation still creates more fragments on higher orders or not 142 142 143 143 atom(); 144 144 ~atom(); 145 145 146 146 bool Output(int ElementNo, int AtomNo, ofstream *out) const; 147 147 bool OutputXYZLine(ofstream *out) const; 148 148 atom *GetTrueFather(); 149 149 bool Compare(atom &ptr); 150 150 151 151 private: 152 152 }; … … 169 169 int nr; //!< unique number in a molecule, updated by molecule::CreateAdjacencyList() 170 170 bool Cyclic; //!< flag whether bond is part of a cycle or not, given in DepthFirstSearchAnalysis() 171 enum EdgeType Type;//!< whether this is a tree or back edge 172 171 enum EdgeType Type;//!< whether this is a tree or back edge 172 173 173 atom * GetOtherAtom(atom *Atom) const; 174 174 bond * GetFirstBond(); 175 175 bond * GetLastBond(); 176 176 177 177 bool MarkUsed(enum Shading color); 178 178 enum Shading IsUsed(); … … 180 180 bool Contains(const atom *ptr); 181 181 bool Contains(const int nr); 182 182 183 183 bond(); 184 184 bond(atom *left, atom *right); … … 186 186 bond(atom *left, atom *right, int degree, int number); 187 187 ~bond(); 188 189 private: 188 189 private: 190 190 enum Shading Used; //!< marker in depth-first search, DepthFirstSearchAnalysis() 191 191 }; … … 218 218 int NoCyclicBonds; //!< number of cyclic bonds in molecule, by DepthFirstSearchAnalysis() 219 219 double BondDistance; //!< typical bond distance used in CreateAdjacencyList() and furtheron 220 220 221 221 molecule(periodentafel *teil); 222 222 ~molecule(); 223 223 224 224 /// remove atoms from molecule. 225 225 bool AddAtom(atom *pointer); … … 230 230 atom * AddCopyAtom(atom *pointer); 231 231 bool AddXYZFile(string filename); 232 bool AddHydrogenReplacementAtom(ofstream *out, bond *Bond, atom *BottomOrigin, atom *TopOrigin, atom *TopReplacement, bond **BondList, int NumBond, bool IsAngstroem); 232 bool AddHydrogenReplacementAtom(ofstream *out, bond *Bond, atom *BottomOrigin, atom *TopOrigin, atom *TopReplacement, bond **BondList, int NumBond, bool IsAngstroem); 233 233 bond * AddBond(atom *first, atom *second, int degree); 234 234 bool RemoveBond(bond *pointer); 235 235 bool RemoveBonds(atom *BondPartner); 236 236 237 237 /// Find atoms. 238 atom * FindAtom(int Nr) const; 238 atom * FindAtom(int Nr) const; 239 239 atom * AskAtom(string text); 240 240 … … 244 244 void CalculateOrbitals(class config &configuration); 245 245 bool CenterInBox(ofstream *out, Vector *BoxLengths); 246 void CenterEdge(ofstream *out, Vector *max); 247 void CenterOrigin(ofstream *out, Vector *max); 246 void CenterEdge(ofstream *out, Vector *max); 247 void CenterOrigin(ofstream *out, Vector *max); 248 248 void CenterGravity(ofstream *out, Vector *max); 249 249 void Translate(const Vector *x); … … 260 260 double VolumeOfConvexEnvelope(ofstream *out, bool IsAngstroem); 261 261 bool VerletForceIntegration(char *file, double delta_t, bool IsAngstroem); 262 262 263 263 bool CheckBounds(const Vector *x) const; 264 264 void GetAlignvector(struct lsq_params * par) const; 265 265 266 /// Initialising routines in fragmentation 267 void CreateAdjacencyList2(ofstream *out, ifstream *output); 266 /// Initialising routines in fragmentation 268 267 void CreateAdjacencyList(ofstream *out, double bonddistance, bool IsAngstroem); 269 268 void CreateListOfBondsPerAtom(ofstream *out); 270 269 271 270 // Graph analysis 272 271 MoleculeLeafClass * DepthFirstSearchAnalysis(ofstream *out, class StackClass<bond *> *&BackEdgeStack); … … 284 283 285 284 molecule *CopyMolecule(); 286 285 287 286 /// Fragment molecule by two different approaches: 288 287 int FragmentMolecule(ofstream *out, int Order, config *configuration); … … 306 305 int LookForRemovalCandidate(ofstream *&out, KeySet *&Leaf, int *&ShortestPathList); 307 306 int GuesstimateFragmentCount(ofstream *out, int order); 308 309 // Recognize doubly appearing molecules in a list of them 307 308 // Recognize doubly appearing molecules in a list of them 310 309 int * IsEqualToWithinThreshold(ofstream *out, molecule *OtherMolecule, double threshold); 311 310 int * GetFatherSonAtomicMap(ofstream *out, molecule *OtherMolecule); 312 311 313 312 // Output routines. 314 313 bool Output(ofstream *out); … … 331 330 int NumberOfMolecules; //!< Number of entries in \a **FragmentList and of to be returned one. 332 331 int NumberOfTopAtoms; //!< Number of atoms in the molecule from which all fragments originate 333 332 334 333 MoleculeListClass(); 335 334 MoleculeListClass(int Num, int NumAtoms); … … 341 340 bool OutputConfigForListOfFragments(ofstream *out, config *configuration, int *SortIndex); 342 341 void Output(ofstream *out); 343 342 344 343 private: 345 344 }; … … 351 350 class MoleculeLeafClass { 352 351 public: 353 molecule *Leaf; //!< molecule of this leaf 352 molecule *Leaf; //!< molecule of this leaf 354 353 //MoleculeLeafClass *UpLeaf; //!< Leaf one level up 355 354 //MoleculeLeafClass *DownLeaf; //!< First leaf one level down … … 387 386 bool FastParsing; 388 387 double Deltat; 389 388 390 389 private: 391 390 char *mainname; 392 391 char *defaultpath; 393 392 char *pseudopotpath; 394 393 395 394 int DoOutVis; 396 395 int DoOutMes; … … 407 406 int UseAddGramSch; 408 407 int Seed; 409 408 410 409 int MaxOuterStep; 411 410 int OutVisStep; … … 415 414 int MaxPsiStep; 416 415 double EpsWannier; 417 416 418 417 int MaxMinStep; 419 418 double RelEpsTotalEnergy; … … 424 423 double InitRelEpsKineticEnergy; 425 424 int InitMaxMinGapStopStep; 426 425 427 426 //double BoxLength[NDIM*NDIM]; 428 427 429 428 double ECut; 430 429 int MaxLevel; … … 435 434 int RTActualUse; 436 435 int AddPsis; 437 436 438 437 double RCut; 439 438 int StructOpt; … … 442 441 int MaxTypes; 443 442 444 443 445 444 int ParseForParameter(int verbose, ifstream *file, const char *name, int sequential, int const xth, int const yth, int type, void *value, int repetition, int critical); 446 445 447 446 public: 448 447 config(); -
Property mode
changed from
Note:
See TracChangeset
for help on using the changeset viewer.
