eternagame / EternaJS

Eterna game/RNA design interface
Other
12 stars 10 forks source link

Incorrect implementation of energy delta and specbox for pseudoknots in puzzlemaker #758

Open luxaritas opened 2 months ago

luxaritas commented 2 months ago

Currently both the energy delta update and specbox update methods in puzzlemaker use targetconditions to determine whether or not to compute with pknots. However, targetconditions is not actually set with this property in puzzlemaker.

However we also can't just fix this, as the specbox update pseudoknot flag not only changes the computation, but also changes how it's stored/retrieved in undoblock. Right now, even if pknots are enabled we store all data in the undoblock marked with pknots as false. This should presumably be changed/fixed, but we need to verify it won't break existing autosaves.

This isn't actually an issue right now since nothing with pknots has energies enabled and all pknot engines use the same dot plots for both pknot and nonpknot cases. However, that could change at some future point, so this should be fixed.