Simmate/BadELF

Background:
"BadELF is a method that combines Bader Charge Analysis and the Electron Localization Function (ELF) to predict oxidation states and perform population analysis of electrides. It uses Bader segmentation of the ELF to detect electride electrons and Voronoi segmentation of the ELF to identify atoms." ( Simmate Documentation )
Preprocessing:
  • run a structure relaxation using the default relax_job in quacc with the lelf=True and lcharg=True as keyword arguements. Make sure to relax both the atomic positions and the unit cell.
  • alternatively, if you have a smaller system sizer or are getting an error that reads "subspace matrix is not hermetian", try running your geometry optimizations without lelf and lcharg set to True and then when your structure is fully optimized, you can do a subsequent static calculation with lelf=True and lcharg=True with any parameter changes needed to get it to run (e.g. fewer cores). You only need the ELFCAR (and CHGCAR) after the structure is optimized.
To download Simmate/BadELF:
This information is from the README file of this  github Repo , specifically steps 1 and 2 of "How to Install Current Simmate (Recommended).", but the following are the steps you should take specifically for using badELF in the Rosen group.
    download and install anaconda in your scratch directory (if you don't already have it)
    create new virtual environment named badelf
    type this while in the folder containing your ELFCAR and CHGCAR folders.
conda install -n badelf -c conda-forge simmate spyder
which will install simmate and spyder in your environment called "cms". type y when prompted
    run this help command to verify installation
simmate --help
    For first time setup, run: (type y when prompted)
simmate database reset
    Now run:
conda install -c conda-forge mp-pyrho pybader
    Now add badELF by running:
simmate config add badelf
    Now, to update your database, run:
simmate database update
    Test your configuration by running:
simmate config test badelf

To use Simmate/BadELF:
** make sure your environment is active**
    create a .yaml file in the same folder where your job output files are (specifically ELFCAR and CHGCAR)
input.yaml
workflow_name: bad-elf.badelf.badelf
directory: /path/to/folder

# all parameters below are optional
find_electrides: true
min_elf: 0.5
algorithm: badelf
elf_connection_cutoff: 0
check_for_covalency: true
run the workflow:
simmate workflows run input.yaml
warning: CHGCAR and ELFCAR must have identical grid sizes
  • Open up the OUTCAR. See what values NGX, NGY, NGZ and NGXF, NGYF, NGZF are
  • if the two sets (NGa/ NGaX) are different, manually set them to be the same value (the higher of the two)
  • * the xyz coordinates can be different just make sure the sets are identical
Interpreting the results:
    the above workflow will generate a folder in you directory named "badelf" inside that folder will be your CHGCAR, ELFCAR, and POTCAR files as well as a new file called "badelf_summary.csv"
    If you open up the badelf summary, you can read off the degree of electride character which is under the descriptor called "electrides_per_reduced_formula"
Visualizing the results:
Paste the ELFCAR file into vesta and decrease the ELF isosurface value until you can see electron density in the pores.