Dear,
We are developing a chimera extension and I would like to know if there is a way to detect or select those models which have an internal sequence gap, represented by the program as a pseudobond in order to distinguish them from those who haven't. Is there a function to do that? Thank you very much and congratulations for the program.
Sincerely
Ibai
On Apr 10, 2013, at 8:25 AM, Ibai Gazpio wrote:
Dear,
We are developing a chimera extension and I would like to know if there is a way to detect or select those models which have an internal sequence gap, represented by the program as a pseudobond in order to distinguish them from those who haven't. Is there a function to do that? Thank you very much and congratulations for the program.
Hi Ibai, There are a couple of ways I can think of. One is go through the model's sequences (m.sequences()) and check the sequences' "residues" list. There will be Nones in the list when residues in the SEQRES records don't exist in the structure. You will need to ignore/strip leading/trailing series of Nones and then see if any Nones remain, which would indicate an internal gap. The other way is to get the pseudobond group that depicts the gap. This will do that:
import chimera pbg = chimera.misc.getPseudoBondGroup(chimera.LONGBOND_PBG_NAME, create=False)
Then if pbg is not None, go through its pseudoBonds list and check one atom of each to see if its "molecule" attr is your model. Of course, if you know that you only have one model open then simply check if the pseudoBonds list is empty or not. Let me know if you need more info. I'm happy to hear you're developing an extension!
--Eric
Eric Pettersen UCSF Computer Graphics Lab http://www.cgl.ucsf.edu
participants (2)
-
Eric Pettersen
-
Ibai Gazpio