Skip to content

Scripts for interacting with CASTEP input and output files for simulations that model solid solutions using the virtual crystal approximation (VCA).

Notifications You must be signed in to change notification settings

ChrisWoodgate/castep_vca

 
 

Repository files navigation

CASTEP_VCA_scripts

Scripts for interacting with CASTEP input and output files for simulations that model solid solutions using the Virtual Crystal Approximation (VCA).

It is recommended that you familiarise yourself with these scripts by following the tutorial in the examples/ directory.

These scripts may be used to construct input files for simulations and extract info (structures, calculation parameters, forces, energies etc) from input and output files, even for cases that use the VCA -- something that the ase (Atomic Simulation Environment) module cannot do. These scripts may also be used to easily convert between solid solution ("mixed") structures and "pure" structures -- which may be interpreted by standard atomistic manipulation tools. There is also the functionality (within the phonon_VCA.py module) to compute harmonic phonons using Phonopy for cells with mixed atoms on a single site.

The main modules, containing functions and classes for general use, are:

  • readmixcastep.py -- for reading/writing VCA CASTEP input/output files
  • mixmap.py -- for managing mapping between pure and mix structures
  • phonons_VCA.py -- a wrapper to manage phonon calculations with the VCA

The following modules then provide more general utilities:

  • strindices.py -- for identifying lines in files containing various combinations of strings
  • casase.py -- a wrapper to the ase.io.read() method to suppress unnecessary output if CASTEP is not integrated to run within ase (e.g. if simulations are run externally).

Finally, the following scripts are command line tools for quickly manipulating structures:

  • SS_to_endmember.py -- converts a mixed (solid solution) structure quickly to a pure structure.
  • pinchposns.py -- takes two cell files as input and shifts atoms in the second to be closest to those in the first (considering PBCs).
  • shiftcas.py -- shifts all atoms in a cell by a given vector.

The unittests.py script can be run to check that most functionality within these modules works (i.e. does not throw up an error). However for a tutorial on how to use the scripts, I recommend looking in the examples/ directory.

About

Scripts for interacting with CASTEP input and output files for simulations that model solid solutions using the virtual crystal approximation (VCA).

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%