Git Product home page Git Product logo

transformer's Introduction

Transformer

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.

Installation

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.

Examples

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:

  1. 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.

  2. Antisite defects in Cu2ZnSnS4: Generate configurations with 1-2 antisite defects in a 2×2×1 supercell of kesterite Cu2ZnSnS4.

  3. 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.

  4. 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.

Working TODO List

  • Finish adding docstrings (so far only the Structure and StructureSet 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.

References

  1. https://atztogo.github.io/spglib/
  2. http://www.numpy.org/
  3. http://cython.org/
  4. https://pypi.python.org/pypi/tqdm; https://github.com/noamraph/tqdm

transformer's People

Contributors

jmskelton avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

transformer's Issues

warnings package error on Mac OSX - system Python

Expected

Trying to run the cation mutation example, expected it to run as described.

Actual behaviour

On running the script python script.py

I got the following:

File "Transformer/Utilities/MultiprocessingHelper.py", line 460, in QueueAccumulate warings.warn("The tqdm module could not be imported -> progressBar will be reset to False.", RuntimeWarning); NameError: name 'warings' is not defined

Steps to recreate

Install Transformer as described on OSX
Run Example_ZnS-CationMutation.py

Notes

Replacing warings.warn with print in the named file fixed the issue for me.

Systems affected

OSX 10.12.6; with system Python

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.