imp icon indicating copy to clipboard operation
imp copied to clipboard

"Friend" hierarchies

Open cgreenberg opened this issue 10 years ago • 3 comments

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?

cgreenberg avatar Apr 10 '14 21:04 cgreenberg

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.

cgreenberg avatar Apr 10 '14 22:04 cgreenberg

I guess the tricky part is to define identical hierarchies more formally. Then it's easy to implement. Let's try:

  1. 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)

  2. The roots must have the same number of children

  3. 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

barakr avatar Apr 10 '14 22:04 barakr

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)

cgreenberg avatar Apr 10 '14 22:04 cgreenberg