get_fastastr is an API-only function which returns the one-letter amino acid sequence in FASTA format.
cmd.get_fastastr(string selection='all', int state=-1, int quiet=1)
fetch 1ubq, async=0 print cmd.get_fastastr('all')
>1ubq MQIFVKTLTGKTITLEVEPSDTIENVKAKIQDKEGIPPDQQRLIFAGKQLEDGRTLSDYNIQKESTLHLV LRLRGG
- Due to a bug this function currently only works for selections from a single object (see #3466472)
- The sequences of different chains are just concatenated and returned as a single sequence