How to extract chains from a PDB file?
I would like to extract chains from pdb files. I have a file named pdb.txt which contains pdb IDs as shown below. The first four characters represent PDB IDs and last character is the chain IDs. 1B68A 1BZ4B 4FUTA I would like to 1) read the file line by line 2) download the atomic coordinates of each chain from the corresponding PDB files. 3) save the output to a folder. I used the following script to extract chains. But this code prints only A chains from pdb files. for i in 1B68 1BZ4 4FUT do wget -c "http://www.pdb.org/pdb/download/downloadFile.do?fileFormat=pdb&compression=NO&structureId="