30 Oct
2014
30 Oct
'14
12:31 p.m.
On 10/30/14, 11:55 AM, chris.wood@stfc.ac.uk wrote: > In the modeller.physical module, is there a way to select to select the > physical types given the index?
No. They are treated as a dict at the Python level. Why do you want to?
> I see that each modeller.physical.<restraint type> has a _num method > which returns the index
Actually that's a private member variable, so you shouldn't rely on it. Use the get_type() method instead.
> I’d like to avoid looping through all the > object types if possible!
Just loop the first time you need to do a lookup, and cache the list for future calls. I can't imagine it would be slow!
Ben Webb, Modeller Caretaker
--
modeller-care@salilab.org http://www.salilab.org/modeller/
Modeller mail list: http://salilab.org/mailman/listinfo/modeller_usage