Skip to content

Commit

Permalink
not all systems have atoms, e.g. electron gas
Browse files Browse the repository at this point in the history
  • Loading branch information
AllanChain committed Apr 26, 2024
1 parent 2ce49d2 commit 2169e8a
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 5 deletions.
5 changes: 0 additions & 5 deletions netobs/systems/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,6 @@

from typing import TypedDict

from jax import numpy as jnp


class System(TypedDict):
atoms: jnp.ndarray
"(natom, ndim) Positions of the atoms."

ndim: int
19 changes: 19 additions & 0 deletions netobs/systems/elec_gas.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Copyright 2022-2024 Bytedance Ltd. and/or its affiliates
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

from netobs.systems import System


class ElectronGas(System):
spins: tuple[int, int]
3 changes: 3 additions & 0 deletions netobs/systems/molecule.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@


class MolecularSystem(System):
atoms: jnp.ndarray
"(natom, ndim) Positions of the atoms."

charges: jnp.ndarray
"(natom,) Nuclear charges of the atoms."

Expand Down
3 changes: 3 additions & 0 deletions netobs/systems/solid.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@


class SolidSystem(System):
atoms: jnp.ndarray
"(natom, ndim) Positions of the atoms."

charges: jnp.ndarray
"(natom,) Nuclear charges of the atoms."

Expand Down

0 comments on commit 2169e8a

Please sign in to comment.