# Bio.PDB.Dice module

Code for chopping up (dicing) a structure.

This module is used internally by the Bio.PDB.extract() function.

class Bio.PDB.Dice.ChainSelector(chain_id, start, end, model_id=0)

  Bases: `object`

  Only accepts residues with right chainid, between start and end.

  Remove hydrogens, waters and ligands. Only use model 0 by default.

  __init__(chain_id, start, end, model_id=0)

    Initialize the class.

  accept_model(model)

    Verify if model match the model identifier.

  accept_chain(chain)

    Verify if chain match chain identifier.

  accept_residue(residue)

    Verify if a residue sequence is between the start and end sequence.

  accept_atom(atom)

    Verify if atoms are not Hydrogen.

  __annotate_func__ = None
  __annotations_cache__ = {}
  __firstlineno__ = 22
  __static_attributes__ = ('chain_id', 'end', 'model_id', 'start')

Bio.PDB.Dice.extract(structure, chain_id, start, end, filename)

  Write out selected portion to filename.

Biopython v: 1.86

Versions
  Previous
  Latest
  Develop

Biopython Project
  Homepage
  On GitHub