Skip to content

Problem with Espaloma template generator #404

Open

Description

@mallanos

Hi everyone,
After updating to OpenMM (8.3.1) and openmmforcefields (0.15.0), I got this error when trying to use the Espaloma template generator:

File "~/micromamba/envs/myenv/lib/python3.12/site-packages/openmmforcefields/generators/template_generators.py", line 1131, in convert_system_to_ffxml
raise ForceException(f"Custom forces not supported. Found force of type {force_name}.")
openmmforcefields.generators.template_generators.ForceException: Custom forces not supported. Found force of type CMMotionRemover.

I've been using this Template Generator before without problems. It seems like the CMMotionRemover force is being added by default to the OpenMM system.
I wrote this quick fix, which has been working for me: 9e99a3d

If you think this is the right way to do it I can open a PR, or if there's a better way to solve it, let me know

Thanks!

Activity

  1. epretti commented on Sep 2, 2025

    @epretti
    Member

    I'm surprised to see that error as I thought it should have been fixed for Espaloma by this commit: 722c2f6. If you have a self-contained example that reproduces the problem, I can take a look and see what's happening.

  2. mattwthompson commented on Sep 2, 2025

    @mattwthompson
    Collaborator

    I suspect something other than the released version (via a conda package) is being imported. (This is easy to have happen accidentally!) The line numbers don't match up between the traceback and the source

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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