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 sampler.py with Pymbar #17

Merged
merged 9 commits into from
Feb 9, 2022
Merged

Conversation

chrisjonesBSU
Copy link
Member

@chrisjonesBSU chrisjonesBSU commented Oct 6, 2021

This PR adds 2 functions:

  1. An equilibration sampling function that uses pymbar timeseries to return the uncorrelated samples from an equilibrated region.
  2. A function that checks if an array is considered equilibrated given some threshold

Still to do:

  • Unit tests
  • Doc strings

@codecov
Copy link

codecov bot commented Oct 6, 2021

Codecov Report

Merging #17 (b64ee2d) into master (a8df0c6) will increase coverage by 0.02%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #17      +/-   ##
==========================================
+ Coverage   99.63%   99.65%   +0.02%     
==========================================
  Files           5        6       +1     
  Lines         273      293      +20     
==========================================
+ Hits          272      292      +20     
  Misses          1        1              
Impacted Files Coverage Δ
cmeutils/sampling.py 100.00% <100.00%> (ø)

@chrisjonesBSU
Copy link
Member Author

Unit tests have been added. Still need to add doc strings.

Copy link
Member

@jennyfothergill jennyfothergill left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like the test environment needs pymbar. I will update the testing worklflow like we did in ulipolyBinder, planckton, msibi, etc :)

Copy link
Member

@jennyfothergill jennyfothergill left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! a couple minor comments

cmeutils/sampling.py Outdated Show resolved Hide resolved
cmeutils/sampling.py Outdated Show resolved Hide resolved
cmeutils/sampling.py Outdated Show resolved Hide resolved
cmeutils/sampling.py Show resolved Hide resolved
"to be lowered. See is_equilibrated for more information."
)

def is_equilibrated(data, threshold_fraction=0.80, threshold_neff=100, nskip=1):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this threshold might be a bit high. In reproducibility study we found we needed to lower it from 0.75 to get reasonable run times.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe set 0.50 as a default?

@chrisjonesBSU chrisjonesBSU merged commit 2ca8753 into cmelab:master Feb 9, 2022
@chrisjonesBSU chrisjonesBSU deleted the add/pymbar branch November 15, 2023 19:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants