Extract the protein residues present in a PDB structure's atom coordinates as FASTA.
About this conversion
The converter reads records in the input format and writes them in the output format. Data that the output format cannot store may be lost. The form above explains the important limits for this pair.
Run it with Biopython
For batch work, you can use Biopython's SeqIO.convert function. If your output needs a sequence type, provide the matching molecule type.
from Bio import SeqIO
count = SeqIO.convert("input.pdb-atom", "pdb-atom",
"output.fasta", "fasta")
print("Converted %i records" % count)