Skip to content

Commit 2169e8a

Browse files
committed
not all systems have atoms, e.g. electron gas
1 parent 2ce49d2 commit 2169e8a

File tree

4 files changed

+25
-5
lines changed

4 files changed

+25
-5
lines changed

netobs/systems/__init__.py

-5
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,6 @@
1414

1515
from typing import TypedDict
1616

17-
from jax import numpy as jnp
18-
1917

2018
class System(TypedDict):
21-
atoms: jnp.ndarray
22-
"(natom, ndim) Positions of the atoms."
23-
2419
ndim: int

netobs/systems/elec_gas.py

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Copyright 2022-2024 Bytedance Ltd. and/or its affiliates
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
from netobs.systems import System
16+
17+
18+
class ElectronGas(System):
19+
spins: tuple[int, int]

netobs/systems/molecule.py

+3
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@
1818

1919

2020
class MolecularSystem(System):
21+
atoms: jnp.ndarray
22+
"(natom, ndim) Positions of the atoms."
23+
2124
charges: jnp.ndarray
2225
"(natom,) Nuclear charges of the atoms."
2326

netobs/systems/solid.py

+3
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@
2323

2424

2525
class SolidSystem(System):
26+
atoms: jnp.ndarray
27+
"(natom, ndim) Positions of the atoms."
28+
2629
charges: jnp.ndarray
2730
"(natom,) Nuclear charges of the atoms."
2831

0 commit comments

Comments
 (0)