You are here

clean_pdb not working

4 posts / 0 new
Last post
clean_pdb not working
#1

The simple clean_pdb.py does not function.

When I look at the script it is trying to print the wget_cmd command, WHY??

Here is the input and output:

python /home/aserobian/Documents/rosetta/tools/protein_tools/scripts/clean_pdb.py 2n2a AB
  File "/home/aserobian/Documents/rosetta/tools/protein_tools/scripts/clean_pdb.py", line 56
    print wget_cmd
          ^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(wget_cmd)?

What is wrong here?

 

Category: 
Post Situation: 
Thu, 2020-07-23 04:48
Andre Serobian

Many of the scripts in Rosetta are written for Python2. As such, they won't necessarily work for Python3.  (We're slowly transitioning things to Python3, but depending on which version of Rosetta you use and which scripts you use, they might be Python2 specific.)

The error you're getting is the result of trying to run a script written for Python2 only on a Python3 interpreter. Try explicitly invoking Python2 by providing the version number for the python interpreter.

python2.7 /home/aserobian/Documents/rosetta/tools/protein_tools/scripts/clean_pdb.py 2n2a AB

Mon, 2020-07-27 10:47
rmoretti

Thank yopu for the reply, I have checked the python version, it is python 2, here is the output:

Infinity1s-iMac:TOMs andreserobian$ python --version

Python 2.7.16

 

Ok, so I tried explicitly calling python 2.7 and this is the input and output:

python2.7 /Users/andreserobian/Documents/rosetta/tools/protein_tools/scripts/clean_pdb.py ae-pep1 A

Found existing PDB file at ae-pep1.pdb

ae-pep1 A     0 --- --- --- --- BAD

 

Why is it saying BAD?

 

Mon, 2020-07-27 22:17
Andre Serobian

That shows up if there are no valid residues which the script can find in the PDB.

If the PDB is otherwise properly formatted (e.g. if you can open it with PyMol or Chimera or the like), the most common reason for that is having all atoms be zero occupancy. One of the tasks of the clean_pdb script is to remove the zero occupancy atoms. If a residue is missing or has zero occupancy for critical backbone atoms (N, CA, C), then the whole residue is discarded.

There isn't a setting to change the script's behavior in this -- you'd need to manually change the occupancy column in the PDB.

 

Alternatively, you can try simply skipping the clean_pdb step. This script was much more critical in the past. Over the years Rosetta has been made much more robust to various PDB input, and can handle inputs which it would previously choke on.

Tue, 2020-07-28 08:24
rmoretti