Bio.PDB.StructureBuilder module¶
Consumer class that builds a Structure object.
This is used by the PDBParser and MMCIFparser classes.
-
class
Bio.PDB.StructureBuilder.
StructureBuilder
¶ Bases:
object
Deals with constructing the Structure object.
The StructureBuilder class is used by the PDBParser classes to translate a file to a Structure object.
-
__init__
(self)¶ Initialize the class.
-
set_header
(self, header)¶ Set header.
-
set_line_counter
(self, line_counter)¶ Tracks line in the PDB file that is being parsed.
- Arguments:
line_counter - int
-
init_structure
(self, structure_id)¶ Initialize a new Structure object with given id.
- Arguments:
id - string
-
init_model
(self, model_id, serial_num=None)¶ Create a new Model object with given id.
- Arguments:
id - int
serial_num - int
-
init_chain
(self, chain_id)¶ Create a new Chain object with given id.
- Arguments:
chain_id - string
-
init_seg
(self, segid)¶ Flag a change in segid.
- Arguments:
segid - string
-
init_residue
(self, resname, field, resseq, icode)¶ Create a new Residue object.
- Arguments:
resname - string, e.g. “ASN”
field - hetero flag, “W” for waters, “H” for hetero residues, otherwise blank.
resseq - int, sequence identifier
icode - string, insertion code
-
init_atom
(self, name, coord, b_factor, occupancy, altloc, fullname, serial_number=None, element=None, pqr_charge=None, radius=None, is_pqr=False)¶ Create a new Atom object.
- Arguments:
name - string, atom name, e.g. CA, spaces should be stripped
coord - Numeric array (Float0, size 3), atomic coordinates
b_factor - float, B factor
occupancy - float
altloc - string, alternative location specifier
fullname - string, atom name including spaces, e.g. ” CA “
element - string, upper case, e.g. “HG” for mercury
pqr_charge - float, atom charge (PQR format)
radius - float, atom radius (PQR format)
is_pqr - boolean, flag to specify if a .pqr file is being parsed
-
set_anisou
(self, anisou_array)¶ Set anisotropic B factor of current Atom.
-
set_siguij
(self, siguij_array)¶ Set standard deviation of anisotropic B factor of current Atom.
-
set_sigatm
(self, sigatm_array)¶ Set standard deviation of atom position of current Atom.
-
get_structure
(self)¶ Return the structure.
-
set_symmetry
(self, spacegroup, cell)¶ Set symmetry.
-