Archived
0
0

进一步实现 interface

This commit is contained in:
2025-11-04 00:07:40 +08:00
parent 0e08fb3a41
commit 4eaff18685
13 changed files with 153 additions and 132 deletions

View File

@@ -6,6 +6,7 @@ import pathlib
import typing
import toml
import json
import bidict
class AtomRegister(TypedDict):
nucleon: Nucleon
@@ -17,6 +18,7 @@ class AtomRegister(TypedDict):
orbital: Orbital
orbital_path: pathlib.Path
orbital_fmt: str
runtime: dict
class Atom():
"""
@@ -29,6 +31,7 @@ class Atom():
def __init__(self, ident = ""):
self.ident = ident
atom_registry[ident] = self
self.register: AtomRegister = { # type: ignore
"nucleon": None,
"nucleon_path": None,
@@ -76,4 +79,6 @@ class Atom():
@staticmethod
def placeholder():
return (Electron.placeholder(), Nucleon.placeholder(), {})
return (Electron.placeholder(), Nucleon.placeholder(), {})
atom_registry: bidict.bidict[str, Atom] = bidict.bidict()