Fragment objects are a basic unit for organizing small groups of
Atoms. Amino acid residues are fragments, as well as nucleic acids and
other small molecules. In terms of a PDB file, they are all the atoms
from a unique residue in a chain.
Fragment.res_name - the fragment/residue name Fragment.res_seq
- the sequence id of the fragment/residue Fragment.chain_id - the ID
of the chain containing this fragment
|
__init__(self,
model_id=1,
chain_id='
' ,
fragment_id='
' ,
res_name='
' ,
**args)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature |
source code
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
__getitem__(self,
name_idx)
Lookup an atom contained in a fragment by its name, or by its index
within the fragment's private atom_list. |
source code
|
|
|
|
|
__contains__(self,
atom_idx)
Return True if the Atom object is contained in the fragment. |
source code
|
|
|
index(self,
atom)
Returns the sequential index of the atom. |
source code
|
|
|
set_default_alt_loc(self,
alt_loc)
Sets the default alt_loc of the Fragment. |
source code
|
|
|
add_atom(self,
atom)
Adds an atom to the fragment, and sets the atom's atom.fragment
attribute to the fragment. |
source code
|
|
|
remove_atom(self,
atom)
Removes the Atom instance from the Fragment. |
source code
|
|
|
get_atom(self,
name,
alt_loc=None)
Returns the matching Atom instance contained in the Fragment. |
source code
|
|
|
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. |
source code
|
|
|
iter_atoms(self)
Iterates over all Atom objects contained in the Fragment matching the
current model and default alt_loc. |
source code
|
|
|
|
|
iter_all_atoms(self)
Iterates of all Atoms in the Fragment including Altlocs. |
source code
|
|
|
count_all_atoms(self)
Counts all Atom objects including Atoms in alternate conformations. |
source code
|
|
|
|
|
|
|
get_model(self)
Returns the parent Chain object. |
source code
|
|
|
get_chain(self)
Returns the parent Chain object. |
source code
|
|
|
get_structure(self)
Returns the parent Structure object. |
source code
|
|
|
|
|
|
|
is_amino_acid(self)
Returns True if the Fragment is an Amino Acid residue. |
source code
|
|
|
is_nucleic_acid(self)
Returns True if the Fragment is a Nucleic Acid residue. |
source code
|
|
|
is_water(self)
Returns True if the Fragment is a water molecule, returns False
otherwise. |
source code
|
|
|
set_model_id(self,
model_id)
Sets the model_id of the Fragment and all contained Atom objects. |
source code
|
|
|
set_chain_id(self,
chain_id)
Sets the chain_id of the Fragment and all contained Atom objects. |
source code
|
|
|
set_fragment_id(self,
fragment_id)
Sets the fragment_id of the Fragment and all contained Atom objects. |
source code
|
|
|
set_res_name(self,
res_name)
Sets the res_name of the Fragment and all contained Atom objects. |
source code
|
|
Inherited from object :
__delattr__ ,
__format__ ,
__getattribute__ ,
__hash__ ,
__new__ ,
__reduce__ ,
__reduce_ex__ ,
__repr__ ,
__setattr__ ,
__sizeof__ ,
__subclasshook__
|