MantisBT - Rosetta
View Issue Details
0000091Rosetta[All Projects] Incorrect Resultspublic2012-08-30 13:312013-04-10 19:17
Labonte 
Sergey 
lowminoralways
resolvedfixed 
Trunk 
 
any using PyMolMover or inheriting from it
See Steps To Reproduce Above
54768
0000091: PyMolMover.energy_type() and/or ScoreType enum problem
If one sets the energy type of a PyMolMover (the C++ version, not the Python version, from which the latter inherits) to total_score using PyMolMover.energy_type(total_score), the energy type is instead set to end_of_score_type_enumeration, (which is also the default setting).

All other ScoreTypes work correctly.
In [1]: from rosetta import *

In [2]: init()

In [3]: pymol = PyMolMover()

In [4]: pymol.energy_type()
Out[4]: rosetta.core.scoring.__scoring_all_at_once_.ScoreType.end_of_score_type_enumeration

In [5]: pymol.energy_type(fa_atr)

In [6]: pymol.energy_type()
Out[6]: rosetta.core.scoring.__scoring_all_at_once_.ScoreType.fa_atr

In [7]: pymol.energy_type(total_score)

In [8]: pymol.energy_type()
Out[8]: rosetta.core.scoring.__scoring_all_at_once_.ScoreType.end_of_score_type_enumeration

In [9]: pymol.energy_type(end_of_score_type_enumeration)

In [10]: pymol.energy_type()
Out[10]: rosetta.core.scoring.__scoring_all_at_once_.ScoreType.end_of_score_type_enumeration
Movers, PyMOL
Issue History
2012-08-30 13:31LabonteNew Issue
2012-09-03 12:12LabonteApplication(s) Affectedany using PyMolObserver or inheriting from it => any using PyMolMover or inheriting from it
2012-09-04 19:31LabonteTag Attached: Movers
2012-09-04 19:31LabonteTag Attached: PyMOL
2013-04-02 18:20LabonteAssigned To => Sergey
2013-04-02 18:20LabonteStatusnew => assigned
2013-04-02 19:05rmorettiNote Added: 0000245
2013-04-03 13:30SergeyStatusassigned => acknowledged
2013-04-10 15:15LabonteNote Added: 0000250
2013-04-10 15:16LabonteSeveritymajor => minor
2013-04-10 19:15SergeyNote Added: 0000251
2013-04-10 19:16SergeyNote Edited: 0000251bug_revision_view_page.php?bugnote_id=251#r73
2013-04-10 19:17SergeyFixed in SVN Version => 54768
2013-04-10 19:17SergeyStatusacknowledged => resolved
2013-04-10 19:17SergeyResolutionopen => fixed

Notes
(0000245)
rmoretti   
2013-04-02 19:05   
It probably should be noted that end_of_score_type_enumeration *is* total_score, at least as far as the C++ enumeration is concerned. In core/scoring/ScoreType.hh where the enumeration values are defined, they're explicitly set as equal.

I think the issue, if there is any, is not so much that the value isn't being set appropriately, but rather that the representation of that enumeration value at the Python level is "ScoreType.end_of_score_type_enumeration", rather than "ScoreType.total_score" (Note that the name strings as accessed through the ScoreTypeManager shouldn't suffer this problem.)
(0000250)
Labonte   
2013-04-10 15:15   
Ok, not really a bug then, but I still think it is a potential issue of confusion for end users of PyRosetta. Maybe there is a way to intercept it at the Python end to make it more clear to users....
(0000251)
Sergey   
2013-04-10 19:15   
(edited on: 2013-04-10 19:16)
Just committed fix for this (r54768). Please see if it works for you.