kgrid

Calculate the required k-point density from the input geometry for periodic quantum chemistry calculations

https://github.com/wmd-group/kgrid

Science Score: 67.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 4 DOI reference(s) in README
  • Academic publication links
  • Committers with academic emails
    2 of 6 committers (33.3%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (13.4%) to scientific vocabulary

Keywords from Contributors

materials-design computational-chemistry materials-science
Last synced: 6 months ago · JSON representation ·

Repository

Calculate the required k-point density from the input geometry for periodic quantum chemistry calculations

Basic Info
  • Host: GitHub
  • Owner: WMD-group
  • License: other
  • Language: Python
  • Default Branch: develop
  • Size: 69.3 KB
Statistics
  • Stars: 23
  • Watchers: 9
  • Forks: 10
  • Open Issues: 2
  • Releases: 4
Created about 13 years ago · Last pushed over 3 years ago
Metadata Files
Readme Changelog License Citation

README.md

kgrid

Version 1.2: Change log

Generates a suitably converged k-point grid for solid-state quantum chemical calculations.

Current status

Two programs are provided: kgrid and kgrid-series

kgrid

  • The specified input file is read using Atomic Simulation Environment (supported formats)
    • If none is specified, looks for geometry.in (FHI-aims) in working directory
  • A k-point density is selected to satisfy a given length cutoff, as described by Moreno & Soler (1992)[1]. The length cutoff corresponds to a radius about repeated images that would be needed in a gamma-point supercell calculation to achieve the same sampling.
  • This k-point grid is expressed as a number of samples in each lattice vector and passed to standard output. (Note that this is NOT a Moreno-Soler grid as it does not use symmetry information to minimise the required number of points. It is a uniform grid specified with the same length parameter notation.)
  • Default k-point cutoff is 10Å (generally well-converged for semiconducting or insulating materials)
  • Optional arguments are implemented with conventional GNU/POSIX syntax, including -h help option

kgrid-series

  • Reports a series of "critical" cutoffs and KSPACING values with their corresponding k-point grids.
  • These may be very useful for convergence testing, but users should be wary of rounding behaviour near these values.

Requirements

Usage

kgrid

From the command line

bash kgrid FILE -t TYPE -c CUTOFF

will return a suggested set of mesh dimensions. FILE can be any file format supported by ASE; if no FILE is specified, kgrid will look for a geometry.in file in the current directory. TYPE is a string specifying the format of this file; usually this argument can be left out and the correct type will be inferred by ASE. CUTOFF is the real-space cutoff parameter in Å and defaults to 10.0.

There is an internal Python function which may prove useful to ASE users, with the form python kgrid.calc_kpt_tuple(atoms, cutoff_length=10)

where atoms is an ASE atoms object and the function returns a tuple. As such, kgrid may be used while setting up a calculation with a typical ASE calculator. For example:

``` python import kgrid from ase.io import read from ase.calculators.vasp import Vasp

atoms = read('myfavouritestructure.cif') calc = Vasp(xc='PBE', kpts=kgrid.calckpttuple(atoms)) atoms.setcalculator(calc) atoms.gettotal_energy() ```

would perform a VASP calculation in the current directory with the PBE functional, using kgrid to determine the reciprocal-space sampling.

kgrid-series

bash kgrid-series FILE -t TYPE --min MIN --max MAX

Example output:

``` bash Length cutoff KSPACING Samples


  10.630    0.2956     2   7   4
  11.260    0.2790     2   8   4
  11.860    0.2649     2   8   5
  12.148    0.2586     3   8   5
  13.666    0.2299     3   9   5
  14.075    0.2232     3  10   5
  15.185    0.2069     3  10   6
  16.703    0.1881     3  11   6
  16.890    0.1860     3  12   6
  17.790    0.1766     3  12   7
  18.222    0.1724     4  12   7
  19.705    0.1594     4  13   7
  19.741    0.1591     4  13   8
  21.259    0.1478     4  14   8
  22.520    0.1395     4  15   8
  22.777    0.1379     4  15   9
  23.720    0.1324     4  16   9
  24.296    0.1293     5  16   9
  25.335    0.1240     5  17   9
  25.814    0.1217     5  17  10
  27.333    0.1149     5  18  10
  28.150    0.1116     5  19  10
  28.852    0.1089     5  19  11
  29.650    0.1060     5  20  11

```

Use the --castep option to replace KSPACING with "MP SPACING", which corresponds to the KPOINTSMPSPACING parameter in CASTEP (i.e. divide by 2π).

INSTALLATION

kgrid uses setuptools; from a reasonable healthy Python environment you can use

pip install .

with the usual pip caveats:

  • the --user flag is highly recommended and avoids the need for administrator privileges, but on a somewhat unhealthy Python installation the user packages location may not be on your paths yet.
  • the -e flag creates an "editable" installation which links to this repository and enables easy updates with git.

kgrid is not developed on Windows but no problems are anticipated; the Anaconda Python distribution includes pip. We have had good experiences using the Windows subsystem for Linux (WSL), available on Windows 10. On Mac OSX, the system Python does not include pip but there are various ways of getting a more complete distribution such as Homebrew or Anaconda.

Testing

To run the unit tests, install pytest and pytest-mock and run pytest from the project directory (i.e. the folder containing this README.)

Disclaimer

This program is not affiliated with ASE or any particular quantum chemistry code. This program is made available under the GNU General Public License; you are free to modify and use the code, but do so at your own risk.

References

[1] Moreno, J., & Soler, J. (1992). Optimal meshes for integrals in real- and reciprocal-space unit cells. Physical Review B, 45(24), 13891–13898. doi:10.1103/PhysRevB.45.13891

Owner

  • Name: Materials Design Group
  • Login: WMD-group
  • Kind: organization
  • Location: London

Research group in computational chemistry & physics led by @aronwalsh at @ImperialCollegeLondon

Citation (CITATION.cff)

cff-version: 1.2.0
message: "Please consider citing this software as below"
authors:
- family-names: "Jackson"
  given-names: "Adam James"
  orcid: "https://orcid.org/0000-0001-5272-6530"
title: "kgrid"
version: 1.2.0
date-released: 2021-04-01
url: "https://github.com/wmd-group/kgrid"

GitHub Events

Total
  • Watch event: 1
  • Fork event: 1
Last Year
  • Watch event: 1
  • Fork event: 1

Committers

Last synced: about 2 years ago

All Time
  • Total Commits: 57
  • Total Committers: 6
  • Avg Commits per committer: 9.5
  • Development Distribution Score (DDS): 0.421
Past Year
  • Commits: 1
  • Committers: 1
  • Avg Commits per committer: 1.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Adam J. Jackson a****n@p****g 33
ajjackson a****n@b****k 15
Seán Kavanagh 5****e 5
Aron Walsh a****h@b****k 2
Alex Ganose u****f 1
RKBK s****d@g****m 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 7
  • Total pull requests: 4
  • Average time to close issues: 2 months
  • Average time to close pull requests: 2 days
  • Total issue authors: 3
  • Total pull request authors: 4
  • Average comments per issue: 2.86
  • Average comments per pull request: 1.25
  • Merged pull requests: 4
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • ajjackson (3)
  • utf (2)
  • RKBK (2)
Pull Request Authors
  • RKBK (1)
  • kavanase (1)
  • utf (1)
  • ajjackson (1)
Top Labels
Issue Labels
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 37 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 1
  • Total versions: 2
  • Total maintainers: 1
pypi.org: kgrid

Reciprocal space sampling for atomistic crystal structures

  • Versions: 2
  • Dependent Packages: 0
  • Dependent Repositories: 1
  • Downloads: 37 Last month
Rankings
Dependent packages count: 10.1%
Forks count: 10.2%
Stargazers count: 13.3%
Average: 18.6%
Dependent repos count: 21.6%
Downloads: 37.6%
Maintainers (1)
Last synced: 6 months ago

Dependencies

setup.py pypi
  • ase >=3.18
.github/workflows/python-testing.yml actions
  • actions/checkout v2 composite
  • actions/setup-python v2 composite