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

Made fast RMSD the default when possible (align==displace)

parent 31deb029
No related branches found
No related tags found
No related merge requests found
...@@ -145,17 +145,6 @@ double RMSD::calculate(const std::vector<Vector> & positions,std::vector<Vector> ...@@ -145,17 +145,6 @@ double RMSD::calculate(const std::vector<Vector> & positions,std::vector<Vector>
bool fastversion=true; bool fastversion=true;
// this is because fast version only works with align==displace // this is because fast version only works with align==displace
if (align!=displace) fastversion=false; if (align!=displace) fastversion=false;
// this is because of an inconsistent usage of weights in different versions:
unsigned i;
for(i=0;i<align.size();i++){
if(align[i]!=0.0) break;
}
for(unsigned j=i+1;j<align.size();j++){
if(align[i]!=align[j] && align[j]!=0.0){
fastversion=false;
break;
}
}
if (fastversion){ if (fastversion){
// this is the fast routine but in the "safe" mode, which gives less numerical error: // this is the fast routine but in the "safe" mode, which gives less numerical error:
ret=optimalAlignment<true>(align,displace,positions,reference,derivatives,squared); ret=optimalAlignment<true>(align,displace,positions,reference,derivatives,squared);
......
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