diff --git a/src/chilife/RotamerEnsemble.py b/src/chilife/RotamerEnsemble.py index 6d681f8..5e383cc 100644 --- a/src/chilife/RotamerEnsemble.py +++ b/src/chilife/RotamerEnsemble.py @@ -1362,6 +1362,12 @@ def set_dihedral_sampling_sigmas(self, value): raise ValueError('`dihedral_sigmas` must be a scalar, an array the length of the `self.dihedral atoms` or ' 'an array with the shape of (len(self.weights), len(self.dihedral_atoms))') + @property + def partition_function(self): + """The partition function of the rotamer ensemble after reweighting.""" + if self.partition == 1 and self.protein is not None: + self.evaluate () + return self.partition def assign_defaults(kwargs): """ diff --git a/src/chilife/dRotamerEnsemble.py b/src/chilife/dRotamerEnsemble.py index 2ffe8e5..9a2b419 100644 --- a/src/chilife/dRotamerEnsemble.py +++ b/src/chilife/dRotamerEnsemble.py @@ -718,6 +718,13 @@ def copy(self): else: new_copy.__dict__[item] = deepcopy(self.__dict__[item]) return new_copy + + @property + def partition_function(self): + """The partition function of the rotamer ensemble after reweighting.""" + if self.partition == 1 and self.protein is not None: + self.evaluate() + return self.partition def proc_sites(sites): sites = sorted(sites) @@ -792,4 +799,4 @@ def dassign_defaults(kwargs): f'{", ".join(key for key in kwargs if key not in defaults)}' ) - return kwargs_filled.items() \ No newline at end of file + return kwargs_filled.items()