Skip to content
Snippets Groups Projects
Commit 285d69b5 authored by Studer Gabriel's avatar Studer Gabriel
Browse files

move check for enough positions to function that actually does the superposition

parent d6c10dce
No related branches found
No related tags found
No related merge requests found
......@@ -25,6 +25,11 @@ void TheobaldRMSD(const promod3::core::EMatX3& pos_one,
Real& rmsd,
promod3::core::EMat3& rot){
if(pos_one.rows() < 3){
throw promod3::Error("Observed superposition with < 3 positions to "
"superpose!");
}
promod3::core::EMat3 M = pos_one.transpose() * pos_two;
// for the calculations itself we enforce double precision
......@@ -211,11 +216,6 @@ void Superpose(promod3::core::EMatX3& pos_one,
throw promod3::Error("Cannot superpose positions of different size!");
}
if(pos_one.rows() < 3){
throw promod3::Error("Observed superposition with < 3 positions to "
"superpose!");
}
avg_one = AverageRow(pos_one);
avg_two = AverageRow(pos_two);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment