Class Dihedron
dihedron structure class for rFold
a dihedron consists of two faces, or hedra
external dependencies : deque (https://github.com/catwell/cw-lua/tree/master/deque)
Dihedron.key |
4 atom tokens separated by ':' identifying this dihedron : 6FCA:6FCB:6FCG:6FCD2 |
Dihedron.key3 |
3 atom tokens separated by ':' identifying first hedron : 6FCA:6FCB:6FCG |
Dihedron.key32 |
3 atom tokens separated by ':' identifying second hedron : 6FCB:6FCG:6FCD2 |
Dihedron.dihedral1 |
dihedral angle for this dihedron |
Dihedron.updated |
flag indicting that atom coordinates are up to date (do not need to be recalculated from dihedral1) |
Methods
-
dihedron.new (o)
-
Dihedron class object initialiser (not a class method).
The input object 'o' is a table with expected fields:
[1..4] = atom tokens for 4 bonded atoms forming dihedral angle
'dihedral1' = dihedral angle formed by 4 atoms
Parameters:
- o
table as described above
Returns:
minimally initialised Dihedron object
-
Dihedron.res
-
Residue object which includes this dihedron; set by Residue:linkDihedra()
-
Dihedron.hedron1
-
first Hedron object; set by self:setHedra()
-
Dihedron.hedron2
-
second Hedron object; set by self:setHedra()
-
Dihedron.initialCoords
-
four 4x1 matrices holding atom coordinates comprising this dihedron
-
Dihedron.key
-
4 atom tokens separated by ':' identifying this dihedron : 6FCA:6FCB:6FCG:6FCD2
-
Dihedron.key3
-
3 atom tokens separated by ':' identifying first hedron : 6FCA:6FCB:6FCG
-
Dihedron.key32
-
3 atom tokens separated by ':' identifying second hedron : 6FCB:6FCG:6FCD2
-
Dihedron.dihedral1
-
dihedral angle for this dihedron
-
Dihedron.updated
-
flag indicting that atom coordinates are up to date (do not need to be recalculated from dihedral1)
-
Dihedron:tostring ()
-
generate descriptive string for Dihedron: 4- followed by 'key' for this Dihedron = 4 atom tokens separated by :'s
Returns:
descriptive string
-
Dihedron:setHedra ()
-
determine forward or reverse hedra keys based on 4 atom tokens for this dihedron, set object variables for hkey and hedra
Returns:
true if hedra keys are reverse ordered from dihedron atom tokens
-
Dihedron:initPos ()
-
generate dihedron space coordinates for 4 atoms with specified dihedral, first 3 on XZ plane (a1 in -Z), 4th in +Z and rotated
coordinates stored in 'initialCoords' field, 'updated' set to false
-
Dihedron:dihedronFromAtoms (atomCoords)
-
generate self[dihedral1] and self[initialCoords], populate hedra as needed from atomCoords
Parameters:
- atomCoords
table of atom token, atom matrix of position in protein coordinate space
-
Dihedron:clearInternalCoords ()
-
delete dihedral angle value for this dihedron, keep key
-
Dihedron:writeDb (rfpg, res_id, update)
-
write dihedron data to rfold database
Parameters:
- rfpg
open database handle
- res_id
residue ID in db residue table
- update
optional flag, if false silently skip if entry exists already in dihedral / angle / bond tables