|
| 1 | +from dataclasses import dataclass |
| 2 | +import numpy as np |
| 3 | +from typing import Optional, List |
| 4 | +from pyiron_dataclasses.v1.dft import OutputGenericDFT |
| 5 | + |
| 6 | + |
| 7 | +@dataclass |
| 8 | +class GenericOutput: |
| 9 | + cells: np.ndarray # N_steps * 3 *3 [Angstrom] |
| 10 | + energy_pot: np.ndarray # N_steps [eV] |
| 11 | + energy_tot: np.ndarray # N_steps [eV] |
| 12 | + forces: np.ndarray # N_steps * N_atoms * 3 [eV/Angstrom] |
| 13 | + positions: np.ndarray # N_steps * N_atoms * 3 [Angstrom] |
| 14 | + volume: np.ndarray # N_steps |
| 15 | + indices: Optional[np.ndarray] # N_steps * N_atoms |
| 16 | + natoms: Optional[np.ndarray] # N_steps |
| 17 | + pressures: Optional[np.ndarray] # N_steps * 3 * 3 |
| 18 | + steps: Optional[np.ndarray] # N_steps |
| 19 | + stresses: Optional[np.ndarray] # N_steps |
| 20 | + temperature: Optional[np.ndarray] # N_steps |
| 21 | + unwrapped_positions: Optional[np.ndarray] # N_steps * N_atoms * 3 [Angstrom] |
| 22 | + velocities: Optional[np.ndarray] # N_steps * N_atoms * 3 [Angstrom/fs] |
| 23 | + dft: Optional[OutputGenericDFT] |
| 24 | + elastic_constants: Optional[np.ndarray] |
| 25 | + |
| 26 | + |
| 27 | +@dataclass |
| 28 | +class GenericInput: |
| 29 | + calc_mode: str |
| 30 | + structure: str |
| 31 | + fix_symmetry: Optional[bool] |
| 32 | + k_mesh_spacing: Optional[float] |
| 33 | + k_mesh_center_shift: Optional[np.ndarray] |
| 34 | + reduce_kpoint_symmetry: Optional[bool] |
| 35 | + restart_for_band_structure: Optional[bool] |
| 36 | + path_name: Optional[str] |
| 37 | + n_path: Optional[str] |
| 38 | + fix_spin_constraint: Optional[bool] |
| 39 | + max_iter: Optional[int] |
| 40 | + temperature: Optional[float] |
| 41 | + n_ionic_steps: Optional[int] |
| 42 | + n_print: Optional[int] |
| 43 | + temperature_damping_timescale: Optional[float] |
| 44 | + pressure_damping_timescale: Optional[float] |
| 45 | + time_step: Optional[int] |
| 46 | + |
| 47 | + |
| 48 | +@dataclass |
| 49 | +class Units: |
| 50 | + length: str |
| 51 | + mass: str |
| 52 | + |
| 53 | + |
| 54 | +@dataclass |
| 55 | +class Cell: |
| 56 | + cell: np.ndarray # 3 * 3 [Angstrom] |
| 57 | + pbc: np.ndarray # 3 |
| 58 | + |
| 59 | + |
| 60 | +@dataclass |
| 61 | +class Structure: |
| 62 | + dimension: int |
| 63 | + indices: np.array |
| 64 | + info: dict |
| 65 | + positions: np.ndarray # N_atoms * 3 [Angstrom] |
| 66 | + species: List[str] |
| 67 | + cell: Cell |
| 68 | + units: Units |
0 commit comments