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 gentle equilibration protocol as utility function #669

Merged
merged 9 commits into from Mar 29, 2023

Conversation

ijpulidos
Copy link
Contributor

@ijpulidos ijpulidos commented Mar 22, 2023

Description

Resolves #540

These changes add the function gentle_equilibration that can be imported using from openmmtools.utils import gentle_equilibration.

These changes create a new utils module that should serve as a more organized API point where to locate all the utility functions.

Todos

  • Implement feature / fix bug
  • Add tests
  • Update documentation as needed
  • Update changelog to summarize changes in behavior, enhancements, and bugfixes implemented in this PR

Status

  • Ready to go

Changelog message

Support for gentle equilibration. API point in `openmmtools.utils.gentle_equilibration`.

@ijpulidos ijpulidos added this to the 0.22.0 milestone Mar 22, 2023
@ijpulidos ijpulidos self-assigned this Mar 22, 2023
@ijpulidos ijpulidos marked this pull request as ready for review March 28, 2023 14:40
@mikemhenry
Copy link
Contributor

Very nice 🎉

openmm.app.PDBxFile.writeFile(topology, positions, open(filename, "w"), keepIds=True)

# Save the box vectors
if save_box_vectors:
Copy link
Contributor

Choose a reason for hiding this comment

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

Are there cases where the box vectors are not needed? When creating a DCD trajectory in mdtraj, we need the box vectors along with the positions, so at least in that use case, we always need the box vectors.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You are right, we should always be saving the box vectors in production-ready scenarios somehow. So far, this is mostly for practical purposes, such that we don't have to keep track of other files in tests.

I'm also considering that we want to eventually return openmm objects that already have this information included, I still don't know if that's going to be easily achievable but for now I'm going to leave it as is. The default behavior is to store the box vectors.

@zhang-ivy
Copy link
Contributor

Looks good! Just added some minor suggestions.

ijpulidos and others added 3 commits March 29, 2023 17:59
Co-authored-by: Ivy Zhang <35546250+zhang-ivy@users.noreply.github.com>
Co-authored-by: Ivy Zhang <35546250+zhang-ivy@users.noreply.github.com>
@ijpulidos ijpulidos enabled auto-merge (squash) March 29, 2023 22:10
@ijpulidos ijpulidos merged commit 139b454 into main Mar 29, 2023
12 of 14 checks passed
@ijpulidos ijpulidos deleted the 540-utils-gentle-equilibration branch March 29, 2023 22:50
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.

Add gentle equilibration code
3 participants