Skip to content

Instantly share code, notes, and snippets.

@physicshinzui
Last active May 22, 2023 05:35
Show Gist options
  • Save physicshinzui/9f21c74be62504f32ad8412a87a69ba3 to your computer and use it in GitHub Desktop.
Save physicshinzui/9f21c74be62504f32ad8412a87a69ba3 to your computer and use it in GitHub Desktop.
A way to generate artificial amino-acid sequence in PyMOL
# Updated: 26.10.2022
# Author: Shinji Iida
# MIT licence
def gen_linseq(seq):
"""
Args: seq (one letter aa sequence)
Return:
A linear peptide is generated.
Usage:
linseq AAAAA
"""
for aa in seq:
cmd._alt(aa.lower())
cmd.extend("linseq", gen_linseq)
@physicshinzui
Copy link
Author

This should work on a free version of PyMOL.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment