Skip to content

Issues with selecting multiple residues with REST #197

Description

@mb2055

Hi,

There seems to be an issue when selecting multiple residues within rest2_selection, with an error of ERROR | somd2.runner._runner:run_window:413 - Error running λ = 0.0: list.remove(x): x not in list being raised when more than one residue is selected.
The issue seems to be coming from this line in sire not returning the expected shape.

I've attached a small example containing a host-guest system that runs succesfully when rest2_selection is either molidx 0 or molidx -1 (the indices of the host and guest respectively), but fails when the selection is set to molidx0 or molidx -1.
I can also confirm that the issue also arises in protein-ligand systems.

Versions:
somd2 version: 2026.2.0.dev+62.g0583678
sire version: 2026.2.0.dev+g35efd4a

Tagging @marcobICR as he found the issue.

example.tar.gz

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions