Tool for handling data.



Tools to operate on CifData nodes.


Bases: Exception

An exception that will be raised if pymatgen fails to parse the structure from a cif because some site occupancies exceed the occupancy tolerance. This often happens for structures that have attached species, such as hydrogen, and specify a placeholder position for it, leading to occupancies greater than one. Pymatgen only issues a warning in this case and simply does not return a structure

__module__ = ''#

list of weak references to the object (if defined), **kwargs)[source]#

Creates using ASE.


unable to correctly import structures of alloys.


requires ASE module., **kwargs)[source]#

Creates using pymatgen.

  • occupancy_tolerance – If total occupancy of a site is between 1 and occupancy_tolerance, the occupancies will be scaled down to 1.

  • site_tolerance – This tolerance is used to determine if two sites are sitting in the same position, in which case they will be combined to a single disordered site. Defaults to 1e-4.


requires pymatgen module.[source]#

Refine (reduce) the cell of, find and remove symmetrically equivalent atoms.


node – a instance.


dict with


can be used as inline calculation., tr=(0, 0, 0), eps=0)[source]#

Construct a CIF representation of symmetry operator plus translation. See International Tables for Crystallography Vol. A. (2002) for definition.

  • matrix – 3x3 matrix, representing the symmetry operator

  • tr – translation vector of length 3 (default 0)

  • eps – epsilon parameter for fuzzy comparison x == 0


CIF representation of symmetry operator

Various utilities to deal with StructureData instances or create new ones (e.g. convert format to/from SPGLIB, create a StructureData from a different format, …), parameters)[source]#

Creates using ASE.


requires ASE module., kind_info=None, kinds=None)[source]#

Convert a tuple of the format (cell, scaled_positions, element_numbers) to an AiiDA structure.

Unless the element_numbers are identical to the Z number of the atoms, you should pass both kind_info and kinds, with the same format as returned by get_tuple_from_aiida_structure.

  • structure_tuple – the structure in format (structure_tuple, kind_info)

  • kind_info – a dictionary mapping the kind_names to the numbers used in element_numbers. If not provided, assumes {element_name: element_Z}

  • kinds – a list of the kinds of the structure.[source]#

Convert an AiiDA structure to a tuple of the format (cell, scaled_positions, element_numbers).


structure – the AiiDA structure


(structure_tuple, kind_info, kinds) where structure_tuple is a tuple of format (cell, scaled_positions, element_numbers); kind_info is a dictionary mapping the kind_names to the numbers used in element_numbers. When possible, it uses the Z number of the element, otherwise it uses numbers > 1000; kinds is a list of the kinds of the structure.[source]#

Yields a tuple (natoms, comment, atomiter)`for each frame in a XYZ file where `atomiter is an iterator yielding a nested tuple (symbol, (x, y, z)) for each entry.


xyz_string – a string containing XYZ-structured text