Package schrodinger :: Module structure :: Class _Residue
[hide private]
[frames] | no frames]

Class _Residue

     object --+    
              |    
_AtomCollection --+
                  |
                 _Residue

A class which is returned by the ResidueIterator and contains information about the residue including the atoms which make it up.

Important methods include extractStructure and getAtomIndices. The atom attribute can be used to iterate over all atoms in the molecule, and the number of atoms can be determined via len(molecule.atom).

Instance Methods [hide private]
 
__init__(self, st, resnum, inscode, chain, atoms=[])
x.__init__(...) initializes x; see help(type(x)) for signature
 
__str__(self)
Return a string representation - chain:resnum[inscode].
 
_getPdbRes(self)
 
_setPdbRes(self, newvalue)
 
_getChain(self)
 
_setChain(self, newvalue)
 
_getResnum(self)
 
_setResnum(self, newvalue)
 
_getInscode(self)
 
_setInscode(self, newvalue)
 
_getMolNumber(self)
 
_getSecStruct(self)
 
getCode(self)
Return the one-letter residue code for this residue.
 
hasMissingAtoms(self)
Returns True is this residue doesn't have the expected number of heavy atoms.
 
isStandardResidue(self)
Returns True if this residue is on the list of standard PDB residues
 
isConnectedToResidue(self, other_res)
Returns True if the given residue is connected (C->N) to this residue.
 
applyStyle(self, atoms=3, bonds=3)
Applies the given display styles to the atoms and bonds of the residue.
_StructureAtom or None
getAtomByPdbName(self, pdbname)
Returns the atom of this residue that matches the given PDB name, or None if no such atom is found.
_StructureAtom or None
getBackboneNitrogen(self)
Returns the backbone nitrogen of the residue, or None.
_StructureAtom or None
getCarbonylCarbon(self)
Returns the carbonyl backbone carbon of the residue, or None.
_StructureAtom or None
getBackboneOxygen(self)
Returns the oxygen of the backbone, or None.
_StructureAtom or None
getAlphaCarbon(self)
Returns the backbone alpha carbon atom of this residue, or None.
_StructureAtom or None
getBetaCarbon(self, gly_hydrogen=False)
Returns the beta carbon atom of this residue, or None.
 
getDihedralAtoms(self, angle_name)
Return a list of 4 atom objects for the named dihedral angle in this residue.

Inherited from _AtomCollection: __len__, extractStructure, getAtomIndices, getAtomList

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __subclasshook__

Properties [hide private]
  pdbres
PDB residue name
  chain
Chain name
  resnum
PDB residue number
  inscode
PDB residue insertion code
  molecule_number
Molecule number
  secondary_structure
Secondary structure

Inherited from _AtomCollection: atom, structure, temperature_factor

Inherited from object: __class__

Method Details [hide private]

__init__(self, st, resnum, inscode, chain, atoms=[])
(Constructor)

 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

__str__(self)
(Informal representation operator)

 

Return a string representation - chain:resnum[inscode]. Insertion code is included only it is present. If the residue has no chain ID, then underscore ("_") is used.

Overrides: object.__str__

hasMissingAtoms(self)

 

Returns True is this residue doesn't have the expected number of heavy atoms. Will return False is this residue has the correct number of heavy atoms or if it is of a type we don't know

isConnectedToResidue(self, other_res)

 

Returns True if the given residue is connected (C->N) to this residue.

If the "C" PDB atom of this residue is connected to the "N" PDB atom of the other_res, then the residues are connected. Otherwise, they are not considered connected.

applyStyle(self, atoms=3, bonds=3)

 

Applies the given display styles to the atoms and bonds of the residue.

Parameters:
  • atoms (int) - display style for atoms given by structure module constants ATOM_NOSTYLE, ATOM_CIRCLE, ATOM_CPK, ATOM_BALLNSTICK. Default is ATOM_BALLNSTICK.
  • atoms (int) - display style for bonds given by structure module constants BOND_NOSTYLE, BOND_WIRE, BOND_TUBE, BOND_BALLNSTICK. Default is BOND_BALLNSTICK.
  • bonds (int)

getAtomByPdbName(self, pdbname)

 

Returns the atom of this residue that matches the given PDB name, or None if no such atom is found.

Parameters:
  • pdbname (str) - 4-letter PDB atom name. E.g. " C " to get the C terminal atom of a protein residue.
Returns: _StructureAtom or None
Atom with given PDB name or None

getBackboneNitrogen(self)

 

Returns the backbone nitrogen of the residue, or None. NOTE: For use with protein residues only.

Returns: _StructureAtom or None
Nitrogen atom or None

getCarbonylCarbon(self)

 

Returns the carbonyl backbone carbon of the residue, or None. NOTE: For use with protein residues only.

Returns: _StructureAtom or None
Carbon atom or None

getBackboneOxygen(self)

 

Returns the oxygen of the backbone, or None. NOTE: For use with protein residues only.

Returns: _StructureAtom or None
Oxygen atom or None

getAlphaCarbon(self)

 

Returns the backbone alpha carbon atom of this residue, or None. NOTE: For use with protein residues only.

Returns: _StructureAtom or None
Alpha carbon atom or None

getBetaCarbon(self, gly_hydrogen=False)

 

Returns the beta carbon atom of this residue, or None. NOTE: For use with protein residues only.

Parameters:
  • gly_hydrogen (bool) - Whether to return the hydrogen atom if the residue is a glycine.
Returns: _StructureAtom or None
Beta carbon atom or None

getDihedralAtoms(self, angle_name)

 

Return a list of 4 atom objects for the named dihedral angle in this residue. For backbone bonds, atoms are listed in the N->C order; for side-chain bonds, atoms are listed in order of increasing bond count from the backbone. Omega dihedral is the one to the previous residue (the one bonded to the N atom of this residue).

Parameters:
  • name (str) - Name of the dihedral angle to fine. Supported names are: Phi, Psi, Omega, Chi1, Chi2, Chi3, Chi4, Chi5.
Raises:
  • ValueError - if specified dihedral name is not valid or if it was not found in the database.

Property Details [hide private]

pdbres

PDB residue name

Get Method:
_getPdbRes(self)
Set Method:
_setPdbRes(self, newvalue)

chain

Chain name

Get Method:
_getChain(self)
Set Method:
_setChain(self, newvalue)

resnum

PDB residue number

Get Method:
_getResnum(self)
Set Method:
_setResnum(self, newvalue)

inscode

PDB residue insertion code

Get Method:
_getInscode(self)
Set Method:
_setInscode(self, newvalue)

molecule_number

Molecule number

Get Method:
_getMolNumber(self)

secondary_structure

Secondary structure

Get Method:
_getSecStruct(self)