Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# EditorConfig is awesome: https://EditorConfig.org
# SPDX-FileCopyrightText: © 2023 Tiny DFT Development Team <https://github.com/molmod/acid/blob/main/AUTHORS.md>
# SPDX-License-Identifier: GPL-3.0-or-later

root = true

Expand Down
3 changes: 3 additions & 0 deletions .github/requirements-old.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# SPDX-FileCopyrightText: © 2023 Tiny DFT Development Team <https://github.com/molmod/acid/blob/main/AUTHORS.md>
# SPDX-License-Identifier: GPL-3.0-or-later

# Ensure changes to these dependencies are reflected in pyproject.toml
numpy==2.2.6
scipy==1.15.3
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/pytest.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# SPDX-FileCopyrightText: © 2023 Tiny DFT Development Team <https://github.com/molmod/acid/blob/main/AUTHORS.md>
# SPDX-License-Identifier: GPL-3.0-or-later

name: pytest
on:
push:
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# SPDX-FileCopyrightText: © 2023 Tiny DFT Development Team <https://github.com/molmod/acid/blob/main/AUTHORS.md>
# SPDX-License-Identifier: GPL-3.0-or-later

*.png
__pycache__
*.py[cod]
Expand Down
11 changes: 11 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# SPDX-FileCopyrightText: © 2023 Tiny DFT Development Team <https://github.com/molmod/acid/blob/main/AUTHORS.md>
# SPDX-License-Identifier: GPL-3.0-or-later

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
Expand Down Expand Up @@ -34,3 +37,11 @@ repos:
rev: 0.37.1
hooks:
- id: check-github-workflows
- repo: https://github.com/hukkin/mdformat
rev: 1.0.0
hooks:
- id: mdformat
- repo: https://github.com/fsfe/reuse-tool
rev: v6.2.0
hooks:
- id: reuse
3 changes: 3 additions & 0 deletions .yamllint
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# SPDX-FileCopyrightText: © 2023 Tiny DFT Development Team <https://github.com/molmod/acid/blob/main/AUTHORS.md>
# SPDX-License-Identifier: GPL-3.0-or-later

extends: default

rules:
Expand Down
11 changes: 11 additions & 0 deletions AUTHORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!--
SPDX-FileCopyrightText: © 2023 Tiny DFT Development Team <https://github.com/molmod/acid/blob/main/AUTHORS.md>
SPDX-License-Identifier: GPL-3.0-or-later
-->

# Authors

- [Toon Verstraelen](https://github.com/tovrstra):
Associate professor at [Ghent University](https://www.ugent.be/),
member of the [Center for Molecular Modeling](https://molmod.ugent.be/).
ORCID: [0000-0001-9288-5608](https://orcid.org/0000-0001-9288-5608)
232 changes: 232 additions & 0 deletions LICENSE

Large diffs are not rendered by default.

674 changes: 0 additions & 674 deletions LICENSE.txt

This file was deleted.

232 changes: 232 additions & 0 deletions LICENSES/GPL-3.0-or-later.txt

Large diffs are not rendered by default.

9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
<!--
SPDX-FileCopyrightText: © 2023 Tiny DFT Development Team <https://github.com/molmod/acid/blob/main/AUTHORS.md>
SPDX-License-Identifier: GPL-3.0-or-later
-->

# Tiny DFT

Tiny DFT is a minimalistic atomic Density Functional Theory (DFT) code, mainly for educational purposes.
Expand Down Expand Up @@ -125,7 +130,7 @@ In order of increasing difficulty:

In ZORA, the following operator should be added to the Hamiltonian:

![t_{ab} = \int (\nabla \chi_a) (\nabla \chi_b) \frac{v_{KS}(\mathbf{r})}{4/\alpha^2 - 2v_{KS}(\mathbf{r})} \mathrm{d}\mathbf{r}](zora.png)
![t_{ab} = nt (abla hi_a) (abla hi_b) rac{v_{KS}(athbf{r})}{4/lpha^2 - 2v_{KS}(athbf{r})} athrm{d}athbf{r}](zora.png)

where the first factors are the gradients of the basis functions (similar to the kinetic energy operator).
The Kohn-Sham potential from the previous outer iteration can be used.
Expand Down Expand Up @@ -183,7 +188,7 @@ of `z`, to make them more self-explaining and to comply with good practices.
- `occups`: Occupation numbers
- `olp`: Overlap integrals
- `orb_u`: Orbital divided by r: U = R/r
- `orb_r`: Orbital: R = U*r
- `orb_r`: Orbital: R = U\*r
- `priqn`: Primary quantum numbers
- `rho`: Electron density on grid points
- `vhartree`: Hartree potential, i.e. minus classical electrostatic potential
Expand Down
13 changes: 13 additions & 0 deletions REUSE.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# SPDX-FileCopyrightText: © 2023 Tiny DFT Development Team <https://github.com/molmod/acid/blob/main/AUTHORS.md>
# SPDX-License-Identifier: GPL-3.0-or-later

version = 1

[[annotations]]
path = [
"zora.png",
"tests/test_tiny*/test_*.csv",
]
precedence = "override"
SPDX-FileCopyrightText = "© 2023 Tiny DFT Development Team <https://github.com/molmod/acid/blob/main/AUTHORS.md>"
SPDX-License-Identifier = "GPL-3.0-or-later"
6 changes: 5 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# SPDX-FileCopyrightText: © 2023 Tiny DFT Development Team <https://github.com/molmod/acid/blob/main/AUTHORS.md>
# SPDX-License-Identifier: GPL-3.0-or-later

[build-system]
requires = ["setuptools>=65.0", "setuptools_scm[toml]>=7.1.0"]
build-backend = "setuptools.build_meta"
Expand Down Expand Up @@ -41,7 +44,8 @@ dev = [
"pytest-cov",
"pytest-xdist",
"pytest-regressions",
"pandas"
"pandas",
"reuse",
]

[project.scripts]
Expand Down
20 changes: 2 additions & 18 deletions src/tinydft/__init__.py
Original file line number Diff line number Diff line change
@@ -1,21 +1,5 @@
# Tiny DFT is a minimalistic atomic DFT implementation.
# Copyright (C) 2024 The Tiny DFT Development Team
#
# This file is part of Tiny DFT.
#
# Tiny DFT is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 3
# of the License, or (at your option) any later version.
#
# Tiny DFT is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, see <http://www.gnu.org/licenses/>
# --
# SPDX-FileCopyrightText: © 2023 Tiny DFT Development Team <https://github.com/molmod/acid/blob/main/AUTHORS.md>
# SPDX-License-Identifier: GPL-3.0-or-later
"""Tiny DFT is a minimalistic atomic DFT implementation.

It only supports closed-shell calculations with pure local (not even semi-local)
Expand Down
20 changes: 2 additions & 18 deletions src/tinydft/atom.py
Original file line number Diff line number Diff line change
@@ -1,21 +1,5 @@
# Tiny DFT is a minimalistic atomic DFT implementation.
# Copyright (C) 2024 The Tiny DFT Development Team
#
# This file is part of Tiny DFT.
#
# Tiny DFT is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 3
# of the License, or (at your option) any later version.
#
# Tiny DFT is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, see <http://www.gnu.org/licenses/>
# --
# SPDX-FileCopyrightText: © 2023 Tiny DFT Development Team <https://github.com/molmod/acid/blob/main/AUTHORS.md>
# SPDX-License-Identifier: GPL-3.0-or-later
"""Utilities for setting up atomic calculations.

This is used by the demos and the unit tests.
Expand Down
20 changes: 2 additions & 18 deletions src/tinydft/basis.py
Original file line number Diff line number Diff line change
@@ -1,21 +1,5 @@
# Tiny DFT is a minimalistic atomic DFT implementation.
# Copyright (C) 2024 The Tiny DFT Development Team
#
# This file is part of Tiny DFT.
#
# Tiny DFT is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 3
# of the License, or (at your option) any later version.
#
# Tiny DFT is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, see <http://www.gnu.org/licenses/>
# --
# SPDX-FileCopyrightText: © 2023 Tiny DFT Development Team <https://github.com/molmod/acid/blob/main/AUTHORS.md>
# SPDX-License-Identifier: GPL-3.0-or-later
"""Radial orbital basis of Gaussian primitives and their integrals for TinyDFT."""

from functools import wraps
Expand Down
20 changes: 2 additions & 18 deletions src/tinydft/demo_evn.py
Original file line number Diff line number Diff line change
@@ -1,21 +1,5 @@
# Tiny DFT is a minimalistic atomic DFT implementation.
# Copyright (C) 2024 The Tiny DFT Development Team
#
# This file is part of Tiny DFT.
#
# Tiny DFT is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 3
# of the License, or (at your option) any later version.
#
# Tiny DFT is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, see <http://www.gnu.org/licenses/>
# --
# SPDX-FileCopyrightText: © 2023 Tiny DFT Development Team <https://github.com/molmod/acid/blob/main/AUTHORS.md>
# SPDX-License-Identifier: GPL-3.0-or-later
"""Plot the energy as function of number of electrons for Carbon: N = 0 to 6."""

import matplotlib.pyplot as plt
Expand Down
20 changes: 2 additions & 18 deletions src/tinydft/demo_mendelejev.py
Original file line number Diff line number Diff line change
@@ -1,21 +1,5 @@
# Tiny DFT is a minimalistic atomic DFT implementation.
# Copyright (C) 2024 The Tiny DFT Development Team
#
# This file is part of Tiny DFT.
#
# Tiny DFT is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 3
# of the License, or (at your option) any later version.
#
# Tiny DFT is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, see <http://www.gnu.org/licenses/>
# --
# SPDX-FileCopyrightText: © 2023 Tiny DFT Development Team <https://github.com/molmod/acid/blob/main/AUTHORS.md>
# SPDX-License-Identifier: GPL-3.0-or-later
"""Compute atomic DFT results for a series of elements."""

import matplotlib.pyplot as plt
Expand Down
20 changes: 2 additions & 18 deletions src/tinydft/dft.py
Original file line number Diff line number Diff line change
@@ -1,21 +1,5 @@
# Tiny DFT is a minimalistic atomic DFT implementation.
# Copyright (C) 2024 The Tiny DFT Development Team
#
# This file is part of Tiny DFT.
#
# Tiny DFT is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 3
# of the License, or (at your option) any later version.
#
# Tiny DFT is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, see <http://www.gnu.org/licenses/>
# --
# SPDX-FileCopyrightText: © 2023 Tiny DFT Development Team <https://github.com/molmod/acid/blob/main/AUTHORS.md>
# SPDX-License-Identifier: GPL-3.0-or-later
"""DFT main routines."""

import autograd.numpy as agnp
Expand Down
20 changes: 2 additions & 18 deletions src/tinydft/grid.py
Original file line number Diff line number Diff line change
@@ -1,21 +1,5 @@
# Tiny DFT is a minimalistic atomic DFT implementation.
# Copyright (C) 2024 The Tiny DFT Development Team
#
# This file is part of Tiny DFT.
#
# Tiny DFT is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 3
# of the License, or (at your option) any later version.
#
# Tiny DFT is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, see <http://www.gnu.org/licenses/>
# --
# SPDX-FileCopyrightText: © 2023 Tiny DFT Development Team <https://github.com/molmod/acid/blob/main/AUTHORS.md>
# SPDX-License-Identifier: GPL-3.0-or-later
"""Tiny numerical integration library for Tiny DFT."""

from collections.abc import Callable
Expand Down
20 changes: 2 additions & 18 deletions tests/conftest.py
Original file line number Diff line number Diff line change
@@ -1,21 +1,5 @@
# Tiny DFT is a minimalistic atomic DFT implementation.
# Copyright (C) 2023 The Tiny DFT Development Team
#
# This file is part of Tiny DFT.
#
# Tiny DFT is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 3
# of the License, or (at your option) any later version.
#
# Tiny DFT is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, see <http://www.gnu.org/licenses/>
# --
# SPDX-FileCopyrightText: © 2023 Tiny DFT Development Team <https://github.com/molmod/acid/blob/main/AUTHORS.md>
# SPDX-License-Identifier: GPL-3.0-or-later
"""Configuration of pytest."""

import pytest
Expand Down
20 changes: 2 additions & 18 deletions tests/test_tinybasis.py
Original file line number Diff line number Diff line change
@@ -1,21 +1,5 @@
# Tiny DFT is a minimalistic atomic DFT implementation.
# Copyright (C) 2023 The Tiny DFT Development Team
#
# This file is part of Tiny DFT.
#
# Tiny DFT is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 3
# of the License, or (at your option) any later version.
#
# Tiny DFT is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, see <http://www.gnu.org/licenses/>
# --
# SPDX-FileCopyrightText: © 2023 Tiny DFT Development Team <https://github.com/molmod/acid/blob/main/AUTHORS.md>
# SPDX-License-Identifier: GPL-3.0-or-later
"""Unit tests for Tiny DFT."""

import numpy as np
Expand Down
20 changes: 2 additions & 18 deletions tests/test_tinydft.py
Original file line number Diff line number Diff line change
@@ -1,21 +1,5 @@
# Tiny DFT is a minimalistic atomic DFT implementation.
# Copyright (C) 2023 The Tiny DFT Development Team
#
# This file is part of Tiny DFT.
#
# Tiny DFT is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 3
# of the License, or (at your option) any later version.
#
# Tiny DFT is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, see <http://www.gnu.org/licenses/>
# --
# SPDX-FileCopyrightText: © 2023 Tiny DFT Development Team <https://github.com/molmod/acid/blob/main/AUTHORS.md>
# SPDX-License-Identifier: GPL-3.0-or-later
"""Unit tests for Tiny DFT."""

import numpy as np
Expand Down
20 changes: 2 additions & 18 deletions tests/test_tinygrid.py
Original file line number Diff line number Diff line change
@@ -1,21 +1,5 @@
# Tiny DFT is a minimalistic atomic DFT implementation.
# Copyright (C) 2023 The Tiny DFT Development Team
#
# This file is part of Tiny DFT.
#
# Tiny DFT is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 3
# of the License, or (at your option) any later version.
#
# Tiny DFT is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, see <http://www.gnu.org/licenses/>
# --
# SPDX-FileCopyrightText: © 2023 Tiny DFT Development Team <https://github.com/molmod/acid/blob/main/AUTHORS.md>
# SPDX-License-Identifier: GPL-3.0-or-later
"""Unit tests for Tiny Grid."""

import numpy as np
Expand Down
Loading