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

Class Atom

source code

object --+
         |
        Atom

Class representing a single atom. Atoms have the following default
attributes. If an attribute has the value None, then the attribute was
never set. If the attribute has a default, then it is required.

Atom[alt_loc]    - Atom objects in alternate locations can be accessed
                   by using Python's dictionary syntax with the alt_loc
                   character
iter(Atom)       - iterates over all alt_loc versions of the Atom
Atom.name        - label of the atom
Atom.alt_loc     - alternate location indicater for the atom
Atom.res_name    - the name of the resiude/fragment this atom is part of
Atom.res_seq     - the residue/fragment sequence number
Atom.icode       - the insertion code for the residue/fragment
Atom.chain_id    - the chain ID of the chain containing this atom
Atom.element     - symbol for the element
Atom.position    - a numpy.array[3] (Numeric Python)
Atom.occupancy   - [1.0 - 0.0] float 
Atom.temp_factor - float represting B-style temp factor
Atom.column6768  - string value. Can be used for anything in columns 67+68
Atom.U           - a 6-tuple of the anisotropic values
Atom.charge      - charge on the atom
Atom.label_entity_id -
                   entity id corresponding to entity_poly_seq.entity_id
Atom.label_asym_id -
                   asym id corresponding to struct_conf.beg_label_asym_id
Atom.label_seq_id -
                   sequence id corresponding to entity_poly_seq_num
                   and struct_conn.ptnr?_label_seq_id

Instance Methods [hide private]
 
__init__(self, name='', alt_loc='', res_name='', fragment_id='', chain_id='', model_id=1, element='', position=None, x=None, y=None, z=None, sig_position=None, sig_x=None, sig_y=None, sig_z=None, temp_factor=None, column6768=None, sig_temp_factor=None, occupancy=None, sig_occupancy=None, charge=None, label_entity_id=None, label_asym_id=None, label_seq_id=None, U=None, u11=None, u22=None, u33=None, u12=None, u13=None, u23=None, sig_U=None, sig_u11=None, sig_u22=None, sig_u33=None, sig_u12=None, sig_u13=None, sig_u23=None, **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 alternate conformations of this atom.
source code
 
__getitem__(self, alt_loc)
This is an alternative to calling get_alt_loc, but a KeyError exception is raised if the alt_loc Atom is not found.
source code
 
__iter__(self)
Iterates over all Altloc representations of this Atom.
source code
 
__contains__(self, atom_alt_loc)
Returns True if the argument matches an alternate conformation of the Atom.
source code
 
remove_alt_loc(self, atom)
Removes the argument Atom from the Altloc.
source code
 
get_alt_loc(self, alt_loc)
Returns the Atom object matching the alt_loc argument.
source code
 
iter_alt_loc(self)
Iterate over all alt_loc versions of this atom in the alphabetical order of the alt_loc labels, within the current model.
source code
 
create_bond(self, atom=None, bond_type=None, atom1_symop=None, atom2_symop=None, standard_res_bond=False)
Creates a bond between this atom and the argumentatom.
source code
 
create_bonds(self, atom=None, bond_type=None, atom1_symop=None, atom2_symop=None, standard_res_bond=False)
Like create_bonds, but it bonds all alternate locations of this atom.
source code
 
get_bond(self, atom)
Returns the Bond connecting self with the argument atom.
source code
 
iter_bonds(self)
Iterates over all the Bond edges connected to self.
source code
 
iter_bonded_atoms(self)
Iterates over all the Atoms bonded to self.
source code
 
get_bonded_atom(self, name_list)
From atom, follow the bonding path specified by a sequence of atom names given in name_list and return the last atom instance in the list.
source code
 
get_fragment(self)
Returns the parent Fragment object.
source code
 
get_chain(self)
Returns the parent Chain object.
source code
 
get_model(self)
Returns the parent Model object.
source code
 
get_structure(self)
Returns the parent Structure object.
source code
 
set_U(self, u11, u22, u33, u12, u13, u23)
Sets the symmetric U tensor from the six unique values.
source code
 
set_sig_U(self, u11, u22, u33, u12, u13, u23)
Sets the symmetric sig_U tensor from the six unique values.
source code
 
calc_Uiso(self)
Calculates the Uiso tensor from the Atom's temperature factor.
source code
 
get_U(self)
Returns the Atoms's U tensor if it exists, otherwise returns the isotropic U tensor calculated by self.calc_Uiso
source code
 
calc_anisotropy(self)
Calculates the anisotropy of that atom.
source code
 
calc_anisotropy3(self)
Calculates the eigenvalues of the U matrix and returns the 3-tuple of the eigenvalue ratios: (e1/e2, e1/e3, e2/e3)
source code
 
iter_atoms_by_distance(self, max_distance=None)
Iterates all atoms in the Structure object from the closest to the farthest up to the cutoff distance max_distance if given.
source code
 
set_model_id(self, model_id)
Sets the chain_id of the Atom and all alt_loc Atom objects.
source code
 
set_chain_id(self, chain_id)
Sets the chain_id of the Atom and all alt_loc Atom objects.
source code
 
set_fragment_id(self, fragment_id)
Sets the fragment_id of the Atom and all alt_loc Atom objects.
source code
 
set_res_name(self, res_name)
Sets the fragment_id of the Atom and all alt_loc Atom 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, name='', alt_loc='', res_name='', fragment_id='', chain_id='', model_id=1, element='', position=None, x=None, y=None, z=None, sig_position=None, sig_x=None, sig_y=None, sig_z=None, temp_factor=None, column6768=None, sig_temp_factor=None, occupancy=None, sig_occupancy=None, charge=None, label_entity_id=None, label_asym_id=None, label_seq_id=None, U=None, u11=None, u22=None, u33=None, u12=None, u13=None, u23=None, sig_U=None, sig_u11=None, sig_u22=None, sig_u33=None, sig_u12=None, sig_u13=None, sig_u23=None, **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)

__contains__(self, atom_alt_loc)
(In operator)

source code 

Returns True if the argument matches an alternate conformation of the Atom. The argument can be an alt_loc label, or an Atom object.

create_bond(self, atom=None, bond_type=None, atom1_symop=None, atom2_symop=None, standard_res_bond=False)

source code 

Creates a bond between this atom and the argumentatom. The argument bond_type is a string, atom1_symop and atom2_symop are symmetry operations to be applied to self and the argument atom before distance calculations, and standard_res_bond is a flag used to indicate this bond is a standard bond.

get_bonded_atom(self, name_list)

source code 

From atom, follow the bonding path specified by a sequence of atom names given in name_list and return the last atom instance in the list. Returns None if any atom in the bonding path cannot be found.

calc_anisotropy(self)

source code 

Calculates the anisotropy of that atom. Anisotropy is defined as the ratio of the minimum/maximum eigenvalues of the 3x3 symmetric tensor defined by U.

iter_atoms_by_distance(self, max_distance=None)

source code 

Iterates all atoms in the Structure object from the closest to the farthest up to the cutoff distance max_distance if given. Yields the 2-tuple (dist, atm).