Keren Lasker wrote:
I would like to iterate over all restraints.
To my understating the way to do that today is using
model.get_restraints(), although the restraints I get might also be
of type RestraintSet.
It seems that today one basically needs to know which restraint
sets the
model contains.
I suggest to add a function Flat() in class Restraint that returns
a flat list of all restraint in that instance ( will be called
recursively with RestraintSet).
Your other option is to do what Frido is currently doing - keep a
reference in Python to the RestraintSets you're interested in
looking at
later. Since everything is dynamic typed at the Python level, it's
very
easy to build all sorts of useful hierarchies there at runtime.