Package mmLib :: Module Structure :: Class Model
[hide private]
[frames] | no frames]

Class Model

source code

object --+
         |
        Model

Multiple models support.

Instance Methods [hide private]
 
__init__(self, model_id=1, **args)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
__str__(self)
str(x)
source code
 
__deepcopy__(self, memo) source code
 
__lt__(self, other) source code
 
__le__(self, other) source code
 
__gt__(self, other) source code
 
__ge__(self, other) source code
 
__len__(self)
Returns the number of stored Chain objects.
source code
 
__getitem__(self, chain_idx)
Same as get_chain, but raises KeyError if the requested chain_id is not found.
source code
 
__iter__(self)
Iterates the Chain objects in the Model.
source code
 
__contains__(self, chain_idx)
Returns True if the argument Chain or chain_id is in the Model.
source code
 
index(self, chain)
Returns the numeric index of the Chain object in the Model.
source code
 
sort(self)
Sorts all Chains in the Model by their chain_id.
source code
 
add_chain(self, chain, delay_sort=False)
Adds a Chain to the Model.
source code
 
remove_chain(self, chain)
Removes the Chain from the Model.
source code
 
get_chain(self, chain_id)
Returns the Chain object matching the chain_id character.
source code
 
iter_chains(self)
Iterates over all Chain objects in alphabetical order according to their chain_id.
source code
 
count_chains(self)
Counts all Chain objects.
source code
 
add_fragment(self, fragment, delay_sort=False)
Adds a Fragment instance
source code
 
remove_fragment(self, fragment)
Removes a Fragment object.
source code
 
count_fragments(self)
Counts all Fragment objects.
source code
 
iter_fragments(self)
Iterates over all Fragment objects.
source code
 
has_amino_acids(self) source code
 
count_amino_acids(self) source code
 
iter_amino_acids(self) source code
 
has_nucleic_acids(self) source code
 
count_nucleic_acids(self) source code
 
iter_nucleic_acids(self) source code
 
has_standard_residues(self) source code
 
count_standard_residues(self) source code
 
iter_standard_residues(self) source code
 
count_non_standard_residues(self) source code
 
has_non_standard_residues(self) source code
 
iter_non_standard_residues(self) source code
 
has_waters(self) source code
 
count_waters(self) source code
 
iter_waters(self) source code
 
add_atom(self, atom, delay_sort=False) source code
 
remove_atom(self, atom)
Removes an Atom object.
source code
 
iter_atoms(self)
Iterates over all Atom objects according to the Structure defaults.
source code
 
count_atoms(self)
Counts all Atom objects in according to the Structure defaults.
source code
 
iter_all_atoms(self)
Iterates over all Atom objects including all atoms in multiple conformations.
source code
 
count_all_atoms(self)
Counts all Atom objects including all atoms in multiple conformations.
source code
 
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.
source code
 
add_alpha_helix(self, alpha_helix)
Adds an AlphaHelix object to the Model.
source code
 
remove_alpha_helix(self, alpha_helix)
Removes an AlphaHelix object from the Model.
source code
 
iter_alpha_helicies(self)
Iterates over all AlphaHelix objects in the Model.
source code
 
add_beta_sheet(self, beta_sheet)
Adds a BetaSheet object to the Model.
source code
 
remove_beta_sheet(self, beta_sheet)
Removes a BetaSheet object from the Model.
source code
 
iter_beta_sheets(self)
Iterate over all child BetaSheet objects in the Model.
source code
 
add_site(self, site)
Adds a Site (of interest) object to the Model.
source code
 
remove_site(self, site)
Removes a Site (of interest) object from the Model.
source code
 
iter_sites(self)
Iterate over all active/important sites defined in the Structure.
source code
 
get_structure(self)
Returns the parent Structure.
source code
 
iter_bonds(self)
Iterates over all Bond objects.
source code
 
count_bonds(self)
Counts all Bond objects.
source code
 
set_model_id(self, model_id)
Sets the model_id of all contained objects.
source code

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

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, model_id=1, **args)
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
(inherited documentation)

__str__(self)
(Informal representation operator)

source code 

str(x)

Overrides: object.__str__
(inherited documentation)

iter_fragments(self)

source code 

Iterates over all Fragment objects. The iteration is performed in order according the the parent Chain's chain_id, and the Fragment's position within the chain.

iter_bonds(self)

source code 

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.