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

Type Structure

object --+
         |
        Structure


The Structure object is the parent container object for the entire macromolecular data structure. It contains a list of the Chain objects in the structure hierarchy, and contains these additional data objects:

cifdb(mmLib.mmCIFDB) A mmCIF database with additional structure data.

unit_cell(mmLib.UnitCell) Unit cell/Spacegroup for the structure.

default_alt_loc(string) The default alternate location identifier used when iterating or retreiving Atom objects in the structure.
Method Summary
  __init__(self, **args)
  __contains__(self, model_chain_idx)
Returns True if item is a Model in the Structure, or a Chain or chain_id in the default Model.
  __deepcopy__(self, memo)
  __getitem__(self, chain_idx)
Same as get_chain, but raises KeyError if the requested chain_id is not found.
  __iter__(self)
Iterates the Chain objects in the Structure.
  __len__(self)
Returns the number of stored Chain objects.
  __str__(self)
  add_alpha_helix(self, alpha_helix)
Adds a AlphaHelix to the default Model object.
  add_atom(self, atom, delay_sort)
Adds a Atom object to the Structure.
  add_beta_sheet(self, beta_sheet)
Adds a BetaSheet to the default Model object.
  add_bonds_from_covalent_distance(self)
Builds a Structure's bonds by atomic distance distance using the covalent radii in element.cif.
  add_bonds_from_library(self)
Builds bonds for all Fragments in the Structure from bond tables for monomers retrieved from the Library implementation of the Structure.
  add_chain(self, chain, delay_sort)
Adds a Chain object to the Structure.
  add_fragment(self, fragment, delay_sort)
Adds a Fragment object.
  add_model(self, model, delay_sort)
Adds a Model to a Structure.
  add_site(self, site)
Adds a Site object to the default Model.
  alt_loc_list(self)
Return the unique list of Atom alternate location IDs found in the Structure.
  count_all_atoms(self)
Counts all atoms in the default Model using the default alt_loc.
  count_amino_acids(self)
Counts all AminoAcidResidue objects in the default Model.
  count_atoms(self)
Counts all Atom objects in the default Model using the default alt_loc.
  count_bonds(self)
Counts all Bond objects using the default Model and default alt_loc.
  count_chains(self)
Counts all Chain objects in the default Model.
  count_fragments(self)
Counts all Fragment objects in the default Model.
  count_models(self)
Counts all Model objects in the Structure.
  count_non_standard_residues(self)
Counts all non-standard residues in the default Model.
  count_nucleic_acids(self)
Counts all NucleicAcidResidue objects in the default Model.
  count_standard_residues(self)
Counts the number of stardard residues in the default Model.
  count_waters(self)
Counts all waters in the default Model.
  get_chain(self, chain_id)
Returns the Chain object matching the chain_id charactor.
  get_default_alt_loc(self)
Returns the default alt_loc string.
  get_default_model(self)
Returns the default Model 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, model_id)
Return the Model object with the argument model_id, or None if not found.
  get_structure(self)
Returns self.
  has_amino_acids(self)
Returns True if there are AminoAcidResidue objects in the default Model of the Structure.
  has_non_standard_residues(self)
Returns True if there are non-standard residues in the default Model.
  has_nucleic_acids(self)
Returns True if the Structure contains NucleicAcidResiudes in the default Model.
  has_standard_residues(self)
Returns True if the Structure contains amino or nucleic acids in the default Model.
  has_waters(self)
Returns True if there are waters in the default Model.
  index(self, model_chain)
If item is a Model, returns the index of the Model in the Structure, or if the item is a Chain, returns the index of the Chain in the default Model.
  iter_all_amino_acids(self)
Iterates over all AminoAcidResidue objects in all Models.
  iter_all_atoms(self)
Iterates over all Atom objects in the Structure.
  iter_all_chains(self)
Iterates over all Chain objects in all Model objects.
  iter_all_fragments(self)
Iterates over all Fragment objects in all Models.
  iter_all_nucleic_acids(self)
Iterates over all NucleicAcidResidue objects in all Models.
  iter_alpha_helicies(self)
