I am learning the advanced "protein-protein docking" part of the Rosetta about the docking of HA and antibody. When I input the following command in this tutorial:
$ROSETTA_TOOLS/protein_tools/scripts/pdb_renumber.py --norestart input_files/3GBM_AB.pdb input_files/3gbm_HA.pdb
I get the following error message:
Traceback (most recent call last):
File "/app/rosetta_src_2017.08.59291_bundle/tools/protein_tools/scripts/pdb_renumber.py", line 53, in <module>
residue.id=(' ',residue_id,' ')
File "/usr/lib/python2.7/site-packages/biopython-1.69-py2.7-linux-x86_64.egg/Bio/PDB/Entity.py", line 91, in id
" this entity.".format(self._id, value, value))
ValueError: Cannot change id from `(' ', 1, ' ')` to `(' ', 1, ' ')`. The id `(' ', 1, ' ')` is already used for a sibling of this entity.
Could someone tell me what the command "pdb_renumber.py" is used for? How the problem arises and how to solve it?
It looks like you're trying to fix the residue numbers and/or chain letters of some PDBs. Rosetta ofter overwrites them with its preferred numbering schemes, so having the input be in the numbering Rosetta is going to use anyway is valuable to accessory files like constraint files.
I'm going to guess that the error message means you can't renumber two different residues to the same number. The format '', 1, '' makes me suspect it's chain ID, residue ID, residue insertion code. If you have TWO that map to the same thing - probably you have two chains with no chain letter. Look at the inputs and figure out how many chains are there (and supposed to be there) and what their chain letters are. Fix it if you need to.
Is the input file you're using the one supplied by the tutorial?
For what it's worth - the error is in BioPython, not Rosetta. Rosetta is calling BioPython. You are using a user-installed BioPython, which might not be a version compatible with the Rosetta script that calls into BioPython. So the solution might be "get a different BioPython".
Thank you, smlewis,
The input file I am using, the "3GBM_AB.pdb" file, is provided by the tutorial "advanced protein-protein docking". I've checked this file with text editor as well as pymol. It have two chains： Chain A and chain B. The chain IDs, residue IDs, and residue names are unambiguously labeled in the pdb file and the is no visualization problem in pymol. I cannot find any wrong with it. The format of the pdb file is like the following:
ATOM 1 N ASP A 1 -4.188 -81.119 -5.710 1.00 23.74 N
ATOM 2 CA ASP A 1 -4.051 -79.636 -5.805 1.00 24.41 C
Does this format match the (' ', 1, ' ') format shown in the error message?
The biopython I installed is version 1.69, it was downloaded form biopython official website (http://biopython.org/wiki/Download). You said the solution might be "get a different BioPython", but what BioPython should I install? and how?
I'm guessing from your other threads that you got this working?
No, it still doesn't work.
Biopython updated its internal residue connection code and broke every single script that relied on this. Including this one and others.
I can suggest that there are other renumberers available in tools:
mlewis@KLAW-GOR [14:26:56] [~/ROSETTA/Rosetta/tools] [master]
-> % find . -name "*enumbe*"
I don't know what's wrong with the one in the demo but I've pointed it out to the rest of the dev community.
I opened a Biopython issue for this as the fix is not obvious and breaks many scripts.
I found that biopython1.68 is compatible with pdb_renumber.py while newer version is not.
I have written a python script that renumbers a structure starting at 1 and the script works as a stand alone script, no need to use biopython or any other library.
I hope it works for your structure and that you find it useful. :-)