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

Properly check, whether requested compound is valid.

No unit tests yet.
parent 5c668e4e
Branches
Tags
No related merge requests found
#include "compound_lib_base.hh"
#include <ost/message.hh>
namespace ost { namespace conop {
bool CompoundLibBase::IsResidueComplete(const ost::mol::ResidueHandle& res, bool check_hydrogens, Compound::Dialect dialect) const{
CompoundPtr compound = this->FindCompound(res.GetName(), dialect);
AtomSpecList a_spec = compound->GetAtomSpecs();
if(!compound){
std::stringstream ss;
ss << "Could not find " << res.GetName() << " in compound library";
throw Error(ss.str());
}
const AtomSpecList& a_spec = compound->GetAtomSpecs();
for(AtomSpecList::const_iterator it=a_spec.begin(); it!=a_spec.end();++it){
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment