[chimera-dev] Pseudobonds and gap detection

Eric Pettersen pett at cgl.ucsf.edu
Wed Apr 10 11:20:20 PDT 2013


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


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://plato.cgl.ucsf.edu/pipermail/chimera-dev/attachments/20130410/4d158b58/attachment.html>


More information about the Chimera-dev mailing list