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

Include VirtualSiteHandler and dependencies in gradient subset #534

Merged
merged 12 commits into from
Oct 16, 2023

Conversation

mattwthompson
Copy link
Member

@mattwthompson mattwthompson commented Oct 12, 2023

Description

This PR is a minimal change to get this snippet running without (obvious) error.

Todos

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

  • Include VirtualSiteHandler in system subset
  • Include VirtualSiteHandler's dependencies in system subset
  • Add test(s)
    • Halving (scale_amount=-0.5) distance parameter in OPC
    • Nothing weird happens mixing molecules with and without virtual sites applied
    • OpenMM energies can be evaluated

Questions

  • Question1

Status

  • Ready to go

@codecov
Copy link

codecov bot commented Oct 12, 2023

Codecov Report

Merging #534 (849e05f) into main (a1fb24b) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Additional details and impacted files

@jthorton
Copy link
Contributor

jthorton commented Oct 13, 2023

I think we could use something like this to include all standard electrostatic forces, tagging @SimonBoothroyd to double check.

if parameter_key.tag in {"ChargeIncrementModel", "LibraryCharges", "VirtualSiteHandler"}:
        # Make sure to retain all of the electrostatic handlers when dealing with
        # charges as the applied charges will depend on which charges have been applied
        # by previous handlers.
        handlers_to_register.update(
            {"Electrostatics", "ChargeIncrementModel", "LibraryCharges", "VirtualSiteHandler", "ToolkitAM1BCC"}
        )

@SimonBoothroyd
Copy link
Contributor

@jthorton that looks right - good catch on "ToolkitAM1BCC" as I think that should be there also!

@mattwthompson
Copy link
Member Author

For testing, would it be sufficient to make system subsets in a number of different cases or should we set up some actual gradient-based calculations?

@jthorton
Copy link
Contributor

jthorton commented Oct 13, 2023

For testing, would it be sufficient to make system subsets

I think this would be enough and maybe make sure we can calculate the energy of the sub system using openmm and matches what we expect particularly for systems with v-sites, maybe add in a system mixed with v-site water and some other molecule without a v-site.

@mattwthompson
Copy link
Member Author

@jthorton this does everything I think we set out for it to originally do - I'm not sure all gradient-based fitting is enabled but I'd like to get this change in before worry about that scale. Could you give this a brief once over in case I've accidentally slipped in something silly?

@mattwthompson mattwthompson marked this pull request as ready for review October 16, 2023 15:50
Copy link
Contributor

@jthorton jthorton left a comment

Choose a reason for hiding this comment

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

LGTM!

@mattwthompson
Copy link
Member Author

Thanks!

@mattwthompson mattwthompson merged commit 2de77e0 into main Oct 16, 2023
15 checks passed
@mattwthompson mattwthompson deleted the virtual-site-gradients branch October 16, 2023 19:30
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