Code Monkey home page Code Monkey logo

mctools's Introduction

MCTOOLS

Collection of generic pre- and post- processing tools using the Atomic Simulation Environment. Developed while working with Walsh Materials Design, kept on as a personal toolkit and developed further while at Scanlon Materials Theory Group.

The recommended way of installing is to clone the repository and make a local installation using pip:

git clone https://github.com/ajjackson/mctools.git
cd mctools
pip install --user -e .

To run unit tests, install pytest and run with

python -m pytest

get-spacegroup (Spacegroup tolerances)

Use Spglib to analyse the symmetry of a crystal structure file over a range of distance thresholds. This can be useful for identifying when numerical noise or limited convergence has resulted in a lower-symmetry spacegroup, as well as for quickly checking the identity of an unknown structure. Call with -h flag for usage information.

# EXAMPLE
bash> get_spacegroup.py -i geometry.in.next_step
| Threshold / Å |    Space group    |
|---------------|-------------------|
|    0.00001    |  P-1 (2)          |
|    0.00010    |  P-1 (2)          |
|    0.00050    |  C2/m (12)        |
|    0.00100    |  C2/m (12)        |
|    0.00500    |  P-3m1 (164)      |
|    0.01000    |  P-3m1 (164)      |
|    0.05000    |  P-3m1 (164)      |
|    0.10000    |  P-3m1 (164)      |

get-minimum (Extract optimum from trajectory)

Use ASE to import a trajectory, typically a vasprun.xml or OUTCAR file from a structure relaxation. Find the step with lowest energy and write it out to a file. This is useful for salvaging optimisation calculations that get 'lost'.

get-primitive (Primitive cell generator)

Use Spglib to generate a primitive cell from/to any ASE-supported structure file format. It can be helpful to use get_spacegroup.py first in order to identify an appropriate symmetry threshold. Call with -h flag for usage information.

plot-cplap-ternary (Pretty plotting for CPLAP outputs)

This is an alternative plotter to the GNUplot scripts generated by the Chemical Potential Limits Analysis Program (CPLAP). (website, paper) Specifically it deals with analysis of ternary systems where one phase is set as the dependent variable. All of the necessary data is read from the grid.dat and 2Dplot.txt output files, including the elements and compound formulae. The chemical potential of the dependent element is displayed as a colour map on the stability region. The plotter makes use of various matplotlib features (choice of file formats, appearance customisation with style sheets) to generate publication/presentation-quality graphics.

sendto (submission to remote server)

Copy the current directory to a specified remote server. The server accounts must be set up in sendto.conf. This is a convenience tool for copying files around, and does not submit to a queue.

sqs-read (ATAT SQS file reader)

Read a "bestsqs.out" file as generated by the ATAT mcsqs tool. Print to standard output, optionally write file or open ASE GUI.

fold-prim (ATAT/BANDUP glue)

Computing the unfolded band structure of a disordered or alloy material requires a reference primitive cell, but it makes no sense to compute such a cell. This tool will generate a "dummy" primitive cell from a relaxed supercell, given the supercell matrix.

vasp-charge (Electron counting)

WORK IN PROGRESS

Report the number of electrons in a proposed vasp calculation (NELECT). The name refers to an intended feature (specify system charge). At the moment there is no real user interface.

Uses the VASP_PP_PATH environment variable; if you use ASE for VASP calculations this should be set up. Otherwise it will not work.

vectors (Lattice vectors)

Report lattice vectors in a, b, c, alpha, beta, gamma format. This is useful for comparing structures and makes for more compact and intuitive reporting. Call with -h flag for usage information.

# EXAMPLE
bash> vectors.py geometry.in
  a     b     c    alpha  beta   gamma
11.451 3.856 6.193 90.00 103.21 90.00

Related Repositories

Optimal k-point meshes with a single convergence parameter

Rapid volume optimisation with an auxiliary equation of state

mctools's People

Contributors

ajjackson avatar kavanase avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

mctools's Issues

Set a threshold for pylint

Realistically I am not going to completely satisfy pylint. (e.g. we really don't need a docstring on every module and every function for this kind of package...)

It's intended more as guidance than a hard quality gate, so an "expected" pass threshold would suffice. We can bump it up as code "quality" improves...

While at it, we don't really need to lint for multiple versions of 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.