stilt.execution.run_receptors#

stilt.execution.run_receptors(model, receptor_ids, *, n_cores=1, skip_existing=True)[source]#

Run a list of receptors, in this process or in a process pool.

Pool workers load the model again from model.project.root, so the config and receptors must already be saved in the project, as Model.register() does. A SIGTERM, such as Slurm preemption or the end of the job’s time limit, stops the batch with an interrupted result.

Parameters:
  • model (Model) – Model the receptors belong to.

  • receptor_ids (list[str]) – Receptors to run.

  • n_cores (int) – Number of worker processes. 1 runs in this process.

  • skip_existing (bool) – Keep trajectories and footprints that already exist.

Returns:

One result per receptor, in input order. After an interruption, only the receptors that finished.

Return type:

list[ReceptorResult]