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

Re: [modeller_usage] Physical.values



On 10/30/14, 11:55 AM,  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
--
             http://www.salilab.org/modeller/
Modeller mail list: http://salilab.org/mailman/listinfo/modeller_usage