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

Type StructureBuilder

object --+
         |
        StructureBuilder

Known Subclasses:
mmCIFStructureBuilder, PDBStructureBuilder

Builder class for the mmLib.Structure object hierarchy. StructureBuilder must be subclassed with a working parse_format() method to implement a working builder.
Method Summary
  __init__(self, sequence_from_structure, library_bonds, distance_bonds, **args)
  load_alpha_helicies(self, helix_list)
The argument helix_list is a list of Python dictionaries with information to build build AlphaHelix objects into the Structure.
  load_atom(self, atm_map)
Called repeatedly by the implementation of read_atoms to load all the data for a single atom.
  load_beta_sheets(self, beta_sheet_list)
The argument beta_sheet_list is a list of Python dictionaries with information to build build BetaSheet objects into the Structure.
  load_bonds(self, bond_map)
Call by the implementation of load_metadata to load bond information on the structure.
  load_sequence(self, sequence_map)
The sequence map contains the following keys: chain_id: the chain ID fo the sequence; num_res: the number of residues in the sequence; sequence_list: a list of 3-letter codes of the residues in the sequence.
  load_sites(self, site_list)
The argument site_list is a list of Python dictionaries with information to build build Site objects into the Structure.
  load_structure_id(self, structure_id)
  load_unit_cell(self, ucell_map)
Called by the implementation of load_metadata to load the unit cell pararameters for the structure.
  name_service(self)
Runs the name service on all atoms needing to be named.
  read_atoms(self)
This method needs to be reimplemented in a fuctional subclass.
  read_atoms_finalize(self)
After loading all atom records, use the list of atom records to build the structure.
  read_end(self)
This method needs to be reimplemented in a fuctional subclass.
  read_end_finalize(self)
Called for final cleanup after structure source readinging is done.
  read_metadata(self)
This method needs to be reimplemented in a fuctional subclass.
  read_metadata_finalize(self)
Called after the the metadata loading is complete.
  read_start(self, fil)
This methods needs to be reimplemented in a functional subclass.
  read_start_finalize(self)
Called after the read_start method.
    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
  __str__(x)
x.__str__() <==> str(x)

Method Details

load_alpha_helicies(self, helix_list)

The argument helix_list is a list of Python dictionaries with
information to build build AlphaHelix objects into the Structure.

The dictionary has attributes:
    helix_id:    The ID of the helix
    chain_id:    The chain_id where the helix is located
    frag_id1:    The start fragment_id of the helix
    frag_id2:    The end fragment_id of the helix
    helix_class: The PDB helix class number
    detaisl:     Text commont about the helix

load_atom(self, atm_map)

Called repeatedly by the implementation of read_atoms to load all the data for a single atom. The data is contained in the atm_map argument, and is not well documented at this point. Look at this function and you'll figure it out.

load_beta_sheets(self, beta_sheet_list)

The argument beta_sheet_list is a list of Python dictionaries with
information to build build BetaSheet objects into the Structure.

The dictionary has attributes:
    sheet_id:    ID of the sheet
    num_strands: total number of strands in the beta sheet
    strand_list: list of dictionaries describing the strand with
                 the following attributes:

        chain_id1/frag_id1: chain_id and fragment_id of inital residue
                            in the strand
        chain_id2/frag_id2: chain_id and fragment_id of end residue
                            in the strand
        sense:              the sense of the strand with respect to the
                            previous strand, either the string
                            parallel or anti_parallel

        reg_chain_id, reg_frag_id, reg_atom:
                            registration atom in current strand
        reg_prev_chain_id, reg_prev_frag_id, reg_prev_atom:
                            registration atom in previous strand

load_bonds(self, bond_map)

Call by the implementation of load_metadata to load bond
information on the structure.  The keys of the bond map are a 2-tuple
of the bonded Atom instances, and the value is a dictionary
containing information on the type of bond, which may also
be a symmetry operator.

[bond_map]
keys: (atm1, atm2)
values: bond_data_map(s)

[bond_data_map]
bond_type -> text description of bond type: covalent, salt bridge,
             hydrogen, cispeptide
             
atm1_symop -> symmetry operation (if any) to be applied to atm1
atm2_symop -> same as above, for atom 2

The symmetry operations themselves are a 3x4 array of floating point
values composed of the 3x3 rotation matrix and the 3x1 translation.

load_sequence(self, sequence_map)

The sequence map contains the following keys: chain_id: the chain ID fo the sequence; num_res: the number of residues in the sequence; sequence_list: a list of 3-letter codes of the residues in the sequence.

load_sites(self, site_list)

The argument site_list is a list of Python dictionaries with information to build build Site objects into the Structure.

load_unit_cell(self, ucell_map)

Called by the implementation of load_metadata to load the unit cell pararameters for the structure.

name_service(self)

Runs the name service on all atoms needing to be named. This is a complicated function which corrects most commonly found errors and omitions from PDB files.

read_atoms(self)

This method needs to be reimplemented in a fuctional subclass. The subclassed read_atoms method should call load_atom once for every atom in the sturcture, and should not call any other load_* methods.

read_atoms_finalize(self)

After loading all atom records, use the list of atom records to build the structure.

read_end(self)

This method needs to be reimplemented in a fuctional subclass. The subclassed read_end method can be used for any clean up from the file loading process you need, or may be left unimplemented.

read_end_finalize(self)

Called for final cleanup after structure source readinging is done. Currently, this method does nothing but may be used in future versions.

read_metadata(self)

This method needs to be reimplemented in a fuctional subclass. The subclassed read_metadata method should call the various load_* methods to set non-atom coordinate data for the Structure.

read_metadata_finalize(self)

Called after the the metadata loading is complete.

read_start(self, fil)

This methods needs to be reimplemented in a functional subclass. This function is called with the file object (or any other object passed in to build a Structure from) to begin the reading process. This is usually used to open the source file.

read_start_finalize(self)

Called after the read_start method. Does nothing currently, but may be used in the future.

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