Skip to content

PyMOL scripting. How to select the last residue? #358

Answered by speleo3
ivandatasci asked this question in Q&A
Discussion options

You must be logged in to vote

There is a last operator.

select last_res_in_C, byres (last (chain C))

I would also add guide and present to make sure it's a polymer residue and has coordinates in the current state:

select last_res_in_C, byres (last (chain C & present & guide))

See https://pymolwiki.org/index.php/Selection_Algebra

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by JarrettSJohnson
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants