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

Allow different optimizations at different iterations #30

Open
jdrusso opened this issue Oct 21, 2022 · 0 comments
Open

Allow different optimizations at different iterations #30

jdrusso opened this issue Oct 21, 2022 · 0 comments
Labels
Optimization Related to optimization

Comments

@jdrusso
Copy link
Owner

jdrusso commented Oct 21, 2022

If I pass an extra n_iter argument to my custom_optimization functions that the optimization plugin uses, I can allow using different optimization strategies at different iterations

I.e., instead of

def optimize_allocation(hamsm):

    original_allocation = westpa.rc.get_we_driver().bin_target_counts

    return original_allocation

we could have

def optimize_allocation(hamsm, n_iter):

    if n_iter < 1000:
        allocation = westpa.rc.get_we_driver().bin_target_counts

    elif n_iter < 7000:
        allocation = do_something_else()

    return allocation
@jdrusso jdrusso added the Optimization Related to optimization label Oct 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Optimization Related to optimization
Projects
None yet
Development

No branches or pull requests

1 participant