OpenBioSim/sire

[BUG] sire.morph.create_from_pertfile doesn't assign different element properties to the end states

lohedges opened this issue · 0 comments

Not really a bug, since this works for the purposes of running simulations with somd2, which is the intended use case, but the sire.morph.create_from_pertfile function doesn't assign different elements to the end states when atoms are perturbed. (The element0 and element1 properties are identical.) This is because element is absent from the perturbation template and atom changes are inferred from the ambertype0 and ambertype1 properties.

This is currently causing round-trip pert file conversion to fail, since the file written back by BioSimSpace differs since it uses the element property to check for dummies, which will be wrong if there is a dummy in the lambda = 1 state. A minimal fix would be to set the appropriate end state property to Element(0) if either ambertype0 or ambertype1 is du. A full fix would be to correctly set the lamba = 1 element property for all atoms, potentially inferring from ambertype1.