Skip to content

Barycenter Calculation in OpenMM #287

@svarner9

Description

@svarner9

I am not sure if this is a known issue, but I noticed that CVs which rely on the barycenter has a small issue in OpenMM.

To my knowledge, OpenMM wraps particle coordinates internally when using PBCs. As a result, when an atom group sits directly on the boundary, the barycenter is calculated to be in the center of the box, rather than on the edge. (See the attached image).

I think a way to remedy this would be to use the angular method mentioned in this Wikipedia article: https://en.wikipedia.org/wiki/Center_of_mass. I am going to implement this for myself, but would recommend looking into it for the package.

Thank you! :)

Screenshot 2023-10-18 101524

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