Package Bio :: Package PDB :: Module Atom :: Class Atom
[hide private]
[frames] | no frames]

Class Atom

source code

object --+
         |
        Atom

Instance Methods [hide private]
 
__init__(self, name, coord, bfactor, occupancy, altloc, fullname, serial_number, element=None)
Create Atom object.
source code
 
_assign_element(self, element)
Tries to guess element from atom name if not recognised.
source code
 
_assign_atom_mass(self) source code
 
__repr__(self)
Print Atom object as <Atom atom_name>.
source code
 
__sub__(self, other)
Calculate distance between two atoms.
source code
 
set_serial_number(self, n) source code
 
set_bfactor(self, bfactor) source code
 
set_coord(self, coord) source code
 
set_altloc(self, altloc) source code
 
set_occupancy(self, occupancy) source code
 
set_sigatm(self, sigatm_array)
Set standard deviation of atomic parameters.
source code
 
set_siguij(self, siguij_array)
Set standard deviations of anisotropic temperature factors.
source code
 
set_anisou(self, anisou_array)
Set anisotropic B factor.
source code
 
flag_disorder(self)
Set the disordered flag to 1.
source code
 
is_disordered(self)
Return the disordered flag (1 if disordered, 0 otherwise).
source code
 
set_parent(self, parent)
Set the parent residue.
source code
 
detach_parent(self)
Remove reference to parent.
source code
 
get_sigatm(self)
Return standard deviation of atomic parameters.
source code
 
get_siguij(self)
Return standard deviations of anisotropic temperature factors.
source code
 
get_anisou(self)
Return anisotropic B factor.
source code
 
get_parent(self)
Return parent residue.
source code
 
get_serial_number(self) source code
 
get_name(self)
Return atom name.
source code
 
get_id(self)
Return the id of the atom (which is its atom name).
source code
 
get_full_id(self)
Return the full id of the atom.
source code
 
get_coord(self)
Return atomic coordinates.
source code
 
get_bfactor(self)
Return B factor.
source code
 
get_occupancy(self)
Return occupancy.
source code
 
get_fullname(self)
Return the atom name, including leading and trailing spaces.
source code
 
get_altloc(self)
Return alternative location specifier.
source code
 
get_level(self) source code
 
transform(self, rot, tran)
Apply rotation and translation to the atomic coordinates.
source code
 
get_vector(self)
Return coordinates as Vector.
source code
 
copy(self)
Create a copy of the Atom.
source code

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

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, name, coord, bfactor, occupancy, altloc, fullname, serial_number, element=None)
(Constructor)

source code 
Create Atom object.

The Atom object stores atom name (both with and without spaces),
coordinates, B factor, occupancy, alternative location specifier
and (optionally) anisotropic B factor and standard deviations of
B factor and positions.

@param name: atom name (eg. "CA"). Note that spaces are normally stripped.
@type name: string

@param coord: atomic coordinates (x,y,z)
@type coord: Numeric array (Float0, size 3)

@param bfactor: isotropic B factor
@type bfactor: number

@param occupancy: occupancy (0.0-1.0)
@type occupancy: number

@param altloc: alternative location specifier for disordered atoms
@type altloc: string

@param fullname: full atom name, including spaces, e.g. " CA ". Normally
these spaces are stripped from the atom name.
@type fullname: string

@param element: atom element, e.g. "C" for Carbon, "HG" for mercury,
@type element: uppercase string (or None if unknown)

Overrides: object.__init__

__repr__(self)
(Representation operator)

source code 
Print Atom object as <Atom atom_name>.

Overrides: object.__repr__

__sub__(self, other)
(Subtraction operator)

source code 
Calculate distance between two atoms.

Example:
    >>> distance=atom1-atom2

@param other: the other atom
@type other: L{Atom}

set_sigatm(self, sigatm_array)

source code 
Set standard deviation of atomic parameters.

The standard deviation of atomic parameters consists
of 3 positional, 1 B factor and 1 occupancy standard
deviation.

@param sigatm_array: standard deviations of atomic parameters.
@type sigatm_array: Numeric array (length 5)

set_siguij(self, siguij_array)

source code 
Set standard deviations of anisotropic temperature factors.

@param siguij_array: standard deviations of anisotropic temperature factors.
@type siguij_array: Numeric array (length 6)

set_anisou(self, anisou_array)

source code 
Set anisotropic B factor.

@param anisou_array: anisotropic B factor.
@type anisou_array: Numeric array (length 6)

flag_disorder(self)

source code 
Set the disordered flag to 1.

The disordered flag indicates whether the atom is disordered or not.

set_parent(self, parent)

source code 
Set the parent residue.

Arguments:
 - parent - Residue object

get_full_id(self)

source code 
Return the full id of the atom.

The full id of an atom is the tuple
(structure id, model id, chain id, residue id, atom name, altloc).

transform(self, rot, tran)

source code 
Apply rotation and translation to the atomic coordinates.

Example:
        >>> rotation=rotmat(pi, Vector(1, 0, 0))
        >>> translation=array((0, 0, 1), 'f')
        >>> atom.transform(rotation, translation)

@param rot: A right multiplying rotation matrix
@type rot: 3x3 Numeric array

@param tran: the translation vector
@type tran: size 3 Numeric array

get_vector(self)

source code 
Return coordinates as Vector.

@return: coordinates as 3D vector
@rtype: Vector

copy(self)

source code 
Create a copy of the Atom.

Parent information is lost.