Get protein names corresponding to PDB ID I have a list of about 4000 PDB IDs and would like to get the actual names of the proteins (e.g. lactate dehydrogenase, cytochrome c). I tried the batch header section at the Protein Databank Download page but it refused to accept my PDB IDs in formats (xxxx or xxxx.pdb, individually or space-separated) that worked in an interactive search for the protein structure.
Any suggestions?
You can use one of the UniProt Protein APIs.
As you said you have your pdb entries in a text file line by line you can, like this example.txt containing:
1brr
4lzm
2dyi

Using the commandline, you can use a little script like this to download the name, if it is available for the given pdb entry.
while read line;
do 
 curl -X GET --header 'Accept:application/json' &quot;https://www.ebi.ac.uk/proteins/api/proteins/pdb:$line&quot; | 
 jq -r '.[].protein.recommendedName.fullName.value'  |
 sed &quot;s/^/$line\t/&quot; &gt;&gt; pdb_names.txt;
done &lt; example.txt;

You need to have curl, sed and jq installed on your system.
This gives you following output in pdb_names.txt
1brr    Bacteriorhodopsin
4lzm    Endolysin
2dyi    Ribosome maturation factor RimM


Update
if you want to speed it up, you can run it with parallel.
parallel -j 4 'curl -X GET --header &quot;Accept:application/json&quot; &quot;https://www.ebi.ac.uk/proteins/api/proteins/pdb:{}&quot; |   jq -r &quot;.[]. .protein.recommendedName.fullName.value&quot;  |  sed &quot;s/^/{}\t/&quot; &gt;&gt; pdb_names_parallel.txt' :::: example.txt

With the -j option you call how many jobs should run in parallel. The limit of the UniProt API is 200 request per second per user.

Update 7. Nov 2020
To get another info beside the protein name, you need to know how the JSON response from UniProt looks like.
To get also the scientific name, you can run following command:
parallel -j 4 'curl -X GET --header &quot;Accept:application/json&quot; &quot;https://www.ebi.ac.uk/proteins/api/proteins/pdb:{}&quot; | jq -r &quot;.[] | .protein.recommendedName.fullName.value + \&quot; - \&quot; + .organism.names[0].value&quot;  |  sed &quot;s/^/{}\t/&quot; &gt;&gt; pdb_names_parallel.txt' :::: example.txt

As result you get this:
1brr    Bacteriorhodopsin - Halobacterium salinarum (strain ATCC 700922 / JCM 11081 / NRC-1)
4lzm    Endolysin - Enterobacteria phage T4
2dyi    Ribosome maturation factor RimM - Thermus thermophilus (strain HB8 / ATCC 27634 / DSM 579)