Dataclass Hierarchy#
Overview#
pychum represents all configuration data as Python dataclasses. The ORCA
engine defines 15+ dataclasses in pychum/engine/orca/_dataclasses.py. The
eOn engine defines 2 in pychum/engine/eon/_dataclasses.py.
Abstract Base#
OrcaBlock is an abstract base class. Concrete blocks (NebBlock,
GeomBlock) must implement block_type() returning a BlockType enum
value.
class BlockType(Enum):
NEB = "neb"
GEOM = "geom"
class OrcaBlock(ABC):
@abstractmethod
def block_type(self) -> BlockType:
pass
Top-level Dataclasses#
OrcaConfig#
The root configuration object:
Field |
Type |
Description |
|---|---|---|
|
|
ORCA keyword lines (the |
|
|
Coordinate block |
|
|
Named blocks (neb, geom) |
|
|
Arbitrary blocks as raw text |
Coords#
Field |
Type |
Default |
Description |
|---|---|---|---|
|
|
required |
System charge |
|
|
required |
Spin multiplicity |
|
|
required |
Format: xyz, int, gzmt, xyzfile, gzmtfile |
|
|
|
External file path (for xyzfile/gzmtfile) |
|
|
|
Atom definitions |
Atom#
The Atom dataclass has fields for three coordinate formats (xyz, internal,
Gaussian Z-matrix) and special atom flags:
Field |
Type |
Default |
Description |
|---|---|---|---|
|
|
|
Cartesian coordinates |
|
|
|
Element symbol (required unless point charge) |
|
|
|
Ghost atom (appends |
|
|
|
Embedding potential (appends |
|
|
|
Freeze all coordinates (Cartesian only) |
|
|
|
Freeze individual coordinates |
|
|
|
Isotope mass |
|
|
|
Custom nuclear charge |
|
|
|
Fragment assignment |
|
|
|
Dummy atom (rendered as |
|
|
|
Point charge value (forces symbol to |
|
|
|
Bonded atom index (internal coords) |
|
|
|
Bond length (internal coords) |
|
|
|
Angle reference atom (internal coords) |
|
|
|
Bond angle (internal coords) |
|
|
|
Dihedral reference atom (internal coords) |
|
|
|
Dihedral angle (internal coords) |
Validation in __post_init__: if point_charge is set, symbol is forced to
"Q". Otherwise, symbol is required.
NEB Settings Dataclasses#
NebBlock is a large dataclass (OrcaBlock subclass) with 17 direct fields
and 12 settings sub-objects:
Direct NEB Fields#
Field |
Type |
Default |
Validated against |
|---|---|---|---|
|
|
required |
– |
|
|
required |
– |
|
|
|
all, cionly |
|
|
|
IDPP, LINEAR, XTB1TS, XTB1, XTB2TS, XTB2 |
|
|
|
no, startonly, always |
|
|
|
improved, original |
|
|
|
– |
|
|
|
– |
|
|
|
– |
|
|
|
– |
Settings Sub-objects#
Each settings class has defaults and is created with field(default_factory…)=:
Class |
Fields |
Validation |
|---|---|---|
|
method, maxmove, stepsize, maxiter, local |
method in {LBFGS, VPO, FIRE} |
|
reparamonrestart, memory, precondition, dr, restartonmaxmove |
none |
|
initdamp, dampdecr, stepincr, stepdecr, maxstep, retention |
none |
|
tolmaxf, maxmove, alpha, nmax, quatern, ksp, debug |
none |
|
tolturnon, offset, auto, tolscale, alpha, interpolation, printfulltrj |
interpolation in {linear, cubic} |
|
interp, every, tol |
interp in {linear, cubic} |
|
units, maxfpi, rmsfpi, maxfci, rmsfci, turnonci, scale |
none |
|
use, opttype, ec, ecend, kappa |
opttypein {PERP, CONTOUR, FULL} |
|
springkind, const1, const2, energyweighted, perpspring, lltcos |
springkindin {image, dof, ideal}; perpspring in {no, cos, tan, cosTan, DNEB} |
|
gbwbasename, allxyz |
mutually exclusive (raises ValueError) |
|
xyzstruct, pdbstruct, tsimg |
xyzstructand pdbstructmutually exclusive |
|
active, removeexternforce |
none |
Geometry Dataclasses#
GeomScan#
Field |
Type |
Description |
|---|---|---|
|
|
Atom indices (2 for bonds, 3 for angles, 4 for dihedrals) |
|
|
Start and end values |
|
|
Number of scan points |
GeomBlock#
OrcaBlock subclass with three lists of GeomScan:
bondsdihedralsangles
Utility Dataclasses#
UnitConversion#
Field |
Type |
|---|---|
|
|
|
|
Schema for optional [units.*] TOML tables. ConfigLoader does not
construct these objects; the tables are documentation-only tags.
Suite unit conversion lives in chemparseplot.units.
eOn/NWChem Dataclasses#
NWChemAtom#
Field |
Type |
Description |
|---|---|---|
|
|
Element symbol |
|
|
Cartesian coordinates |
NWChemSocketConfig#
Field |
Type |
Default |
Description |
|---|---|---|---|
|
|
required |
Atom list |
|
|
required |
Path to NWChem settings file |
|
|
required |
Socket address for eOn |
|
|
|
Use Unix domain socket |
|
|
|
Memory allocation in GB |
|
|
|
Output file path |