choderalab / chiron

Differentiable Markov Chain Monte Carlo
https://github.com/choderalab/chiron/wiki
MIT License
14 stars 1 forks source link

Montecarlo barostat #14

Closed chrisiacovella closed 6 months ago

chrisiacovella commented 7 months ago

Description

This PR implements a simple isotropic MC barostat. This modifies the metroplizedmove base class such that it can handle the barostat move. This has included changing the _propose_positions function to take/return box_vectors. Additional changes include storing initial/final box volume if pressure is defined.

Note, this will dilate all atoms in the system; for molecular systems we'll need to implement functionality to handle inference of molecules and scaling based on molecule COM.

Edit (24/01/11): After quick discussion of this in the meeting today, I think it is evident we will need to do a major refactor of how we implement the MC move classes after we get these initial ones committed, as the code is definitely starting to get a bit messy. We shouldn't get bogged down with that in this PR, so that we can have these routines to use for other development. I think the overall API used by the MCMCSampler class won't need to change (basically will still just calling run regardless of the rest of the code structure) so refactoring should basically be plug and play and not necessarily break things.

Todos

Notable points that this PR has either accomplished or will accomplish.

Status

codecov-commenter commented 7 months ago

Codecov Report

Merging #14 (128b513) into main (58db5df) will increase coverage by 0.96%. The diff coverage is 90.22%.

Additional details and impacted files
chrisiacovella commented 6 months ago

Closing this because it's now in redacted code in https://github.com/choderalab/chiron/pull/21