Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Building CP2K input parameters from an existing input file #137

Closed
sylviancadars opened this issue Apr 29, 2021 · 2 comments
Closed

Building CP2K input parameters from an existing input file #137

sylviancadars opened this issue Apr 29, 2021 · 2 comments

Comments

@sylviancadars
Copy link

Dear AiiDA-CP2K developper(s),

I cannot find in the documentation a tool to construct a dict of parameters from an existing CP2K input file, which, possibly after some modifications, could then be converted back to an AiiDA data Dict to run calculations through AiiDA. Did I overlooked a corresponding functionality in aiida-cp2k ?

If not (which would I find very suprising), then the cp2k-input-tools seems to be a good potential option, except that it does not seem to behave exactly as I would expect, or at least seemingly not suitably for subsequent conversion to an AiiDA data Dict. Here is what I tried :

from cp2k_input_tools.parser import CP2KInputParserSimplified
parser = CP2KInputParserSimplified()
with open("sampleInput.in") as fhandle:
inputAsDict = parser.parse(fhandle)

But it seems that my KIND section does not match the required syntax :

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

instead of :
'KIND': [
{
'': 'O',
'BASIS_SET': 'DZVP-MOLOPT-SR-GTH',
'POTENTIAL': 'GTH-PBE-q6'
},
{
'
': 'H',
'BASIS_SET': 'DZVP-MOLOPT-SR-GTH',
'POTENTIAL': 'GTH-PBE-q1'
},

When I use CP2KInputParser instead of CP2KInputParserSimplified in the cp2k-input-tools package, '+' signs are added to most key values, such that the script used to prepare aiida-cp2k calculations does not overwrites the corresponding sections. E.g. '&+CELL' and '&CELL' sections coexist in the file if a '&CELL' section existed in the original file.

Thanks for your help.
best reagards

Sylvian

@dev-zero
Copy link
Contributor

as answered in cp2k/cp2k-input-tools#29 some of this functionality would be added with PR #105

@sylviancadars
Copy link
Author

Thank you very much for your answer.
Best regards.
Sylvian.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants