Skip to content

ajjackson/mctools

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

52 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 .

ase-convert (Convert structure files)

Use ASE to read a crystal structure file and write out to target format. Call with -h flag for usage information. ASE can also get this information from some output file formats, which is useful.

# EXAMPLE: read relaxed structure from aims output and write VASP input
bash> ase_convert.py aims.out POSCAR

# EXAMPLE: Convert between files with non-standard names
bash> ase_convert.py -f vasp MY_SUPER_POSCAR -t cif MY_SUPER_CIF

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