Skip to content

Commit

Permalink
Updated CI.yaml to enabled CI to run for branches commiting to the mu…
Browse files Browse the repository at this point in the history
…ltistage branch. Thanks Mike Henry!
  • Loading branch information
chrisiacovella committed Feb 2, 2024
1 parent 0f049b2 commit 21ff068
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
1 change: 1 addition & 0 deletions .github/workflows/CI.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:
pull_request:
branches:
- "main"
- "multistage"
schedule:
# Weekly tests run on main by default:
# Scheduled workflows run on the latest commit on the default or base branch.
Expand Down
2 changes: 1 addition & 1 deletion Examples/LJ_MCMC.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,4 +149,4 @@
)

sampler = MCMCSampler(move_set, sampler_state, thermodynamic_state)
sampler.run(n_iterations=1000, nbr_list=nbr_list) # how many times to repeat
sampler.run(n_iterations=10, nbr_list=nbr_list) # how many times to repeat
10 changes: 4 additions & 6 deletions chiron/mcmc.py
Original file line number Diff line number Diff line change
Expand Up @@ -938,12 +938,10 @@ def _propose(
proposed_sampler_state, proposed_nbr_list
)

# χ = exp ⎡−β (ΔU + PΔV ) + N ln(V new /V old )⎤
log_proposal_ratio = (
-proposed_reduced_pot
+ current_reduced_pot
+ nr_of_atoms * jnp.log(proposed_volume / initial_volume)
)
# ⎡−β (ΔU + PΔV ) + N ln(V new /V old )⎤
log_proposal_ratio = -(
proposed_reduced_pot - current_reduced_pot
) + nr_of_atoms * jnp.log(proposed_volume / initial_volume)

# we do not change the thermodynamic state so we can return 'current_thermodynamic_state'
return (
Expand Down

0 comments on commit 21ff068

Please sign in to comment.