Skip to content

Commit

Permalink
Add MBAREstimator class for performing mbar analysis
Browse files Browse the repository at this point in the history
  • Loading branch information
wiederm committed Jan 9, 2024
1 parent c3bd752 commit 84a85be
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
18 changes: 18 additions & 0 deletions chiron/analysis.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import numpy as np


class MBAREstimator:
def __init__(self, N_u: int) -> None:
self.mbar_f_k = np.zeros(len(N_u))

def initialize(self, u_kn: np.ndarray, N_k: np.ndarray):
"""
Perform mbar analysis
"""
from pymbar import MBAR
from loguru import logger as log

log.debug(f"{N_k=}")
mbar = MBAR(u_kn=u_kn, N_k=N_k)
log.debug(mbar.f_k)
self.mbar_f_k = mbar.f_k
3 changes: 0 additions & 3 deletions chiron/analyzer.py

This file was deleted.

0 comments on commit 84a85be

Please sign in to comment.