Bio.PDB.mmtf.mmtfio module
Write a MMTF file.
- class Bio.PDB.mmtf.mmtfio.MMTFIO
Bases:
StructureIO
Write a Structure object as a MMTF file.
Examples
>>> from Bio.PDB import MMCIFParser >>> from Bio.PDB.mmtf import MMTFIO >>> parser = MMCIFParser() >>> structure = parser.get_structure("1a8o", "PDB/1A8O.cif") >>> io=MMTFIO() >>> io.set_structure(structure) >>> io.save("bio-pdb-mmtf-out.mmtf") >>> import os >>> os.remove("bio-pdb-mmtf-out.mmtf") # tidy up
- __init__()
Initialise.
- save(filepath, select=_select)
Save the structure to a file.
- Parameters:
filepath (string) – output file
select (object) – selects which entities will be written.
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.