Package Bio :: Package PDB :: Module FragmentMapper' :: Class Fragment
[hide private]
[frames] | no frames]

Class Fragment

source code

object --+
         |
        Fragment

Represent a polypeptide C-alpha fragment.
Instance Methods [hide private]
 
__init__(self, length, fid)
Initialize fragment object.
source code
 
__len__(self)
Return lengt of the fragment.
source code
 
__repr__(self)
Represent the fragment object as a string.
source code
float
__sub__(self, other)
Return rmsd between two fragments.
source code
 
add_residue(self, resname, ca_coord)
Add a residue.
source code
Numeric (Nx3) array
get_coords(self)
Get the CA coordinates in the fragment.
source code
int
get_id(self)
Get identifier for the fragment.
source code
[string, string,...]
get_resname_list(self)
Get residue list.
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, length, fid)
(Constructor)

source code 
Initialize fragment object.
Parameters:
  • length (int) - length of the fragment
  • fid (int) - id for the fragment
Overrides: object.__init__

__repr__(self)
(Representation operator)

source code 

Represent the fragment object as a string.

Returns <Fragment length=L id=ID> where L=length of fragment and ID the identifier (rank in the library).

Overrides: object.__repr__

__sub__(self, other)
(Subtraction operator)

source code 

Return rmsd between two fragments.

Examples

>>> rmsd = fragment1 - fragment2
Returns: float
rmsd between fragments

add_residue(self, resname, ca_coord)

source code 
Add a residue.
Parameters:
  • resname (string) - residue name (eg. GLY).
  • ca_coord (Numeric array with length 3) - the c-alpha coorinates of the residues

get_coords(self)

source code 
Get the CA coordinates in the fragment.
Returns: Numeric (Nx3) array
the CA coords in the fragment

get_id(self)

source code 
Get identifier for the fragment.
Returns: int
id for the fragment

get_resname_list(self)

source code 
Get residue list.
Returns: [string, string,...]
the residue names