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
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