-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
151 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
flake8 == 7.1.0 | ||
pre-commit == 3.7.1 | ||
pylint == 3.2.6 | ||
pytest == 8.3.1 | ||
setuptools == 74.1.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,12 @@ | ||
# numpy, scipy recommendations: https://scientific-python.org/specs/spec-0000/ | ||
|
||
defusedxml >= 0.6.0;python_version=='3.10' # minimum working | ||
defusedxml >= 0.6.0;python_version=='3.11' # minimum working | ||
defusedxml >= 0.6.0;python_version=='3.12' # minimum working | ||
flake8 == 7.1.0 | ||
numpy >= 1.24.0;python_version=='3.10' # minimum recommended | ||
numpy >= 1.24.0;python_version=='3.11' # minimum recommended | ||
numpy >= 1.26.0;python_version=='3.12' # minimum working | ||
pre-commit == 3.7.1 | ||
pylint == 3.2.6 | ||
pytest == 8.3.1 | ||
scipy >= 1.10.0;python_version=='3.10' # minimum recommended | ||
scipy >= 1.10.0;python_version=='3.11' # minimum recommended | ||
scipy >= 1.11.2;python_version=='3.12' # minimum working | ||
setuptools == 74.1.2 | ||
spglib >= 1.16.4;python_version=='3.10' # minimum working | ||
spglib >= 1.16.4;python_version=='3.11' # minimum working | ||
spglib >= 1.16.4;python_version=='3.12' # minimum working | ||
tabulate >= 0.8.8;python_version=='3.10' # minimum working | ||
tabulate >= 0.8.8;python_version=='3.11' # minimum working | ||
tabulate >= 0.8.8;python_version=='3.12' # minimum working | ||
tqdm >= 2.0 | ||
defusedxml >= 0.6.0 # min working | ||
numpy >= 1.24.0;python_version=='3.10' # min recommended | ||
numpy >= 1.24.0;python_version=='3.11' # min recommended | ||
numpy >= 1.26.0;python_version=='3.12' # min working | ||
scipy >= 1.10.0;python_version=='3.10' # min recommended | ||
scipy >= 1.10.0;python_version=='3.11' # min recommended | ||
scipy >= 1.11.2;python_version=='3.12' # min working | ||
spglib >= 1.16.4 # min working | ||
tabulate >= 0.8.8 # min working | ||
tqdm >= 2.0 # min working |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,16 @@ | ||
aiohttp >= 3.8.0;python_version=='3.10' | ||
aiohttp >= 3.8.3;python_version=='3.11' | ||
aiohttp >= 3.9.0;python_version=='3.12' | ||
dill >= 0.3.4 | ||
frozenlist >= 1.2.0;python_version=='3.10' | ||
frozenlist >= 1.3.3;python_version=='3.11' | ||
frozenlist >= 1.4.1;python_version=='3.12' | ||
fsspec>= 2021.4.0;python_version=='3.10' | ||
fsspec>= 2021.4.0;python_version=='3.11' | ||
fsspec>=2021.4.0;python_version=='3.12' | ||
jinja2 >= 3.0.2 | ||
pyparsing >= 3.0.0 | ||
scikit-learn >= 1.2.0;python_version=='3.10' | ||
scikit-learn >= 1.2.0;python_version=='3.11' | ||
scikit-learn >= 1.3.0;python_version=='3.12' and sys_platform=="darwin" | ||
scikit-learn >= 1.3.0;python_version=='3.12' and sys_platform=="linux" | ||
scikit-learn >= 1.4.0;python_version=='3.12' and sys_platform=="win32" | ||
torch_geometric >= 2.3.0;python_version=='3.10' | ||
torch_geometric >= 2.3.0;python_version=='3.11' | ||
torch_geometric >= 2.3.0;python_version=='3.12' | ||
aiohttp >= 3.8.0;python_version=='3.10' # min working | ||
aiohttp >= 3.8.3;python_version=='3.11' # min working | ||
aiohttp >= 3.9.0;python_version=='3.12' # min working | ||
dill >= 0.3.4 # min working | ||
frozenlist >= 1.2.0;python_version=='3.10' # min working | ||
frozenlist >= 1.3.3;python_version=='3.11' # min working | ||
frozenlist >= 1.4.1;python_version=='3.12' # min working | ||
fsspec>= 2021.4.0;python_version=='3.10' # min working | ||
jinja2 >= 3.0.2 # min working | ||
pyparsing >= 3.0.0 # min working | ||
scikit-learn >= 1.2.0;python_version=='3.10' # min working | ||
scikit-learn >= 1.2.0;python_version=='3.11' # min working | ||
scikit-learn >= 1.3.0;python_version=='3.12' and sys_platform=='darwin' # min working | ||
scikit-learn >= 1.3.0;python_version=='3.12' and sys_platform=='linux' # min working | ||
scikit-learn >= 1.4.0;python_version=='3.12' and sys_platform=='win32' # min working | ||
torch_geometric >= 2.3.0 # min working |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
--index-url https://download.pytorch.org/whl/cpu | ||
torch==2.4.1;sys_platform=="darwin" | ||
torch==2.4.1+cpu;sys_platform=="linux" | ||
torch==2.4.1+cpu;sys_platform=="win32" | ||
torch==2.4.1;sys_platform=='darwin' | ||
torch==2.4.1+cpu;sys_platform=='linux' | ||
torch==2.4.1+cpu;sys_platform=='win32' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
"""Dummy polarizability PyTorch dataset. | ||
Used when torch installation cannot be found. | ||
:meta private: | ||
""" | ||
|
||
import numpy as np | ||
from numpy.typing import NDArray | ||
|
||
TORCH_PRESENT = False | ||
|
||
|
||
class PolarizabilityDataset: # pylint: disable=too-few-public-methods | ||
"""PyTorch dataset of atomic structures and polarizabilities. | ||
Polarizabilities are scaled and flattened into vectors containing the six | ||
independent tensor components. | ||
Parameters | ||
---------- | ||
lattices | ||
| (Å) 3D array with shape (S,3,3) where S is the number of samples. | ||
atomic_numbers | ||
| List of length S containing lists of length N, where N is the number of atoms. | ||
positions | ||
| (fractional) 3D array with shape (S,N,3). | ||
polarizabilities | ||
| 3D array with shape (S,3,3). | ||
scale_mode | ||
| Supports ``"standard"`` (standard scaling), ``"stddev"`` (division by | ||
| standard deviation), and ``"none"`` (no scaling). | ||
""" | ||
|
||
def __init__( # pylint: disable=too-many-arguments | ||
self, | ||
lattices: NDArray[np.float64], | ||
atomic_numbers: list[list[int]], | ||
positions: NDArray[np.float64], | ||
polarizabilities: NDArray[np.float64], | ||
scale_mode: str = "standard", | ||
): | ||
raise ModuleNotFoundError("torch installation not found") |