Skip to content
Snippets Groups Projects
Commit c6cbe911 authored by Marco Biasini's avatar Marco Biasini
Browse files

improve calculation of reduced potential on views

parent d484a15a
No related branches found
No related tags found
No related merge requests found
......@@ -144,7 +144,7 @@ Real ReducedPotential::GetTotalEnergy(ost::mol::EntityHandle ent, bool norm)
Real ReducedPotential::GetTotalEnergy(ost::mol::EntityView ent, bool norm)
{
ReducedEnergiesCalc calc(opts_, energies_, ent, norm);
ReducedEnergiesCalc calc(opts_, energies_, ent.GetHandle(), norm);
ent.Apply(calc);
return calc.GetEnergy();
}
......
......@@ -129,7 +129,7 @@ void ReducedStatistics::Extract(mol::EntityHandle ent)
if (ent.GetChainCount()!=1) {
std::stringstream ss;
ss << "Expected exactly one chain, but entity has "
<< ent.GetChainCount() << "chains";
<< ent.GetChainCount() << " chains";
throw std::runtime_error(ss.str());
}
ReducedStatExtractor extractor(opts_, histo_, ent);
......@@ -141,10 +141,10 @@ void ReducedStatistics::Extract(mol::EntityView ent)
if (ent.GetChainCount()!=1) {
std::stringstream ss;
ss << "Expected exactly one chain, but entity has "
<< ent.GetChainCount() << "chains";
<< ent.GetChainCount() << " chains";
throw std::runtime_error(ss.str());
}
ReducedStatExtractor extractor(opts_, histo_, ent);
ReducedStatExtractor extractor(opts_, histo_, ent.GetHandle());
ent.Apply(extractor);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment