- Timestamp:
- Jul 28, 2015, 2:03:59 PM (9 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:
- f54524
- Parents:
- df3f2f
- git-author:
- Frederik Heber <heber@…> (06/21/15 04:45:30)
- git-committer:
- Frederik Heber <heber@…> (07/28/15 14:03:59)
- Location:
- src/Atom
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Atom/atom_bondedparticle.cpp
rdf3f2f rc6719d 109 109 * @return pointer to created bond or to already present bonds 110 110 */ 111 bond::ptr BondedParticle::addBond(const unsigned int _step, BondedParticle* Partner)111 bond::ptr BondedParticle::addBond(const unsigned int _step, BondedParticle* const Partner) 112 112 { 113 113 const BondList &bondlist = getListOfBondsAtStep(_step); … … 127 127 128 128 /** 129 * Returns aan already present bond between this bonded particle and another. 130 * 131 * @param _step time step to access 132 * @param bonding partner 133 * @return pointer to already present bonds or containing NULL 134 */ 135 bond::ptr BondedParticle::getBondAtStep( 136 const unsigned int _step, 137 const BondedParticle* const Partner) const 138 { 139 const BondList &bondlist = getListOfBondsAtStep(_step); 140 for (BondList::const_iterator runner = bondlist.begin(); 141 runner != bondlist.end(); 142 runner++) { 143 if ((*runner)->Contains(Partner)) 144 return *runner; 145 } 146 return bond::ptr(); 147 } 148 149 /** 129 150 * Adds a bond between this bonded particle and another. Returns present instance if this 130 151 * bond already exists. … … 133 154 * @return pointer to created bond or to already present bonds 134 155 */ 135 bond::ptr BondedParticle::addBond(BondedParticle* Partner)156 bond::ptr BondedParticle::addBond(BondedParticle* const Partner) 136 157 { 137 158 return addBond(WorldTime::getTime(), Partner); 159 } 160 161 /** 162 * Returns an already present bond between this bonded particle and another. 163 * 164 * @param bonding partner 165 * @return pointer to already present bonds or containing NULL 166 */ 167 bond::ptr BondedParticle::getBond(const BondedParticle* const Partner) const 168 { 169 return getBondAtStep(WorldTime::getTime(), Partner); 138 170 } 139 171 … … 334 366 * @return >=0 - first time step where bond appears, -1 - bond not present in lists 335 367 */ 336 int BondedParticle::ContainsBondAtStep( bond::ptr Binder) const368 int BondedParticle::ContainsBondAtStep(const bond::ptr Binder) const 337 369 { 338 370 int step = -1; -
src/Atom/atom_bondedparticle.hpp
rdf3f2f rc6719d 44 44 virtual ~BondedParticle(); 45 45 46 bond::ptr addBond(const unsigned int _step, BondedParticle* Partner); 47 bond::ptr addBond(BondedParticle* Partner); 48 void removeBond(const unsigned int _step, BondedParticle* Partner); 49 void removeBond(BondedParticle* Partner); 46 bond::ptr addBond(const unsigned int _step, BondedParticle* const Partner); 47 bond::ptr addBond(BondedParticle* const Partner); 48 bond::ptr getBondAtStep(const unsigned int _step, const BondedParticle* const Partner) const; 49 bond::ptr getBond(const BondedParticle* const Partner) const; 50 void removeBond(const unsigned int _step, BondedParticle* const Partner); 51 void removeBond(BondedParticle* const Partner); 50 52 void removeBond(bond::ptr &binder); 51 53 void removeAllBonds(); … … 64 66 bool UnregisterBond(const unsigned int _step, bond::ptr const Binder); 65 67 66 int ContainsBondAtStep( bond::ptr Binder) const;68 int ContainsBondAtStep(const bond::ptr Binder) const; 67 69 68 70 private:
Note:
See TracChangeset
for help on using the changeset viewer.