src.easycrystallography.io
cif
template
CIF_Template
This class is an abstract class for a CIF template.
to_cif_str(obj, block=None)
This method returns the CIF string. :return: The CIF string.
cif_parser
CifFileReader
Bases: AbstractStructureReader
Reads a structure from a CIF file.
__init__(filename)
Initializes the CIF structure reader.
:param filename: The filename of the CIF file.
read(in_str, reader_class)
Reads the CIF structure.
:return: The CIF structure.
CifFileWriter
Bases: AbstractStructureWriter
Writes a structure to a CIF file.
__init__(filename, data_name=None, raw='w')
Initializes the CIF structure writer.
:param filename: The filename of the CIF file.
write(structure, writer_class, *args, **kwargs)
Writes the CIF structure.
:param structure: The CIF structure.
CifStringReader
Bases: AbstractStructureReader
Reads a structure from a CIF String.
__init__()
Initializes the CIF structure reader.
read(in_str, reader_class)
Reads the CIF structure.
:return: The CIF structure.
CifStringWriter
Bases: AbstractStructureWriter
Writes a structure to a CIF file.
__init__()
Initializes the CIF structure writer.
write(structure, writer_class, *args, **kwargs)
Writes the CIF structure.
:param structure: The CIF structure.
template
AbstractStructureReader
Bases: AbstractBase
Abstract class for reading structures.
read(input, *args, **kwargs)
abstractmethod
Reads a structure from a file.
:param filename: The filename to read from. :return: The structure.
AbstractStructureWriter
Bases: AbstractBase
Abstract class for writing structures.
write(structure, *args, **kwargs)
abstractmethod
Writes a structure to a file.
:param structure: The structure to write. :param filename: The filename to write to.