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

Generated CP2K input is invalid #1701

Open
7 tasks
e-kwsm opened this issue Aug 31, 2024 · 2 comments
Open
7 tasks

Generated CP2K input is invalid #1701

e-kwsm opened this issue Aug 31, 2024 · 2 comments

Comments

@e-kwsm
Copy link
Contributor

e-kwsm commented Aug 31, 2024

Avogadro version: (please complete the following information from the About box):

  • Avogadrolibs: 1.99.0
  • Qt: 5.15.2

Desktop version: (please complete the following information):

  • OS: EndeavourOS
  • Version:
  • Compiler (appimage)

Describe the bug
Generated CP2K input is malformed. See ja.txt (Japanese locale).

Regarding Energy calculation:

  • GLOBAL
    • PROJECT
      2: PROJECT CO | ????? | SZV-GTH
      • by default avogadro determines the PROJECT by the formula, calculation type, and basisset
      • here the calculation type is "エネルギー" (Energy in ja), correctly shown in the GUI, but saved wrongly
      • CP2K uses PROJECT for the prefix of intermediate files; anyway, i.e. in any locale, CP2K 2024.2 rejects the line since it contains spaces (and | is not suitable for filename); it must be e.g. PROJECT CO_Energy_SVZ-GTH
  • FORCE_EVAL
    • METHOD
      8: METHOD DFT
      DFT must be QS or QUICKSTEP for electronic structure methods including DFT
    • 9:&END FORCE_EVAL this must be put at the EOF but 58: $END appears instead
    • SUBSYS: surrounding &SUBSYS and &END SUBSYS are missing
      • KIND: closing &END KIND is gone
      • COORD: enclosing &COORD and &END COORD are missed around the C and O coordinates
    • DFT
      • XC
        50: &XC_FUNCTIONAL 0
        enum of BLYP is used instead of string BLYP

I have not checked the other calculation types.

To Reproduce

2
carbon monoxide
C          0.00000        0.00000        0.00000
O          1.05700        0.00000        0.00000
  1. Open the above XYZ file
  2. Navigate to "Input" → "CP2K"
  3. "Save File…" without modification

Expected behavior
Generated CP2K input is valid.

Screenshots

Screenshot from 2024-09-01 06-32-33

@ghutchis
Copy link
Member

Some of these would be fairly easy for me to fix, but since I don't use cp2k, I'll definitely need help from other users.

The code is at https://github.com/OpenChemistry/avogadrolibs/blob/master/avogadro/qtplugins/cp2kinput/cp2kinputdialog.cpp

@e-kwsm
Copy link
Contributor Author

e-kwsm commented Sep 2, 2024

#1702

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