Skip to content

Commit

Permalink
Merge pull request #31 from BranniganLab/decorr
Browse files Browse the repository at this point in the history
Add back decorrelation
  • Loading branch information
EzryStIago authored Jun 14, 2023
2 parents b14b0c9 + 78d5f94 commit e1c4493
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions safep/processing.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,19 +133,17 @@ def read_and_process(fepoutFiles, temperature, decorrelate, detectEQ):
"""
Read NAMD fepout files for a single calculation and carry out any decorrelation or equilibrium detection
Arguments: files to parse, temperature, decorrelate (boolean, whether or not to use alchemlyb's decorrelation functions), detectEQ (boolean, whether or not to use alchemlyb's equilibrium detection)
Returns: u_nk, affix (a string that describes the data processing)
Returns: u_nk
"""
fepoutFiles = natsorted(fepoutFiles)
u_nk = namd.extract_u_nk(fepoutFiles, temperature)

affix = ""

if detectEQ:
print("Detecting Equilibrium")
affix = f"{affix}_AutoEquilibrium"
print("Detecting Equilibrium (includes decorrelating)")
u_nk = detect_equilibrium_u_nk(u_nk)
else:
affix = f"{affix}_HardEquilibrium"
elif decorrelate:
print(f"Decorrelating samples")
u_nk = decorrelate_u_nk(u_nk)

return u_nk

Expand Down

0 comments on commit e1c4493

Please sign in to comment.