Changeset d3347e
- Timestamp:
- Mar 5, 2010, 11:40:30 AM (15 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:
- 75ac0c
- Parents:
- 9879f6
- git-author:
- Tillmann Crueger <crueger@…> (03/05/10 11:40:05)
- git-committer:
- Tillmann Crueger <crueger@…> (03/05/10 11:40:30)
- Location:
- src
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
src/lists.hpp
r9879f6 rd3347e 8 8 #ifndef LISTS_HPP_ 9 9 #define LISTS_HPP_ 10 11 class atom; 10 12 11 13 /******************************** Some templates for list management ***********************************/ -
src/memoryallocator.hpp
r9879f6 rd3347e 115 115 template <typename X> void Free(X** buffer, const char *msg = NULL) 116 116 { 117 std::cout << "!!!!!!!!!!!!!!!!!removing pointer to buffer !!!!!!!!!!!!" << std::endl; 117 118 if ((buffer == NULL) || (*buffer == NULL)) 118 119 return; … … 130 131 template <typename X> void Free(X* const buffer, const char *msg = NULL) 131 132 { 133 std::cout << "!!!!!!!!!!!!!!!!!removing direct buffer !!!!!!!!!!!!" << std::endl; 132 134 if ((buffer == NULL)) 133 135 return; -
src/molecule.cpp
r9879f6 rd3347e 31 31 * Initialises molecule list with correctly referenced start and end, and sets molecule::last_atom to zero. 32 32 */ 33 molecule::molecule(const periodentafel * const teil) : elemente(teil) 33 molecule::molecule(const periodentafel * const teil) : elemente(teil), 34 34 first(new bond(0, 0, 1, -1)), last(new bond(0, 0, 1, -1)), MDSteps(0), AtomCount(0), 35 35 BondCount(0), ElementCount(0), NoNonHydrogen(0), NoNonBonds(0), NoCyclicBonds(0), BondDistance(0.), … … 166 166 pair<molecule::iterator,bool> molecule::insert ( atom * const key ) 167 167 { 168 return atoms.insert(key); 168 pair<atomSet::iterator,bool> res = atoms.insert(key); 169 return pair<iterator,bool>(iterator(res.first,this),res.second); 169 170 } 170 171 … … 937 938 void molecule::CountAtoms() 938 939 { 940 cout << "!!!!!!!!!!! Assigning Numbers to atoms " << endl; 939 941 int i = size(); 940 942 if ((AtomCount == 0) || (i != AtomCount)) { 943 cout << "!!!!!!!!! Counting needed" << endl; 941 944 Log() << Verbose(3) << "Mismatch in AtomCount " << AtomCount << " and recounted number " << i << ", renaming all." << endl; 942 945 AtomCount = i; … … 958 961 } else 959 962 Log() << Verbose(3) << "AtomCount is still " << AtomCount << ", thus counting nothing." << endl; 963 } 964 else { 965 cout << "!!!!!!!!! Nothing changed while counting" << endl; 960 966 } 961 967 }; -
src/molecule.hpp
r9879f6 rd3347e 94 94 typedef ObservedIterator<atomSet> iterator; 95 95 typedef atomSet::const_iterator const_iterator; 96 96 97 double cell_size[6];//!< cell size 97 98 const periodentafel * const elemente; //!< periodic table with each element … … 120 121 atomSet atoms; //<!set of atoms 121 122 protected: 123 /** 124 * this iterator type should be used for internal variables, \ 125 * since it will not lock 126 */ 127 typedef atomSet::iterator internal_iterator; 128 129 122 130 molecule(const periodentafel * const teil); 123 131 virtual ~molecule(); … … 149 157 Vector *GetCenter() const ; 150 158 TesselPoint *GetPoint() const ; 151 int GetMaxId() const;159 //int GetMaxId() const; 152 160 void GoToNext() const ; 153 161 void GoToFirst() const ; … … 342 350 private: 343 351 int last_atom; //!< number given to last atom 344 mutable i terator InternalPointer; //!< internal pointer for PointCloud352 mutable internal_iterator InternalPointer; //!< internal pointer for PointCloud 345 353 }; 346 354 -
src/molecule_graph.cpp
r9879f6 rd3347e 136 136 AtomMap = Calloc<atom *> (AtomCount, "molecule::CreateAdjacencyList - **AtomCount"); 137 137 for (molecule::const_iterator iter = begin(); iter != end(); ++iter) { 138 std::cout << "!!!!!!!!!!!!Copying pointer to Atom number: " << (*iter)->nr << std::endl; 138 139 AtomMap[(*iter)->nr] = (*iter); 139 140 } … … 177 178 } 178 179 } 180 std::cout << "trying to remove Pointer to buffer " << std::endl; 179 181 Free(&AtomMap); 180 182 delete (LC); -
src/molecule_pointcloud.cpp
r9879f6 rd3347e 48 48 { 49 49 Info FunctionInfo(__func__); 50 if (InternalPointer != end())50 if (InternalPointer != atoms.end()) 51 51 InternalPointer++; 52 52 }; … … 58 58 { 59 59 Info FunctionInfo(__func__); 60 InternalPointer = begin();60 InternalPointer = atoms.begin(); 61 61 }; 62 62 … … 76 76 { 77 77 Info FunctionInfo(__func__); 78 return (InternalPointer == end());78 return (InternalPointer == atoms.end()); 79 79 };
Note:
See TracChangeset
for help on using the changeset viewer.