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

Module Selection

source code

Selection of atoms, residues, etc.

Functions [hide private]
 
uniqueify(items)
Return a list of the unique items in the given iterable.
source code
 
get_unique_parents(entity_list)
Translate a list of entities to a list of their (unique) parents.
source code
 
unfold_entities(entity_list, target_level)
Unfold entities list to a child level (e.g.
source code
 
_test()
Run the Bio.PDB.Selection module's doctests (PRIVATE).
source code
Variables [hide private]
  entity_levels = ['A', 'R', 'C', 'M', 'S']
  __package__ = 'Bio.PDB'
Function Details [hide private]

uniqueify(items)

source code 
Return a list of the unique items in the given iterable.

Order is NOT preserved.

unfold_entities(entity_list, target_level)

source code 
Unfold entities list to a child level (e.g. residues in chain).

Unfold a list of entities to a list of entities of another
level.  E.g.:

list of atoms -> list of residues
list of modules -> list of atoms
list of residues -> list of chains

o entity_list - list of entities or a single entity
o target_level - char (A, R, C, M, S)

Note that if entity_list is an empty list, you get an empty list back:

>>> unfold_entities([], "A")
[]