gemmi.cif.Document class

Contents

Methods

def add_copied_block(self, block: Block, pos: int = -1) -> Block
def add_new_block(self, name: str, pos: int = -1) -> Block
def as_json(self, mmjson: bool = False) -> str
Returns JSON representation in a string.
def as_string(self, style: Style = Style.Simple) -> str
Returns a string in CIF format.
def check_for_duplicates(self, /) -> None
def check_for_missing_values(self, /) -> None
def clear(self, /) -> None
def find_block(self, name: str) -> Block
def parse_file(self, arg0: str, /) -> None
def parse_string(self, arg0: str, /) -> None
def sole_block(self, /) -> Block
Returns the only block if there is exactly one
def write_file(self, filename: str, style: Style = Style.Simple) -> None
Write data to a CIF file.

Special methods

def __delitem__(self, index: int) -> None
def __getitem__(self, name: str) -> Block
def __getitem__(self, index: int) -> Block
def __getitem__(self, arg0: slice, /) -> list
def __init__(self, /) -> None
def __iter__(self, /) -> typing.Iterator[Block]
def __len__(self, /) -> int
def __repr__(self, /) -> str

Properties

source: str get set