Calculating Non-Ideal Loops Penalty:

 Case number: 845813-2005262 Topic: Game: Tools Opened by: jeff101 Status: Open Type: Suggestion Opened on: Saturday, May 19, 2018 - 16:51 Last modified: Monday, April 27, 2020 - 02:07

On Puzzle 1518, to calculate the Ideal Loops penalty,
it seemed like Foldit determined secondary structures
like the auto secondary structure button would find,
then it considered each continuous group of adjacent
loop residues as one loop.

For one structure (Je1b CW -2589.230 F -350) with the sequence below:

``````0000000001111111111222222222233333333334444444444555555555566666666667777777777888
1234567890123456789012345678901234567890123456789012345678901234567890123456789012
LLLLLLLLLLLLLLLLLLLELLLLLLLLLLLLEEEEEEELELLLLLLLLLLLLLLEEEEELLLLLLLLLLLLLLLLLLLLLL``````

showing the Ideal Loops filter gave a penalty of -500
for 5 non-ideal loops and put red blobs at segments
2-19 21-32 40 42-55 and 61-82 (all L positions above
except segment 1). Even the single-segment loop at
segment 40 counted as a non-ideal loop.

For another structure (Je1a CW 9826.952 F -456.8) with the sequence below:

``````0000000001111111111222222222233333333334444444444555555555566666666667777777777888
1234567890123456789012345678901234567890123456789012345678901234567890123456789012
LEEEELLLEELLLEEEEEEEEELLLEEEEEEEEEELLLLEEEELLLLEEEEEEEEEEELLEEEEEEEEEELLLEELLEEEEL``````

showing the Ideal Loops filter gave a penalty of -600
for 6 non-ideal loops and put red blobs at segments
6-8 11-13 23-25 36-39 71-73 and 76-77 (all L positions
above except segments 1 44-47 59-60 and 82). I took this
to mean that the loops at segments 44-47 and 59-60
passed the Ideal Loops filter and so were considered
as Ideal. Nevertheless, the colors within the Blueprint
Tool for segments 44-47 (brrb) and 59-60 (rr) did not
match any of the sheet-sheet loop Building Blocks within
the Blueprint Tool.

For a 3rd structure (Je1b CW 9827.220 -663.2) with the sequence below:

``````0000000001111111111222222222233333333334444444444555555555566666666667777777777888
1234567890123456789012345678901234567890123456789012345678901234567890123456789012
LEEEEELLEELLEEEEEEEEELLLEEELLLLEEELLLLEEEEELLLLEEEELLLLEEEEEEEEELLLEEELLEEEEELLLEL``````

showing the Ideal Loops filter gave a penalty of -800
for 8 non-ideal loops and put red blobs at segments
7-8 11-12 22-24 28-31 44-47 65-67 71-72 and 78-80
(all L positions above except segments 1 35-38 52-55 and 82).
I took this to mean that the Loops at segments 35-38 and 52-55
passed the Ideal Loops filter and so were considered as Ideal.
Nevertheless, the colors within the Blueprint Tool for
segments 35-38 and 52-55 were both brrb and did not match
any of the sheet-sheet loop Building Blocks within the
Blueprint Tool.

I am curious how Foldit decides which loops are ideal
and which ones are not. Does Foldit average the Ideality
subscores for all segments within a loop? Is there a cutoff
for this average Ideality subscore above which the loop is
considered Ideal and below which the loop is considered
Non-Ideal? I noticed that in the structures above, all
segments had either no Ideality subscore or negative ones.
I didn't see any segments with positive Ideality subscores.

(Sat, 05/19/2018 - 16:51  |  10 comments)

Offline
Joined: 04/20/2012
Groups: Go Science

I think it would be useful when one opts to Show the
Ideal Loops Filter to have Foldit do the following:

(1) Put red blobs by Non-Ideal Loop segments
and green blobs by Ideal Loop segments in the
3D picture of the protein.

(2) Somehow mark Ideal & Non-Ideal Loop segments
in both the Blueprint Tool and Rama Map. Perhaps
use +'s for Ideal Loops and -'s for Non-Ideal Loops.

(3) In the Blueprint Tool, have another row showing
the secondary structure that the auto secondary
structure button would show. It does not always agree
with the secondary structure one has chosen for each
segment, but it seems to determine which segments get
grouped together & checked by the Ideal Loops filter.

(4) It would also be nice to be able to toggle the
Show Filter/Penalty boxes on/off while a Recipe is
running.

Offline
Joined: 04/20/2012
Groups: Go Science

Below is an example of the Blueprint Tool
labeling proposed in (2) above:

For the structure Je1b CW 9827.220 -663.2 with the sequence below:

``````0000000001111111111222222222233333333334444444444555555555566666666667777777777888
1234567890123456789012345678901234567890123456789012345678901234567890123456789012
LEEEEELLEELLEEEEEEEEELLLEEELLLLEEELLLLEEEEELLLLEEEELLLLEEEEEEEEELLLEEELLEEEEELLLEL
?     --  --         ---   ----   ++++     ----    ++++         ---   --     --- ?``````

