﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	blockedby	blocking	notify_on_close	platform	project
831	Allow methods to access current changes to a specific Structure	Tristan Croll	Eric Pettersen	"At the moment in ISOLDE I have four different types of annotations to do with structural quality and/or restraints, which need to update their position/colour/visibility as their associated model changes. These are all illustrated in the attached image:

- position restraints (the 'pin' on the left);
- Ramachandran scores (CA colours);
- cis and twisted peptide bonds (pseudo-trapezoid filling the ""cup"" from CA to CA);
- torsion restraints (""calipers"" around each axial bond indicating the distance from the target by both colour and angle)

At present I have the position and torsion restraint graphical updates slaved to the atomic ""changes"" trigger, and I should have the other two doing the same (but for now they only update during live simulations). The problem I face is that unless I'm missing something, the change handler offers no fast way to determine if any of the changes are coming from a specific model - it's faster to just update the drawings every time ""display changed"" or ""coord changed"" appears in changes.atom_reasons().

What I think would be nice is to be able to avoid unnecessary recalculations b querying the target Structure directly to see if it has any relevant changes. This could be achieved as simply as adding the line:

`self.current_changes = gc`

at line 309 of structure.py to provide an outward-visible copy of the current change mask, or a little more complex by splitting the changes out into individual boolean variables (`self.coords_changed`, `self.display_changed` etc.). That would allow me to use essentially the same logic pipeline that's used in structure.py itself for these updates."	enhancement	closed	blocker		Core		fixed		Tom Goddard				all	ChimeraX
