Skip to content

ParmEd OpenMM FFXML writer doesn't correctly handle patches that can modify residues in multiple ways #1397

@epretti

Description

@epretti

In parmed.openmm.parameters.OpenMMParameterSet._write_omm_patches(), there is logic that tries to apply patches to all applicable residues and write the "best" or "consensus" definition. This causes invalid patches to be written for parts of the CHARMM force field (see openmm/openmm#4800 for example), in cases where there really needs to be multiple versions of a patch present.

I have a fix for this that I am using for our conversion of the latest versions of CHARMM force fields to OpenMM FFXML. It generates multiple versions of each patch as necessary with different names. There are a few limitations like restriction to <ApplyToResidue> (rather than <AllowPatch>), and I have a few questions about the expected behavior of ParmEd in a few cases, but I can submit a PR to discuss if desired.

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