Closed mbercx closed 3 years ago
Maybe consider also using something like this:
Sure, that also works for these simple cases :) (note that for complex systems with more than 10 magnetizations for one element this would fail due to the 3 char limit of Quantum ESPRESSO kinds). However, you would be creating a new duplicate StructureData
each time the Cp2kRelaxInputGenerator.get_builder()
method is called, right?
Indeed, there are the usual two comments to the simple solution referenced:
calcfunction
, now the builder will mutate the database when being run, which is not desirable.@mbercx and I have written a calcfunction
that takes the latter problem (and a lot more subtle details) but the further we advanced the more we were getting convinced the problem lay elsewhere. Really the CalcJob
should probably just allow to specify quantities (such as starting magnetization) per site, instead of per kind.
That said, it's probably better to have this simple solution for now than no solution at all? That or we add separate .xyz
files with tags for the structures which we discuss in the paper. On that note, I don't seem to be able to obtain the click arguments from the context, i.e. ctx.params
only seems to contain the options?
So far I've been running AFM calculations for QE by first generating a new
StructureData
with the required kinds and then passing its identifier to the-S
option. This is not very user friendly, however. 😅Instead, it would be easier if we added structure files that immediately have the required kinds after being loaded. @yakutovicha sent me an example yesterday where tags are added to an
.xyz
file for BCC Fe:However, we might still switch to FCC iron for this structure (see #117). Another example would be the hydrogen molecule:
When I adjust the
common/data/h2.xyz
file as above, theDissociationCurveWorkChain
launch command work fine for Quantum ESPRESSO. However, running e.g. BigDFT result in error with the following final line:So maybe we should have two separate files (e.g.
h2.xyz
andh2-afm.xyz
), and clearly indicate which ones to use for which code in the instructions? Not the cleanest solution, I admit. Alternatively we could look into loading the right structure inStructureDataParamType
based on the code and provided magnetizations (which can be derived from thectx
?)? Pinging @sphuber for comments.