Bader analysis script

With this script, one can import the Bader volumes as fields in a Materials Studio document. Here are the steps involved:

  1. Generate the Bader volumes using the program available here http://theory.cm.utexas.edu/bader/
  2. Put them (the .cube files) in the same folder as the structure
  3. Set the name of the structure file and the isovalue and run the script

To do this with CASTEP one would generate the inputs like this:

  1. The CASTEP calculation
    • Tick retain server files
    • Add this line to the .param input file:

      WRITE_FORMATTED_DENSITY : TRUE

    • You may want to increase the FFT grid density (see Electronic | More | Basis)
    • Run the job
    • Download the .den_fmt file from the server
  2. Convert the .den_fmt file to a .cube file using den2cube program http://theory.cm.utexas.edu/bader/

In the attachment I have includes a sample set of files for gallium arsenic.