diff --git a/modules/mol/alg/pymod/qsscoring.py b/modules/mol/alg/pymod/qsscoring.py index ba9c2af9dcde47fb03c8af3f7eccd1ddffe22f8a..8f9286b49bc1f36624c6f4786da289edca765ee5 100644 --- a/modules/mol/alg/pymod/qsscoring.py +++ b/modules/mol/alg/pymod/qsscoring.py @@ -228,6 +228,10 @@ class QSscorer: self._chem_mapping = _GetChemGroupsMapping(self.qs_ent_1, self.qs_ent_2) return self._chem_mapping + @chem_mapping.setter + def chem_mapping(self, chem_mapping): + self._chem_mapping = chem_mapping + @property def ent_to_cm_1(self): """Subset of :attr:`qs_ent_1` used to compute chain mapping and symmetries. @@ -255,6 +259,10 @@ class QSscorer: self._ComputeAlignedEntities() return self._ent_to_cm_1 + @ent_to_cm_1.setter + def ent_to_cm_1(self, ent_to_cm_1): + self._ent_to_cm_1 = ent_to_cm_1 + @property def ent_to_cm_2(self): """Subset of :attr:`qs_ent_1` used to compute chain mapping and symmetries @@ -264,6 +272,10 @@ class QSscorer: self._ComputeAlignedEntities() return self._ent_to_cm_2 + @ent_to_cm_2.setter + def ent_to_cm_2(self, ent_to_cm_2): + self._ent_to_cm_2 = ent_to_cm_2 + @property def symm_1(self): """Symmetry groups for :attr:`qs_ent_1` used to speed up chain mapping. @@ -384,6 +396,10 @@ class QSscorer: LogInfo('Mapping found: %s' % str(self._chain_mapping)) return self._chain_mapping + @chain_mapping.setter + def chain_mapping(self, chain_mapping): + self._chain_mapping = chain_mapping + @property def chain_mapping_scheme(self): """Mapping scheme used to get :attr:`chain_mapping`. @@ -440,6 +456,10 @@ class QSscorer: self.res_num_alignment) return self._alignments + @alignments.setter + def alignments(self, alignments): + self._alignments = alignments + @property def mapped_residues(self): """Mapping of shared residues in :attr:`alignments`. @@ -454,6 +474,10 @@ class QSscorer: self._mapped_residues = _GetMappedResidues(self.alignments) return self._mapped_residues + @mapped_residues.setter + def mapped_residues(self, mapped_residues): + self._mapped_residues = mapped_residues + @property def global_score(self): """QS-score with penalties. @@ -522,6 +546,10 @@ class QSscorer: self._clustalw_bin = settings.Locate(('clustalw', 'clustalw2')) return self._clustalw_bin + @clustalw_bin.setter + def clustalw_bin(self, clustalw_bin): + self._clustalw_bin = clustalw_bin + def GetOligoLDDTScorer(self, settings, penalize_extra_chains=True): """ :return: :class:`OligoLDDTScorer` object, setup for this QS scoring problem. diff --git a/modules/mol/alg/tests/test_qsscoring.py b/modules/mol/alg/tests/test_qsscoring.py index 29aaa621024deb883f00c3d30523df50492ff1a5..0e57f2a3ef2ea0df15a1e8560d4b5c97f658cdfa 100644 --- a/modules/mol/alg/tests/test_qsscoring.py +++ b/modules/mol/alg/tests/test_qsscoring.py @@ -167,8 +167,7 @@ class TestQSscore(unittest.TestCase): # enforce different chain mapping enforced_cm = {'C': 'C', 'E': 'A', 'D': 'D', 'F': 'B'} qs_scorer_2 = QSscorer(qs_scorer.qs_ent_1, qs_scorer.qs_ent_2) - # directly overwrite variable intended to be private. Have mercy with me. - qs_scorer_2._chain_mapping = enforced_cm + qs_scorer_2.chain_mapping = enforced_cm self.assertAlmostEqual(qs_scorer_2.global_score, 0.356, 2) self.assertAlmostEqual(qs_scorer_2.best_score, 0.419, 2) self.assertEqual(qs_scorer_2.chain_mapping, enforced_cm)