Skip to content

ENH: enhancing kpts2sizeandoffsets + Castep kpts, bandpath arguments

Adam Jackson requested to merge ajjackson/ase:castep-kpts-dict into master

As mentioned in #382 (closed) the kpts2sizeandoffsets function has a few limitations. This is a utility function for specifying appropriate Monkhorst-Pack meshes. Changes made here include:

  • Allow the function to be used without a valid Atoms object, as this is not required for all the features. Raise an informative error if 'density' would be used without any Atoms.
  • Implement the functionality of 'even' promised in the docstring: True/False/None -> round-up-to-even/round-up-to-odd/do-nothing
  • Have this rounding functionality available when 'density' was not used; this may be useful if meshes are generated with some other tool
  • Test a wide range of scenarios for different inputs

This functionality is made available in the CASTEP calculator, providing the option for GPAW-like dictionary syntax when setting kpts=. This is especially useful as CASTEP does not provide an inbuilt keyword for Gamma-centering.

Edited by Adam Jackson

Merge request reports