Gears¶
Interface¶
- class scine_chemoton.gears.Gear[source]
The base class for all Gears.
A Gear in Chemoton is a continuous loop that alters, analyzes or interacts in any other way with a reaction network stored in a SCINE Database. Each Gear has to be attached to an Engine(
scine_chemoton.engine.Engine
) and will then help in driving the exploration of chemical reaction networks forward.Extending the features of Chemoton can be done by adding new Gears or altering existing ones.
- class Options[source]
-
cycle_time:
int
- int
The minimum number of seconds between two cycles of the Gear. Cycles are finished independently of this option, hence if a cycle takes longer than the cycle_time will effectively lead to longer cycle times and not cause multiple cycles of the same Gear.
-
model:
Model
- db.Model
The model the Gear is working with.
- unset_collections()
Duplicate name to HoldCollections method to be triggered in pickling process, so infinite _parent loops are avoided.
- Return type:
-
cycle_time:
- __call__(credentials, loop_count, single=False)[source]
Starts the main loop of the Gear, then acting on the database referenced by the given credentials.
- Parameters:
- credentialsdb.Credentials (Scine::Database::Credentials)
The credentials to a database storing a reaction network.
- loop_countc_int
A shared memory integer that allows to communicate the number of loops across processes.
- singlebool
If true, runs only a single iteration of the actual loop. Default: false, meaning endless repetition of the loop.
- initialize_collections(manager)
- Return type:
- property name: str
- property stop_at_next_break_point: bool
- unset_collections()
- Return type: