[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [IMP-dev] Iterating over all restraints






What are you trying to accomplish? If it is getting a dependency graph, you will have all sorts of problems with nonbonded lists and other sorts of indirect relationships.

It is for generating the dependency graph. The idea is to generate the graph and then run inference on it. I am not really interested in all the restraints that build one logic restraint, but Frido and I have for example a restraint set of all the Y2H restraints. I would like to be able to go over it.


How about requiring that Restraint::get_particles() always returns all the particles that affect the Restraint? It would be horribly expensive in the worst case, but....
Maybe we can specific the level of particles we are intersted in, for example if we are working on the protein level, I will not be intersted in getting all the atom particles but just the protein ones.

We may need to introduce some lower level mechanism. For example, a method on Object which returns a list of all pointers contained to other objects. I may be able to implement that in a clean way with only the overhead of one extra int per pointer.
great :)  - but we'll have to decide  what the list should contain ... :)

On Feb 23, 2008, at 5:19 PM, Keren Lasker wrote:

hi,

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

thoughts?

Keren.
_______________________________________________
IMP-dev mailing list

https://salilab.org/mailman/listinfo/imp-dev