please implement get_sidechain_snap(<segment>)

Started by Bletchley Park

Bletchley Park Lv 1

It would be very interesting for experimental usage to have the sidechain snap position as a return value from a function likely to be called get_sidechain_snap() as a companion to do_sidechain_snap(,). For the V2 scripts there is I believe rotamer.SetRotamer(), it may be called rotamer.GetRotamer() there.

I would imagine this to be a quick and easy implementation with interesting science benefit.

Bletchley Park Lv 1

Reopened.
This is explicitly NOT the function I am describing.

Please carefully read my description.
GetCount() returns how MANY positions can be made, I ask for the current sidechain snap position.

brow42 Lv 1

I've thought about this. Sidechains aren't in discrete positions (or if they are it's very fine grain). If a sidechain has 10 rotamers and you set it to #5, then wiggle sidechain, it's no longer in any of the 10 rotamer positions. So you are asking them to find the closest discrete rotamer position to the current position, which may scale horribly (depending on shake settings, there could be 1000s of rotamer positions). And even if you have this number, if you tried to use it to get back to the original configuration, it wouldn't quite match and your score would be lower.

Bletchley Park Lv 1

Sidechains ARE in discrete bins, as made available through the rotamer.GetCount() list. If rotamer.GetCount() returns a value of n there are n possible bins (from 1 to n) in which the sidechain can sit. If you use rotamer.SetRotamer() to set one of those bins as the current position, you can use rotamer.GetRotamer() to read which bin it is currently in. I did not speak of wiggling or changing the model. I read 'would be lower'. You do not know if it would be lower. Not wanting to sound mean, I'm just tired.

brow42 Lv 1

Sidechains CAN be binned. They are NOT ALWAYS in one of those bins. Okay, so, you can get the rotamer bin a sidechain is in after a shake. Maybe you have a use for that.

If the most recent thing done to a sidechain is not Shake, or SetRotamer, or maybe a pull, then it's not in one of those bins. What if I use SetRotamer, then I moved the (removed) sidechain slider to eliminate rotamers and the one I just set got eliminated? Then it's not in a rotamer bin. What is the function supposed to return when the sidechain is in an arbitrary position?

I'm not saying that your script is going to do wiggles or that you're going to change the shake accuracy. I'm saying that at any given moment, with few exceptions, a segment doesn't HAVE a rotamer id. At best, the devs can do a search to find the one that is closest by some measure. The only time it has a rotamer id is when it's just been set, either by shake or SetRotamer.

The discrete rotamers are NEVER at the local optimum. Wiggle sidechains always improves them (even if it's not noticable during the endgame). That's why I say the score will go down if you use SetRotamer.

I'm sure you have your own ideas as to what you want to use this for. To be perfectly clear, I am saying 1) this may be an expensive function to call, and 2) if the intent is to try different conformations and then maybe reject them and go back to where you started, it won't actually do that in most cases.

infjamc Lv 1

Part of the problem is that the number of side chain bins and the ID number of the nearest rotamer might change with the backbone configuration. A better solution might be the ability to set and retrieve chi angles (side chain dihedral angles).

brow42 Lv 1

Part of the problem is that the number of side chain bins and the ID number of the nearest rotamer might change with the backbone configuration. A better solution might be the ability to set and retrieve chi angles (side chain dihedral angles).

True as well. ComputerMage finally cornered jflat 2 days ago in global and asked him about that. He thought it unlikely that information would ever be provided to the players.