8 non-ideal loops marked with red blobs are at segments
7-8 11-12 22-24 28-31 44-47 65-67 71-72 and 78-80
while 2 ideal loops marked with green blobs are at segments
35-38 and 52-55. Segments 1 and 82 are marked with ? because
they are neither ideal nor non-ideal.

Offline
Joined: 10/02/2011

I am pretty sure the ideal loop filter looks first at hydrogen bonds to determine what is a loop, then looks at backbone torsion angles phi and psi (the two values that appear in the rama map) to determine whether it matches the list of allowed loops. It has to have some kind of allowed range of torsion angles for each allowed loop, which may or may not exactly match the colors shown in the rama map for the current AA. That is, a segment might be blue in the rama map but not within the allowed phi/psi range for a given ideal loop that has a blue in that spot, or may be within the allowed phi/psi range but not be quite within that colored rama area for the current AA.

You might look at the rama maps for your red-red and blue-red-red-blue loops that pass the filter, and see if the segment right after the second red is way up in the top left corner of the rama map. If so, it is very near to the bottom right corner (because the map wraps in both directions), which is yellow. If that is the case, you may be getting credit for a blue-red-red-yellow sheet-sheet loop, with leeway given in the allowed torsion angles for the yellow segment that lets them slop over into the adjacent corner of the blue area. The attached image shows the blueprint tool's suggested phi/psi angles for the BRRY loop; you can see that the yellow dot is way in the lower right corner, and therefore very close to the upper left corner. That said, I have also seen some red-red sheet-sheet loops pass the ideal loop filter. If they are not due to leeway in the BRRY loop allowed ranges, they may be a "hidden" allowed loop in their own right.

Auto structures uses DSSP, which relies on the presence or absence of hydrogen bonds, to decide what is a loop. This makes it a good approximation of the ideal loop filter's decision about what is a loop (since that also relies on hydrogen bonds), but may not be an exact match.

AFAIK the ideality subscore is completely unrelated to the torsion angles phi and psi, and therefore to the ideal loop filter - it just unfortunately has a similar name in foldit, so it is easy to confuse with ideal loops. I think the ideality subscore has to do with how much the lengths of the covalent bonds that hold the backbone together vary from expected values, and how much the omega dihedral angle (which unlike the phi and psi angles is not supposed to vary much) varies from expected values.

Offline
Joined: 11/15/2012
Groups: Foldit Staff

This is correct.

The "Ideality" subscore (displayed in Segment Information) is completely unrelated to the "Ideal Loops Filter." The first corresponds to the lengths and angles of chemical bonds between atoms; the latter depends only on the phi and psi torsions of the protein backbone. Sorry for the confusion! This is an example of some very poor naming decisions on our part, and it ought to be corrected.

The red-red β-hairpin loop is indeed a special "hidden" allowed loop. It is actually a fairly common loop structure for β-hairpins, but it is not included in the Building Blocks for some technical reasons.* The Ideal Loop Filter does not allow for any "leeway"; the color boundaries in the Rama Map should correspond exactly to the phi and psi thresholds for the Ideal Loop Filter.

*The red-red (BRRB) β-hairpin induces some distortion in the adjacent β-strands, which makes this loop unsuitable as a drag-and-drop Building Block. To some extent, this is true of all the β-hairpins, and to account for this the Building Blocks are a little more complicated than you might think (see this blog post for details). For this particular β-hairpin, the distortion is so extensive that a BRRB Building Block was impractical.

Offline
Joined: 11/15/2012
Groups: Foldit Staff

Thanks for the feedback, jeff101—these are great suggestions! I agree that there should be better distinctions in Foldit about player-defined and auto-defined secondary structure, and I definitely think there's room to improve the information content of the Blueprint panel and Ideal Loop Filter visualization.

Offline
Joined: 04/20/2012
Groups: Go Science
``````The above Feedback still
seems relevant and gives
examples where individual
non-ideal loops ranged in
length from 1 to 22 residues.
I think the change requested
below would help in puzzles
with the Ideal Loops Filter.

In Puzzle 1824, one of the
Objectives/Bonuses/Filters
was for Ideal Loops and gave
+500 for 0 non-ideal loops,
+400 for 1 non-ideal loop,
+300 for 2 non-ideal loops, &
+200 for 3 non-ideal loops.

On Puzzle 1824, when I enabled
the Objectives and clicked on
the Show box for Ideal Loops,
Foldit showed little red dots
next to residues in non-ideal
loops. Below are some of the
groups of residues that Puzzle
1824 treated as single non-ideal
loops at different times when
I played this puzzle: 106-109,
106-110, 106-119, 112-113, 112-125,
116-125, 117-125, 118-119, 123-125,
and 124-125. These non-ideal loops
were all 2 to 14 residues in length.

