Class Residue
residue structure classes for rFold
external dependencies : deque (https://github.com/catwell/cw-lua/tree/master/deque)
Functions
residue.new (o) | Residue class object initialiser (not a class method) |
Fields
Residue.hedra | array of hedron objects indexed by hedron keys ([resPos res atom] x3) |
Residue.dihedra | array of dihedron objects indexed by dihedron keys ([resPos res atom] x4) |
Residue.backbone | array of { dihedron object, position 1..4 in dihedron specifying atom } for backbone atoms indexed by integer position of print order in PDB format file; set by linkDihedra() |
Residue.sidechain | array of { dihedron object, position 1..4 in dihedron specifying atom } for sidechain atoms indexed by integer position of print order in PDB format file; set by linkDihedra() |
Residue.atomCoords | array of 4x1 float matrices indexed by atomKey strings (resPos res atom) |
Residue.ordered | boolean indicating residue is ordered |
Residue.res | residue character GAVLIMFPSTCNQYWDEHKRX |
Residue.resn | residue sequence position as in PDB or DSSP file |
Residue.dssp | DSSP data for this residue as read by parseProteinData(), or subset (ss, ss2, psi, phi, omg, acc) if loaded from database |
Methods
Residue:load (t) | callback from file parser, import table data for this Residue according to contents |
Residue:writeDb (rfpg, res_id, update) | write residue data to rfold database |
Residue:dbLoad (rfpg) | populate residue object from database using supplied database res_id |
Residue:tostring () | generate descriptive string for Residue: 1-letter amino acid code, sequence position |
Residue:countHedra () | count entries in self['hedra'] table |
Residue:countDihedra () | count entries in self['dihedra'] table |
Residue:clearAtomCoords () | delete protein space atom coordinate data from this residue |
Residue:clearInternalCoords () | delete internal coordinate data from this chain |
Residue:renderHedra () | set hedron space coordinates for each point from supplied length, angle, length |
Residue:renderDihedra () | set dihedron space coordinates for each point from hedra and supplied dihedral angle |
Residue:linkDihedra () | create map of key(first 3 atom ids) to dihedron for all dihedra in Residue; create backbone and sidechain tables of (dihedron, position) for atoms in PDB order |
Residue:dihedraFromAtoms () | complete residue, dihedra, hedra data structures from protein space atom coordinates |
Residue:writePDB (chain, ndx) | generate ATOM records for this Residue
Note: OXT defined in Dihedra like other atoms, if present |
Residue:dsspAtom (atomKey) | create a 4x1 matrix with coordinates for specified atom token as read from DSSP |
Residue:NCaCKeySplit () | generate a table of atom tokens for this Residue's N, CA, C backbone atoms |
Residue:assemble (atomCoordsIn) | join dihedrons from N-CA-C and N-CA-CB hedrons, computing protein space coordinates for backbone and sidechain atoms |
Functions
Methods- residue.new (o)
-
Residue class object initialiser (not a class method)
Parameters:
- o table with fields 'res' = 1-letter amino acid code, 'resn' = sequence position of Residue in Chain
Returns:
-
minimally initialised Residue object
Fields
- Residue.hedra
-
array of hedron objects indexed by hedron keys ([resPos res atom] x3)
- hedra array of hedron objects
- Residue.dihedra
-
array of dihedron objects indexed by dihedron keys ([resPos res atom] x4)
- dihedra array of dihedron objects
- Residue.backbone
-
array of { dihedron object, position 1..4 in dihedron specifying atom } for backbone atoms indexed by integer position of print order in PDB format file; set by linkDihedra()
- backbone {dihedron, i}
- Residue.sidechain
-
array of { dihedron object, position 1..4 in dihedron specifying atom } for sidechain atoms indexed by integer position of print order in PDB format file; set by linkDihedra()
- sidechain {dihedron, i}
- Residue.atomCoords
-
array of 4x1 float matrices indexed by atomKey strings (resPos res atom)
- atomCoords float[4][1]
- Residue.ordered
-
boolean indicating residue is ordered
- ordered boolean
- Residue.res
-
residue character GAVLIMFPSTCNQYWDEHKRX
- res char
- Residue.resn
-
residue sequence position as in PDB or DSSP file
- resn integer
- Residue.dssp
-
DSSP data for this residue as read by parseProteinData(), or subset (ss, ss2, psi, phi, omg, acc) if loaded from database
- dssp array
Methods
- Residue:load (t)
-
callback from file parser, import table data for this Residue according to contents
Parameters:
- t parsed file record data: DSSP record, PDB ATOM record, or hedron / dihedron specification
- Residue:writeDb (rfpg, res_id, update)
-
write residue data to rfold database
Parameters:
- rfpg open database handle
- res_id residue ID in residue table
- update optional flag, if false silently skip if [resid [atom] ] entry exists already in atomcoordinates / dssp / dihedral / angle / bond tables
- Residue:dbLoad (rfpg)
-
populate residue object from database using supplied database res_id
Parameters:
- rfpg open database handle
- Residue:tostring ()
-
generate descriptive string for Residue: 1-letter amino acid code, sequence position
Returns:
-
descriptive string
- Residue:countHedra ()
-
count entries in self['hedra'] table
Returns:
-
number of hedra in Residue
- Residue:countDihedra ()
-
count entries in self['dihedra'] table
Returns:
-
number of dihedra in Residue
- Residue:clearAtomCoords ()
- delete protein space atom coordinate data from this residue
- Residue:clearInternalCoords ()
- delete internal coordinate data from this chain
- Residue:renderHedra ()
- set hedron space coordinates for each point from supplied length, angle, length
- Residue:renderDihedra ()
- set dihedron space coordinates for each point from hedra and supplied dihedral angle
- Residue:linkDihedra ()
-
create map of key(first 3 atom ids) to dihedron for all dihedra in Residue; create backbone and sidechain tables of (dihedron, position) for atoms in PDB order
See also:
- Residue:dihedraFromAtoms ()
- complete residue, dihedra, hedra data structures from protein space atom coordinates
- Residue:writePDB (chain, ndx)
-
generate ATOM records for this Residue
Note: OXT defined in Dihedra like other atoms, if presentParameters:
- chain chain ID
- ndx ATOM record sequence counter
Returns:
-
string containing sequential ATOM records, ndx
- Residue:dsspAtom (atomKey)
-
create a 4x1 matrix with coordinates for specified atom token as read from DSSP
Parameters:
- atomKey atom token of form (sequence postion)(residue)(atom string)
Returns:
-
4x1 matrix with protein space coordinates for atom
See also:
- Residue:NCaCKeySplit ()
-
generate a table of atom tokens for this Residue's N, CA, C backbone atoms
Returns:
-
table of atom tokens { (sequence postion)(residue)(atom string) } for N, CA, C backbone atoms
See also:
- Residue:assemble (atomCoordsIn)
-
join dihedrons from N-CA-C and N-CA-CB hedrons, computing protein space coordinates for backbone and sidechain atoms
Parameters:
- atomCoordsIn table of atom_token : 4x1 matrix of protein space coordinates