I'm new to unix and I'm trying to use the wget command to download PDBs from the PDB database, can this be achieved?
I've tried the following:
wget http://www.pdb.org/pdb/download/downloadFile.dofileFormat=pdb&compression=NO&structureId=1PNK
but i get this in the console:
[mimas:/Users/ucbthsa/PDBs Similarity] ucbthsa% wget http://www.pdb.org/pdb/download/downloadFile.do?fileFormat=pdb & compression=NO & structureId=1PNK [3] 74828 [4] 74829 structureId=1PNK: Command not found. compression=NO: Command not found. [4] Exit 1
compression=NO [2] + Exit 1
compression=NO [1] - Exit 1
wget http://www.pdb.org/pdb/download/downloadFile.do?fileFormat=pdb wget: No match.
2 answers
Hi,
looking a bit at the source code of the PDB website (the Jmol page for example) I could see the files are accessible through URLs such as: http://www.pdb.org/pdb/files/1PNK.pdb
If you juste change 1PNK by any other PDB ID it seems to work.
Make sure to enclose your URL with quotes otherwise the & character will be interpreted as a special character that makes the command before it run in the background:
This will work:
$ wget 'http://www.pdb.org/pdb/download/downloadFile.do?fileFormat=cif&compression=NO&structureId=1PNK' -O 1PNK
Log in to answer this question.
The URL of the PDB website has been changed, you can still download PDB files directly through URLs such as : http://www.rcsb.org/pdb/files/1PNK.pdb
The only difference is changing www.pdb.org to www.rcsb.org