Back to Recipes Homepage
recipe picture
Recipe: Atom Tables 1.0
Created by brow42 102 2482
Your rating: None Average: 2.5 (2 votes)


Name: Atom Tables 1.0
ID: 40004
Created on: Sat, 03/24/2012 - 06:30
Updated on: Tue, 05/15/2012 - 05:50

Collection of functions to identify donors, acceptors, and polar hydrogens by atom number. Lua 2

Best For


brow42's picture
User offline. Last seen 24 weeks 1 day ago. Offline
Joined: 09/19/2011
Groups: None
For band.Add and Looking for possible H Bonds

This is not a script, but a table and functions that query the table. It will tell you which atoms are H-bond acceptor or donors. Since bonding can change the atom ID numbers, the functions will adjust the ids according to flags you pass in, or auto-detected by counting all the atoms in a segment. Using these functions, you can determine if a segment is a potential bonding partner, and make bands directly between acceptors and donors. Looking at the polar hydrogens can indicate the higher scoring bond directions.

Atoms are counted by creating bands until an error occurs. This is a fairly slow process. For most puzzles, it's okay to assume the first and last segments are the end points. However, this library makes no assumptions. It can determine if a puzzle as multiple segments by counting all the atoms, but this is time consuming.

API (all in the fsl.atom namespace):

Many functions accept optional 2 or 3 boolean arguments, which indicate if the segment is the first and/or last segment in a polypeptide. The third boolean argument is true if the segment is disulfide bonded. These arguments can be replaced by a (SLOW) call to IsTerminal(). Functions will NOT automatically check for being terminal segments. Most functions accept either a segment number or AA code as the first argument.

CountAtoms() is the only useful function for ligands ('M' structure). Other functions will return nil if passed a ligand segment.

* CountAtoms(number iSeg) -- SLOW manual count all the atoms in the segment.
* GetCount(number or string iSeg, isFirst, isLast, isDisulfideBonded) -- total atoms in segment or AA
* IsTerminal(number iSeg) -- returns bool,bool if start or end of a polypeptide, calls CountAtoms() SLOW
* GetBackboneHeavyAtoms(number or string iSeg, isFirst, isLast) -- range of atoms on the backbone
* GetSidechainHeavyAtoms(number or string iSeg, isFirst, isLast) -- range of atoms on the sidechain (nil for glycine)
* GetDonorAtoms(number or string iSeg, isFirst, isLast) -- list of donor atoms
* GetAcceptorAtoms(number or string iSeg, isFirst, isLast) -- list of acceptor atoms
* GetPolarHydrogens(number or string iSeg, isFirst, isLast) -- list of polar hydrogen atoms
* _IsDisulfideBonded(number iSeg) -- true if bonded to another cysteine
* _IsTerminalTest(string aa,count,disulfide) -- If already called CountAtoms(), don't call IsTerminal(), call this instead.
* _NumberOrCode(number or string iSeg) -- performs a table look up given segment number or AA code.
* Test1() -- Count all atoms, compare with table, perform terminal segment check, for all segments
* Test2(mode) -- Band all atoms of a particular class. mode = sc, bb, donor, polar, acceptor
* db -- Reference table of atom numbers for each class. Should not be accessed directly since bonding changes atom counts.

brow42's picture
User offline. Last seen 24 weeks 1 day ago. Offline
Joined: 09/19/2011
Groups: None
Superseded by 1.1

You should use Atom Tables 1.1 instead of this one. The new one uses the built in GetAtomCount function, which I stupidly forgot existed. This allows the library to automatically determine if an AA is a terminal residue or not, so you don't have to.

Also, this version got unshared and is lost forever.

Want to try?
Add to Cookbook!
To download recipes to your cookbook, you need to have the game client running.





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