Bio. DBC.mmcifio模块
写入mm到岸文件。
请参阅https://www.iucr.org/resources/cif/spec/version1.1/cifsyntax了解语法。
- class Bio.PDB.mmcifio.MMCIFIO
基类:
StructureIO
将结构对象或mminf字典编写为mminf文件。
示例
>>> from Bio.PDB import MMCIFParser >>> from Bio.PDB.mmcifio import MMCIFIO >>> parser = MMCIFParser() >>> structure = parser.get_structure("1a8o", "PDB/1A8O.cif") >>> io=MMCIFIO() >>> io.set_structure(structure) >>> io.save("bio-pdb-mmcifio-out.cif") >>> import os >>> os.remove("bio-pdb-mmcifio-out.cif") # tidy up
- __init__()
初始化。
- set_dict(dic)
设置要写出的mminf字典。
- save(filepath, select=_select, preserve_atom_numbering=False)
将结构保存到文件。
- 参数:
filepath (string or filehandle) -- 输出文件
select (object) -- 选择要写入的实体。
通常select是L{Select}的一个子集,它应该有以下方法:
accept_mode(模型)
accept_chain(chain)
accept_residue(residue)
accept_atom(atom)
如果要写出实体,这些方法应该返回1,否则应该返回0。
- __annotations__ = {}
- __firstlineno__ = 51
- __static_attributes__ = ('dic',)