Changeset f39735 for molecuilder/src/molecules.hpp
- Timestamp:
- Jul 23, 2009, 1:45:24 PM (16 years ago)
- Children:
- 47548d
- Parents:
- 560995 (diff), 1b2aa1 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)links above to see all the changes relative to each parent. - git-author:
- Frederik Heber <heber@…> (07/23/09 12:34:47)
- git-committer:
- Frederik Heber <heber@…> (07/23/09 13:45:24)
- File:
-
- 1 edited
-
molecuilder/src/molecules.hpp (modified) (11 diffs)
Legend:
- Unmodified
- Added
- Removed
-
molecuilder/src/molecules.hpp
r560995 rf39735 71 71 #define DistanceMultiMapPair pair <double, pair < PointMap::iterator, PointMap::iterator> > 72 72 73 #define MoleculeList list <molecule *> 74 #define MoleculeListTest pair <MoleculeList::iterator, bool> 75 73 76 /******************************** Some small functions and/or structures **********************************/ 74 77 … … 116 119 element *type; 117 120 }; 118 119 120 121 121 122 /** Single atom. … … 131 132 atom *father; //!< In many-body bond order fragmentations points to originating atom 132 133 atom *Ancestor; //!< "Father" in Depth-First-Search 133 char *Name; //!< unique name used during many-body bond-order fragmentation134 char *Name; //!< unique name used during many-body bond-order fragmentation 134 135 int FixedIon; //!< config variable that states whether forces act on the ion or not 135 136 int *sort; //!< sort criteria … … 146 147 ~atom(); 147 148 148 bool Output(int ElementNo, int AtomNo, ofstream *out ) const;149 bool Output(int ElementNo, int AtomNo, ofstream *out, const char *comment = NULL) const; 149 150 bool OutputXYZLine(ofstream *out) const; 150 151 atom *GetTrueFather(); … … 163 164 class bond { 164 165 public: 165 atom *leftatom;//!< first bond partner166 atom *rightatom;//!< second bond partner166 atom *leftatom; //!< first bond partner 167 atom *rightatom; //!< second bond partner 167 168 bond *previous; //!< previous atom in molecule list 168 169 bond *next; //!< next atom in molecule list 169 int HydrogenBond;//!< Number of hydrogen atoms in the bond170 int BondDegree;//!< single, double, triple, ... bond170 int HydrogenBond; //!< Number of hydrogen atoms in the bond 171 int BondDegree; //!< single, double, triple, ... bond 171 172 int nr; //!< unique number in a molecule, updated by molecule::CreateAdjacencyList() 172 173 bool Cyclic; //!< flag whether bond is part of a cycle or not, given in DepthFirstSearchAnalysis() … … 218 219 int MDSteps; //!< The number of MD steps in Trajectories 219 220 int *NumberOfBondsPerAtom; //!< Number of Bonds each atom has 220 int AtomCount; //!< number of atoms, brought up-to-date by CountAtoms()221 int BondCount; //!< number of atoms, brought up-to-date by CountBonds()221 int AtomCount; //!< number of atoms, brought up-to-date by CountAtoms() 222 int BondCount; //!< number of atoms, brought up-to-date by CountBonds() 222 223 int ElementCount; //!< how many unique elements are therein 223 224 int ElementsInMolecule[MAX_ELEMENTS]; //!< list whether element (sorted by atomic number) is alread present or not 224 int NoNonHydrogen; //!< number of non-hydrogen atoms in molecule225 int NoNonHydrogen; //!< number of non-hydrogen atoms in molecule 225 226 int NoNonBonds; //!< number of non-hydrogen bonds in molecule 226 227 int NoCyclicBonds; //!< number of cyclic bonds in molecule, by DepthFirstSearchAnalysis() 227 228 double BondDistance; //!< typical bond distance used in CreateAdjacencyList() and furtheron 229 bool ActiveFlag; //!< in a MoleculeListClass used to discern active from inactive molecules 230 Vector Center; //!< Center of molecule in a global box 231 char name[MAXSTRINGSIZE]; //!< arbitrary name 232 int IndexNr; //!< index of molecule in a MoleculeListClass 228 233 229 234 molecule(periodentafel *teil); … … 233 238 bool AddAtom(atom *pointer); 234 239 bool RemoveAtom(atom *pointer); 240 bool UnlinkAtom(atom *pointer); 235 241 bool CleanupMolecule(); 236 242 … … 253 259 bool CenterInBox(ofstream *out, Vector *BoxLengths); 254 260 void CenterEdge(ofstream *out, Vector *max); 255 void CenterOrigin(ofstream *out, Vector *max); 256 void CenterGravity(ofstream *out, Vector *max); 261 void CenterOrigin(ofstream *out); 262 void CenterPeriodic(ofstream *out); 263 void CenterAtVector(ofstream *out, Vector *newcenter); 257 264 void Translate(const Vector *x); 258 265 void Mirror(const Vector *x); 259 266 void Align(Vector *n); 260 267 void Scale(double **factor); 261 void Determine Center(Vector ¢er);268 void DeterminePeriodicCenter(Vector ¢er); 262 269 Vector * DetermineCenterOfGravity(ofstream *out); 263 270 Vector * DetermineCenterOfAll(ofstream *out); 271 void SetNameFromFilename(const char *filename); 264 272 void SetBoxDimension(Vector *dim); 265 273 double * ReturnFullMatrixforSymmetric(double *cell_size); 266 274 void ScanForPeriodicCorrection(ofstream *out); 267 void PrincipalAxisSystem(ofstream *out, bool DoRotate);268 double VolumeOfConvexEnvelope(ofstream *out, bool IsAngstroem);269 270 275 bool VerletForceIntegration(ofstream *out, char *file, config &configuration); 271 276 void Thermostats(config &configuration, double ActualTemp, int Thermostat); 277 void PrincipalAxisSystem(ofstream *out, bool DoRotate); 278 double VolumeOfConvexEnvelope(ofstream *out, bool IsAngstroem); 279 Vector* FindEmbeddingHole(ofstream *out, molecule *srcmol); 280 272 281 273 282 double ConstrainedPotential(ofstream *out, atom **permutation, int start, int end, double *constants, bool IsAngstroem); … … 315 324 /// -# BOSSANOVA 316 325 void FragmentBOSSANOVA(ofstream *out, Graph *&FragmentList, KeyStack &RootStack, int *MinimumRingSize); 317 int PowerSetGenerator(ofstream *out, int Order, struct UniqueFragments &FragmentSearch, KeySet RestrictedKeySet);326 int PowerSetGenerator(ofstream *out, int Order, struct UniqueFragments &FragmentSearch, KeySet RestrictedKeySet); 318 327 bool BuildInducedSubgraph(ofstream *out, const molecule *Father); 319 328 molecule * StoreFragmentFromKeySet(ofstream *out, KeySet &Leaflet, bool IsAngstroem); … … 343 352 class MoleculeListClass { 344 353 public: 345 molecule **ListOfMolecules; //!< pointer list of fragment molecules to check for equality 346 int NumberOfMolecules; //!< Number of entries in \a **FragmentList and of to be returned one. 347 int NumberOfTopAtoms; //!< Number of atoms in the molecule from which all fragments originate 354 MoleculeList ListOfMolecules; //!< List of the contained molecules 355 int MaxIndex; 348 356 349 357 MoleculeListClass(); 350 MoleculeListClass(int Num, int NumAtoms);351 358 ~MoleculeListClass(); 352 359 353 /// Output configs.354 360 bool AddHydrogenCorrection(ofstream *out, char *path); 355 361 bool StoreForcesFile(ofstream *out, char *path, int *SortIndex); 356 bool OutputConfigForListOfFragments(ofstream *out, const char *fragmentprefix, config *configuration, int *SortIndex, bool DoPeriodic, bool DoCentering); 362 void insert(molecule *mol); 363 molecule * ReturnIndex(int index); 364 bool OutputConfigForListOfFragments(ofstream *out, config *configuration, int *SortIndex); 365 int NumberOfActiveMolecules(); 366 void Enumerate(ofstream *out); 357 367 void Output(ofstream *out); 368 369 // merging of molecules 370 bool SimpleMerge(molecule *mol, molecule *srcmol); 371 bool SimpleAdd(molecule *mol, molecule *srcmol); 372 bool SimpleMultiMerge(molecule *mol, int *src, int N); 373 bool SimpleMultiAdd(molecule *mol, int *src, int N); 374 bool ScatterMerge(molecule *mol, int *src, int N); 375 bool EmbedMerge(molecule *mol, molecule *srcmol); 358 376 359 377 private: … … 479 497 bool Save(const char *filename, periodentafel *periode, molecule *mol) const; 480 498 bool SaveMPQC(const char *filename, molecule *mol) const; 481 void Edit( molecule *mol);499 void Edit(); 482 500 bool GetIsAngstroem() const; 483 501 char *GetDefaultPath() const;
Note:
See TracChangeset
for help on using the changeset viewer.
