eon.amsel_records

Search records of [amsel] displacement = direction_cover.

Every start amsel hands out, and what the search made of it, is a record in a readcon-db corpus in the state directory, states/N/searches.db. The corpus is the only account of what was searched: the next start is planned from it, the score of the state is computed from it, and nothing about either is kept anywhere else.

A search is two trajectories of one frame. Trajectory 2 * wuid is written when the job is created and trajectory 2 * wuid + 1 when its result is registered. A search with the first and without the second was handed out and has not come back. The fields of a record are the JSON object under eon_search in the metadata of its frame, written and read by readcon.

A record does not hold a second copy of a structure eOn keeps. The frame of a start holds the atoms its push moves, as they were sent, and the record holds the push itself: mode lists those atoms with the three components of the unit vector on each, magnitude its length, and atoms their rows in the state. The numbers read back bit for bit, so the structure the client was sent is the reactant of the state plus the push. The frame of a result holds the active atoms of the structure the search ended on. A search that landed on a process names it by process_id; its saddle and its far minimum are in states/N/procdata. eOn keeps no file of a search that ended on no process unless [Debug] keep_bad_saddles is set, and the record then names the directory.

A search can find a connected saddle that eOn leaves off the table, as it does above the thermal window. It is a connected search all the same: the direction led to a saddle. Its record has off_table set, the barrier and the two energies, no process and no rate, and since eOn keeps no file of it the active atoms of the saddle and of the far minimum are its two frames.

A state amsel has no start for has one more trajectory, with a record of kind fallback that gives the reason. The state info file holds nothing of this.

The corpus needs the readcon_db module. Without it there is no place to keep a record, so direction_cover is refused when the configuration is read; it is never run without records. It is an LMDB directory and belongs on a local filesystem; it follows [Paths] states.

Module Contents

Classes

SearchRecords

The searches of one state, in work-unit order.

Functions

corpus_error

Why the record corpus cannot be used, or None when it can.

outcome_kind

Record kind of an eOn result.

subset_text

A frame of the atoms in rows of structure that carries record.

Data

API

eon.amsel_records.CONNECTED

‘connected’

eon.amsel_records.RETURNED

‘returned’

eon.amsel_records.NON_CONVERGED

‘non_converged’

eon.amsel_records.FAILED

‘failed’

eon.amsel_records.KINDS

()

eon.amsel_records.corpus_error() → str | None[source]

Why the record corpus cannot be used, or None when it can.

eon.amsel_records.outcome_kind(termination_reason: int, connected: bool) → str[source]

Record kind of an eOn result.

connected is true when eOn accepted the saddle as a process of the state, new or repeated. A search that stopped on an energy, iteration or trajectory budget did not converge. Every other ending failed.

eon.amsel_records.subset_text(structure: Any, rows: list[int], record: dict[str, Any]) → str[source]

A frame of the atoms in rows of structure that carries record.

The atoms keep their positions, species, masses, per-axis fixed flags and ids. readcon builds and writes the frame.

Taking the rows is readcon.subframe(frame, rows). The readcon that eOn pins predates it, so the rows are copied here first; this function becomes that one call when the pin carries it.

class eon.amsel_records.SearchRecords(state: Any)[source]

The searches of one state, in work-unit order.

Initialization

handed_out() → int[source]

Number of starts handed out, returned or not.

fallback() → str | None[source]

Why amsel has no start for the state, or None when it has.

set_fallback(reason: str, structure: Any) → None[source]

Record once that the state takes no start from amsel, and why.

The record needs a frame to ride on. It is the first atom of the state, which says nothing; the reason is the content.

pending_start(wuid: int) → dict[str, Any] | None[source]

The start on record for wuid when no result is, else None.

hand_out(wuid: int, start: Any, rows: list[int], **fields: Any) → None[source]

Record the start sent to the client for work unit wuid.

start is the structure sent and rows the atoms its push moves; only those go into the frame.

register(wuid: int, kind: str, end: Any, rows: list[int], beyond: Any = None, **fields: Any) → bool[source]

Record what the search of wuid ended on.

end is the structure it ended on and rows the atoms of it to keep, in ascending order. beyond is the minimum on the far side of a saddle eOn keeps no file of; the same atoms of it follow as a second frame. False when wuid has no start here: a search of another state, or one that was not started by amsel.

frame_text(wuid: int, end: bool = False, frame: int = 0) → str[source]

The frame of the start of wuid, or a frame of its result.

records() → list[dict[str, Any]][source]

One row per start in work-unit order: start and end or None.