scine_puffin.jobs.templates.scine_observers

Classes

Observer()

Abstract base class that defines an observer pattern in a Puffin job in order to observe each calculation.

StoreEverythingObserver(calculation_id, model)

Observer implementation that stores every structure and calculated properties in the database.

StoreWithFractionObserver(calculation_id, ...)

Observer implementation that stores a given fraction of structures and their properties in the database.

StoreWithFrequencyObserver(calculation_id, ...)

Observer implementation that stores every nth structure and calculated properties in the database.

class scine_puffin.jobs.templates.scine_observers.Observer[source]

Abstract base class that defines an observer pattern in a Puffin job in order to observe each calculation.

abstract finalize(db_manager: db.Manager, charge: int, multiplicity: int) None[source]
abstract gather(cycle: int, atoms, results, tag: str) None[source]
class scine_puffin.jobs.templates.scine_observers.StoreEverythingObserver(calculation_id: db.ID, model: db.Model)[source]

Observer implementation that stores every structure and calculated properties in the database.

finalize(db_manager: db.Manager, charge: int, multiplicity: int) None[source]
gather(cycle: int, atoms: utils.AtomCollection, results: utils.Results, tag: str) None[source]
static tag_to_label(tag: str) db.Label[source]
class scine_puffin.jobs.templates.scine_observers.StoreWithFractionObserver(calculation_id: db.ID, model: db.Model, fraction: float)[source]

Observer implementation that stores a given fraction of structures and their properties in the database. Which structures are stored is determined at random.

finalize(db_manager: db.Manager, charge: int, multiplicity: int) None
gather(cycle: int, atoms: utils.AtomCollection, results: utils.Results, tag: str) None[source]
static tag_to_label(tag: str) db.Label
class scine_puffin.jobs.templates.scine_observers.StoreWithFrequencyObserver(calculation_id: db.ID, model: db.Model, frequency: float)[source]

Observer implementation that stores every nth structure and calculated properties in the database.

finalize(db_manager: db.Manager, charge: int, multiplicity: int) None
gather(cycle: int, atoms: utils.AtomCollection, results: utils.Results, tag: str) None[source]
static tag_to_label(tag: str) db.Label