microsoft-skala 1.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. microsoft_skala-1.1.0/LICENSE.txt +21 -0
  2. microsoft_skala-1.1.0/PKG-INFO +115 -0
  3. microsoft_skala-1.1.0/README.md +84 -0
  4. microsoft_skala-1.1.0/pyproject.toml +63 -0
  5. microsoft_skala-1.1.0/setup.cfg +4 -0
  6. microsoft_skala-1.1.0/src/microsoft_skala.egg-info/PKG-INFO +115 -0
  7. microsoft_skala-1.1.0/src/microsoft_skala.egg-info/SOURCES.txt +43 -0
  8. microsoft_skala-1.1.0/src/microsoft_skala.egg-info/dependency_links.txt +1 -0
  9. microsoft_skala-1.1.0/src/microsoft_skala.egg-info/requires.txt +21 -0
  10. microsoft_skala-1.1.0/src/microsoft_skala.egg-info/top_level.txt +1 -0
  11. microsoft_skala-1.1.0/src/skala/__init__.py +10 -0
  12. microsoft_skala-1.1.0/src/skala/ase/__init__.py +13 -0
  13. microsoft_skala-1.1.0/src/skala/ase/calculator.py +201 -0
  14. microsoft_skala-1.1.0/src/skala/foundry/__init__.py +2 -0
  15. microsoft_skala-1.1.0/src/skala/foundry/client.py +101 -0
  16. microsoft_skala-1.1.0/src/skala/foundry/schemas.py +83 -0
  17. microsoft_skala-1.1.0/src/skala/functional/__init__.py +93 -0
  18. microsoft_skala-1.1.0/src/skala/functional/base.py +151 -0
  19. microsoft_skala-1.1.0/src/skala/functional/density.py +211 -0
  20. microsoft_skala-1.1.0/src/skala/functional/layers.py +96 -0
  21. microsoft_skala-1.1.0/src/skala/functional/load.py +148 -0
  22. microsoft_skala-1.1.0/src/skala/functional/model.py +581 -0
  23. microsoft_skala-1.1.0/src/skala/functional/traditional.py +301 -0
  24. microsoft_skala-1.1.0/src/skala/gpu4pyscf/__init__.py +277 -0
  25. microsoft_skala-1.1.0/src/skala/gpu4pyscf/dft.py +150 -0
  26. microsoft_skala-1.1.0/src/skala/gpu4pyscf/gradients.py +397 -0
  27. microsoft_skala-1.1.0/src/skala/py.typed +0 -0
  28. microsoft_skala-1.1.0/src/skala/pyscf/__init__.py +253 -0
  29. microsoft_skala-1.1.0/src/skala/pyscf/backend.py +79 -0
  30. microsoft_skala-1.1.0/src/skala/pyscf/dft.py +168 -0
  31. microsoft_skala-1.1.0/src/skala/pyscf/features.py +877 -0
  32. microsoft_skala-1.1.0/src/skala/pyscf/gradients.py +372 -0
  33. microsoft_skala-1.1.0/src/skala/pyscf/numint.py +281 -0
  34. microsoft_skala-1.1.0/src/skala/pyscf/retry.py +201 -0
  35. microsoft_skala-1.1.0/src/skala/utils/__init__.py +8 -0
  36. microsoft_skala-1.1.0/src/skala/utils/scatter.py +83 -0
  37. microsoft_skala-1.1.0/tests/test_ase.py +53 -0
  38. microsoft_skala-1.1.0/tests/test_enhancement_factor.py +31 -0
  39. microsoft_skala-1.1.0/tests/test_gpu4pyscf_classes.py +73 -0
  40. microsoft_skala-1.1.0/tests/test_gpu4pyscf_gradients.py +506 -0
  41. microsoft_skala-1.1.0/tests/test_model.py +125 -0
  42. microsoft_skala-1.1.0/tests/test_pyscf_classes.py +66 -0
  43. microsoft_skala-1.1.0/tests/test_pyscf_gradients.py +499 -0
  44. microsoft_skala-1.1.0/tests/test_scf_retry.py +45 -0
  45. microsoft_skala-1.1.0/tests/test_traditional.py +47 -0
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) Microsoft Corporation.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,115 @@
1
+ Metadata-Version: 2.4
2
+ Name: microsoft-skala
3
+ Version: 1.1.0
4
+ Summary: Skala Exchange Correlation Functional
5
+ Project-URL: repository, https://github.com/microsoft/skala
6
+ Classifier: Programming Language :: Python :: 3
7
+ Classifier: Development Status :: 5 - Production/Stable
8
+ Requires-Python: >=3.10
9
+ Description-Content-Type: text/markdown
10
+ License-File: LICENSE.txt
11
+ Requires-Dist: ase
12
+ Requires-Dist: azure-core
13
+ Requires-Dist: azure-identity
14
+ Requires-Dist: dftd3
15
+ Requires-Dist: e3nn
16
+ Requires-Dist: huggingface_hub
17
+ Requires-Dist: numpy
18
+ Requires-Dist: opt_einsum_fx
19
+ Requires-Dist: pyscf<2.10.0
20
+ Requires-Dist: qcelemental
21
+ Requires-Dist: torch
22
+ Provides-Extra: dev
23
+ Requires-Dist: pre-commit; extra == "dev"
24
+ Requires-Dist: pytest; extra == "dev"
25
+ Requires-Dist: pytest-cov; extra == "dev"
26
+ Provides-Extra: doc
27
+ Requires-Dist: myst-nb; extra == "doc"
28
+ Requires-Dist: sphinx; extra == "doc"
29
+ Requires-Dist: sphinx-book-theme; extra == "doc"
30
+ Dynamic: license-file
31
+
32
+ # Skala: Accurate and scalable exchange-correlation with deep learning
33
+
34
+ [![Documentation](https://img.shields.io/badge/docs-microsoft.github.io%2Fskala-blue?logo=read-the-docs&logoColor=white)](https://microsoft.github.io/skala)
35
+ [![Tests](https://img.shields.io/github/actions/workflow/status/microsoft/skala/test.yml?branch=main&logo=github&label=build)](https://github.com/microsoft/skala/actions/workflows/test.yml)
36
+ [![PyPI](https://img.shields.io/pypi/v/microsoft-skala?logo=pypi&logoColor=white)](https://pypi.org/project/microsoft-skala/)
37
+ [![Paper](https://img.shields.io/badge/arXiv-2506.14665-b31b1b?logo=arxiv&logoColor=white)](https://arxiv.org/abs/2506.14665)
38
+
39
+ Skala is a neural network-based exchange-correlation functional for density functional theory (DFT), developed by Microsoft Research AI for Science. It leverages deep learning to predict exchange-correlation energies from electron density features, achieving chemical accuracy for atomization energies and strong performance on broad thermochemistry and kinetics benchmarks, all at a computational cost similar to semi-local DFT.
40
+
41
+ Trained on a large, diverse dataset—including coupled cluster atomization energies and public benchmarks—Skala uses scalable message passing and local layers to learn both local and non-local effects. The model has about 276,000 parameters and matches the accuracy of leading hybrid functionals.
42
+
43
+ Learn more about Skala in our [ArXiv paper](https://arxiv.org/abs/2506.14665).
44
+
45
+ ## What's in here
46
+
47
+ This repository contains three main components:
48
+
49
+ 1. The Python package `microsoft-skala`, which is also distributed [on PyPI](https://pypi.org/project/microsoft-skala/) and contains a Pytorch implementation of the Skala model, its hookups to quantum chemistry packages [PySCF](https://pyscf.org/) and [ASE](https://ase-lib.org/), and an independent client library for the Skala model served [in Azure AI Foundry](https://ai.azure.com/catalog/models/Skala).
50
+ 2. A development version of the CPU/GPU C++ library for XC functionals [GauXC](https://github.com/wavefunction91/GauXC) with an add-on supporting Pytorch-based functionals like Skala. GauXC is part of the stack that serves Skala in Azure AI Foundry and can be used to integrate Skala into other third-party DFT codes.
51
+ 3. An example of using Skala in C++ CPU applications through LibTorch, see [`examples/cpp/cpp_integration`](examples/cpp/cpp_integration).
52
+
53
+ All information below relates to the Python package, the development version of GauXC including its license and other information can be found in [`third_party/gauxc`](https://github.com/microsoft/skala/tree/main/third_party/gauxc).
54
+
55
+ ## Getting started
56
+
57
+ Install using Pip:
58
+
59
+ ```bash
60
+ pip install torch --index-url https://download.pytorch.org/whl/cpu # unless you already have GPU Pytorch for something else
61
+ pip install microsoft-skala
62
+ ```
63
+
64
+ Run an SCF calculation with Skala for a hydrogen molecule:
65
+
66
+ ```python
67
+ from pyscf import gto
68
+ from skala.pyscf import SkalaKS
69
+
70
+ mol = gto.M(
71
+ atom="""H 0 0 0; H 0 0 1.4""",
72
+ basis="def2-tzvp",
73
+ )
74
+ ks = SkalaKS(mol, xc="skala")
75
+ ks.kernel()
76
+ ```
77
+ Go to [microsoft.github.io/skala](https://microsoft.github.io/skala) for a more detailed installation guide and further examples of how to use Skala functional with PySCF and ASE and in [Azure Foundry](https://ai.azure.com/catalog/models/Skala).
78
+
79
+ ## Getting started (GPU support)
80
+
81
+ Install using Pip:
82
+ ```bash
83
+ cu_version=128 #or 126 or 130 depending on your CUDA version
84
+ pip install torch cupy --extra-index-url "https://download.pytorch.org/whl/cu${cu_version}"
85
+ pip install --no-deps "gpu4pyscf-cuda${cu_version:0:2}x>=1.0,<2" "gpu4pyscf-libxc-cuda${cu_version:0:2}x>=0.4,<1"
86
+ pip install microsoft-skala
87
+ ```
88
+ Run an SCF calculation with Skala for a hydrogen molecule on GPU:
89
+
90
+ ```python
91
+ from pyscf import gto
92
+ from skala.gpu4pyscf import SkalaKS
93
+
94
+ mol = gto.M(
95
+ atom="""H 0 0 0; H 0 0 1.4""",
96
+ basis="def2-tzvp",
97
+ )
98
+ ks = SkalaKS(mol, xc="skala")
99
+ ks.kernel()
100
+ ```
101
+
102
+ ## Project information
103
+
104
+ See the following files for more information about contributing, reporting issues, and the code of conduct:
105
+
106
+ - [`CONTRIBUTING.md`](CONTRIBUTING.md)
107
+ - [`LICENSE.txt`](LICENSE.txt)
108
+ - [`SECURITY.md`](SECURITY.md)
109
+
110
+ ## Trademarks
111
+
112
+ This project may contain trademarks or logos for projects, products, or services.
113
+ Authorized use of Microsoft trademarks or logos is subject to and must follow [Microsoft's Trademark & Brand Guidelines](https://www.microsoft.com/en-us/legal/intellectualproperty/trademarks/usage/general).
114
+ Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship.
115
+ Any use of third-party trademarks or logos are subject to those third-party's policies.
@@ -0,0 +1,84 @@
1
+ # Skala: Accurate and scalable exchange-correlation with deep learning
2
+
3
+ [![Documentation](https://img.shields.io/badge/docs-microsoft.github.io%2Fskala-blue?logo=read-the-docs&logoColor=white)](https://microsoft.github.io/skala)
4
+ [![Tests](https://img.shields.io/github/actions/workflow/status/microsoft/skala/test.yml?branch=main&logo=github&label=build)](https://github.com/microsoft/skala/actions/workflows/test.yml)
5
+ [![PyPI](https://img.shields.io/pypi/v/microsoft-skala?logo=pypi&logoColor=white)](https://pypi.org/project/microsoft-skala/)
6
+ [![Paper](https://img.shields.io/badge/arXiv-2506.14665-b31b1b?logo=arxiv&logoColor=white)](https://arxiv.org/abs/2506.14665)
7
+
8
+ Skala is a neural network-based exchange-correlation functional for density functional theory (DFT), developed by Microsoft Research AI for Science. It leverages deep learning to predict exchange-correlation energies from electron density features, achieving chemical accuracy for atomization energies and strong performance on broad thermochemistry and kinetics benchmarks, all at a computational cost similar to semi-local DFT.
9
+
10
+ Trained on a large, diverse dataset—including coupled cluster atomization energies and public benchmarks—Skala uses scalable message passing and local layers to learn both local and non-local effects. The model has about 276,000 parameters and matches the accuracy of leading hybrid functionals.
11
+
12
+ Learn more about Skala in our [ArXiv paper](https://arxiv.org/abs/2506.14665).
13
+
14
+ ## What's in here
15
+
16
+ This repository contains three main components:
17
+
18
+ 1. The Python package `microsoft-skala`, which is also distributed [on PyPI](https://pypi.org/project/microsoft-skala/) and contains a Pytorch implementation of the Skala model, its hookups to quantum chemistry packages [PySCF](https://pyscf.org/) and [ASE](https://ase-lib.org/), and an independent client library for the Skala model served [in Azure AI Foundry](https://ai.azure.com/catalog/models/Skala).
19
+ 2. A development version of the CPU/GPU C++ library for XC functionals [GauXC](https://github.com/wavefunction91/GauXC) with an add-on supporting Pytorch-based functionals like Skala. GauXC is part of the stack that serves Skala in Azure AI Foundry and can be used to integrate Skala into other third-party DFT codes.
20
+ 3. An example of using Skala in C++ CPU applications through LibTorch, see [`examples/cpp/cpp_integration`](examples/cpp/cpp_integration).
21
+
22
+ All information below relates to the Python package, the development version of GauXC including its license and other information can be found in [`third_party/gauxc`](https://github.com/microsoft/skala/tree/main/third_party/gauxc).
23
+
24
+ ## Getting started
25
+
26
+ Install using Pip:
27
+
28
+ ```bash
29
+ pip install torch --index-url https://download.pytorch.org/whl/cpu # unless you already have GPU Pytorch for something else
30
+ pip install microsoft-skala
31
+ ```
32
+
33
+ Run an SCF calculation with Skala for a hydrogen molecule:
34
+
35
+ ```python
36
+ from pyscf import gto
37
+ from skala.pyscf import SkalaKS
38
+
39
+ mol = gto.M(
40
+ atom="""H 0 0 0; H 0 0 1.4""",
41
+ basis="def2-tzvp",
42
+ )
43
+ ks = SkalaKS(mol, xc="skala")
44
+ ks.kernel()
45
+ ```
46
+ Go to [microsoft.github.io/skala](https://microsoft.github.io/skala) for a more detailed installation guide and further examples of how to use Skala functional with PySCF and ASE and in [Azure Foundry](https://ai.azure.com/catalog/models/Skala).
47
+
48
+ ## Getting started (GPU support)
49
+
50
+ Install using Pip:
51
+ ```bash
52
+ cu_version=128 #or 126 or 130 depending on your CUDA version
53
+ pip install torch cupy --extra-index-url "https://download.pytorch.org/whl/cu${cu_version}"
54
+ pip install --no-deps "gpu4pyscf-cuda${cu_version:0:2}x>=1.0,<2" "gpu4pyscf-libxc-cuda${cu_version:0:2}x>=0.4,<1"
55
+ pip install microsoft-skala
56
+ ```
57
+ Run an SCF calculation with Skala for a hydrogen molecule on GPU:
58
+
59
+ ```python
60
+ from pyscf import gto
61
+ from skala.gpu4pyscf import SkalaKS
62
+
63
+ mol = gto.M(
64
+ atom="""H 0 0 0; H 0 0 1.4""",
65
+ basis="def2-tzvp",
66
+ )
67
+ ks = SkalaKS(mol, xc="skala")
68
+ ks.kernel()
69
+ ```
70
+
71
+ ## Project information
72
+
73
+ See the following files for more information about contributing, reporting issues, and the code of conduct:
74
+
75
+ - [`CONTRIBUTING.md`](CONTRIBUTING.md)
76
+ - [`LICENSE.txt`](LICENSE.txt)
77
+ - [`SECURITY.md`](SECURITY.md)
78
+
79
+ ## Trademarks
80
+
81
+ This project may contain trademarks or logos for projects, products, or services.
82
+ Authorized use of Microsoft trademarks or logos is subject to and must follow [Microsoft's Trademark & Brand Guidelines](https://www.microsoft.com/en-us/legal/intellectualproperty/trademarks/usage/general).
83
+ Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship.
84
+ Any use of third-party trademarks or logos are subject to those third-party's policies.
@@ -0,0 +1,63 @@
1
+ [build-system]
2
+ requires = ["setuptools"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "microsoft-skala"
7
+ version = "1.1.0"
8
+ description = "Skala Exchange Correlation Functional"
9
+ authors = []
10
+ license-files = ["LICENSE.txt"]
11
+ readme = "README.md"
12
+ keywords = []
13
+ classifiers = [
14
+ "Programming Language :: Python :: 3",
15
+ "Development Status :: 5 - Production/Stable",
16
+ ]
17
+ requires-python = ">=3.10"
18
+ dependencies = [
19
+ "ase",
20
+ "azure-core",
21
+ "azure-identity",
22
+ "dftd3",
23
+ "e3nn",
24
+ "huggingface_hub",
25
+ "numpy",
26
+ "opt_einsum_fx",
27
+ "pyscf<2.10.0",
28
+ "qcelemental",
29
+ "torch"
30
+ ]
31
+
32
+ optional-dependencies.dev = [
33
+ "pre-commit",
34
+ "pytest",
35
+ "pytest-cov",
36
+ ]
37
+ optional-dependencies.doc = [
38
+ "myst-nb",
39
+ "sphinx",
40
+ "sphinx-book-theme",
41
+ ]
42
+
43
+ urls.repository = "https://github.com/microsoft/skala"
44
+
45
+ [tool.ruff]
46
+ target-version = "py311"
47
+ src = ["src"]
48
+
49
+ [tool.ruff.lint]
50
+ extend-select = [
51
+ "B", # flake8-bugbear
52
+ "D417", # undocumented-param in docstring
53
+ "UP", # pyupgrade
54
+ ]
55
+ extend-ignore = [
56
+ "UP015", # redundant-open-modes
57
+ ]
58
+
59
+ [tool.ruff.lint.isort]
60
+ detect-same-package = true
61
+
62
+ [tool.black]
63
+ line-length = 100
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,115 @@
1
+ Metadata-Version: 2.4
2
+ Name: microsoft-skala
3
+ Version: 1.1.0
4
+ Summary: Skala Exchange Correlation Functional
5
+ Project-URL: repository, https://github.com/microsoft/skala
6
+ Classifier: Programming Language :: Python :: 3
7
+ Classifier: Development Status :: 5 - Production/Stable
8
+ Requires-Python: >=3.10
9
+ Description-Content-Type: text/markdown
10
+ License-File: LICENSE.txt
11
+ Requires-Dist: ase
12
+ Requires-Dist: azure-core
13
+ Requires-Dist: azure-identity
14
+ Requires-Dist: dftd3
15
+ Requires-Dist: e3nn
16
+ Requires-Dist: huggingface_hub
17
+ Requires-Dist: numpy
18
+ Requires-Dist: opt_einsum_fx
19
+ Requires-Dist: pyscf<2.10.0
20
+ Requires-Dist: qcelemental
21
+ Requires-Dist: torch
22
+ Provides-Extra: dev
23
+ Requires-Dist: pre-commit; extra == "dev"
24
+ Requires-Dist: pytest; extra == "dev"
25
+ Requires-Dist: pytest-cov; extra == "dev"
26
+ Provides-Extra: doc
27
+ Requires-Dist: myst-nb; extra == "doc"
28
+ Requires-Dist: sphinx; extra == "doc"
29
+ Requires-Dist: sphinx-book-theme; extra == "doc"
30
+ Dynamic: license-file
31
+
32
+ # Skala: Accurate and scalable exchange-correlation with deep learning
33
+
34
+ [![Documentation](https://img.shields.io/badge/docs-microsoft.github.io%2Fskala-blue?logo=read-the-docs&logoColor=white)](https://microsoft.github.io/skala)
35
+ [![Tests](https://img.shields.io/github/actions/workflow/status/microsoft/skala/test.yml?branch=main&logo=github&label=build)](https://github.com/microsoft/skala/actions/workflows/test.yml)
36
+ [![PyPI](https://img.shields.io/pypi/v/microsoft-skala?logo=pypi&logoColor=white)](https://pypi.org/project/microsoft-skala/)
37
+ [![Paper](https://img.shields.io/badge/arXiv-2506.14665-b31b1b?logo=arxiv&logoColor=white)](https://arxiv.org/abs/2506.14665)
38
+
39
+ Skala is a neural network-based exchange-correlation functional for density functional theory (DFT), developed by Microsoft Research AI for Science. It leverages deep learning to predict exchange-correlation energies from electron density features, achieving chemical accuracy for atomization energies and strong performance on broad thermochemistry and kinetics benchmarks, all at a computational cost similar to semi-local DFT.
40
+
41
+ Trained on a large, diverse dataset—including coupled cluster atomization energies and public benchmarks—Skala uses scalable message passing and local layers to learn both local and non-local effects. The model has about 276,000 parameters and matches the accuracy of leading hybrid functionals.
42
+
43
+ Learn more about Skala in our [ArXiv paper](https://arxiv.org/abs/2506.14665).
44
+
45
+ ## What's in here
46
+
47
+ This repository contains three main components:
48
+
49
+ 1. The Python package `microsoft-skala`, which is also distributed [on PyPI](https://pypi.org/project/microsoft-skala/) and contains a Pytorch implementation of the Skala model, its hookups to quantum chemistry packages [PySCF](https://pyscf.org/) and [ASE](https://ase-lib.org/), and an independent client library for the Skala model served [in Azure AI Foundry](https://ai.azure.com/catalog/models/Skala).
50
+ 2. A development version of the CPU/GPU C++ library for XC functionals [GauXC](https://github.com/wavefunction91/GauXC) with an add-on supporting Pytorch-based functionals like Skala. GauXC is part of the stack that serves Skala in Azure AI Foundry and can be used to integrate Skala into other third-party DFT codes.
51
+ 3. An example of using Skala in C++ CPU applications through LibTorch, see [`examples/cpp/cpp_integration`](examples/cpp/cpp_integration).
52
+
53
+ All information below relates to the Python package, the development version of GauXC including its license and other information can be found in [`third_party/gauxc`](https://github.com/microsoft/skala/tree/main/third_party/gauxc).
54
+
55
+ ## Getting started
56
+
57
+ Install using Pip:
58
+
59
+ ```bash
60
+ pip install torch --index-url https://download.pytorch.org/whl/cpu # unless you already have GPU Pytorch for something else
61
+ pip install microsoft-skala
62
+ ```
63
+
64
+ Run an SCF calculation with Skala for a hydrogen molecule:
65
+
66
+ ```python
67
+ from pyscf import gto
68
+ from skala.pyscf import SkalaKS
69
+
70
+ mol = gto.M(
71
+ atom="""H 0 0 0; H 0 0 1.4""",
72
+ basis="def2-tzvp",
73
+ )
74
+ ks = SkalaKS(mol, xc="skala")
75
+ ks.kernel()
76
+ ```
77
+ Go to [microsoft.github.io/skala](https://microsoft.github.io/skala) for a more detailed installation guide and further examples of how to use Skala functional with PySCF and ASE and in [Azure Foundry](https://ai.azure.com/catalog/models/Skala).
78
+
79
+ ## Getting started (GPU support)
80
+
81
+ Install using Pip:
82
+ ```bash
83
+ cu_version=128 #or 126 or 130 depending on your CUDA version
84
+ pip install torch cupy --extra-index-url "https://download.pytorch.org/whl/cu${cu_version}"
85
+ pip install --no-deps "gpu4pyscf-cuda${cu_version:0:2}x>=1.0,<2" "gpu4pyscf-libxc-cuda${cu_version:0:2}x>=0.4,<1"
86
+ pip install microsoft-skala
87
+ ```
88
+ Run an SCF calculation with Skala for a hydrogen molecule on GPU:
89
+
90
+ ```python
91
+ from pyscf import gto
92
+ from skala.gpu4pyscf import SkalaKS
93
+
94
+ mol = gto.M(
95
+ atom="""H 0 0 0; H 0 0 1.4""",
96
+ basis="def2-tzvp",
97
+ )
98
+ ks = SkalaKS(mol, xc="skala")
99
+ ks.kernel()
100
+ ```
101
+
102
+ ## Project information
103
+
104
+ See the following files for more information about contributing, reporting issues, and the code of conduct:
105
+
106
+ - [`CONTRIBUTING.md`](CONTRIBUTING.md)
107
+ - [`LICENSE.txt`](LICENSE.txt)
108
+ - [`SECURITY.md`](SECURITY.md)
109
+
110
+ ## Trademarks
111
+
112
+ This project may contain trademarks or logos for projects, products, or services.
113
+ Authorized use of Microsoft trademarks or logos is subject to and must follow [Microsoft's Trademark & Brand Guidelines](https://www.microsoft.com/en-us/legal/intellectualproperty/trademarks/usage/general).
114
+ Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship.
115
+ Any use of third-party trademarks or logos are subject to those third-party's policies.
@@ -0,0 +1,43 @@
1
+ LICENSE.txt
2
+ README.md
3
+ pyproject.toml
4
+ src/microsoft_skala.egg-info/PKG-INFO
5
+ src/microsoft_skala.egg-info/SOURCES.txt
6
+ src/microsoft_skala.egg-info/dependency_links.txt
7
+ src/microsoft_skala.egg-info/requires.txt
8
+ src/microsoft_skala.egg-info/top_level.txt
9
+ src/skala/__init__.py
10
+ src/skala/py.typed
11
+ src/skala/ase/__init__.py
12
+ src/skala/ase/calculator.py
13
+ src/skala/foundry/__init__.py
14
+ src/skala/foundry/client.py
15
+ src/skala/foundry/schemas.py
16
+ src/skala/functional/__init__.py
17
+ src/skala/functional/base.py
18
+ src/skala/functional/density.py
19
+ src/skala/functional/layers.py
20
+ src/skala/functional/load.py
21
+ src/skala/functional/model.py
22
+ src/skala/functional/traditional.py
23
+ src/skala/gpu4pyscf/__init__.py
24
+ src/skala/gpu4pyscf/dft.py
25
+ src/skala/gpu4pyscf/gradients.py
26
+ src/skala/pyscf/__init__.py
27
+ src/skala/pyscf/backend.py
28
+ src/skala/pyscf/dft.py
29
+ src/skala/pyscf/features.py
30
+ src/skala/pyscf/gradients.py
31
+ src/skala/pyscf/numint.py
32
+ src/skala/pyscf/retry.py
33
+ src/skala/utils/__init__.py
34
+ src/skala/utils/scatter.py
35
+ tests/test_ase.py
36
+ tests/test_enhancement_factor.py
37
+ tests/test_gpu4pyscf_classes.py
38
+ tests/test_gpu4pyscf_gradients.py
39
+ tests/test_model.py
40
+ tests/test_pyscf_classes.py
41
+ tests/test_pyscf_gradients.py
42
+ tests/test_scf_retry.py
43
+ tests/test_traditional.py
@@ -0,0 +1,21 @@
1
+ ase
2
+ azure-core
3
+ azure-identity
4
+ dftd3
5
+ e3nn
6
+ huggingface_hub
7
+ numpy
8
+ opt_einsum_fx
9
+ pyscf<2.10.0
10
+ qcelemental
11
+ torch
12
+
13
+ [dev]
14
+ pre-commit
15
+ pytest
16
+ pytest-cov
17
+
18
+ [doc]
19
+ myst-nb
20
+ sphinx
21
+ sphinx-book-theme
@@ -0,0 +1,10 @@
1
+ # SPDX-License-Identifier: MIT
2
+
3
+ """
4
+ Skala: Accurate and scalable exchange-correlation with deep learning.
5
+
6
+ This package provides deep learning-based exchange-correlation functionals
7
+ for density functional theory calculations, with integration to PySCF.
8
+ """
9
+
10
+ __version__ = "1.0.0"
@@ -0,0 +1,13 @@
1
+ # SPDX-License-Identifier: MIT
2
+
3
+ try:
4
+ import ase # noqa: F401
5
+ except ModuleNotFoundError as e:
6
+ raise ModuleNotFoundError(
7
+ "ASE is not installed. Please install it with `pip install ase` or `conda install ase`."
8
+ ) from e
9
+
10
+
11
+ from skala.ase.calculator import Skala # noqa: F401
12
+
13
+ __all__ = ["Skala"]