stfc / aiida-mlip

machine learning interatomic potentials aiida plugin
https://stfc.github.io/aiida-mlip/
BSD 3-Clause "New" or "Revised" License
1 stars 4 forks source link

get_builder #106

Open federicazanca opened 2 months ago

federicazanca commented 2 months ago

implement get_builder function for calcjobs (need to check how it works, at the moment if I do singlepoint.get_builder I only get Process class: Singlepoint Inputs: metadata: options: stash: {} monitors: {})

ElliottKasoar commented 2 months ago

Sorry,

implement get_builder function for calcjobs (need to check how it works, at the moment if I do singlepoint.get_builder I only get Process class: Singlepoint Inputs: metadata: options: stash: {} monitors: {})

What's the general purpose of get_builder/what would you like it to do that it's not doing at the moment?

This may be explained, but how does it relate to the config file?

federicazanca commented 2 months ago

Sorry,

implement get_builder function for calcjobs (need to check how it works, at the moment if I do singlepoint.get_builder I only get Process class: Singlepoint Inputs: metadata: options: stash: {} monitors: {})

What's the general purpose of get_builder/what would you like it to do that it's not doing at the moment?

This may be explained, but how does it relate to the config file?

At the moment we have a config file that is an input for the calcjob that is directly given to janus as it is, and additionally you give to the calcjob the aiida specific inputs (like metadata), or also janus inputs but defined outside the config. That is what is being finalised in the pr #102, and we like it this way for now. And it works this way to run a singlepoint calculation:

run(Singlepoint, code="code@localhost", metadata="{}", config="config.yaml", additional_inputs="additional_inputs")

The other thing we were discussing was to have directly a config file that you can pass to aiida calcjob, one that maybe it's divided in 2 parts, one part inputs for aiida and another part inputs for janus, so you only pass the config file to aiida, and the config file itself is not saved as an input, but its content is. And we said to keep this for later cause this is something on the AIIDA level. What I realised now basically is that this is done by the aiida get_builder() function. I can make it read the yaml file with all the janus and aiida inputs (so I should define what to look for in the yaml file and save it as an input for the calcjob which is not necessarily trivial). So in my mind the config file would have worked like this:

run(Singlepoint, config)

while the builder would work like

singlepoint.get_builder_from_yaml("config.yaml")
run(singlepoint)

but in the end it is basically the same thing. Still I would keep this as a non-urgent thing for the future, cause it might actually make it needlessly complicated.