You are here

Error getting MinMover attributes

7 posts / 0 new
Last post
Error getting MinMover attributes


I’m experiencing some very strange behavior on part of PyRosetta.

I'm running pre-built PyRosetta v2.011 for ScientificLinux (64 bit, r47657) on Linux 3.0.3 ( x86_64) with Python 2.6.6. I’ll use MinMover as an example, but this happens with many other object types.

I can instantiate, configure and run a MinMover without a hitch, e.g. min_mover.tolerance(0.025) works fine. But when I try to access that information using a getter, i.e. min_mover.tolerance(), I get an ArgumentError.

Here’s the output from my iPython session:

In [1]: import rosetta

In [2]: rosetta.init()
PYROSETTA_DATABASE environment variable was set to: /vol/ek/share/csbw/tools/pyrosetta/rosetta_database... using it...
PyRosetta 2.011 [r47657] retrieved from:
(C) Copyright Rosetta Commons Member Institutions.
Created in JHU by Sergey Lyskov and PyRosetta Team.

core.init: Mini-Rosetta version 47657 from
core.init: command: app -database /vol/ek/share/csbw/tools/pyrosetta/rosetta_database -ex1 -ex2aro 
core.init: 'RNG device' seed mode, using '/dev/urandom', seed=1831869119 seed_offset=0 real_seed=1831869119
core.init.random: RandomGenerator:init: Normal mode, seed=1831869119 RG_type=mt19937

In [3]: min_mover = rosetta.MinMover()

In [4]: min_mover.tolerance(0.025) # no problems here

In [5]: min_mover.tolerance
Out[5]: >

In [6]: min_mover.tolerance()
ArgumentError                             Traceback (most recent call last)
/a/fr-01/vol/home/grad/assaff/ in ()
----> 1 min_mover.tolerance()

ArgumentError: Python argument types in
did not match C++ signature:
    tolerance(MinMover_exposer_callback {lvalue}, double tolerance_in)
    tolerance(protocols::simple_moves::MinMover {lvalue}, double tolerance_in)

In [7]: min_mover.min_type
Out[7]: >

In [8]: min_mover.min_type()
ArgumentError                             Traceback (most recent call last)
/a/fr-01/vol/home/grad/assaff/ in ()
----> 1 min_mover.min_type()

ArgumentError: Python argument types in
did not match C++ signature:
    min_type(MinMover_exposer_callback {lvalue}, std::string min_type_in)
    min_type(protocols::simple_moves::MinMover {lvalue}, std::string min_type_in)

In [9]: exit()
Post Situation: 
Sun, 2012-03-25 10:54

MinMover doesn't have a getter tolerance(). At least, it doesn't in trunk C++, SVN 47908. Is this a general answer to the missing functions?

Sun, 2012-03-25 10:57

Thanks for your (insanely) quick reply, Steven. Saved me some time and agony.

Regarding generality, I don't know how common this issue is among Rosetta objects. If it's widespread, then IMHO objects missing basic getters *is* an issue (think debugging, or interactive PyRosetta).

Mon, 2012-03-26 00:11

I committed the path that add accessor methods, so builds for versions 48154+ will have it.

Sun, 2012-03-25 20:39

Thanks, Sergey. I'm checking out the PyRosetta.develop dir right now.

Was that a specific oversight in MinMover, or a reoccurring theme?

Mon, 2012-03-26 00:13

Getters and setters section in PyRosetta documentation:

Mon, 2012-03-26 00:15

I would guess our general getter-and-setter co-coverage is about 75%. I would guess the coverage of internal data that SHOULD be exposed via getters and setters (as opposed to only being available via constructor) is something like 33%. These are wild guesses...

They're generally easy to write if you want to attack the problem!

Mon, 2012-03-26 06:27