Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add back decorrelation #31

Merged
merged 1 commit into from
Jun 14, 2023
Merged
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
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