MantisBT - Rosetta
View Issue Details
0000156Rosetta[All Projects] Bad Codingpublic2012-12-01 16:512013-03-07 15:50
rmoretti 
 
normalminoralways
newopen 
All platformsAnyAny
Trunk 
 
relax, others using constraints
relax.linuxgccrelease -s pdb.pdb -native native.pdb -cst_fa_file cst.txt -relax:constrain_relax_to_native_coords
0000156: Missing show() methods on Constraints
When a constraint (like PocketConstraint) which does not implement the show() method is used in a situation which results in a pose length change (such as adding a virtual root in constrained relax protocols) Rosetta dies with an error. This is because ConstraintSet::get_all_constraints() invokes the contained constraints' show() method.

cf. http://www.rosettacommons.org/content/how-use-cstfafile-and-relaxconstrainrelaxtonativecoords-same-time [^]
Use a constraint file with a Pocket constraint (or other constraint not implementing show()) with a constrained relax protocol.
The base constraint implementation has a lot of stubbed-out functions, making it very easy to skip the implementation, resulting in these strange crashes. It might be worth thinking about converting (some of) them to pure virtual methods to ensure they are properly implemented in derived classes.
No tags attached.
related to 0000201assigned Labonte Show() methods are missing for a large number of classes 
Issue History
2012-12-01 16:51rmorettiNew Issue
2012-12-03 10:58smlewisNote Added: 0000130
2013-03-01 12:24smlewisDescription Updatedbug_revision_view_page.php?rev_id=55#r55
2013-03-07 15:50LabonteRelationship addedrelated to 0000201

Notes
(0000130)
smlewis   
2012-12-03 10:58   
These functions are not pure virtual because the function was added to the base class interface AFTER the first round of derived classes were already in use. Whoever wrote the new base class interface didn't want to/couldn't go writing show() for all the other constraint classes in already in existence (I had a similar experience adding functions to Mover for JD2).

This is an ideal candidate for, maybe not XRW3, but some community-sponsored code cleanup event. If we had a working afternoon at the developer meeting it could probably be finished within that time by a group of 5 people.

I think this is one of those software design anti-patterns.