Skip to content

Implement aiida-cp2k input scaffolding #29

@sylviancadars

Description

@sylviancadars

Dear cp2k-input-tools developper(s),

I have been trying to use your library to create a python dict from an existing CP2K input, to then use this dict to run new calculations in the aiida-cp2k framework. However I face the following issue.

When I use the CP2KInputParserSimplified parser, the KIND section is in the form :

'KIND': {'Te': {'BASIS_SET': 'TZVP-MOLOPT-SR-GTH', 'POTENTIAL': 'GTH-BLYP-q6'}, 'O': {'BASIS_SET': 'TZVP-GTH-q6', 'POTENTIAL': 'GTH-BLYP-q6'}}

My problem is that this tree-structure is not understood by AiiDA, which requires a format that seems to correspond to what you call "canonical form", generated by the CP2KInputParser :

'+KIND': [{'BASIS_SET': ['TZVP-MOLOPT-SR-GTH'], 'POTENTIAL': 'GTH-BLYP-q6', '': 'Te'}, {'BASIS_SET': ['TZVP-GTH-q6'], 'POTENTIAL': 'GTH-BLYP-q6', '': 'O'}]

except that in this case the '+' signs that are added to most dict key names for a reason that I do not quite understand are problematic. I do not yet know whether aiida-cp2k is able to recognize the key names despite the presence of these + signs, but it will create section duplicates if I try to modify the inoput parameters afterwards within aiida-cp2k.

In summary, is there a way to obtain the tree structure of the 'canonical form' (in particular for the 'KIND' section) without the '+' signs ?

Thanks for your help.
Best regards.

Sylvian

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions