- Timestamp:
- Aug 5, 2015, 5:32:12 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:
- 92ee41
- Parents:
- 68989c
- git-author:
- Frederik Heber <heber@…> (07/19/15 13:46:41)
- git-committer:
- Frederik Heber <heber@…> (08/05/15 17:32:12)
- Location:
- src/UIElements/Views/Qt4/Qt3D
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/UIElements/Views/Qt4/Qt3D/GLMoleculeObject_molecule.cpp
r68989c rca4b63b 301 301 302 302 void GLMoleculeObject_molecule::addAtomBonds( 303 const atom *_atom) 304 { 305 const bool atom_present = AtomsinSceneMap.count(_atom->getId()); 306 const BondList &bondlist = _atom->getListOfBonds(); 307 for (BondList::const_iterator bonditer = bondlist.begin(); 308 (bonditer != bondlist.end()) && atom_present; 309 ++bonditer) { 310 const bond::ptr _bond = *bonditer; 311 // check if OtherAtom's sphere is already present 312 const atom *OtherAtom = _bond->GetOtherAtom(_atom); 313 const bool otheratom_present = AtomsinSceneMap.count(OtherAtom->getId()); 314 if (otheratom_present && atom_present) { 315 const GLMoleculeObject_bond::SideOfBond side = (_bond->leftatom == _atom) ? 316 GLMoleculeObject_bond::left : GLMoleculeObject_bond::right; 317 const GLMoleculeObject_bond::SideOfBond otherside = (_bond->leftatom == _atom) ? 318 GLMoleculeObject_bond::right : GLMoleculeObject_bond::left; 319 addAtomBonds(_bond, side); 320 addAtomBonds(_bond, otherside); 303 const atomId_t _id) 304 { 305 const atom * const Walker = const_cast<const World &>(World::getInstance()). 306 getAtom(AtomById(_id)); 307 if (Walker != NULL) { 308 const bool atom_present = AtomsinSceneMap.count(_id); 309 const BondList &bondlist = Walker->getListOfBonds(); 310 for (BondList::const_iterator bonditer = bondlist.begin(); 311 (bonditer != bondlist.end()) && atom_present; 312 ++bonditer) { 313 const bond::ptr _bond = *bonditer; 314 // check if OtherAtom's sphere is already present 315 const atom *OtherAtom = _bond->GetOtherAtom(Walker); 316 const bool otheratom_present = AtomsinSceneMap.count(OtherAtom->getId()); 317 if (otheratom_present && atom_present) { 318 const GLMoleculeObject_bond::SideOfBond side = (_bond->leftatom == Walker) ? 319 GLMoleculeObject_bond::left : GLMoleculeObject_bond::right; 320 const GLMoleculeObject_bond::SideOfBond otherside = (_bond->leftatom == Walker) ? 321 GLMoleculeObject_bond::right : GLMoleculeObject_bond::left; 322 addAtomBonds(_bond, side); 323 addAtomBonds(_bond, otherside); 324 } 321 325 } 322 } 326 } else 327 ELOG(1, "GLMoleculeObject_atom disappeared while about to add bonds."); 323 328 } 324 329 … … 721 726 722 727 // add all bonds 723 const atom * const Walker = const_cast<const World &>(World::getInstance()). 724 getAtom(AtomById(_id)); 725 if (Walker != NULL) 726 addAtomBonds(Walker); 727 else 728 ELOG(1, "GLMoleculeObject_atom disappeared while about to add bonds."); 728 addAtomBonds(_id); 729 729 730 730 emit changeOccured(); -
src/UIElements/Views/Qt4/Qt3D/GLMoleculeObject_molecule.hpp
r68989c rca4b63b 104 104 const GLMoleculeObject_bond::SideOfBond _side 105 105 ); 106 void addAtomBonds(const atom *_atom);106 void addAtomBonds(const atomId_t _id); 107 107 108 108 //!> typedef for the internal set of atoms
Note:
See TracChangeset
for help on using the changeset viewer.