From: Jason Vertrees <jason.vertrees@gm...> - 2009-09-02 16:52:33
I wrote a script like this a while ago. I was importing huge selection
lists into PyMOL and it was crashing. So, I created a script to turn
selection lists like,
Here's an example execution:
PyMOL>sele EE, resn GLU
If your protein has non-standard amino acid numbers like "9F" instead of
just "9", this will fail, because it doesn't know how to convert a
"9F" into a number.
I just posted the script to the PyMOLWiki at:
Feel free to use that.
Hope this helps,
> [PyMOL] Getting ranges from selections
> From: Folmer Fredslund <folmerf@...> - 2009-09-02 15:19
> Dear all,
> For several reasons I have been printing the residue numbers from
> selections. This could be just the loops, or interface residues
> defined with the script from Jason Vertrees.
> I use iterate for this and it works well enough, however I would like
> to be able to make:
> 1. a non-redundant list (e.g. residue 12 will only appear once)
> 2. adjacent numbers into ranges (e.g. residues 1, 2, 4, 5, 6, 10, 11,
> 12 would become 1:2, 4:6, 10:12 or something similar)
> Any ideas on how to do this best? Ideally this should of course be
> possible from within PyMOL, but any kind of script that will work on
> your normal linux distribution would make me happy.
> Best regards,
> Folmer Fredslund
Jason Vertrees, PhD
PyMOL -- http://www.pymol.org/
PyMOLWiki -- http://www.pymolwiki.org/