MTAtom

Objects of class MTAtom represent ATOM and HETATM lines in PDB files.

NEW: every atom can have a partial charge and is of a defined chemical type (element). This information is parsed from and written to PDB files.

Class MTAtom inherits from class MTCoordinates (3.9) and implements the additional methods:

* read-only access
-(NSString*)name returns name of atom
-(NSNumber*)number returns serial number of atom
-(double)temperature returns temperature factor of atom
-(int)element returns index number of chemical element of this atom:

ELEMENT_ID_H = 1  
ELEMENT_ID_C = 6  
ELEMENT_ID_N = 7  
ELEMENT_ID_O = 8  
... 
ELEMENT_ID_Unknown = -1

Just to name a few.

-(NSString*)elementName returns string of element name
-(int)charge returns partial charge on atom (normally 0)
* bonding
-(NSEnumerator*)allBondedAtoms returns an enumerator (9.6) over all bonded atoms
-(void)bondTo: (MTAtom*)atm2 add a bond from this atom to the given atm2
-(void)dropAllBonds remove all bonds
-(void)dropBondTo:(MTAtom*)atm2 remove the bond to atm2
*setters
-(id)setNumber: (int)serial update atom serial number
-(id)setCharge: (int)chrg update partial charge on atom
-(id)setElement: (int)elid set atom to be of chemical type: elid
-(id)setElementWithName: (char*)elname derive chemical type from atom name
   
+(MTAtom*)atomWithNumber: (unsigned int)num name: (char*)nm X:(double)x Y:(double)y Z:(double)z B:(double)b creation of a new atom with the given information

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