-
Notifications
You must be signed in to change notification settings - Fork 5
Control an AiiDA process precisely
Xing Wang edited this page Jun 24, 2024
·
3 revisions
First create a task and save the checkpoint
from aiida import load_profile
from aiida.workflows.arithmetic.multiply_add import MultiplyAddWorkChain
from aiida.orm import Int, load_code
load_profile()
code = load_code("add@localhost")
p = MultiplyAddWorkChain(inputs={"x":Int(1), "y": Int(2), "z": Int(3), "code": code})
p.runner.persister.save_checkpoint(p)
Then, in another script, continue the process
from aiida.manage import get_manager
process_controller = get_manager().get_process_controller()
pk = 4070
process_controller.continue_process(pk)
Becareful, don't run process_controller.continue_process(pk)
multiple times.