Random¶
RandomCalculator
¶
RandomCalculator(
fmax: float = 0.1,
steps: int = 1000,
optimizer: type[Optimizer] | str = "FIRE",
relax_cell: bool = True,
fix_symmetry: bool = False,
fix_atoms: bool = False,
hydrostatic_strain: bool = False,
symprec: float = 0.01,
traj_file: str | None = None,
interval: int = 1,
verbose: bool = False,
params_asecellfilter: dict | None = None,
include_magmoms: bool = False,
include_dipoles: bool = False,
**kwargs: Any,
)
A tiny calculator that returns random energies and forces for every call.
calculator
property
¶
Returns a bare ASE Calculator instance.
Unused by this class since calculate() and relax() are both overridden
directly, but still required to satisfy BaseCalculator's abstract property.
Returns:
| Name | Type | Description |
|---|---|---|
Calculator |
Calculator
|
A plain ASE Calculator instance. |
calculate
¶
Pretend to calculate: return a random energy and random forces.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
structure
|
Atoms | Structure | Molecule
|
The structure to calculate (used to determine number of atoms). |
required |
**kwargs
|
Any
|
Additional keyword arguments (ignored). |
{}
|
relax
¶
Pretend to relax: return the same structure, a random energy, and random forces.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
structure
|
Atoms | Structure | Molecule
|
The structure to relax (used to determine number of atoms). |
required |
**kwargs
|
Any
|
Additional keyword arguments (ignored). |
{}
|
Returns:
| Type | Description |
|---|---|
dict[str, Any]
|
A dictionary containing the given structure, a random energy, and random forces. |