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

it's rather useless to uniquely identify a residue by its name

when it could be renamed in the meantime...
parent c3314f47
Branches
Tags
No related merge requests found
......@@ -43,11 +43,11 @@ public:
TerminiExceptions(){ }
void SetException(const ost::mol::ResidueHandle& res, const String& exception_name){
exceptions_[res.GetQualifiedName()] = exception_name;
exceptions_[res.GetHashCode()] = exception_name;
}
bool HasException(const ost::mol::ResidueHandle& res) const{
return exceptions_.find(res.GetQualifiedName()) != exceptions_.end();
return exceptions_.find(res.GetHashCode()) != exceptions_.end();
}
String GetException(const ost::mol::ResidueHandle& res) const {
......@@ -56,11 +56,11 @@ public:
ss<<"Tried to get termini exceptions of res "<<res<<" without defined exception!";
throw ost::Error(ss.str());
}
std::map<String, String>::const_iterator i = exceptions_.find(res.GetQualifiedName());
std::map<unsigned long, String>::const_iterator i = exceptions_.find(res.GetHashCode());
return i->second;
}
private:
std::map<String, String> exceptions_;
std::map<unsigned long, String> exceptions_;
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment