Package Bio :: Package PDB :: Module PDBIO' :: Class PDBIO
[hide private]
[frames] | no frames]

Class PDBIO

source code

object --+
         |
        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")
Instance Methods [hide private]
 
__init__(self, use_model_flag=0)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
_get_atom_line(self, atom, hetfield, segid, atom_number, resname, resseq, icode, chain_id, charge=' ')
Returns an ATOM PDB string (PRIVATE).
source code
 
save(self, file, select=<Select all>, write_end=0) source code
 
set_structure(self, structure) source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, use_model_flag=0)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Parameters:
  • use_model_flag (int) - if 1, force use of the MODEL record in output.
Overrides: object.__init__

save(self, file, select=<Select all>, write_end=0)

source code 
Parameters:
  • file (string or filehandle) - output file
  • select (select hould 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 Select.

    ) - selects which entities will be written.