MTChain

Class MTChain holds three lists of residues (3.6): amino and nucleic acid residues (corresponding to ATOM entries in PDB files), heterogeneous groups (corresponding to HETATM entries in PDB files) and solvent residues (named HETATM residues with SOL, DIS, HOH).

The PDB file format indicates, that modified residues as stated in MODRES entries, have to be within the sequence of ATOM entries but marked as HETATM. We do respect this format decision on loading and writing PDB formatted files but treat this modified residues as normal residues in the chain's list of residues and mark them as being modified, which can be queried by the method isModified on the residue (3.6). Thus querying a chain's list of residues (not heterogens) returns also the modified residues.

Methods:

* naming
-(char)code returns code of this chain
-(NSNumber*)numberCode returns the chain's code as a number
-(NSString*)name returns the code of this chain as a string
-(NSString*)description returns a textual description of this chain
-(NSString*)fullPDBCode concatenation of the structure's code and the chain's code
* query and manipulation
-(NSString*)compound corresponding to COMPND lines in PDB files
-(NSString*)eccode corresponding to COMPND lines in PDB files with EC: entry
-(NSString*)source corresponding to SOURCE lines in PDB files
-(MTStructure*)structure reference to parent structure (3.2)
-(id)transformBy: (MTMatrix53*)m transforms all residues/atoms in this chain by the given matrix (4.4)
-(id)rotateBy: (MTMatrix44*)m rotates all residues/atoms in this chain by the given matrix (4.3)
-(id)translateBy: (MTCoordinates*)v translates all residues/atoms in this chain by the given vector (3.9)
* enumerator over residues, heterogens, solvent, respectively
-(NSEnumerator*)allResidues returns an enumerator (9.6) over all residues
-(NSEnumerator*)allHeterogens returns an enumerator over all heterogeneous residues
-(NSEnumerator*)allSolvent returns an enumerator over all solvent residue
* count of residues, heterogens, solvent, respectively
-(int)countResidues returns the number of residues (amino acids and nucleic acids)
-(int)countHeterogens returns the number of heterogeneous residues
-(int)countSolvent returns the number of solvent residues
-(int)countStandardAminoAcids returns the number of standard (20 types) amino acids
* access a residue, heterogen, solvent, respectively, for the given identifying number
-(MTResidue*)getResidue: (NSString*)nr search residue (3.6) for its id
-(MTResidue*)getHeterogen: (NSString*)nr search heterogeneous residue (3.6) for its id
-(MTResidue*)getSolvent: (NSString*)nr search solvent residue (3.6) for its id
* add a residue, heterogen, solvent, respectively, to this chain
-(id)addResidue: (MTResidue*)res adds a new residue (3.6) to this chain
-(id)addHeterogen: (MTResidue*)het adds a new heterogen ( 3.6) to this chain
-(id)addSolvent: (MTResidue*)sol adds a new solvent (3.6) to this chain
-(void)removeResidue: (MTResidue*)p_res removes a residue
-(NSString*)get3DSequence derives amino acid sequence from connected residues. Non-standard amino acids have single letter code 'X'
-(NSString*)getSequence derives amino acid sequence as above, but take into account chain breaks and fill missing residues with 'X'
-(NSString*)getSEQRES returns the sequence of amino acids as parsed from SEQRES lines.
-(void)prepareResidueHash: (float)gridsize computes geometric hash of all residues. Recompute the geometric hash whenever the coordinates change (e.g. by the method -(void)transformBy:). The parameter gridsize is used to compute the number of bits, which encode the co-ordinates. Residues with close co-ordinates are stored in the same bin and can be found with -findResiduesCloseTo:.
-(NSArray*)findResiduesCloseTo: (MTCoordinates*)p_coords returns a list of residues in this chain, which are close to the given Coordinates (3.9). The method -prepareResidueHash must be called first.

moltalk@moltalk.org      version of this document: V3.0