At least once, I tried to fix these
non-ideal loops by remixing sections
of them. I think it was possible to
replace a long non-ideal loop (like
112-125 with 14 residues in 1 loop,
giving a bonus of +400) with 2 or
more shorter non-ideal loops (like
112-113 118-119 & 124-125, giving a
total of 6 residues in 3 loops and
a bonus of +200). You'd think that
6 residues in 3 non-ideal loops
should score better than 14 residues
in 1 non-ideal loop, but this was
not the case in Puzzle 1824.

Furthermore, since remix seems to
work best on sections of the protein
only about 3-6 residues long, the
best remix can do is to incrementally
fix a loop that is 14 residues long.
If a recipe were trying to incrementally
remix such a long non-ideal loop so that
eventually no non-ideal loops remained,
it would help to have an Ideal Loops
Bonus counting the number of residues
in non-ideal loops rather than the
number of non-ideal loops.

For the above reasons, I ask that in
future puzzles, you make the Ideal Loops
Bonus depend on the number of residues
in non-ideal loops rather than the number
of non-ideal loops.

Thanks!``````
Offline
Joined: 04/20/2012
Groups: Go Science

Having the Ideal Loops Bonus depend
on the number of residues in non-ideal
loops would let a solution with a
1-residue non-ideal loop score better
than one with a 22-residue non-ideal
loop. Recipes could then tell that
gradually reducing the number of
residues in non-ideal loops is the
right way to go to eventually
eliminate all non-ideal loops.

Offline
Joined: 10/02/2011

I had suggested on the discord that the text associated with this filter be changed. Much of the time, what foldit currently calls a non-ideal loop is really a failed helix or failed sheet. How does a helix fail? One or more residues in it fails to have the expected helix bonds. Ideal loop filter currently calls such non-bonding helix residues "non-ideal loops." Instead, if the player or the auto-structure tool (which also should be reworded, but that's another story) has marked a segment as helix, and it doesn't have the expected helix backbone bonds, foldit should flag it as a bad helix and offer a suggested solution, such as "curl the helix so it makes backbone bonds."

How does a sheet fail and get flagged as a non-ideal loop? It lacks one or more expected sheet-to-sheet backbone bonds. If the player or the autostruct tool has marked a segment as sheet, the filter should say "found one sheet missing some sheet-to-sheet bonds" or something informative, instead of calling it a bad loop. How do you fix a 22-residue non-ideal loop? You're going to have to make most of it into either helix (with good helix bonds) or sheet (with good sheet-to-sheet bonds). There is no way to fix it by keeping it as a loop. So the filter should say something to that effect - "Loop too long! Try making part of it into helix or sheet!" Then when the player changes the SS but fails to make the requisite bonds, the message should change to "Found one helix lacking backbone bonds! Try curling it up!" or "Found one sheet lacking sheet-to-sheet bonds! Try bringing sheets together!"

Another thing that sometimes gets flagged as a bad loop is a loop that has a perfectly good sequence of abego shapes (that is, it matches one of the loops in the blueprint tool), but it *also* happens to have a backbone bond to a helix or a sheet - then foldit counts is as a failed helix or failed sheet (but continues to call it a loop just to confuse things). This is especially annoying when the loop is providing helix capping, which is actually a good thing and a normal function of some of the blueprint loops, but which fold interprets as the loop segment actually being part of the helix and having a bad shape for a piece of a helix.

TL;DR: the label "non-ideal loop" gets applied to many types of problems and doesn't help players recognize or solve those problems.

Offline
Joined: 04/20/2012
Groups: Go Science
``````Below are some ideas for LUA commands
that would help Foldit recipes cope with
different Foldit Objectives/Bonuses/Filters:

structure.GetABEGO(resnum) gives the ABEGO color
as 'r' 'g' 'b' or 'y' for residue number resnum.

structure.GetSecondaryStructure(resnum,flag)
gives the secondary structure as 'H' 'E' or 'L'
for residue number resnum based on flag.
flag = 'auto' gives what auto secondary structure would give.
flag = 'reset' gives what reset secondary structure would give.
flag = 'now' gives what the present secondary structure is set to.
If flag is not given as input, flag = 'now' is used by default.

structure.LoopType(resnum)
gives for residue number resnum
a 0 if resnum is not part of a loop
(like if it is part of a helix or sheet),
a 1 if resnum is part of a non-ideal loop,
and a 2 if resnum is part of an ideal loop.

structure.IsValid(resnum)
gives for residue number resnum
the value true if resnum is a valid residue and
the value false if resnum is not a valid residue.

structure.MutateSidechainsAll(iters,aalist)
mutates all residues into any amino acid in aalist.
If aalist is not given as input,
mutations to any amino acid are allowed.
iters is the number of iterations to do.

structure.MutateSidechainsSelected(iters,aalist)
mutates the selected residues
into any amino acid in aalist.
If aalist is not given as input,
mutations to any amino acid are allowed.
iters is the number of iterations to do.``````
Offline
Joined: 09/08/2017
Groups: Foldit Staff

Thanks Jeff, I'll look into these!