stilt.Model.register#

Model.register(receptors=None)[source]#

Save the model’s settings and receptors to the project.

Workers rebuild the model from the project alone, so run() calls this first. A config given in Python is written to config.yaml with only the settings that were set. A config.yaml loaded from the project is left as it is. Receptors not yet in receptors.csv are appended to it, and the settings of every variant are recorded. When a work queue is configured, the receptors are added to it.

Parameters:

receptors (Iterable[stilt.receptor.Receptor] | None) – Receptors to add to the project. Defaults to the model’s own receptors.

Returns:

Ids of the receptors registered, including any the project already had.

Return type:

list[str]

Raises:

ConfigChangedError – If a variant or met that already ran now has different settings (check_config()).