biopython v1.71.0 Bio.PDB.PDBIO.PDBIO

Write a Structure object (or a subset of a Structure object) as a PDB file.

Example:

     >>> p=PDBParser()
     >>> s=p.get_structure("1fat", "1fat.pdb")
     >>> io=PDBIO()
     >>> io.set_structure(s)
     >>> io.save("out.pdb")

Link to this section Summary

Functions

Create the PDBIO object

Returns an ATOM PDB string (PRIVATE)

:param file: output file :type file: string or filehandle

Link to this section Functions

Create the PDBIO object.

:param use_model_flag: if 1, force use of the MODEL record in output. :type use_model_flag: int

Link to this function _get_atom_line()

Returns an ATOM PDB string (PRIVATE).

:param file: output file :type file: string or filehandle

:param select: selects which entities will be written. :type select: object

Typically select is a subclass of L{Select}, it should have the following methods:

  • accept_model(model)
  • accept_chain(chain)
  • accept_residue(residue)
  • accept_atom(atom)

These methods should return 1 if the entity is to be written out, 0 otherwise.

Typically select is a subclass of L{Select}.