Changeset 69eb71 for src/molecules.hpp
- Timestamp:
- Dec 3, 2008, 2:12:05 PM (16 years ago)
- Branches:
- 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
- Children:
- f683fe
- Parents:
- 1ffa21
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/molecules.hpp
r1ffa21 r69eb71 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 < 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 > 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 266 /// Initialising routines in fragmentation 267 void CreateAdjacencyList2(ofstream *out, ifstream *output); 267 268 void CreateAdjacencyList(ofstream *out, double bonddistance, bool IsAngstroem); 268 269 void CreateListOfBondsPerAtom(ofstream *out); 269 270 270 271 // Graph analysis 271 272 MoleculeLeafClass * DepthFirstSearchAnalysis(ofstream *out, class StackClass<bond *> *&BackEdgeStack); … … 283 284 284 285 molecule *CopyMolecule(); 285 286 286 287 /// Fragment molecule by two different approaches: 287 288 int FragmentMolecule(ofstream *out, int Order, config *configuration); … … 305 306 int LookForRemovalCandidate(ofstream *&out, KeySet *&Leaf, int *&ShortestPathList); 306 307 int GuesstimateFragmentCount(ofstream *out, int order); 307 308 // Recognize doubly appearing molecules in a list of them 308 309 // Recognize doubly appearing molecules in a list of them 309 310 int * IsEqualToWithinThreshold(ofstream *out, molecule *OtherMolecule, double threshold); 310 311 int * GetFatherSonAtomicMap(ofstream *out, molecule *OtherMolecule); 311 312 312 313 // Output routines. 313 314 bool Output(ofstream *out); … … 330 331 int NumberOfMolecules; //!< Number of entries in \a **FragmentList and of to be returned one. 331 332 int NumberOfTopAtoms; //!< Number of atoms in the molecule from which all fragments originate 332 333 333 334 MoleculeListClass(); 334 335 MoleculeListClass(int Num, int NumAtoms); … … 340 341 bool OutputConfigForListOfFragments(ofstream *out, config *configuration, int *SortIndex); 341 342 void Output(ofstream *out); 342 343 343 344 private: 344 345 }; … … 350 351 class MoleculeLeafClass { 351 352 public: 352 molecule *Leaf; //!< molecule of this leaf 353 molecule *Leaf; //!< molecule of this leaf 353 354 //MoleculeLeafClass *UpLeaf; //!< Leaf one level up 354 355 //MoleculeLeafClass *DownLeaf; //!< First leaf one level down … … 386 387 bool FastParsing; 387 388 double Deltat; 388 389 389 390 private: 390 391 char *mainname; 391 392 char *defaultpath; 392 393 char *pseudopotpath; 393 394 394 395 int DoOutVis; 395 396 int DoOutMes; … … 406 407 int UseAddGramSch; 407 408 int Seed; 408 409 409 410 int MaxOuterStep; 410 411 int OutVisStep; … … 414 415 int MaxPsiStep; 415 416 double EpsWannier; 416 417 417 418 int MaxMinStep; 418 419 double RelEpsTotalEnergy; … … 423 424 double InitRelEpsKineticEnergy; 424 425 int InitMaxMinGapStopStep; 425 426 426 427 //double BoxLength[NDIM*NDIM]; 427 428 428 429 double ECut; 429 430 int MaxLevel; … … 434 435 int RTActualUse; 435 436 int AddPsis; 436 437 437 438 double RCut; 438 439 int StructOpt; … … 441 442 int MaxTypes; 442 443 443 444 444 445 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); 445 446 446 447 public: 447 448 config();
Note:
See TracChangeset
for help on using the changeset viewer.