add atoms to structure.GetDistance command

Case number:954892-991316
Topic:Developer Preview
Opened by:pauldunn
Status:Open
Type:Suggestion
Opened on:Saturday, December 17, 2011 - 00:08
Last modified:Thursday, May 31, 2012 - 01:37

Could you please add optional atom numbers to the structure.GetDistance() command to get the distance between atoms of different segments?

(Sat, 12/17/2011 - 00:08  |  6 comments)


jeff101's picture
User offline. Last seen 3 hours 55 min ago. Offline
Joined: 04/20/2012
Groups: Go Science

I like Paul's idea.

I would further ask that you make band.AddBetweenSegments() and structure.GetDistance()
be more symmetrical than they are right now:

band.AddBetweenSegments(res1,res2,atom1,atom2)
adds a band between atom1 on amino acid res1 and atom2 on amino acid res2,
but right now it doesn't seem to work when |res1-res2| is less than 2.

Meanwhile, structure.GetDistance(res1,res2)
gets the distance between alpha-carbons on amino acids res1 and res2
and works fine when |res1-res2| is less than 2,
but it doesn't allow inputs for atom1 and atom2 like band.AddBetweenSegments does right now.

jeff101's picture
User offline. Last seen 3 hours 55 min ago. Offline
Joined: 04/20/2012
Groups: Go Science

In the meantime, one workaround is the following:

bnum=band.AddBetweenSegments(res1,res2,atom1,atom2)
dist=band.GetLength(bnum)
band.Delete(bnum)

This will give the distance dist between atom1 on residue res1 and atom2 on residue res2.
As far as I know, right now it only works when |res1-res2|>=2.

brow42's picture
User offline. Last seen 2 weeks 20 hours ago. Offline
Joined: 09/19/2011
Groups: None

To get the distance in the same segment or adjacent segment, I make a band to one of the atoms from far enough away, and then use AddToBandEndpoint from other atom.

s = 42
band.AddBetweenSegments(s-3,s,0,11)
band.AddToBandEndpoint(s,1)
band.Delete(1)
print(band.GetLength(1))
band.Delete(1)

Apparently the distance to the end of a phenylanaline is 11.99 A.

Joined: 09/18/2009
Groups: SETI.Germany

"As far as I know, right now it only works when |res1-res2|>=2."

That's right, you can't band adjacent segments.

Sometimes, I thought, a ruler tool would be nice.
It should behave similar to a band (can be connected between segments (and/or their sidechain-atoms) or segment to air, and give out the distance.
What I am still missing (when changing band length via GUI) is a button "set length to distance".

Joined: 09/18/2009
Groups: SETI.Germany

The key is, before Lua V2, we could connect only segments by bands, not sidechain-atoms.
And in this case, connection between adjacent didn't make sense.
Take an arm as example:
upper arm is one segment, forearm the other.
connections (joints, where bands could be applied) are: shoulder, elbow and wrist (between those two segments).
You can change distance between shoulder and wrist, but not between shoulder and elbow, and not between elbow and wrist, as both arm-parts have fixed distances.
If you would do this, you would crush the bones.
What would work is connecting a segment with one of the sidechain-atom of it's adjacent segment or sidechain to sidechain.

brow42's picture
User offline. Last seen 2 weeks 20 hours ago. Offline
Joined: 09/19/2011
Groups: None

xposted from the quicksave parts of solutions thread

It's my understanding (via Tlaloc) that reading and setting the angles or positions directly would make it too easy for someone to import an external server solution or evolver solution, which would ruin the competition for the players and ruin foldit project's studies on humans folding and crowdsourcing. Technically Crashguard's mass banding approach can do this with a computer-generated script, but probably not super effective.

(I tried it once when I was about to do a small change the required a huge change to get there...the rest of the protein was supposed to back the way it was afterward, but it didn't. This was before banding to space, just segment bands. I also tried to force bad disulfide bridges to clone a known good bridge, and that didn't work *at all*).

The more coordinate-producing features we request, or the more we work around built-in limitations, the closer we come to not having lua band functions. I think at this point the game science, bioscience, and development teams should speak up about what they want and don't want us to do with our scripts. It should definately be raised at the next Skype meeting.

Sitemap

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, RosettaCommons