eon.state¶
The state module.
Module Contents¶
Classes¶
The state super class. |
Data¶
API¶
- eon.state.logger¶
‘getLogger(…)’
- class eon.state.State(statepath, statenumber, statelist, previous_state_num=-1, reactant_path=None, config: eon.config.ConfigClass = None)[source]¶
The state super class.
Initialization
Creates a new state, with lazily loaded data.
- get_num_procs()[source]¶
Number of distinct process ids currently in the table.
This is a count, not an allocator. New registrations must use
- Meth:
allocate_process_id(content-addressed xxh64), neverlen(self.procs)ormax(id)+1.
- allocate_process_id(*parts)[source]¶
Content-addressed free process id (xxh64 over parts).
Reloads the process table from disk so external rewrites are visible, then returns an id derived from the payload that is not already in
self.procs. Identity does not depend on table length or max id.
- get_displacement_atom_list(config: eon.config.ConfigClass) str[source]¶
Gets the list of atoms for displacement.
If the list has already been generated and stored in this state’s info file, it is read from there. Otherwise, the displacement script is run, and the result is saved to the info file for future use.
Returns: A string of atom indices for displacement.