chore: better project structure

This commit is contained in:
2026-02-26 18:02:50 -03:00
parent 5d76e49f89
commit cb4b21ab6c
25 changed files with 102 additions and 96 deletions

View File

@@ -1,4 +1,4 @@
from diceplayer.shared.utils.logger import Logger
from diceplayer.utils import Logger
from importlib import metadata

View File

@@ -0,0 +1,6 @@
from .atom import Atom
from .molecule import Molecule
from .system import System
__all__ = ["Atom", "Molecule", "System"]

View File

@@ -1,4 +1,4 @@
from diceplayer.shared.utils.ptable import atommass
from diceplayer.utils.ptable import atommass
class Atom:

View File

@@ -7,9 +7,9 @@ if TYPE_CHECKING:
from nptyping import Float, NDArray, Shape
from diceplayer import logger
from diceplayer.shared.environment.atom import Atom
from diceplayer.shared.utils.misc import BOHR2ANG
from diceplayer.shared.utils.ptable import ghost_number
from diceplayer.environment.atom import Atom
from diceplayer.utils.misc import BOHR2ANG
from diceplayer.utils.ptable import ghost_number
import numpy as np
from numpy.linalg import linalg

View File

@@ -1,6 +1,6 @@
from diceplayer import logger
from diceplayer.shared.environment.molecule import Molecule
from diceplayer.shared.utils.misc import BOHR2ANG
from diceplayer.environment.molecule import Molecule
from diceplayer.utils.misc import BOHR2ANG
import numpy as np
from numpy import linalg

View File

@@ -0,0 +1,6 @@
from .__interface import Interface
from .dice_interface import DiceInterface
from .gaussian_interface import GaussianInterface
__all__ = ["Interface", "DiceInterface", "GaussianInterface"]

View File

@@ -1,7 +1,7 @@
from __future__ import annotations
from diceplayer.config.player_config import PlayerConfig
from diceplayer.shared.environment.system import System
from diceplayer.environment.system import System
from abc import ABC, abstractmethod

View File

@@ -2,8 +2,8 @@ from __future__ import annotations
from diceplayer import logger
from diceplayer.config.player_config import PlayerConfig
from diceplayer.shared.environment.system import System
from diceplayer.shared.interface import Interface
from diceplayer.environment.system import System
from diceplayer.interface import Interface
from setproctitle import setproctitle
from typing_extensions import Final, TextIO

View File

@@ -2,12 +2,12 @@ from __future__ import annotations
from diceplayer import logger
from diceplayer.config.player_config import PlayerConfig
from diceplayer.shared.environment.atom import Atom
from diceplayer.shared.environment.molecule import Molecule
from diceplayer.shared.environment.system import System
from diceplayer.shared.interface import Interface
from diceplayer.shared.utils.misc import date_time
from diceplayer.shared.utils.ptable import atomsymb
from diceplayer.environment.atom import Atom
from diceplayer.environment.molecule import Molecule
from diceplayer.environment.system import System
from diceplayer.interface import Interface
from diceplayer.utils.misc import date_time
from diceplayer.utils.ptable import atomsymb
import numpy as np
from nptyping import NDArray

View File

@@ -1,12 +1,8 @@
from diceplayer import VERSION, logger
from diceplayer.config.player_config import PlayerConfig
from diceplayer.shared.environment.atom import Atom
from diceplayer.shared.environment.molecule import Molecule
from diceplayer.shared.environment.system import System
from diceplayer.shared.interface.dice_interface import DiceInterface
from diceplayer.shared.interface.gaussian_interface import GaussianInterface
from diceplayer.shared.utils.misc import weekday_date_time
from diceplayer.shared.utils.ptable import atomsymb
from diceplayer.environment import Atom, Molecule, System
from diceplayer.interface import DiceInterface, GaussianInterface
from diceplayer.utils import atomsymb, weekday_date_time
import yaml
from pydantic import BaseModel

View File

@@ -1,4 +0,0 @@
from .__interface import Interface
__all__ = ["Interface"]

View File

@@ -0,0 +1,22 @@
from .logger import Logger, valid_logger
from .misc import (
compress_files_1mb,
date_time,
make_qm_dir,
make_step_dir,
weekday_date_time,
)
from .ptable import atommass, atomsymb
__all__ = [
"Logger",
"valid_logger",
"atomsymb",
"atommass",
"weekday_date_time",
"date_time",
"compress_files_1mb",
"make_step_dir",
"make_qm_dir",
]