SetAminoAcid (all) doesn't work

Started by ferrieux

ferrieux Lv 1

This was with 20140213-15100a6562-linux_x64
Try for example with puzzle 846. All three segments of the ligand are mutable (and can be set manually), but trying to set them by a GUI recipe fails, without any output.

Susume Lv 1

This was in a puzzle where only 3 segments are mutable, so the action could not be carried out. It's the downside of allowing actions that can fail in an interface with no error reporting - I prefer it to the alternative of not allowing those actions in the GUI recipe interface. Another alternative would be to add an output window to GUI recipes, which seems like a lot of work.

ferrieux Lv 1

Note this is only an issue with the GUI primitive.
The equivalent Lua script works like a charm:

for k=1,structure.GetCount() do
structure.SetAminoAcid(k,'g')
end

Note this works even when only a few loci are mutable. This means that structure.SetAminoAcid() fails without raising an exception on locked segments…