Skip to content
Snippets Groups Projects
Commit 9efc6dba authored by Giovanni Bussi's avatar Giovanni Bussi
Browse files

Added error for FIT_TO_TEMPLATE without weights

See #247
parent 74c49f2d
No related branches found
No related tags found
No related merge requests found
...@@ -164,7 +164,11 @@ FitToTemplate::FitToTemplate(const ActionOptions&ao): ...@@ -164,7 +164,11 @@ FitToTemplate::FitToTemplate(const ActionOptions&ao):
// normalize weights // normalize weights
double n=0.0; for(unsigned i=0; i<weights.size(); ++i) n+=weights[i]; n=1.0/n; double n=0.0; for(unsigned i=0; i<weights.size(); ++i) n+=weights[i];
if(n==0.0) {
error("PDB file " + reference + " has zero weights. Please check the occupancy column.");
}
n=1.0/n;
for(unsigned i=0; i<weights.size(); ++i) weights[i]*=n; for(unsigned i=0; i<weights.size(); ++i) weights[i]*=n;
// normalize weights for rmsd calculation // normalize weights for rmsd calculation
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment