Home | Trees | Index | Help |
|
---|
Package mmLib :: Module Structure :: Class Fragment |
|
object
--+
|
Fragment
Residue
Fragment objects are a basic unit for organizing small groups of Atoms. Amino acid residues are fragments, as well as nucleic acids and other small molecules. In terms of a PDB file, they are all the atoms from a unique residue in a chain. Fragments have the following attributes:
Fragment.res_name - the fragment/residue name Fragment.res_seq - the sequence id of the fragment/residue Fragment.chain_id - the ID of the chain containing this fragmentMethod Summary | |
---|---|
__init__(self,
model_id,
chain_id,
fragment_id,
res_name,
**args)
| |
Return True if the Atom object is contained in the fragment. | |
__deepcopy__(self,
memo)
| |
__ge__(self,
other)
| |
Lookup a atom contained in a fragment by its name, or by its index within the fragment's private atom_list. | |
__gt__(self,
other)
| |
Iterates the atoms within the fragment. | |
__le__(self,
other)
| |
__len__(self)
| |
__lt__(self,
other)
| |
__str__(self)
| |
Adds a atom to the fragment, and sets the atom's atom.fragment attribute to the fragment. | |
Counts all Atom objects including Atoms in alternate conformations. | |
Counts Atom objects. | |
Contructs bonds within a fragment. | |
Returns the matching Atom instance contained in the Fragment. | |
Returns the parent Chain object. | |
Returns the atom with the same fragment_id and name as the argument atom, or None if it is not found. | |
Returns the parent Chain object. | |
Returns the fragment in the same chain at integer offset from self. | |
Returns the parent Structure object. | |
Returns the sequential index of the atom. | |
Returns True if the Fragment is a Amino Acid residue. | |
Returns True if the Fragment is a Nucleic Acid residue. | |
Returns True if the Fragment/Residue object is one of the PDB defined standard residues. | |
Returns True if the Fragment is a water molecule, returns False otherwise. | |
Iterates of all Atoms in the Fragment includeing Altlocs. | |
Iterates over all Atom objects contained in the Fragment matching the current model and default alt_loc. | |
Iterates over all Bond objects. | |
Removes the Atom instance from the Fragment. | |
Sets the chain_id of the Fragment and all contained Atom objects. | |
Sets the default alt_loc of the Fragment. | |
Sets the fragment_id of the Fragment and all contained Atom objects. | |
Sets the model_id of the Fragment and all contained Atom objects. | |
Sets the res_name of the Fragment and all contained Atom objects. | |
Inherited from object | |
x.__delattr__('name') <==> del x.name | |
x.__getattribute__('name') <==> x.name | |
x.__hash__() <==> hash(x) | |
T.__new__(S, ...) -> a new object with type S, a subtype of T | |
helper for pickle | |
helper for pickle | |
x.__repr__() <==> repr(x) | |
x.__setattr__('name', value) <==> x.name = value |
Method Details |
---|
__contains__(self,
atom_idx)
Return True if the Atom object is contained in the fragment.
|
__getitem__(self,
name_idx)
Lookup a atom contained in a fragment by its name, or by its index
within the fragment's private atom_list. If the atom is not found, a
exception is raised. The type of exception depends on the argument
type. If the argument was a integer, then a IndexError is raised. If
the argument was a string, then a KeyError is raised.
|
__iter__(self)Iterates the atoms within the fragment. If the fragment contains atoms in alternate conformations, only the atoms with the structure's default_alt_loc are iterated. |
add_atom(self, atom)Adds a atom to the fragment, and sets the atom's atom.fragment attribute to the fragment. |
count_all_atoms(self)Counts all Atom objects including Atoms in alternate conformations. |
count_atoms(self)Counts Atom objects. |
create_bonds(self)Contructs bonds within a fragment. Bond definitions are retrieved from the monomer library. |
get_atom(self, name, alt_loc=None)Returns the matching Atom instance contained in the Fragment. Returns None if a match is not found. If alt_loc is not given, then the default alt_loc is used. |
get_chain(self)Returns the parent Chain object. |
get_equivalent_atom(self, atom)Returns the atom with the same fragment_id and name as the argument atom, or None if it is not found. |
get_model(self)Returns the parent Chain object. |
get_offset_fragment(self, offset)Returns the fragment in the same chain at integer offset from self. Returns None if no fragment is found. |
get_structure(self)Returns the parent Structure object. |
index(self, atom)Returns the sequential index of the atom. |
is_amino_acid(self)Returns True if the Fragment is a Amino Acid residue. |
is_nucleic_acid(self)Returns True if the Fragment is a Nucleic Acid residue. |
is_standard_residue(self)Returns True if the Fragment/Residue object is one of the PDB defined standard residues. PDB standard residues are amino and nucleic acid residues. |
is_water(self)Returns True if the Fragment is a water molecule, returns False otherwise. |
iter_all_atoms(self)Iterates of all Atoms in the Fragment includeing Altlocs. |
iter_atoms(self)Iterates over all Atom objects contained in the Fragment matching the current model and default alt_loc. |
iter_bonds(self)Iterates over all Bond objects. The iteration is preformed by iterating over all Atom objects in the same order as iter_atoms(), then iterating over each Atom's Bond objects. |
remove_atom(self, atom)Removes the Atom instance from the Fragment. |
set_chain_id(self, chain_id)Sets the chain_id of the Fragment and all contained Atom objects. |
set_default_alt_loc(self, alt_loc)Sets the default alt_loc of the Fragment. |
set_fragment_id(self, fragment_id)Sets the fragment_id of the Fragment and all contained Atom objects. |
set_model_id(self, model_id)Sets the model_id of the Fragment and all contained Atom objects. |
set_res_name(self, res_name)Sets the res_name of the Fragment and all contained Atom objects. |
Home | Trees | Index | Help |
|
---|
Generated by Epydoc 2.1 on Sun Apr 23 22:08:39 2006 | http://epydoc.sf.net |