Ignore:
Timestamp:
Apr 20, 2016, 10:58:42 PM (9 years ago)
Author:
Frederik Heber <heber@…>
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:
96f14a
Parents:
6af6a62
git-author:
Frederik Heber <heber@…> (03/15/16 10:10:54)
git-committer:
Frederik Heber <heber@…> (04/20/16 22:58:42)
Message:

Added QtObservedBond, managed by QtObservedInstanceBoard.

  • QtObservedBond is special because it observes not only a bond, but also two atoms and a molecule in total.
  • but the general idea is to rather have information duplicate, i.e. the left atom's position is also available via the QtObservedAtom. But in this way QtObservedBond does not depend on the QtObservedAtom being still or already present.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/UIElements/Qt4/InstanceBoard/QtObservedInstanceBoard.hpp

    r6af6a62 rb4bd0e  
    1818
    1919#include "UIElements/Qt4/InstanceBoard/QtObservedAtom.hpp"
     20#include "UIElements/Qt4/InstanceBoard/QtObservedBond.hpp"
    2021#include "UIElements/Qt4/InstanceBoard/QtObservedMolecule.hpp"
    2122
     
    6465
    6566public:
     67  //!> copy bond id type from QtObservedBond
     68  typedef QtObservedBond::bondId_t bondId_t;
     69
    6670  /** Cstor of QtObservedInstanceBoard.
    6771   *
     
    8185
    8286  const atomId_t getAtomIdToIndex(ObservedValue_Index_t _id) const;
     87  const bondId_t getBondIdToIndex(ObservedValue_Index_t _id) const;
    8388  const moleculeId_t getMoleculeIdToIndex(ObservedValue_Index_t _id) const;
    8489
    8590  QtObservedAtom::ptr getObservedAtom(const atomId_t _id);
    8691  QtObservedAtom::ptr getObservedAtom(ObservedValue_Index_t _id);
     92  QtObservedBond::ptr getObservedBond(const bondId_t _id);
     93  QtObservedBond::ptr getObservedBond(ObservedValue_Index_t _id);
    8794  QtObservedMolecule::ptr getObservedMolecule(const moleculeId_t _id);
    8895  QtObservedMolecule::ptr getObservedMolecule(ObservedValue_Index_t _id);
     
    9097  void markObservedAtomAsDisconnected(ObservedValue_Index_t _id);
    9198  void markObservedAtomForErase(ObservedValue_Index_t _id);
     99  void markObservedBondAsConnected(ObservedValue_Index_t _id);
     100  void markObservedBondAsDisconnected(ObservedValue_Index_t _id);
     101  void markObservedBondForErase(ObservedValue_Index_t _id);
    92102  void markObservedMoleculeAsConnected(ObservedValue_Index_t _id);
    93103  void markObservedMoleculeAsDisconnected(ObservedValue_Index_t _id);
     
    98108  void atomRemoved(ObservedValue_Index_t _atomid);
    99109  void atomIndexChanged(const atomId_t _oldid, const atomId_t _newid);
     110  void bondInserted(QtObservedBond::ptr _bond);
     111  void bondRemoved(ObservedValue_Index_t _bondid);
     112  void bondIndexChanged(const bondId_t _oldid, const bondId_t _newid);
    100113  void moleculeInserted(QtObservedMolecule::ptr _mol);
    101114  void moleculeRemoved(ObservedValue_Index_t _molid);
     
    111124  bool WorldSignedOn;
    112125
    113   typedef std::set<Observable *> SignedOn_t;
     126  typedef std::multiset<Observable *> SignedOn_t;
    114127  //!> map indicating to which atom we are currently signed on
    115128  SignedOn_t AtomSignedOn;
     
    121134  struct IdtoIndex_t : boost::bimap<id, ObservedValue_Index_t> {};
    122135  IdtoIndex_t<atomId_t> atomids_lookup;
     136  IdtoIndex_t<bondId_t> bondids_lookup;
    123137  IdtoIndex_t<moleculeId_t> moleculeids_lookup;
    124138
     
    132146   */
    133147  void atomcountsubjectKilled(ObservedValue_Index_t _id);
     148
     149  /** Counts how many bond's ObservedValues got subjectKilled.
     150   *
     151   * This is used to give removal signal only when each and every
     152   * ObservedValue (and the instance itself) has been subjectKilled by the
     153   * monitored Observable. Only then can we safely remove the instance.
     154   *
     155   * \param _bondid id of the bond
     156   */
     157  void bondcountsubjectKilled(ObservedValue_Index_t _bondid);
    134158
    135159  /** Counts how many molecule's ObservedValues got subjectKilled.
     
    145169  //!> container with all ObservedValues for each atom, associated by id
    146170  ObservedValuesContainer<QtObservedAtom, ObservedValue_Index_t> atomObservedValues;
     171  //!> container with all ObservedValues for each bond, associated by id pairs
     172  ObservedValuesContainer<QtObservedBond, ObservedValue_Index_t> bondObservedValues;
    147173  //!> container with all ObservedValues for each molecule, associated by id
    148174  ObservedValuesContainer<QtObservedMolecule, ObservedValue_Index_t> moleculeObservedValues;
Note: See TracChangeset for help on using the changeset viewer.