- Timestamp:
- Aug 5, 2015, 5:32:07 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:
- 009e2e2
- Parents:
- b3a33d
- git-author:
- Frederik Heber <heber@…> (06/19/15 17:37:50)
- git-committer:
- Frederik Heber <heber@…> (08/05/15 17:32:07)
- Location:
- src/UIElements/Views/Qt4/Qt3D
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/UIElements/Views/Qt4/Qt3D/GLMoleculeObject_atom.cpp
rb3a33d r534374 44 44 #include "CodePatterns/Observer/Notification.hpp" 45 45 46 #include <algorithm> 47 #include <boost/assign.hpp> 48 46 49 #include "Atom/atom.hpp" 47 50 #include "Bond/bond.hpp" 48 51 #include "Descriptors/AtomIdDescriptor.hpp" 49 52 #include "Element/element.hpp" 53 #include "Element/periodentafel.hpp" 50 54 #include "LinearAlgebra/Vector.hpp" 51 55 #include "GLMoleculeObject_bond.hpp" … … 53 57 #include "WorldTime.hpp" 54 58 59 using namespace boost::assign; 60 61 static const Observable::channels_t getAtomBondsChannels() 62 { 63 Observable::channels_t channels; 64 channels += AtomObservable::BondsAdded, AtomObservable::BondsRemoved; 65 return channels; 66 } 67 68 // static entities 69 const Observable::channels_t 70 GLMoleculeObject_atom::AtomIndexChannels(1, AtomObservable::IndexChanged); 71 const Observable::channels_t 72 GLMoleculeObject_atom::AtomPositionChannels(1, AtomObservable::PositionChanged); 73 const Observable::channels_t 74 GLMoleculeObject_atom::AtomElementChannels(1, AtomObservable::ElementChanged); 75 const Observable::channels_t 76 GLMoleculeObject_atom::AtomBondsChannels(getAtomBondsChannels()); 77 const Observable::channels_t 78 GLMoleculeObject_atom::AtomSelectionStatusChannels(World::SelectionChanged); 79 55 80 GLMoleculeObject_atom::GLMoleculeObject_atom(QGLSceneNode *mesh[], QObject *parent, const atomId_t _id) : 56 81 GLMoleculeObject(mesh, parent), 57 82 Observer(std::string("GLMoleculeObject_atom")+toString(_id)), 58 atomicid(_id), 59 uptodatePosition(false), 60 uptodateElement(false) 61 { 62 // sign on as observer (obtain non-const instance before) 63 const atom * const _atom = const_cast<const World &>(World::getInstance()). 64 getAtom(AtomById(atomicid)); 65 if (_atom != NULL) { 66 _atom->signOn(this, AtomObservable::IndexChanged); 67 _atom->signOn(this, AtomObservable::PositionChanged); 68 _atom->signOn(this, AtomObservable::ElementChanged); 69 _atom->signOn(this, AtomObservable::BondsAdded); 70 } else { 71 ELOG(2, "Atom with id "+toString(atomicid)+" is already gone."); 72 } 73 World::getInstance().signOn(this, World::SelectionChanged); 74 75 // set the object's id 76 resetProperties(); 77 78 LOG(2, "INFO: Created sphere for atom " << atomicid << "."); 83 atomref(getAtom(_id)), 84 AtomIndex( 85 atomref, 86 boost::bind(&GLMoleculeObject_atom::updateIndex, this), 87 "AtomIndex_"+toString(_id), 88 _id, 89 AtomIndexChannels), 90 AtomPosition( 91 atomref, 92 boost::bind(&GLMoleculeObject_atom::updatePosition, this), 93 "AtomPosition_"+toString(_id), 94 updatePosition(), 95 AtomPositionChannels), 96 AtomElement( 97 atomref, 98 boost::bind(&GLMoleculeObject_atom::updateElement, this), 99 "AtomElement"+toString(_id), 100 updateElement(), 101 AtomElementChannels), 102 AtomBonds( 103 atomref, 104 boost::bind(&GLMoleculeObject_atom::updateBonds, this), 105 "AtomBonds_"+toString(_id), 106 updateBonds(), 107 AtomBondsChannels), 108 AtomSelectionStatus( 109 World::getPointer(), 110 boost::bind(&GLMoleculeObject_atom::updateSelectionStatus, this), 111 "AtomSelectionStatus_"+toString(_id), 112 updateSelectionStatus(), 113 AtomSelectionStatusChannels), 114 owner(NULL) 115 { 116 setObjectId(_id); 117 resetPosition(); 118 resetElement(); 119 120 // sign On 121 activateObserver(); 122 123 // atomref is only used for caching the ref, it must be used elswhere 124 const_cast<atom *&>(atomref) = NULL; 79 125 80 126 connect( this, SIGNAL(clicked()), this, SLOT(wasClicked())); 127 connect( this, SIGNAL(idChanged()), this, SLOT(resetIndex()), Qt::QueuedConnection); 128 connect( this, SIGNAL(elementChanged()), this, SLOT(resetElement()), Qt::QueuedConnection); 129 connect( this, SIGNAL(positionChanged()), this, SLOT(resetPosition()), Qt::QueuedConnection); 130 connect( this, SIGNAL(bondsChanged()), this, SLOT(resetPosition()), Qt::QueuedConnection); 131 connect( this, SIGNAL(selectionstatusChanged()), this, SLOT(resetSelectionStatus()), Qt::QueuedConnection); 132 } 133 134 void GLMoleculeObject_atom::activateObserver() 135 { 136 if (atomref != NULL) { 137 owner = static_cast<const Observable *>(atomref); 138 owner->signOn(this, AtomObservable::IndexChanged); 139 owner->signOn(this, AtomObservable::PositionChanged); 140 owner->signOn(this, AtomObservable::ElementChanged); 141 owner->signOn(this, AtomObservable::BondsAdded); 142 owner->signOn(this, AtomObservable::BondsRemoved); 143 World::getInstance().signOn(this, World::SelectionChanged); 144 } 145 } 146 147 148 void GLMoleculeObject_atom::deactivateObserver() 149 { 150 // sign Off 151 if (owner != NULL) { 152 owner->signOff(this, AtomObservable::IndexChanged); 153 owner->signOff(this, AtomObservable::PositionChanged); 154 owner->signOff(this, AtomObservable::ElementChanged); 155 owner->signOff(this, AtomObservable::BondsAdded); 156 owner->signOff(this, AtomObservable::BondsRemoved); 157 World::getInstance().signOff(this, World::SelectionChanged); 158 owner = NULL; 159 } 81 160 } 82 161 83 162 GLMoleculeObject_atom::~GLMoleculeObject_atom() 84 163 { 85 const atom * const _atom = const_cast<const World &>(World::getInstance()). 86 getAtom(AtomById(atomicid)); 87 if (_atom != NULL){ 88 _atom->signOff(this, AtomObservable::IndexChanged); 89 _atom->signOff(this, AtomObservable::PositionChanged); 90 _atom->signOff(this, AtomObservable::ElementChanged); 91 _atom->signOff(this, AtomObservable::BondsAdded); 92 } 93 World::getInstance().signOff(this, World::SelectionChanged); 94 } 95 96 void GLMoleculeObject_atom::update(Observable *publisher) 97 { 98 #ifdef LOG_OBSERVER 99 observerLog().addMessage() << "++ Update of Observer " << observerLog().getName(static_cast<Observer *>(this)) << " from atom "+toString(atomicid)+"."; 100 #endif 101 resetProperties(); 164 deactivateObserver(); 165 } 166 167 void GLMoleculeObject_atom::resetIndex() 168 { 169 const atomId_t newId = AtomIndex.get(); 170 const size_t oldId = objectId(); 171 ASSERT( newId != oldId, 172 "GLMoleculeObject_atom::updateIndex() - index "+toString(newId)+" did not change."); 173 LOG(4, "INFO: GLMoleculeObject_atom::resetIndex() - new index is "+toString(newId)+"."); 174 setObjectId(newId); 175 176 emit indexChanged(this, oldId, newId); 102 177 } 103 178 104 179 void GLMoleculeObject_atom::resetPosition() 105 180 { 106 const atom * const _atom = const_cast<const World &>(World::getInstance()). 107 getAtom(AtomById(atomicid)); 108 if (_atom != NULL) { 109 const Vector Position = _atom->getPosition(); 110 LOG(4, "INFO: GLMoleculeObject_atom::resetIndex() - new position is "+toString(Position)+"."); 111 setPosition(QVector3D(Position[0], Position[1], Position[2])); 112 } else { 113 ELOG(2, "Atom with id "+toString(atomicid)+" is already gone."); 114 } 115 uptodatePosition = true; 181 const Vector Position = AtomPosition.get(); 182 LOG(4, "INFO: GLMoleculeObject_atom::resetIndex() - new position is "+toString(Position)+"."); 183 setPosition(QVector3D(Position[0], Position[1], Position[2])); 116 184 } 117 185 … … 119 187 { 120 188 size_t elementno = 0; 121 const atom * const _atom = const_cast<const World &>(World::getInstance()). 122 getAtom(AtomById(atomicid)); 123 const element *_type = NULL; 124 if (_atom != NULL) { 125 _type = _atom->getType(); 126 } else { 127 ELOG(2, "Atom with id "+toString(atomicid)+" is already gone."); 128 } 189 const element * const _type = World::getInstance(). 190 getPeriode()->FindElement(AtomElement.get()); 129 191 if (_type != NULL) { 130 192 elementno = _type->getAtomicNumber(); … … 148 210 } 149 211 setScale( radius / 4. ); 150 151 uptodateElement = true; 152 } 153 154 void GLMoleculeObject_atom::resetIndex() 155 { 156 int oldId = objectId(); 157 LOG(4, "INFO: GLMoleculeObject_atom::resetIndex() - new index is "+toString(atomicid)+"."); 158 setObjectId(atomicid); 159 160 emit indexChanged(this, oldId, atomicid); 161 } 162 163 void GLMoleculeObject_atom::resetProperties() 164 { 165 // set position 166 resetPosition(); 167 168 // set element 169 resetElement(); 170 171 // set the object's id 172 resetIndex(); 173 174 // selected? 175 setSelected(World::getInstance().isAtomSelected(atomicid)); 212 } 213 214 void GLMoleculeObject_atom::resetBonds() 215 { 216 ListOfBonds_t ListOfBonds_new = AtomBonds.get(); 217 std::sort(ListOfBonds_new.begin(), ListOfBonds_new.end()); 218 ListOfBonds_t BondsToAdd; 219 std::set_difference( 220 ListOfBonds_new.begin(), ListOfBonds_new.end(), 221 ListOfBonds.begin(), ListOfBonds.end(), 222 std::back_inserter(BondsToAdd)); 223 ListOfBonds_t BondsToRemove; 224 std::set_difference( 225 ListOfBonds.begin(), ListOfBonds.end(), 226 ListOfBonds_new.begin(), ListOfBonds_new.end(), 227 std::back_inserter(BondsToRemove)); 228 for (ListOfBonds_t::const_iterator iter = BondsToAdd.begin(); 229 iter != BondsToAdd.end(); 230 ++iter) { 231 const GLMoleculeObject_bond::SideOfBond side = (iter->first == AtomIndex.get()) ? 232 GLMoleculeObject_bond::left : GLMoleculeObject_bond::right; 233 emit BondsAdded(iter->first, iter->second, side); 234 } 235 for (ListOfBonds_t::const_iterator iter = BondsToRemove.begin(); 236 iter != BondsToRemove.end(); 237 ++iter) { 238 emit BondsRemoved(iter->first, iter->second); 239 } 240 ListOfBonds = ListOfBonds_new; 241 } 242 243 void GLMoleculeObject_atom::resetSelectionStatus() 244 { 245 setSelected(AtomSelectionStatus.get()); 176 246 } 177 247 178 248 void GLMoleculeObject_atom::draw(QGLPainter *painter, const QVector4D &cameraPlane) 179 249 { 180 // hook to update prior to painting181 if (!uptodatePosition)182 resetPosition();183 if (!uptodateElement)184 resetElement();185 186 250 // call old hook to do the actual paining 187 251 GLMoleculeObject::draw(painter, cameraPlane); 188 252 } 189 253 254 void GLMoleculeObject_atom::wasClicked() 255 { 256 LOG(4, "INFO: GLMoleculeObject_atom: atom " << AtomIndex.get() << " has been clicked"); 257 emit clicked(AtomIndex.get()); 258 } 259 260 const atom * const GLMoleculeObject_atom::getAtomConst(const atomId_t _id) 261 { 262 const atom * const _atom = const_cast<const World &>(World::getInstance()). 263 getAtom(AtomById(_id)); 264 return _atom; 265 } 266 267 atom * const GLMoleculeObject_atom::getAtom(const atomId_t _id) 268 { 269 atom * const _atom = World::getInstance().getAtom(AtomById(_id)); 270 return _atom; 271 } 272 273 atomId_t GLMoleculeObject_atom::updateIndex() const 274 { 275 const atom * const _atom = World::getInstance().lastChanged<atom>(); 276 if (_atom != NULL) { 277 return _atom->getId(); 278 } 279 return (atomId_t)-1; 280 } 281 282 Vector GLMoleculeObject_atom::updatePosition() const 283 { 284 const atom * const _atom = getAtom(AtomIndex.get()); 285 if (_atom != NULL) { 286 return _atom->getPosition(); 287 } else { 288 return zeroVec; 289 } 290 } 291 292 atomicNumber_t GLMoleculeObject_atom::updateElement() const 293 { 294 const atom * const _atom = getAtom(AtomIndex.get()); 295 if (_atom != NULL) { 296 return _atom->getElementNo(); 297 } else { 298 return (atomicNumber_t)-1; 299 } 300 } 301 302 GLMoleculeObject_atom::ListOfBonds_t GLMoleculeObject_atom::updateBonds() const 303 { 304 ListOfBonds_t ListOfBonds; 305 const atom * const _atom = getAtom(AtomIndex.get()); 306 if (_atom != NULL) { 307 // make sure position is up-to-date 308 const BondList ListBonds = _atom->getListOfBonds(); 309 for (BondList::const_iterator iter = ListBonds.begin(); 310 iter != ListBonds.end(); 311 ++iter) 312 ListOfBonds.insert( ListOfBonds.end(), std::make_pair( 313 (*iter)->leftatom->getId(), 314 (*iter)->rightatom->getId()) ); 315 } else { 316 ELOG(2, "Atom with id "+toString(AtomIndex.get())+" is already gone."); 317 } 318 return ListOfBonds; 319 } 320 321 bool GLMoleculeObject_atom::updateSelectionStatus() const 322 { 323 const atom * const _atom = getAtom(AtomIndex.get()); 324 if (_atom != NULL) { 325 return const_cast<const World &>(World::getInstance()).isSelected(_atom); 326 } 327 return false; 328 } 329 330 void GLMoleculeObject_atom::update(Observable *publisher) 331 { 332 ASSERT(0, "GLMoleculeObject_atom::update() - we are not signed on for global updates."); 333 } 334 190 335 void GLMoleculeObject_atom::subjectKilled(Observable *publisher) 191 336 { 192 // remove id such that we don't sign off accidentally from a different atom 193 const_cast<atomId_t &>(atomicid) = -1; 337 deactivateObserver(); 194 338 } 195 339 196 340 void GLMoleculeObject_atom::recieveNotification(Observable *publisher, Notification_ptr notification) 197 341 { 198 const atom * const _atom = const_cast<const World &>(World::getInstance()). 199 getAtom(AtomById(atomicid)); 200 if (publisher == dynamic_cast<const Observable*>(_atom)){ 201 // notofication from atom 202 #ifdef LOG_OBSERVER 203 observerLog().addMessage() << "++ Update of Observer "<< observerLog().getName(static_cast<Observer *>(this)) 204 << " received notification from atom " << _atom->getId() << " for channel " 205 << notification->getChannelNo() << "."; 206 #endif 342 // ObservedValues have been updated before, hence convert updates to Qt's signals 343 atom * const _atom = dynamic_cast<atom *>(publisher); 344 if (_atom != NULL) { 207 345 switch (notification->getChannelNo()) { 346 case AtomObservable::IndexChanged: 347 emit idChanged(); 348 break; 349 case AtomObservable::PositionChanged: 350 emit positionChanged(); 351 break; 208 352 case AtomObservable::ElementChanged: 209 uptodateElement = false; 210 break; 211 case AtomObservable::IndexChanged: 212 resetIndex(); 213 break; 214 case AtomObservable::PositionChanged: 215 uptodatePosition = false; 353 emit elementChanged(); 216 354 break; 217 355 case AtomObservable::BondsAdded: 218 { 219 const atom * const _atom = const_cast<const World &>(World::getInstance()). 220 getAtom(AtomById(atomicid)); 221 if (_atom != NULL) { 222 // make sure position is up-to-date 223 if (!uptodatePosition) 224 resetPosition(); 225 ASSERT(!_atom->getListOfBonds().empty(), 226 "GLMoleculeObject_atom::recieveNotification() - received BondsAdded but ListOfBonds is empty."); 227 const bond::ptr _bond = *(_atom->getListOfBonds().rbegin()); 228 const GLMoleculeObject_bond::SideOfBond side = (_bond->leftatom == _atom) ? 229 GLMoleculeObject_bond::left : GLMoleculeObject_bond::right; 230 emit BondsInserted(_bond, side); 231 } else { 232 ELOG(2, "Atom with id "+toString(atomicid)+" is already gone."); 233 } 234 break; 235 } 356 case AtomObservable::BondsRemoved: 357 emit bondsChanged(); 358 break; 236 359 default: 237 //setProperties(); 360 ASSERT(0, "GLMoleculeObject_atom::recieveNotification() - we are not signed on to channel " 361 +toString(notification->getChannelNo())+" of the atom."); 238 362 break; 239 363 } 240 }else if (static_cast<World *>(publisher) == World::getPointer()) { 241 // notification from world 242 #ifdef LOG_OBSERVER 243 observerLog().addMessage() << "++ Update of Observer "<< observerLog().getName(static_cast<Observer *>(this)) 244 << " received notification from world for channel " 245 << notification->getChannelNo() << "."; 246 #endif 364 } else if (publisher == static_cast<World *>(World::getPointer())) { 247 365 switch (notification->getChannelNo()) { 248 366 case World::SelectionChanged: 249 if (_atom != NULL) 250 setSelected(World::getInstance().isSelected(_atom)); 367 emit selectionstatusChanged(); 251 368 break; 252 369 default: 370 ASSERT(0, "GLMoleculeObject_atom::recieveNotification() - we are not signed on to channel " 371 +toString(notification->getChannelNo())+" of the World."); 253 372 break; 254 373 } 255 374 } 256 375 } 257 258 void GLMoleculeObject_atom::wasClicked()259 {260 LOG(4, "INFO: GLMoleculeObject_atom: atom " << atomicid << " has been clicked");261 emit clicked(atomicid);262 } -
src/UIElements/Views/Qt4/Qt3D/GLMoleculeObject_atom.hpp
rb3a33d r534374 16 16 #include "GLMoleculeObject.hpp" 17 17 18 #include "CodePatterns/ObservedValue.hpp" 18 19 #include "CodePatterns/Observer/Observer.hpp" 20 21 #include "LinearAlgebra/Vector.hpp" 19 22 20 23 #include "Bond/bond.hpp" … … 24 27 class GLWorldScene; 25 28 26 class GLMoleculeObject_atom : public GLMoleculeObject, publicObserver29 class GLMoleculeObject_atom : public GLMoleculeObject, Observer 27 30 { 28 31 Q_OBJECT … … 40 43 private slots: 41 44 void wasClicked(); 45 void resetIndex(); 46 void resetElement(); 47 void resetPosition(); 48 void resetBonds(); 49 void resetSelectionStatus(); 42 50 43 51 signals: 44 52 void clicked(atomId_t); 45 void BondsInserted(const bond::ptr _bond, const GLMoleculeObject_bond::SideOfBond side); 46 void indexChanged(GLMoleculeObject_atom *ob, int oldId, int newId); 53 void BondsAdded(const atomId_t _left, const atomId_t _right, const GLMoleculeObject_bond::SideOfBond side); 54 void BondsRemoved(const atomId_t _left, const atomId_t _right); 55 void indexChanged(GLMoleculeObject_atom *ob, const atomId_t oldId, const atomId_t newId); 56 void idChanged(); 57 void positionChanged(); 58 void elementChanged(); 59 void bondsChanged(); 60 void selectionstatusChanged(); 47 61 48 62 private: … … 50 64 friend class GLMoleculeObject_molecule; 51 65 52 void resetPosition(); 66 //!> typedef for list of bonds, defined by pairs of atom ids 67 typedef std::vector< std::pair<atomId_t, atomId_t> > ListOfBonds_t; 68 69 static const atom * const getAtomConst(const atomId_t _id); 70 static atom * const getAtom(const atomId_t _id); 71 72 atomId_t updateIndex() const; 73 Vector updatePosition() const; 74 atomicNumber_t updateElement() const; 75 ListOfBonds_t updateBonds() const; 76 bool updateSelectionStatus() const; 77 78 void activateObserver(); 79 void deactivateObserver(); 53 80 54 81 private: 55 void resetElement();56 void resetIndex();57 void resetProperties();58 82 59 const atomId_t atomicid; 83 //!> current list of bonds to compare new onw against for changes 84 ListOfBonds_t ListOfBonds; 60 85 61 bool uptodatePosition; 62 bool uptodateElement; 86 //!> temporary variable used in cstor 87 atom * const atomref; 88 89 //!> cached value of the atom's id 90 ObservedValue<atomId_t> AtomIndex; 91 //!> cached value of the atom's position 92 ObservedValue<Vector> AtomPosition; 93 //!> cached value of the atom's element 94 ObservedValue<atomicNumber_t> AtomElement; 95 //!> cached value of the atom's id 96 ObservedValue<ListOfBonds_t> AtomBonds; 97 //!> cached value of the atom's selection status 98 ObservedValue<bool> AtomSelectionStatus; 99 100 //!> list of channels when index needs to update 101 static const Observable::channels_t AtomIndexChannels; 102 //!> list of channels when position needs to update 103 static const Observable::channels_t AtomPositionChannels; 104 //!> list of channels when element needs to update 105 static const Observable::channels_t AtomElementChannels; 106 //!> list of channels when bonds needs to update 107 static const Observable::channels_t AtomBondsChannels; 108 //!> list of channels when selection status needs to update 109 static const Observable::channels_t AtomSelectionStatusChannels; 110 111 //!> the Observable we are signed on, also indicates whether we are sign on (not NULL) 112 const Observable *owner; 63 113 }; 64 114
Note:
See TracChangeset
for help on using the changeset viewer.