MTResidue

Class MTResidue represents a group of atoms (3.8) forming a nucleic acid residue, an amino acid residue or a heterogeneous group (including solvent).

Methods:

* read-only access
-(MTChain*)chain access the parent chain (3.4) of which we are part
-(NSString*)description returns a textual description of this residue
-(NSString*)name returns the name
-(NSString*)modname returns the name of the standard amino acid as the base of this modified residue. This is only used in case the residue is modified as indicated by MODRES entries in the PDB file.
-(NSString*)moddescription returns the description of the modification as indicated by a MODRES entry in the PDB file
-(NSString*)oneLetterCode Translate the name of this residue to the one letter amino acid code. If it is not known this returns @'X'.
-(NSNumber*)number returns the number
-(char)subcode This field is only used for distinguishing different residues of the same number. The PDB describes this as the insertion/deletion code.
-(NSString*)key returns a concatenation of number and subcode, as this uniquely identifies this residue.
-(int)sequenceNumber returns the residue's sequential number in the chains sequence. This number is set upon a call to Chain_getSequence or Chain_get3DSequence (3.4)
* tests
-(BOOL)isStandardAminoAcid true if this residue is one of the 20 standard amino acids
-(BOOL)isModified true if this residue is modified as indicated by a MODRES entry in the PDB file
-(BOOL)isNucleicAcid true if this residue is a nucleic acid
-(BOOL)haveAtomsPresent true if the connectivity of this residue's atoms is known to be correct
-(double)distanceCATo: (MTResidue*)r2 calculate and return the distance between the $C_{\alpha}$ atoms of the two residues. If the distance cannot be calculated due to missing atoms, the method returns -1.0.
* atoms
-(id)addAtom: (MTAtom*)atom include new atom in the atom set of this residue
-(NSEnumerator*)allAtoms return an enumerator over all atoms
-(MTAtom*)getAtomWithName: (NSString*)name return atom (3.8) with the given name
-(MTAtom*)getAtomWithInt: (unsigned int)number return atom with the given integer
-(MTAtom*)getAtomWithNumber: (NSNumber*)number return atom with the given number
-(MTAtom*)getCA special case of getAtomWithName:@'CA'
* manipulation
-(id)transformBy: (MTMatrix53*)m transform (4.4) all atoms of this residue
-(id)rotateBy: (MTMatrix44*)m rotates (4.3) all atoms of this residue
-(id)translateBy: (MTCoordinates*)v translates (3.9) all atoms of this residue

Objects of type MTResidue are created by MTResidueFactory (3.5).

res1 := currchain getResidue: '108' .     " find residue. "

res2 := currchain getResidue: '47' .     " find another residue. "

distance := res1 distanceCATo: res2.     " calculate CA distance "

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