What is the command in PyMOL for listing all the amino acids in a specific protein, say, 1a62.pdb?


1 Answer 1


At the command, change the current directory to your target directory:

cd my-directory-path-containing-my-files

Load the file:

load 1a62.pdb

Then you can either print to screen or save to a file:


save 1a62.fasta
  • 1
    $\begingroup$ A small caveat for get_fastastr is that the fasta sequence returned does not include gaps in the numbering, therefore, a multiline command using [int(atom.resi) for atom in cmd.get_model('name CA').atom] may be required in some cases. $\endgroup$ Feb 28, 2022 at 14:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.