MantisBT - Rosetta |
View Issue Details |
|
ID | Project | Category | View Status | Date Submitted | Last Update |
0000228 | Rosetta | [All Projects] Bad Coding | public | 2013-03-22 17:02 | 2013-11-18 16:49 |
|
Reporter | rmoretti | |
Assigned To | rmoretti | |
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | fixed | |
Platform | | OS | | OS Version | |
Product Version | Trunk | |
Fixed in Version | | |
Application(s) Affected | many |
Command Line Used | n/a |
Developer Options | |
Fixed in SVN Version | 36c2c81b7794e1f70a9520da778b3239dc3757a5 |
|
Summary | 0000228: ScoreFunction cloning |
Description | Because of the distinction between ScoreFunction and SymmetricScoreFunction (as well as the other ScoreFunction subclasses), you should never use the copy constructor of ScoreFunction() to make a new copy of a ScoreFunction. Use scorefxn.clone() instead.
Note there's no drawback to this, even if you know that you have a true ScoreFunction. |
Steps To Reproduce | To find potential violators:
egrep -R 'new[[:space:]]*ScoreFunction[[:space:]]*\([^)]' rosetta/rosetta_source/src
|
Additional Information | Command currently finds 66 instances. Some are valid, like the 7 in will and neil's apps/pilot directories, which are explicitly intended to take a symmetric scorefunction and asymmetrize it. Most of the rest are probably latent bugs.
They'll need to be checked manually, though. |
Tags | No tags attached. |
Relationships | |
Attached Files | |
|
Issue History |
Date Modified | Username | Field | Change |
2013-03-22 17:02 | rmoretti | New Issue | |
2013-03-22 17:25 | smlewis | Note Added: 0000210 | |
2013-03-22 17:28 | Sergey | Note Added: 0000211 | |
2013-03-24 19:03 | rmoretti | Note Added: 0000212 | |
2013-11-18 16:49 | rmoretti | Fixed in SVN Version | => 36c2c81b7794e1f70a9520da778b3239dc3757a5 |
2013-11-18 16:49 | rmoretti | Status | new => resolved |
2013-11-18 16:49 | rmoretti | Resolution | open => fixed |
2013-11-18 16:49 | rmoretti | Assigned To | => rmoretti |