Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/chilife/RotamerEnsemble.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
"""
Expand Down
9 changes: 8 additions & 1 deletion src/chilife/dRotamerEnsemble.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -792,4 +799,4 @@ def dassign_defaults(kwargs):
f'{", ".join(key for key in kwargs if key not in defaults)}'
)

return kwargs_filled.items()
return kwargs_filled.items()