New Layer Filters and speed of client

Started by bertro

tamirh Lv 1

Sorry, I missed putting this in the release notes. There are LUA functions to toggle this already in main/devprev. I just forget to add them to the release notes. Sorry about that.

bool behavior.GetSlowFiltersDisabled()
void behavior.SetSlowFiltersDisabled(bool setting)

tamirh Lv 1

bertro, I assume you are talking about the list of 'allowed' residues that the Layer Design filter gives you? I'm hesitant to hard code a LUA function for that one filter because the different filters work in different ways, and those residues aren't really invalid, they are just suspect, which is why you get a penalty. The penalty is exponential, so if you just have a few it's not a big deal. Real proteins don't always match up with those 'allowed' residues. If you have a lot, then it's a good indicator that there is something wrong though.

Perhaps some other LUA functions to access the data from the filters would help? Here are some I think would make sense. Let me know if you can think of anything else:

  • Total Filters currently enabled on this puzzle

  • If filter X is satisfied or not
  • How much of a bonus/penalty filter X is giving

Having said that, I will think of some more general API for LUA functions to grab more data from the Filters other than just the values above. If you have any suggestions feel free to let us know.

bertro Lv 1

Thanks, that was really fast :)

I would suggest naming as:
bool behavior.GetSlowFiltersState()
void behavior.SetSlowFiltersState(bool setting)

I was thinking along the lines of
bool structure.IsInvalid(segment number)
or table structure.Invalid()

Maybe, it would also be interesting to have:
table structure.ScoreTooLow()
or bool structure.IsScoreTooLow(segment number)

Timo van der Laan Lv 1

More functions on Filters:

  • one to get the list of active filters
  • one to get the list of penalized segments for a specific filter
  • one to get the penalty from a specific filter
  • one to get the total penalty from the filters
  • one to get a list of amino acids on a specific segment to satisfy a specific filter
    And if you are building Lua functions please include:
  • get cutpoint list (first segment numbers should be enough)
  • close cutpoint
  • is closable cutpoint
  • make cutpoint

Bletchley Park Lv 1

Tamir, can this please also be updated in the wiki ? I tried updating it manually, but it states that the LUA functions section is 'autogenerated'. The wiki was the first place I searched for this.