Iterates over all child AlphaHelix objects in the default Model.
  iter_amino_acids(self)
Same as iter_fragments() but only iterates over Fragments of the subclass AminoAcidResidue.
  iter_atoms(self)
Iterates over all Atom objects in the default Model, using the default alt_loc.
  iter_beta_sheets(self)
Iterate over all beta sheets in the Structure.
  iter_bonds(self)
Iterates over all Bond objects.
  iter_chains(self)
Iterates over all Chain objects in the default Model, in alphabetical order according to their chain_id.
  iter_fragments(self)
Iterates over all Fragment objects in the default Model.
  iter_models(self)
Iterates over all Model objects.
  iter_non_standard_residues(self)
Iterates over non-standard residues in the default Model.
  iter_nucleic_acids(self)
Same as iter_fragments() but only iterates over Fragments of the subclas NucleicAcidResidue.
  iter_sites(self)
Iterate over all active/important sites defined in the Structure.
  iter_standard_residues(self)
Iterates over standard residues in the default Model.
  iter_waters(self)
Iterate over all waters in the default Model.
  remove_atom(self, atom)
Removes a Atom.
  remove_chain(self, chain)
Removes a Chain object.
  remove_fragment(self, fragment)
Removes a Fragment object.
  remove_model(self, model)
Removes a child Model object.
  set_default_alt_loc(self, alt_loc)
Sets the default alt_loc for the Stucture.
  set_default_model(self, model_id)
Sets the default Model for the Structure to model_id.
  set_model(self, model_id)
DEP: Use set_default_model() Sets the default Model for the Structure to model_id.
  sort(self)
Sorts all Models and Chains in the Structure occording to standard model_id, chain_id, and fragment_id sorting rules.
    Inherited from object
  __delattr__(...)
x.__delattr__('name') <==> del x.name
  __getattribute__(...)
x.__getattribute__('name') <==> x.name
  __hash__(x)
x.__hash__() <==> hash(x)
  __new__(T, S, ...)
T.__new__(S, ...) -> a new object with type S, a subtype of T
  __reduce__(...)
helper for pickle
  __reduce_ex__(...)
helper for pickle
  __repr__(x)
x.__repr__() <==> repr(x)
  __setattr__(...)
x.__setattr__('name', value) <==> x.name = value

Method Details

__contains__(self, model_chain_idx)
(In operator)

Returns True if item is a Model in the Structure, or a Chain or chain_id in the default Model.

__getitem__(self, chain_idx)
(Indexing operator)

Same as get_chain, but raises KeyError if the requested chain_id is not found.

__iter__(self)

Iterates the Chain objects in the Structure.

__len__(self)
(Length operator)

Returns the number of stored Chain objects.

add_alpha_helix(self, alpha_helix)

Adds a AlphaHelix to the default Model object.

add_atom(self, atom, delay_sort=False)

Adds a Atom object to the Structure. If a collision occurs, a error is raised.

add_beta_sheet(self, beta_sheet)

Adds a BetaSheet to the default Model object.

add_bonds_from_covalent_distance(self)

Builds a Structure's bonds by atomic distance distance using the covalent radii in element.cif. A bond is built if the the distance between them is less than or equal to the sum of their covalent radii + 0.54A.

add_bonds_from_library(self)

Builds bonds for all Fragments in the Structure from bond tables for monomers retrieved from the Library implementation of the Structure.

add_chain(self, chain, delay_sort=True)

Adds a Chain object to the Structure. Creates necessary parent Model if necessary

add_fragment(self, fragment, delay_sort=True)

Adds a Fragment object.

add_model(self, model, delay_sort=True)

Adds a Model to a Structure. Raises the ModelOverwrite exception if the model_id of the Model matches the model_id of a Model already in the Structure. If there are no Models in the Structure, the Model is used as the default Model.

add_site(self, site)

Adds a Site object to the default Model.

alt_loc_list(self)

Return the unique list of Atom alternate location IDs found in the Structure.

count_all_atoms(self)

Counts all atoms in the default Model using the default alt_loc.

count_amino_acids(self)

Counts all AminoAcidResidue objects in the default Model.

