MRChemSoft / mrchem

MultiResolution Chemistry
GNU Lesser General Public License v3.0
29 stars 21 forks source link

Improve handling of JSON input #313

Closed robertodr closed 4 years ago

robertodr commented 4 years ago
robertodr commented 4 years ago

@stigrj I think I have some confusion in my head as to what the JSON input should really be when fed to the mrchem Python front-end. Is it the program_dict?

{
"input": {...},
"output": {...}
}

Or is it the JSON I would get from only running lex on the .inp file (i.e. what is called intermediate representation in parselglossy)?

{
"world_prec": ...,
"WaveFunction": {...}
}

I think both should be allowed. What's your opinion?

stigrj commented 4 years ago

It's the latter. The python front-end accepts the user input, which is the one defined in template.yml, but its format can be either getkw or JSON.

stigrj commented 4 years ago

Can you elaborate a bit on the need for this change? This is basically how things were two months ago, and I kind of like the current setup better.

robertodr commented 4 years ago

I'm trying to figure out what's best to run MRChem through QCEngine. I need to produce a JSON file at some point, but it could also be enough with producing a dict. So I might throw away this PR. I think what I actually need is to a) modify parselglossy slightly b) separate the mrchem script into an api.py and a cli.py.