From cda9ca3efb7b0e52ba013c20aa3484ade67ecacd Mon Sep 17 00:00:00 2001 From: Samuel Musson Date: Mon, 15 May 2023 14:10:30 +0100 Subject: [PATCH] molearn bug fixes to avoid recreating dope_score_class in molearn_analysis --- src/molearn/analysis/analyser.py | 4 ++++ src/molearn/scoring/dope_score.py | 13 +++++++++---- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/src/molearn/analysis/analyser.py b/src/molearn/analysis/analyser.py index 4ca560e..839f03f 100644 --- a/src/molearn/analysis/analyser.py +++ b/src/molearn/analysis/analyser.py @@ -466,3 +466,7 @@ def generate(self, crd): return s*self.stdval + self.meanval + + def __getstate__(self): + return {key:value for key, value in dict(self.__dict__).items() if key not in ['dope_score_class', 'ramachandran_score_class']} + diff --git a/src/molearn/scoring/dope_score.py b/src/molearn/scoring/dope_score.py index 21f6737..c7a665f 100644 --- a/src/molearn/scoring/dope_score.py +++ b/src/molearn/scoring/dope_score.py @@ -78,7 +78,12 @@ def get_dope(self, frame, refine=False): if i+1