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

Rewrite the parser commands to always handle ADF inputs correctly #9

Closed
SiebeLeDe opened this issue Mar 4, 2023 · 0 comments
Closed
Assignees
Labels
enhancement New feature or request

Comments

@SiebeLeDe
Copy link
Collaborator

An annoying issue of PyFrag is that it fails to read less common ADF inputkeys. For example, RemoveFragOrbitals and NMR keys are handled incorrectly.

The way pyfrag currently reads the input file is the following:
It first uses the parses script to split the pyfrag input file into three blocks/text files: jobsub, adfinputfile, and "sub". The last two parts are then parsed into the PyFrag.py . The adfinputfile is made in a "semi plams settings object" which sometimes fails to read keys correctly.

In the PyFrag.py script, the inputfiles are read through the parses and the "semi plams settings object" are further modified to represent a plams settings object.

However, it is possible with plams to just convert an ADF input file directly to a plams settings object (AMSJob.from_inputfile()) which pyfrag uses in its main driver.

Therefore, I propose to execute the following adjustment:

  1. Remove the current way of converting an ADFInputfile into a semi-settings object and a settings object consequently, and just read in the inputfile directly. This entails removing a large part of the pyfragparce.sh code (lines 23 - 70; 91; 98 - 106) and waiting with removing the sub.in / EXTRA files
  2. Change the current Grep commands that may cause an issue as illustrated by Lexming
  3. Change lines 121-143; 157-182 in PyFrag.py to directly read a adf inputfile and convert it into a plams Settings() object via the above described method of using AMSJob

With this, I hope to finally end the frustrating parts of not recognizing ADF input keys.

@SiebeLeDe SiebeLeDe self-assigned this Mar 4, 2023
@SiebeLeDe SiebeLeDe added the enhancement New feature or request label Mar 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant