Skip to content

Conversation

@jchodera
Copy link
Member

Description

This PR adds a PeriodicNonequilibriumIntegrator, a simple extension of AlchemicalNonequilibriumLangevinIntegrator that supports periodic alchemical protocols.

@dominicrufa : This is heavily based on your Loopy and bidirectional integrators, but since this is simpler and more compatible with the current Folding@home infrastructure, I'm going to merge this first and then return to #464 in a day or two.

Todos

  • Implement feature / fix bug
  • Add tests
  • Update documentation as needed
  • Update changelogNotable points that this PR has either accomplished or will accomplish.

Status

  • Ready to go

@jchodera
Copy link
Member Author

Weird---there are issues that seem unrelated:

testing alchemically modified BondForce for alchemical/alchemical electrostatics exceptions

Any ideas here @dominicrufa ?

>>> # Run one periodic cycle: (eq 0) > (neq 0->1) > (eq 1) > (neq 1->0)
>>> context.setPositions(testsystem.positions)
>>> nsteps_per_period = 2*nsteps_eq + 2*nsteps_neq
>>> integrator.step(nsteps_per_period)
Copy link
Contributor

Choose a reason for hiding this comment

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

it seems like this class was written to allow for single integrator.step() calls which don't complete the nonequilibrium cycle; is this correct?

Copy link
Member Author

Choose a reason for hiding this comment

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

That's correct! It's the same way that AlchemicalNonequilibriumLangevinIntegrator works, except instead of halting after n_steps_neq, it continues periodic cycling infinitely. This way, we can also measure the work at various points through the switching, and this allows us to capture useful information about the efficiency of the protocol.

I think your integrators are super useful as well, so I'll come back to those in a couple of days.

lambda_control_expression = "lambda"\
" + delta_lambda*step((step+0.5)-n_steps_eq)*step((n_steps_eq+n_steps_neq) - (step+0.5))"\
" - delta_lambda*step((step+0.5)-(n_steps_eq+n_steps_neq+n_steps_eq))*step(n_steps_per_cycle - (step+0.5));"\
"delta_lambda = 1/n_lambda_steps;" # Note that there may be multiple H per integrator string, so we correct for this here
Copy link
Contributor

Choose a reason for hiding this comment

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

could you split this expression into substrings and provide a short comment on each part? it's not too easy to read in this format

Copy link
Member Author

Choose a reason for hiding this comment

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

Great idea!

@dominicrufa
Copy link
Contributor

Weird---there are issues that seem unrelated:

testing alchemically modified BondForce for alchemical/alchemical electrostatics exceptions

Any ideas here @dominicrufa ?

Weird---there are issues that seem unrelated:

testing alchemically modified BondForce for alchemical/alchemical electrostatics exceptions

Any ideas here @dominicrufa ?

hm. never seen this before. can you post the whole traceback?

@jchodera
Copy link
Member Author

@dominicrufa : I was just picking the errors out of the travis failures, but it looks like there are a variety of odd errors I haven't seen before.

@jchodera
Copy link
Member Author

Thanks for the great feedback, @dominicrufa !

@jchodera jchodera merged commit 9fa56df into master Apr 18, 2020
@jchodera jchodera deleted the periodic-nonequilibrium-integrator branch April 18, 2020 01:48
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.

3 participants