MantisBT - Rosetta
View Issue Details
0000201Rosetta[All Projects] Bad Codingpublic2013-03-07 15:432013-03-30 16:57
Labonte 
Labonte 
lowminoralways
assignedopen 
All platformsAnyAny
Trunk 
 
N/A
N/A
Feature Request
0000201: Show() methods are missing for a large number of classes
As discussed at MiniRosettaCON2013, Show() and/or operator<< methods are useful for:
A) Interactive use in PyRosetta
B) Debugging
C) Standardized output

However, many classes have no implementation for Show() or operator<<.

It was proposed that Show() should be added as a virtual or pure virtual method to most objects and that operator<< should be written to call Show().
No tags attached.
related to 0000156new  Missing show() methods on Constraints 
related to 0000191assigned Labonte Mover::clone() should be pure virtual in base class 
related to 0000192closed Labonte Mover::reinitialize_for_each_job should be pure virtual in base class 
related to 0000193closed Labonte Mover::reinitialize_for_new_input should be pure virtual in base class 
related to 0000194assigned Labonte Mover::fresh_instance() should be pure virtual in base class 
Issue History
2013-03-07 15:43LabonteNew Issue
2013-03-07 15:43LabonteStatusnew => assigned
2013-03-07 15:43LabonteAssigned To => Labonte
2013-03-07 15:50LabonteRelationship addedrelated to 0000156
2013-03-29 16:52LabonteRelationship addedrelated to 0000191
2013-03-29 16:52LabonteRelationship addedrelated to 0000192
2013-03-29 16:52LabonteRelationship addedrelated to 0000193
2013-03-29 16:53LabonteRelationship addedrelated to 0000194
2013-03-29 16:56LabonteNote Added: 0000228
2013-03-30 16:57LabonteNote Added: 0000229

Notes
(0000228)
Labonte   
2013-03-29 16:56   
Status Update:
For now, I have simply made show() virtual in Mover and properly implemented operator<< to call it; thus, every Mover will now at least print SOMETHING.

Doing this uprooted several improperly implemented show()s that were not const; I have corrected this in the following Movers/Protocols:
AntibodyModelerProtocol
CDRsMinPackMin
GraftCDRLoopsProtocol
SnugDock
SnugDockProtocol
ThreadingMover
DockingProtocol
TemperedDocking
RemodelGlobalFrame
LoopRefineInnerCycle
LoopRefineInnerCycleContainer
RepackTrial
ShearMinCCDTrial
SmallMinCCDTrial
(0000229)
Labonte   
2013-03-30 16:57   
Status Update:
I modified a large chunk of Movers to have their operator<< methods call their show() method, which I had to write (copying over the gist of the previous operator<< method) in every case. This new show() method calls parent::show(). All the operator<< methods were then "unfriended", as there is no need for them to have access to private data in any of the cases.

The modified Movers are:
    RingConformationMover
    ConformerSwitchMover
    CcdLoopClosureMover
    LoopMover_CCD
    PyMolMover
    5× RigidBodyMovers
    SmallMover
    ShearMover
    ClassicFragmentMover
    MinMover
    PackRotamersMover
    ReturnSidechainMover
    RotamerTrialsMinMover
    RotamerTrialsMover
    SwitchResidueTypeSetMover