Changeset 1024cb for src/molecule.hpp
- Timestamp:
- May 31, 2010, 5:32:27 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, Candidate_v1.7.0, Candidate_v1.7.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:
- e08c46
- Parents:
- 42af9e (diff), a7b761b (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@…> (05/31/10 17:29:30)
- git-committer:
- Frederik Heber <heber@…> (05/31/10 17:32:27)
- File:
-
- 1 edited
-
src/molecule.hpp (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/molecule.hpp
r42af9e r1024cb 34 34 #include "tesselation.hpp" 35 35 #include "Patterns/Observer.hpp" 36 #include "Patterns/ObservedIterator.hpp" 36 37 #include "Patterns/Cacheable.hpp" 37 38 … … 90 91 friend molecule *NewMolecule(); 91 92 friend void DeleteMolecule(molecule *); 93 92 94 public: 95 typedef std::set<atom*> atomSet; 96 typedef ObservedIterator<atomSet> iterator; 97 typedef atomSet::const_iterator const_iterator; 98 93 99 const periodentafel * const elemente; //!< periodic table with each element 94 atom *start; //!< start of atom list 95 atom *end; //!< end of atom list 100 // old deprecated atom handling 101 //atom *start; //!< start of atom list 102 //atom *end; //!< end of atom list 96 103 bond *first; //!< start of bond list 97 104 bond *last; //!< end of bond list 98 105 int MDSteps; //!< The number of MD steps in Trajectories 99 int AtomCount; //!< number of atoms, brought up-to-date by CountAtoms()106 //int AtomCount; //!< number of atoms, brought up-to-date by CountAtoms() 100 107 int BondCount; //!< number of atoms, brought up-to-date by CountBonds() 101 108 int ElementCount; //!< how many unique elements are therein … … 112 119 private: 113 120 Cacheable<string> formula; 121 Cacheable<int> AtomCount; 114 122 moleculeId_t id; 123 atomSet atoms; //<!set of atoms 115 124 protected: 125 //void CountAtoms(); 126 /** 127 * this iterator type should be used for internal variables, \ 128 * since it will not lock 129 */ 130 typedef atomSet::iterator internal_iterator; 131 132 116 133 molecule(const periodentafel * const teil); 117 134 virtual ~molecule(); … … 121 138 //getter and setter 122 139 const std::string getName(); 140 int getAtomCount() const; 141 int doCountAtoms(); 123 142 moleculeId_t getId(); 124 143 void setId(moleculeId_t); … … 127 146 std::string calcFormula(); 128 147 148 iterator begin(); 149 const_iterator begin() const; 150 iterator end(); 151 const_iterator end() const; 152 bool empty() const; 153 size_t size() const; 154 const_iterator erase( const_iterator loc ); 155 const_iterator erase( atom *& key ); 156 const_iterator find ( atom *& key ) const; 157 pair<iterator,bool> insert ( atom * const key ); 158 129 159 130 160 // re-definition of virtual functions from PointCloud … … 132 162 Vector *GetCenter() const ; 133 163 TesselPoint *GetPoint() const ; 134 TesselPoint *GetTerminalPoint() const ;135 164 int GetMaxId() const; 136 165 void GoToNext() const ; 137 void GoToPrevious() const ;138 166 void GoToFirst() const ; 139 void GoToLast() const ;140 167 bool IsEmpty() const ; 141 168 bool IsEnd() const ; … … 232 259 233 260 /// Count and change present atoms' coordination. 234 void CountAtoms();235 261 void CountElements(); 236 262 void CalculateOrbitals(class config &configuration); … … 302 328 bool StoreForcesFile(MoleculeListClass *BondFragments, char *path, int *SortIndex); 303 329 bool CreateMappingLabelsToConfigSequence(int *&SortIndex); 330 bool CreateFatherLookupTable(atom **&LookupTable, int count = 0); 304 331 void BreadthFirstSearchAdd(molecule *Mol, atom **&AddedAtomList, bond **&AddedBondList, atom *Root, bond *Bond, int BondOrder, bool IsAngstroem); 305 332 /// -# BOSSANOVA … … 330 357 private: 331 358 int last_atom; //!< number given to last atom 332 mutable atom *InternalPointer; //!< internal pointer for PointCloud359 mutable internal_iterator InternalPointer; //!< internal pointer for PointCloud 333 360 }; 334 361
Note:
See TracChangeset
for help on using the changeset viewer.