count_atoms(self)

Counts all Atom objects in the default Model using the default alt_loc.

count_bonds(self)

Counts all Bond objects using the default Model and default alt_loc.

count_chains(self)

Counts all Chain objects in the default Model.

count_fragments(self)

Counts all Fragment objects in the default Model.

count_models(self)

Counts all Model objects in the Structure.

count_non_standard_residues(self)

Counts all non-standard residues in the default Model.

count_nucleic_acids(self)

Counts all NucleicAcidResidue objects in the default Model.

count_standard_residues(self)

Counts the number of stardard residues in the default Model.

count_waters(self)

Counts all waters in the default Model.

get_chain(self, chain_id)

Returns the Chain object matching the chain_id charactor.

get_default_alt_loc(self)

Returns the default alt_loc string.

get_default_model(self)

Returns the default Model 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, model_id)

Return the Model object with the argument model_id, or None if not found.

get_structure(self)

Returns self.

has_amino_acids(self)

Returns True if there are AminoAcidResidue objects in the default Model of the Structure.

has_non_standard_residues(self)

Returns True if there are non-standard residues in the default Model.

has_nucleic_acids(self)

Returns True if the Structure contains NucleicAcidResiudes in the default Model.

has_standard_residues(self)

Returns True if the Structure contains amino or nucleic acids in the default Model.

has_waters(self)

Returns True if there are waters in the default Model.

index(self, model_chain)

If item is a Model, returns the index of the Model in the Structure, or if the item is a Chain, returns the index of the Chain in the default Model.

iter_all_amino_acids(self)

Iterates over all AminoAcidResidue objects in all Models.

iter_all_atoms(self)

Iterates over all Atom objects in the Structure. The iteration is performed according to common PDB ordering rules, over all Models and all alternate conformations.

iter_all_chains(self)

Iterates over all Chain objects in all Model objects.

iter_all_fragments(self)

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

iter_all_nucleic_acids(self)

Iterates over all NucleicAcidResidue objects in all Models.

iter_alpha_helicies(self)

Iterates over all child AlphaHelix objects in the default Model.

iter_amino_acids(self)

Same as iter_fragments() but only iterates over Fragments of the subclass AminoAcidResidue.

iter_atoms(self)

Iterates over all Atom objects in the default Model, using the default alt_loc. The iteration is preformed in order according to the Chain and Fragment ordering rules the Atom object is a part of.

iter_beta_sheets(self)

Iterate over all beta sheets in the Structure.

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.

iter_chains(self)

Iterates over all Chain objects in the default Model, in alphabetical order according to their chain_id.

iter_fragments(self)

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

iter_models(self)

Iterates over all Model objects.

iter_non_standard_residues(self)

Iterates over non-standard residues in the default Model. Non-standard residues are any Fragments which are not a amino or nucleic acid.

iter_nucleic_acids(self)

Same as iter_fragments() but only iterates over Fragments of the subclas NucleicAcidResidue.

iter_sites(self)

Iterate over all active/important sites defined in the Structure.

iter_standard_residues(self)

Iterates over standard residues in the default Model.

iter_waters(self)

Iterate over all waters in the default Model.

remove_atom(self, atom)

Removes a Atom.

remove_chain(self, chain)

Removes a Chain object.

remove_fragment(self, fragment)

Removes a Fragment object.

remove_model(self, model)

Removes a child Model object. If the Model object is the default Model, then choose the Model with the lowest model_id as the new default Model, or None if there are no more Models.

set_default_alt_loc(self, alt_loc)

Sets the default alt_loc for the Stucture.

set_default_model(self, model_id)

Sets the default Model for the Structure to model_id. Returns False if a Model with the proper model_id does not exist in the Structure.

set_model(self, model_id)

DEP: Use set_default_model() Sets the default Model for the Structure to model_id. Returns False if a Model with the proper model_id does not exist in the Structure.

sort(self)

Sorts all Models and Chains in the Structure occording to standard model_id, chain_id, and fragment_id sorting rules.

Generated by Epydoc 2.1 on Sun Apr 23 22:08:40 2006 http://epydoc.sf.net