Transformer
is a Python library for transforming structures by performing atomic substitutions.
The package exposes a framework of "convenience functions" for performing common operations, including generating solid solutions and antisite defects, and batch-importing/exporting result sets.
The logic used to build up these routines is separated into lower-level "primitives" that can be used to program more advanced tasks.
The Transformer
library works in Python >= 2.7 and Python 3 (so far tested on macOS and Debian Linux 8.8), and just needs to be placed in the package search path to work (e.g. add to PYTHONPATH
).
The library requires the NumPy
(Ref. 1) and spglib
(Ref. 2) packages; both can be installed using pip
on Linux/macOS, or built from source (see links to code documentation).
Installing the Cython
(Ref. 3) and tqdm
(Ref. 4) packages (both also available via pip
) enables optional performance enhancements and "eye candy".
Cython
in particular is highly recommended, as it allows core routines to be replaced by optimised C code and leads to substantial performance enhancements.
At present, Transformer
is not fully documented.
The best way to learn how to use it is to look at the Examples folder, which contains a few examples illustrating how to perform common functions:
-
SnS/Se solid solutions: Evaluate the full set of inequivalent structures in an S/Se solid solution built from a 2×1×2 supercell of Pnma SnS with 32 atoms.
-
Antisite defects in Cu2ZnSnS4: Generate configurations with 1-2 antisite defects in a 2×2×1 supercell of kesterite Cu2ZnSnS4.
-
ZnS "cation mutation": Starting from a 1×1×2 supercell expansion of the conventional ZnS cell, generate CuGaS2 and Stannite/Kesterite Cu2ZnSnS4 by successive cation substitutions.
-
Cu2ZnSnS4 vacancies: Generate 2×2×1 supercells of kesterite Cu2ZnSnS4 with Cu, Zn, Sn and S defects, and cation vacancies with compensating anion vacancies (i.e. Schottky defects). This example imports and exports FHI-AIMS rather than VASP POSCAR files.
- Finish adding docstrings (so far only the
Structure
andStructureSet
modules have been documented). - Add examples for using the multithreaded substitution routine and
Filters
framework. - Add examples for using the
Screening
module. - Implement statistical-thermodynamics analysis of data from structure sets generated by
Transformer
. - Implement functionality for identifying and working with interstitials.