Skip to content

Commit

Permalink
small function
Browse files Browse the repository at this point in the history
  • Loading branch information
nwmoriarty committed Oct 15, 2024
1 parent 998730c commit 037b7e8
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions mmtbx/validation/rotalyze.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,15 @@ def __init__(self, pdb_hierarchy,
assert abs(self.percent_favored+self.percent_allowed+
self.percent_outliers-100.) < 1.e-6

def get_rotamer_count(self):
rotamer_count = {'total': {}}
for residue in self.results:
if residue.is_outlier(): continue
current = rotamer_count['total'].setdefault(residue.resname, {})
current.setdefault(residue.rotamer_name, 0)
current[residue.rotamer_name]+=1
return rotamer_count

def evaluateScore(self, value, model_id=""):
if value >= ALLOWED_THRESHOLD :
self.n_favored += 1
Expand Down

0 comments on commit 037b7e8

Please sign in to comment.