From 4584ef7dcda74a8ce33e97e8cbf46bba98327d89 Mon Sep 17 00:00:00 2001 From: Gabriel Studer <gabriel.studer@unibas.ch> Date: Fri, 24 Apr 2015 19:55:59 +0200 Subject: [PATCH] it's rather useless to uniquely identify a residue by its name when it could be renamed in the meantime... --- modules/mol/mm/src/settings.hh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/mol/mm/src/settings.hh b/modules/mol/mm/src/settings.hh index 639ddc9b4..ddd3067c0 100644 --- a/modules/mol/mm/src/settings.hh +++ b/modules/mol/mm/src/settings.hh @@ -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_; }; -- GitLab