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)
@param use_model_flag: if 1, force use of the MODEL record in output.
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=True)
@param file: output file @type file: string or filehandle
source code
 
set_structure(self, pdb_object) 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 

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

Overrides: object.__init__

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

source code 

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

@param select: selects which entities will be written.
@type 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 L{Select}.