You are here

can't find toolbox module

10 posts / 0 new
Last post
can't find toolbox module



I was not sure if this is 'build/install' question, but it seems that 'general' forum is for more advanced issues..

I'm a beginner in PyRosetta and not really a "tech" person, more wet biologist so sorry if the question is stupid..

Currently using tutorial from to try basics of PyRosetta.

When running pose = pose_from_pdb("1yy8.clean.pdb") got unknown exception error.

Using Ubuntu 16.04.1 LTS 64-bit, python, pyrosetta versions may be seen from log below (is there a way to hide it behind a cut?)


I would be grateful for your advice!

Python 2.7.12 (default, Jul  1 2016, 15:12:24) 
Type "copyright", "credits" or "license" for more information.

IPython 2.4.1 -- An enhanced Interactive Python.
?         -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help      -> Python's own help system.
object?   -> Details about 'object', use 'object??' for extra details.

In [1]: from pyrosetta import *

In [2]: pyrosetta.init()
NameError                                 Traceback (most recent call last)
<ipython-input-2-34444050a08f> in <module>()
----> 1 pyrosetta.init()

NameError: name 'pyrosetta' is not defined

In [3]: import pyrosetta 

In [4]: pyrosetta.init()
Found rosetta database at: /usr/local/lib/python2.7/dist-packages/pyrosetta-4.0-py2.7.egg/database; using it....
PyRosetta-4 2016 [Rosetta 2016 unknown:caf3ac9d7450e125941c5e85236b57d398680305 2016-10-22 12:28:39 -0700] retrieved from:
(C) Copyright Rosetta Commons Member Institutions.
Created in JHU by Sergey Lyskov and PyRosetta Team.

core.init: Rosetta version  from 
core.init: command: PyRosetta -ex1 -ex2aro -database /usr/local/lib/python2.7/dist-packages/pyrosetta-4.0-py2.7.egg/database
core.init: 'RNG device' seed mode, using '/dev/urandom', seed=396660147 seed_offset=0 real_seed=396660147
core.init.random: RandomGenerator:init: Normal mode, seed=396660147 RG_type=mt19937

In [5]: pose = pose_from_pdb("1yy8.clean.pdb")

RuntimeError                              Traceback (most recent call last)
<ipython-input-5-c5fc8cfb3b2d> in <module>()
----> 1 pose = pose_from_pdb("1yy8.clean.pdb")

/usr/local/lib/python2.7/dist-packages/pyrosetta-4.0-py2.7.egg/pyrosetta/__init__.pyc in pose_from_pdb(filename)
    327 # because otherwise, it wrecks a lot of people's scripts.  ~Labonte
    328 def pose_from_pdb(filename):
--> 329     return pose_from_file(filename)

RuntimeError: Caught an unknown exception!


Post Situation: 
Thu, 2016-11-03 02:22

sorry, the previous was just because of wrong working directory...

now pose_from_pdb works...

but now I've got an ImportError, can't find toolbox module..

In [18]: from toolbox import get_struct
ImportError                               Traceback (most recent call last)
<ipython-input-18-4c061d2704b0> in <module>()
----> 1 from toolbox import get_struct

ImportError: No module named toolbox


Thu, 2016-11-03 05:59

Well, the log file in your post clearly says that PDB file is not there:

In [5]: pose = pose_from_pdb("1yy8.clean.pdb")
core.chemical.ResidueTypeSet: Finished initializing fa_standard residue type set.  Created 455 residue types
core.chemical.ResidueTypeSet: Total time to initialize 0.493135 seconds.
core.import_pose.import_pose: File: 1yy8.clean.pdb not found!


Thu, 2016-11-03 13:31

Re toolbox module: in PyRosetta-4 it location is changed to pyrosetta.toolbox, please try to import it instead.

Thu, 2016-11-03 13:32

Thank's a lot!

You're right, it was my mistake  when creating pose.

pyrosetta.toolbox import worked, thank you.

now I've lost PyMOL_mover..

In [21]: pymol = PyMOL_Mover()
NameError                                 Traceback (most recent call last)
<ipython-input-21-d991403572a8> in <module>()
----> 1 pymol = PyMOL_Mover()

NameError: name 'PyMOL_Mover' is not defined

Am I doing smth wrong? I didn't find an answer in pymol_mover tutorial..

Fri, 2016-11-04 05:39

Just thought it may be informative, regarding PyMOL_Mover issue,

error happened in the same session, after everything "above" worked (import pyrosetta, pyrosetta.init(), import pyrosetta.toolbox, protein geometry manipulation, pose.dump_pdb. ... worked in PyMOL).

I appreciate your help!

Mon, 2016-11-07 05:16

We changed implementation of PyMOL mover from python to C++. So now you need to use something like this:

pymol = pyrosetta.PyMolMover()


Thu, 2016-11-10 10:29

It works. Thank you!

Mon, 2016-11-14 04:27


I have the PyRosetta4.MinSizeRel.python27.linux.release-140 installed on my Windows 8 platform. So far I have been able to pose a pdb structure and am looking forward linking PyMol to Pyrosetta through pymover. I found a post that says that implementation of the pymover is now pymol = pyrosetta.PyMolMover() due to the change from python to C++. However when I enter this command in ipython, I get the AttributeError: "module" object has no attribute "PyMolMover". I will really appreciate any assistance to solve this issue.


Mon, 2017-05-22 16:33

Be careful of capitalization: I believe it's pyrosetta.PyMOLMover()

Thu, 2017-06-01 09:56