Changeset 9d83b6 for src/analysis_bonds.cpp
- Timestamp:
- Feb 24, 2011, 6:51:32 PM (14 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:
- a2bdbe
- Parents:
- c0d9eb
- git-author:
- Frederik Heber <heber@…> (02/24/11 14:41:13)
- git-committer:
- Frederik Heber <heber@…> (02/24/11 18:51:32)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/analysis_bonds.cpp
rc0d9eb r9d83b6 43 43 int AtomCount = 0; 44 44 for (molecule::const_iterator iter = mol->begin(); iter != mol->end(); ++iter) { 45 const int count = (*iter)->ListOfBonds.size(); 45 const BondList& ListOfBonds = (*iter)->getListOfBonds(); 46 const int count = ListOfBonds.size(); 46 47 if (Max < count) 47 48 Max = count; … … 72 73 int AtomNo = 0; 73 74 for (molecule::const_iterator iter = mol->begin(); iter != mol->end(); ++iter) { 74 if ((*iter)->getType() == type1) 75 for (BondList::const_iterator BondRunner = (*iter)->ListOfBonds.begin(); BondRunner != (*iter)->ListOfBonds.end(); BondRunner++) 75 if ((*iter)->getType() == type1) { 76 const BondList& ListOfBonds = (*iter)->getListOfBonds(); 77 for (BondList::const_iterator BondRunner = ListOfBonds.begin(); 78 BondRunner != ListOfBonds.end(); 79 BondRunner++) 76 80 if ((*BondRunner)->GetOtherAtom((*iter))->getType() == type2) { 77 81 const double distance = (*BondRunner)->GetDistanceSquared(); … … 83 87 AtomNo++; 84 88 } 89 } 85 90 } 86 91 if (Max < 0) { … … 161 166 InterfaceFlag = (InterfaceElement == NULL); 162 167 Interface2Flag = (Interface2Element == NULL); 163 for (BondList::const_iterator BondRunner = (*Runner)->ListOfBonds.begin(); BondRunner != (*Runner)->ListOfBonds.end(); BondRunner++) { 168 const BondList& ListOfBonds = (*Runner)->getListOfBonds(); 169 for (BondList::const_iterator BondRunner = ListOfBonds.begin(); 170 BondRunner != ListOfBonds.end(); 171 BondRunner++) { 164 172 atom * const OtherAtom = (*BondRunner)->GetOtherAtom(*Runner); 165 173 // if hydrogen, check angle to be greater(!) than 30 degrees … … 187 195 if (InterfaceFlag && Interface2Flag && OtherHydrogenFlag) { 188 196 // on this element (Walker) we check for bond to hydrogen, i.e. part of water molecule 189 for (BondList::const_iterator BondRunner = (*Walker)->ListOfBonds.begin(); BondRunner != (*Walker)->ListOfBonds.end(); BondRunner++) { 197 const BondList& ListOfBonds = (*Walker)->getListOfBonds(); 198 for (BondList::const_iterator BondRunner = ListOfBonds.begin(); 199 BondRunner != ListOfBonds.end(); 200 BondRunner++) { 190 201 atom * const OtherAtom = (*BondRunner)->GetOtherAtom(*Walker); 191 202 if (OtherAtom->getType()->getAtomicNumber() == 1) { … … 223 234 atom * theAtom = *Walker; 224 235 if ((theAtom->getType() == first) || (theAtom->getType() == second)) { // first element matches 225 for (BondList::const_iterator BondRunner = theAtom->ListOfBonds.begin(); BondRunner != theAtom->ListOfBonds.end(); BondRunner++) { 236 const BondList& ListOfBonds = theAtom->getListOfBonds(); 237 for (BondList::const_iterator BondRunner = ListOfBonds.begin(); 238 BondRunner != ListOfBonds.end(); 239 BondRunner++) { 226 240 atom * const OtherAtom = (*BondRunner)->GetOtherAtom(theAtom); 227 241 if (((OtherAtom->getType() == first) || (OtherAtom->getType() == second)) && (theAtom->nr < OtherAtom->nr)) { … … 261 275 for (int i=0;i<2;i++) 262 276 MatchFlag[i] = false; 263 for (BondList::const_iterator BondRunner = theAtom->ListOfBonds.begin(); BondRunner != theAtom->ListOfBonds.end(); BondRunner++) { 277 const BondList& ListOfBonds = theAtom->getListOfBonds(); 278 for (BondList::const_iterator BondRunner = ListOfBonds.begin(); 279 BondRunner != ListOfBonds.end(); 280 BondRunner++) { 264 281 atom * const OtherAtom = (*BondRunner)->GetOtherAtom(theAtom); 265 282 for (int i=0;i<2;i++)
Note:
See TracChangeset
for help on using the changeset viewer.