Skip to content

User-specified partial charges should not be automatically adjusted by GAFFTemplateGenerator #373

Open
@epretti

Description

@epretti

As we recently discussed, GAFFTemplateGenerator will shift partial charges to match molecule formal charges because those output by antechamber can be slightly offset (looking into it a bit, this seems to be coming from some kind of rounding somewhere within antechamber). This is a problem because it can silently adjust user-specified charges. I am opening a separate issue for this because there are a few additional things related to openmmforcefields' use of OpenFF that hopefully @j-wags / @mattwthompson will have insight into:

  1. It appears that the OpenFF toolkit now handles the GAFF issue automatically, according to Round partial charges to enforce correct integral charge on molecule openforcefield/openff-toolkit#456. Am I understanding correctly then that as long as the default normalize_partial_charges=True is present on assign_partial_charges(), openmmforcefields shouldn't need to do its own normalization at all?
  2. openmmforcefields' _molecule_has_user_charges() checks if the OpenFF toolkit Molecule has partial_charges equal to None, or if they are all 0, to decide if there are no user charges. This precludes users from explicitly specifying all-zero partial charges, and a comment points to the issue Add convenience method to Molecule to return whether user has provided partial charges openforcefield/openff-toolkit#488 from 2020. Is this still the state of things now in the OpenFF toolkit, or is there a more robust way to check for the presence or absence of user charges?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions