Class Protein

protein structure class for rFold

Functions

protein.new (o) Protein class object initialiser (not a class method)
protein.get (id) find the Protein with this id or new Protein if it does not exist (not a class method)
protein.stashId (id) generate a new key for the data stored in protein.proteins for the passed id key.
protein.rename (old, new) change the key for an entry in the protein.proteins table
protein.drop (id) remove an entry from the protein.proteins table so garbage collector can free memory
protein.clean () remove all entries from the protein.proteins table so garbage collector can free memory
protein.load (t) add the passed table data to the protein specified (pdbid) in the table (not a class method - may create new Protein)
protein.copyDSSP (src, dst) copy DSSP data from src protein object to dst protein object (not a class method) will fall over if protein objects do not otherwise match

Fields

Protein.id 4 position PDB identifier for this protein
Protein.chains array of chain objects indexed by chain ID
Protein.chainOrder array of chain IDs indexed by integer order of chains in PDB file
Protein.header pdb HEADER record if supplied
Protein.title pdb TITLE record if supplied
Protein.title pdb TITLE record if supplied
Protein.compnd pdb COMPND record if supplied
Protein.filename location of file this protein data was read from

Methods

Protein:internalToAtomCoords () compute atomCoords for already loaded internal coordinates; wrapper grouping several Protein: class methods
Protein:stats () return table of component counts for chains in protein similar to tostring()
Protein:countDihedra () sum dihedron counts for chains
Protein:countDSSPs () sum dssp counts for chains
Protein:tosequence () generate sequence strings for chains in this protein
Protein:tostring () generate descriptive string for Protein : id, sequence, counts of residues, DSSP entries, hedra and dihedra
Protein:writePDB (noRemark, range) generate PDB format text data, adding HEADER, CAVEAT and END records to Chain:writePDB() result note Residue structures need dihedron data structures to write complete chain
Protein:writeInternalCoords (noTitle, range) generate text data specifying hedra with length, angle, length ; dihedra with angle ; relevant PDB records for annotation and start coordinates
Protein:writeDb (rfpg, update, src) write protein data to rfold database
Protein:reportDb (rfpg) query database for info about this protein
Protein:dbLoad (rfpg) populate protein object from database using supplied pdb id
Protein:linkResidues () trigger linking of residues, dihedrons and hedrons within chains
Protein:renderDihedra () trigger update of initial atom coordinates (dihedron coordinate space) in each dihedron according to dihedron angle
Protein:clearAtomCoords () delete protein space atom coordinate data throughout protein object
Protein:clearInternalCoords () delete internal coordinate data throughout protein object
Protein:atomsToInternalCoords () inverse of linkResidues() and renderDihedra() : from input atom coordinates, build complete hedra and dihedra
Protein:assembleResidues () trigger calculation/update of residue['backbone'] and residue['sidechain'] atom coordinates (protein coordinate space) by sequentially assembling dihedrons
Protein:setStartCoords () set N, CA, C coordinates (protein coordinate space) for first residue in each chain from DSSP data for residue if available
Protein:report () generate string indicating chain IDs and residues in each


Functions

Methods
protein.new (o)
Protein class object initialiser (not a class method)

Parameters:

  • o table with field 'id' = Brookhaven / RCSB PDB alphanumeric ID or similar

Returns:

    minimally initialised Protein object, object added to proteins list
protein.get (id)
find the Protein with this id or new Protein if it does not exist (not a class method)

Parameters:

  • id Brookhaven / RCSB PDB alphanumeric ID or similar

Returns:

    already existing or minimally initialised protein object
protein.stashId (id)
generate a new key for the data stored in protein.proteins for the passed id key.
new key of form - where n is number uch that - is available
enables re-loading file for line-by-line compare to generated daa for test (probably need prot:setStartCoords())

Parameters:

  • id Brookhaven / RCSB PDB alphanumeric ID or similar

Returns:

    new key or nil if no entry exists for passed id
protein.rename (old, new)
change the key for an entry in the protein.proteins table

Parameters:

  • old old key
  • new new key
protein.drop (id)
remove an entry from the protein.proteins table so garbage collector can free memory

Parameters:

  • id key to drop from table
protein.clean ()
remove all entries from the protein.proteins table so garbage collector can free memory
protein.load (t)
add the passed table data to the protein specified (pdbid) in the table (not a class method - may create new Protein)

Parameters:

  • t table with field 'pdbid' and preferably chain identifier field 'chn', passed here as callback from file parser
protein.copyDSSP (src, dst)
copy DSSP data from src protein object to dst protein object (not a class method) will fall over if protein objects do not otherwise match

Parameters:

  • src Protein object with DSSP data
  • dst Protein object to get DSSP data

Fields

Protein.id
4 position PDB identifier for this protein
  • id string
Protein.chains
array of chain objects indexed by chain ID
  • chains array of chain objects
Protein.chainOrder
array of chain IDs indexed by integer order of chains in PDB file
  • chainOrder array of char chain IDs
Protein.header
pdb HEADER record if supplied
  • header string
Protein.title
pdb TITLE record if supplied
  • title string
Protein.title
pdb TITLE record if supplied
  • title string
Protein.compnd
pdb COMPND record if supplied
  • compnd string
Protein.filename
location of file this protein data was read from
  • filename string

Methods

Protein:internalToAtomCoords ()
compute atomCoords for already loaded internal coordinates; wrapper grouping several Protein: class methods
Protein:stats ()
return table of component counts for chains in protein similar to tostring()

Returns:

    table of [chain id][residue count, dssp count, dihedron count, hedron count]
Protein:countDihedra ()
sum dihedron counts for chains

Returns:

    total number of dihedra loaded for protein
Protein:countDSSPs ()
sum dssp counts for chains

Returns:

    total number of dssp entries loaded for protein
Protein:tosequence ()
generate sequence strings for chains in this protein

Returns:

    chain sequence strings, 1n separated
Protein:tostring ()
generate descriptive string for Protein : id, sequence, counts of residues, DSSP entries, hedra and dihedra

Returns:

    descriptive string
Protein:writePDB (noRemark, range)
generate PDB format text data, adding HEADER, CAVEAT and END records to Chain:writePDB() result note Residue structures need dihedron data structures to write complete chain

Parameters:

  • noRemark boolean do not write REMARK records indicating this is RFOLD output
  • range start:fin filter for residues to output

Returns:

    string containing PDB format text (complete)
Protein:writeInternalCoords (noTitle, range)
generate text data specifying hedra with length, angle, length ; dihedra with angle ; relevant PDB records for annotation and start coordinates

Parameters:

  • noTitle do not write TITLE line if true; DSSP does not output so compare fails
  • range start:fin filter for residues to output

Returns:

    string containing structure specification in internal coordinates (complete)
Protein:writeDb (rfpg, update, src)
write protein data to rfold database

Parameters:

  • rfpg open database handle
  • update optional flag, if false (default at protein level only) silently skip if [pdbid,chain,filename] entry exists already in pdb_chain
  • src string to put in pdb_chain:src column
Protein:reportDb (rfpg)
query database for info about this protein

Parameters:

  • rfpg open database handle

Returns:

    report string for printing
Protein:dbLoad (rfpg)
populate protein object from database using supplied pdb id

Parameters:

  • rfpg open database handle
Protein:linkResidues ()
trigger linking of residues, dihedrons and hedrons within chains
Protein:renderDihedra ()
trigger update of initial atom coordinates (dihedron coordinate space) in each dihedron according to dihedron angle
Protein:clearAtomCoords ()
delete protein space atom coordinate data throughout protein object
Protein:clearInternalCoords ()
delete internal coordinate data throughout protein object
Protein:atomsToInternalCoords ()
inverse of linkResidues() and renderDihedra() : from input atom coordinates, build complete hedra and dihedra
Protein:assembleResidues ()
trigger calculation/update of residue['backbone'] and residue['sidechain'] atom coordinates (protein coordinate space) by sequentially assembling dihedrons
Protein:setStartCoords ()
set N, CA, C coordinates (protein coordinate space) for first residue in each chain from DSSP data for residue if available
Protein:report ()
generate string indicating chain IDs and residues in each

Returns:

    string
generated by LDoc 1.4.3 Last updated 2017-04-06 12:45:34