Skip to content

[BUG matchAtoms prune_perturbed_constraints option is broken #453

@lohedges

Description

@lohedges

The logic used to prune perturbed constraints from a mapping is broken, since it uses the in operator to check for the presence of a sire.legacy.Mol.Element("H") object in a set, which will only work if the object in the set is the same instance, or singleton type, which it isn't.

from sire.legacy.Mol import Element

H1 = Element("H")
H2 = Element("H")

x = {H1}

print(H1 in x)
print(H2 in x)

gives:

True
False

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