LUA function structure.GetAtom to return atom types

Case number:845813-997504
Topic:Game: Tools
Opened by:jeff101
Opened on:Wednesday, April 16, 2014 - 00:49
Last modified:Saturday, October 28, 2017 - 17:25

Would it be possible to have a LUA command like structure.GetAminoAcid(resnum) but called structure.GetAtom(resnum,atomnum) that returns the type of atom on segment resnum with the atom number atomnum? It could return strings like 'C', 'N', 'O', 'S', or 'H' for the atom types.

(Wed, 04/16/2014 - 00:49  |  7 comments)

Joined: 08/24/2011
brow42's picture
User offline. Last seen 17 hours 31 min ago. Offline
Joined: 09/19/2011
Groups: None

This can be easily done in LUA for residues (but not ligands). See . I'll consider adding the information.

Basically atoms 1-4 are well defined. Atom 5 is an optional oxygen on the last residue (which shifts all the atom numbers by one). This is followed by all the sidechain atoms, almost all of which are carbon. Everything after the last heavy atom is a hydrogen. So, basically, all I need to do is identify which sidechain atoms are O,N or S. Note atom type doesn't determine whether it is an acceptor or donor.

Hopefully these atom assignments won't ever change in a future version of rosetta.

However, some built-in atom support would help with ligands. See , where I manually identified which atoms were acceptors and donors on the ligand. I had to write and then update this recipe for each release of a ligand puzzle.

brow42's picture
User offline. Last seen 17 hours 31 min ago. Offline
Joined: 09/19/2011
Groups: None

I have updated AtomTables to return element and donor/acceptor/polar/non-polar in a single function call. It takes up a lot of space in the script editor, but it does the job.

Proline is...weird.

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

Thanks, Brow

LociOiling's picture
User offline. Last seen 2 hours 12 min ago. Offline
Joined: 12/27/2012
Groups: Beta Folders

I'll bump this one, since we're seeing more complex ligands like the ones in puzzles 1440 and 1443. A recipe can't determine anything about which atom is which in a ligand, as jeff101 noted.

Timo is looking for new function ideas:

In addition to a GetAtom call, there should be something that returns the hydrogen bond donor/acceptor status:

local donor, acceptor = structure.GetBondableStatus ( resnum, atomnum )

returning two booleans or maybe two numbers. A similar structure.GetBondedCount would be next, and structure.GetBondedAtoms, returning a list of segment and atom number pairs, would round out the set.

There's even a Rosetta atom type, so a carbon might give you CH3 or aroC and an oxygen might give you OH or OOC. Hydrogens are Hpol (polar, I guess) or Hapo (non-polar?).

Of course, at least for a ligand, it might also be helpful to know which atoms are bonded to each other (within the molecule). For ligands, all the info is in plaintext in 000nnnnnnn.ir_puzzle.params, although you have decipher Rosetaa codes. This is where you see CH3, OH, Hapo, Hpol, and aroC. An interface that exposed at least the ATOM and BOND_TYPE records might be handy.

Susume's picture
User offline. Last seen 2 hours 22 min ago. Offline
Joined: 10/02/2011

One thing I often wonder about a bondable atom is whether it is "satisfied" - if it has the potential to make three H bonds, does that mean it has to make all three in order to be happy/stable in a buried environment? Or is making one enough? A function that returns the current satisfaction status of a bondable atom (whether boolean or a percent or however scientists quantify it) would help with this. Really it should be part of the GUI - buried atoms that are unsatisfied enough to destabilize the solution should light up when you turn on some view option - but LUA exposure would be good too.

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

There's also a pdb file atom type,
so a carbon in valine might give you CA, CB, CG1, CG2, or C,
an oxygen in glutamate might give you OE1, OE2, or O,
a nitrogen in arginine might give you N, NE, NH1, or NH2,
and a hydrogen in arginine might give you H, HE, HH11, HH12, HH21, or HH22.


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