lsmo-epfl / aiida-lsmo

AiiDA workflows for the LSMO laboratory at EPFL
Other
9 stars 13 forks source link

BindingEnergyWorkChain for molecule with spin #93

Open ltalirz opened 3 years ago

ltalirz commented 3 years ago

Use case by @mpougin

I want to submit a complicated system for binding energy calculations. I am not sure if I can adjust the settings directly in the cp2kBindingEnergy Work Chain or if I have to do it separately. Maybe you can tell me if there's a problem with my parameter settings: I have a Cu-MOF with 8 Cu-atoms per supercell (i.e. Multiplicity 9) and O2 as adsorbent (i.e. M = 3). In the protocol .yaml file I set the multiplicity of the whole system to 11, if my understanding is right, this should then be used for the first geometry optimisation step. Then, for the BSSE energy calculation I want to set the multiplicity of the first fragment to 9 (this should be the framework correct?) and of the second fragment to 3. In my input I therefore specified for both stages:

uilder.cp2k_base.cp2k.parameters = Dict(dict={ # adjust cp2k settings for triplet molecule
        'FORCE_EVAL': {
            'DFT': {
                'MULTIPLICITY': 11,
                },
            },
        'FORCE_EVAL': {
            'BSSE': {
                'CONFIGURATION': {
                    'GLB_CONF': [1, 0],
                    'MULTIPLICITY': 9,
                    },
                'CONFIGURATION': {
                    'GLB_CONF': [0, 1],
                    'MULTIPLICITY': 3
                    },
                },
            },
        })

the geometry optimisation gets excepted as it produces this aiida.inp file

!!! Generated by AiiDA !!!                                                                                                                                                                                                                   &FORCE_EVAL                                                                                                                                                                                                                                        &BSSE                                                                                                                                                                                                                                           &CONFIGURATION                                                                                                                                                                                                                                  GLB_CONF 0                                                                                                                                                                                                                                   GLB_CONF 1                                                                                                                                                                                                                                   MULTIPLICITY 3

I assume it overrides the first settings automatically. Is there a way to specify the settings for each stage separately?

ltalirz commented 3 years ago

@danieleongari since I notice you cleaning up the repo - great if you could give a comment on this

danieleongari commented 3 years ago

Sure, I just gave a look and I hardcoded that the adsorbate system should have multiplicity equal to one:

https://github.com/lsmo-epfl/aiida-lsmo/blob/0999ccec3e445cfd0dfd37a65ab013299a5f7d51/aiida_lsmo/workchains/cp2k_binding_energy.py#L242-L245

Indeed I'm not sure fro a computational/theoretical point of view how stable it is to compute the interaction of two systems with such a complex multiplicity. You may end up not having the 9-3 split you expect. Putting the BSSE on top may be even more unstable.

I would suggest anyhow to modify the code to allow the input of the multiplicity of both systems, and check carefully in the output of CP2K if it does what you expect!

mpougin commented 3 years ago

Thank you both for checking the case. @danieleongari, I get your point. I will give it a try then to modify the workchain