"Friend" hierarchies
It would be useful to be able to optionally require hierarchies to have the same (IMP) structure. E.g., you might create 10 copies of a protein, but you want make absolutely sure that they look the same to IMP - numbers of atoms, residues, etc, which ones are within which fragments, etc. Maybe this is a little silly, I guess an alternative is to just have a function that checks whether hierarchies look the same. Is there any way to do that?
Possibly it could be functionally implemented within the atom::Copy decorator - just store the hierarchy it is a "copy of" and allow it to check if it's still good.
I guess the tricky part is to define identical hierarchies more formally. Then it's easy to implement. Let's try:
-
The roots must have the same set of model attributes but not the same values for those attributes (possible issue: optional attributes for certain decorators)
-
The roots must have the same number of children
-
Apply recursively to children (possible issue: defining correspondence between children, namely enforcing order on children would solve this)
On Thu, Apr 10, 2014 at 3:00 PM, Charles Greenberg <[email protected]
wrote:
Possibly it could be functionally implemented within the atom::Copy decorator - just store the hierarchy it is a "copy of" and allow it to check if it's still good.
— Reply to this email directly or view it on GitHubhttps://github.com/salilab/imp/issues/783#issuecomment-40148363 .
Barak
Yeah, I like that, traverse the hierarchy in a well-defined order and make sure that children have the same attributes. Could be a requirement for setting up a general Symmetric restraint (ref #752)