2 replies [Last post]
Joined: 01/13/2020
Groups: Go Science

When I right click on a segment and click "Idealize", it works as expected.

But when I execute this Lua code:


Nothing happens.

I used print(selection.GetCount()) to confirm that segment 5 was selected. I tried other segments as well, but to no avail.

No errors appear in the console.

I checked the documentation, but couldn't find any obvious issues.

Joined: 09/24/2012
Groups: Go Science
Try this:

It should be:


When you click on a segment, it takes the all related secundary structure (e.g. de all loop)

Joined: 12/27/2012
Groups: Beta Folders
some more detail...

We've also discussed this issue on Discord, here are some of the key points for the record.

It seems like structure.IdealizeSelected is the same as the "Idealize Peptide Bonds" tool, hotkey 2 in the selection interface. In the original interface, what seems to be the same tool appears as "Idealize" in the pie menu that appears when you hover over a segment and right-click (or control-click).

In the selection interface, the Idealize tool only appears when you select two or more adjacent segments, implying it won't work on just one segment. This makes sense, since the "peptide bonds" are bonds between segments.

Nevertheless, if you look at the Microidealize family of recipes (such as Microidealize 4.1.1), you'll see them doing idealize of length one. This approach often works, but involves cutpoints, shaking, and wiggling in addition to the idealize.

Cutting and wiggling is often useful, see TvdL Be careful with that axe Eugene or Cut And Wiggle Everything v1.3 for recipes that do something similar without the idealize.

As usual, we don't know exactly what structure.IdealizeSelected does. The one tool tip talks about peptide bonds, but it's not clear what else changes. The Rama Map might give clues about whether backbone angles are also affected. (Unfortunately, looking at the Rama Map is the only way to see these angles, nothing in the user interface or Lua gives you the numbers.) You can also compare and contrast all the various score parts before and after the idealize. (Hover over a segment and hit the tab key to see the score parts for a single segment, or use print protein to get everything in spreadsheet format.)

The manual idealize tool is an example of why I like the selection interface. In the original interface, you click on "Idealize" while hovering over a segment, but it's not clear how many segments get idealized. As Bruno states, it's likely the entire secondary structure, so all the adjacent helix, sheet, or loop segments.

In the selection interface, the segments selected are what gets idealized, so there's no mystery. The tool appears once you have at least two adjacent segments selected. If you then select a third non-adjacent segment, the tool disappears. The tool appears again if you select a fourth segment adjacent to the third. It's nice to have that level of control, although usually let a recipe handle the idealizing, and only idealize a single set of adjacent segments if I use the tool manually.


Developed by: UW Center for Game Science, UW Institute for Protein Design, Northeastern University, Vanderbilt University Meiler Lab, UC Davis
Supported by: DARPA, NSF, NIH, HHMI, Amazon, Microsoft, Adobe, Boehringer Ingelheim, RosettaCommons