structure.CanMutate

Started by Bruno Kestemont

Bruno Kestemont Lv 1

structure.CanMutate(integer segmentIndex, string aminoAcid)

Is it possible to add an option like "forbidden" (impossible to mutate) or "penalized" (not recommended to mutate because penalties or no bonus).

I suggest:

structure.CanMutate(integer segmentIndex, string aminoAcid [, forbidded])

where:

forbidded = true (default) => Foldit would not allow a mutation to this aa
forbidded = false => You may mutate but at own risk (you will loose bonus or gain penalties)

Thus, for example
structure.CanMutate(3, g, true) = structure.CanMutate(3, g)
will return false if no mutation is even possible

structure.CanMutate(3, g, false)
will return false if mutation is allowed but penalized

brow42 Lv 1

Much prefer solutions that return a list instead of querying one AA type at a time. This is one thing from LUA1 that I miss. Could be combined with IsMutable, with true/false the first return value, and a table(s) after.