# pymatgen.io.zeopp module

Module implementing classes and functions to use Zeo++.

## Zeo++ Installation Steps:

1. Zeo++ requires Voro++. Download Voro++ from code.lbl.gov using subversion: “svn checkout –username anonsvn https://code.lbl.gov/svn/voro/trunk Password is anonsvn.

2. Stable version of Zeo++ can be obtained from http://www.maciejharanczyk.info/Zeopp/ Alternatively it can be obtained from code.lbl.gov. Replace voro with zeo.

3) (Optional) Install cython from pip Mac OS X: 4) (a) Edit the Voro++/voro/trunk/config.mk file to suit your environment

> (compiler, linker). (b) Run make command

5. (a) Edit the Zeo++/trunk/cython_wrapper/setup.py to correctly point to Voro++ directory. (b) Run “python setup.py develop” to install Zeo++ python bindings. Be patient, it will take a while.

Linux: 4) (a) Edit the Voro++/voro/trunk/config.mk file to suit your environment.

> 2. Also add -fPIC option to CFLAGS variable in config.mk file.

> 3. Run make command

5. (a) Go to Zeo++/zeo/trunk folder and compile zeo++ library using the command “make dylib”. (b) Edit the Zeo++/trunk/cython_wrapper/setup_alt.py to correctly point to Voro++ directory. (c) Run “python setup_alt.py develop” to install Zeo++ python bindings.

## Zeo++ Post-Installation Checking:

1. Go to pymatgen/io/tests and run “python test_zeoio.py” If Zeo++ python bindings are properly installed, the tests should pass. One or two tests will be skipped.

2. Go to pymatgen/analysis/defects/tests and run “python test_point_defects.py”. Lots of tests will be skipped if GULP is not installed. But there should be no errors.

class ZeoCssr(structure)

  Bases: `pymatgen.io.cssr.Cssr`

  ZeoCssr adds extra fields to CSSR sites to conform with Zeo++ input CSSR format. The coordinate system is rorated from xyz to zyx. This change aligns the pivot axis of pymatgen (z-axis) to pivot axis of Zeo++ (x-axis) for structurural modifications.

  Parameters

    structure – A structure to create ZeoCssr object

  static from_file(filename)

    Reads a CSSR file to a ZeoCssr object.

    Parameters

      filename – Filename to read from.

    Returns

      ZeoCssr object.

  static from_string(string)

    Reads a string representation to a ZeoCssr object.

    Parameters

      string – A string representation of a ZeoCSSR.

    Returns

      ZeoCssr object.

class ZeoVoronoiXYZ(mol)

  Bases: `pymatgen.io.xyz.XYZ`

  Class to read Voronoi Nodes from XYZ file written by Zeo++. The sites have an additional column representing the voronoi node radius. The voronoi node radius is represented by the site property voronoi_radius.

  Parameters

    mol – Input molecule holding the voronoi node information

  static from_file(filename)

    Creates XYZ object from a file.

    Parameters

      filename – XYZ filename

    Returns

      XYZ object

  static from_string(contents)

    Creates Zeo++ Voronoi XYZ object from a string. from_string method of XYZ class is being redefined.

    Parameters

      contents – String representing Zeo++ Voronoi XYZ file.

    Returns

      ZeoVoronoiXYZ object

get_free_sphere_params(structure, rad_dict=None, probe_rad=0.1)

  Analyze the void space in the input structure using voronoi decomposition Calls Zeo++ for Voronoi decomposition.

  Parameters

    - structure – pymatgen.core.structure.Structure

    - rad_dict (optional) – Dictionary of radii of elements in structure. If not given, Zeo++ default values are used. Note: Zeo++ uses atomic radii of elements. For ionic structures, pass rad_dict with ionic radii

    - probe_rad (optional) – Sampling probe radius in Angstroms. Default is 0.1 A

  Returns

    voronoi nodes as pymatgen.core.structure.Strucutre within the unit cell defined by the lattice of input structure voronoi face centers as pymatgen.core.structure.Strucutre within the unit cell defined by the lattice of input structure

get_high_accuracy_voronoi_nodes(structure, rad_dict, probe_rad=0.1)

  Analyze the void space in the input structure using high accuracy voronoi decomposition. Calls Zeo++ for Voronoi decomposition.

  Parameters

    - structure – pymatgen.core.structure.Structure

    - rad_dict (optional) – Dictionary of radii of elements in structure. If not given, Zeo++ default values are used. Note: Zeo++ uses atomic radii of elements. For ionic structures, pass rad_dict with ionic radii

    - probe_rad (optional) – Sampling probe radius in Angstroms. Default is 0.1 A

  Returns

    voronoi nodes as pymatgen.core.structure.Strucutre within the unit cell defined by the lattice of input structure voronoi face centers as pymatgen.core.structure.Strucutre within the unit cell defined by the lattice of input structure

get_void_volume_surfarea(structure, rad_dict=None, chan_rad=0.3, probe_rad=0.1)

  Computes the volume and surface area of isolated void using Zeo++. Useful to compute the volume and surface area of vacant site.

  Parameters

    - structure – pymatgen Structure containing vacancy

    - rad_dict (optional) – Dictionary with short name of elements and their radii.

    - chan_rad (optional) – Minimum channel Radius.

    - probe_rad (optional) – Probe radius for Monte Carlo sampling.

  Returns

    floating number representing the volume of void

  Return type

    volume

get_voronoi_nodes(structure, rad_dict=None, probe_rad=0.1)

  Analyze the void space in the input structure using voronoi decomposition Calls Zeo++ for Voronoi decomposition.

  Parameters

    - structure – pymatgen.core.structure.Structure

    - rad_dict (optional) – Dictionary of radii of elements in structure. If not given, Zeo++ default values are used. Note: Zeo++ uses atomic radii of elements. For ionic structures, pass rad_dict with ionic radii

    - probe_rad (optional) – Sampling probe radius in Angstroms. Default is 0.1 A

  Returns

    voronoi nodes as pymatgen.core.structure.Strucutre within the unit cell defined by the lattice of input structure voronoi face centers as pymatgen.core.structure.Strucutre within the unit cell defined by the lattice of input structure