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

issue1475: a small bug of iterdict (generator/lib/cp2k.py) #1476

Merged
merged 5 commits into from
Mar 6, 2024

Conversation

yohsama
Copy link
Contributor

@yohsama yohsama commented Mar 5, 2024

  1. The flag in iterdict (generator/lib/cp2k.py) now contains the parent section name, and fix the problem that the content of multiple sections with the same name will only be inserted into the first section.
  2. Add indent for sections.

now the input generate by make_cp2k_input is look like this:

&GLOBAL                                                                                                                                                                                                                  
  PROJECT DPGEN                                                                                                                                                                                                          
  PREFERRED_DIAG_LIBRARY SCALAPACK                                                                                                                                                                                       
&END GLOBAL                                                                                                                                                                                                              
&FORCE_EVAL
  METHOD QS
  STRESS_TENSOR ANALYTICAL
  &DFT #FORCE_EVAL
    BASIS_SET_FILE_NAME EMSL_BASIS_SETS
    POTENTIAL_FILE_NAME POTENTIAL
    CHARGE 0
    UKS TRUE
    &MGRID #DFT #FORCE_EVAL
      CUTOFF 800
      REL_CUTOFF 55
      NGRIDS 4
    &END MGRID #DFT #FORCE_EVAL
    &QS #DFT #FORCE_EVAL
      EPS_DEFAULT 1.0E-12
      METHOD GAPW
    &END QS #DFT #FORCE_EVAL
    &SCF #DFT #FORCE_EVAL
      SCF_GUESS ATOMIC
      EPS_SCF 1.0E-6
      MAX_SCF 50
      &MIXING #SCF #DFT #FORCE_EVAL
        METHOD BROYDEN_MIXING
      &END MIXING #SCF #DFT #FORCE_EVAL
      &PRINT #SCF #DFT #FORCE_EVAL
        &RESTART OFF
        &END RESTART #PRINT #SCF #DFT #FORCE_EVAL
      &END PRINT #SCF #DFT #FORCE_EVAL
      ADD_MOS -1 -1
    &END SCF #DFT #FORCE_EVAL
    &XC #DFT #FORCE_EVAL
      &XC_FUNCTIONAL B3LYP
      &END XC_FUNCTIONAL #XC #DFT #FORCE_EVAL
      &HF #XC #DFT #FORCE_EVAL
        &MEMORY #HF #XC #DFT #FORCE_EVAL
          MAX_MEMORY 2000
        &END MEMORY #HF #XC #DFT #FORCE_EVAL
      &END HF #XC #DFT #FORCE_EVAL
    &END XC #DFT #FORCE_EVAL
    &POISSON #DFT #FORCE_EVAL
      PERIODIC NONE
      POISSON_SOLVER MULTIPOLE
    &END POISSON #DFT #FORCE_EVAL
    RELAX_MULTIPLICITY 0.00001
  &END DFT #FORCE_EVAL
  &SUBSYS #FORCE_EVAL
    &CELL #SUBSYS #FORCE_EVAL
      A 14.39252  0.       0.
      B  0.       20.281213  0.
      C  0.        0.       15.801355
      PERIODIC NONE
    &END CELL #SUBSYS #FORCE_EVAL
    &COORD #SUBSYS #FORCE_EVAL
      @include coord.xyz
    &END COORD #SUBSYS #FORCE_EVAL
    &KIND Cl
      BASIS_SET 6-311G**
      POTENTIAL ALL
    &END KIND #SUBSYS #FORCE_EVAL
    &KIND H
      BASIS_SET 6-311G**
      POTENTIAL ALL
    &END KIND #SUBSYS #FORCE_EVAL
    &KIND C
      BASIS_SET 6-311G**
      POTENTIAL ALL
    &END KIND #SUBSYS #FORCE_EVAL
  &END SUBSYS #FORCE_EVAL
  &PRINT #FORCE_EVAL
    &FORCES ON
    &END FORCES #PRINT #FORCE_EVAL
    &STRESS_TENSOR ON
    &END STRESS_TENSOR #PRINT #FORCE_EVAL
  &END PRINT #FORCE_EVAL
&END FORCE_EVAL

@yohsama yohsama changed the title Yohsama/issue1475 issue1475: fixed a small bug of iterdict (generator/lib/cp2k.py) Mar 5, 2024
@yohsama yohsama changed the title issue1475: fixed a small bug of iterdict (generator/lib/cp2k.py) issue1475: a small bug of iterdict (generator/lib/cp2k.py) Mar 5, 2024
@njzjz njzjz changed the base branch from master to devel March 5, 2024 19:18
@njzjz njzjz requested a review from robinzyb March 5, 2024 19:20
Copy link

codecov bot commented Mar 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 49.50%. Comparing base (e7b4311) to head (c4cf219).

Additional details and impacted files
@@           Coverage Diff           @@
##            devel    #1476   +/-   ##
=======================================
  Coverage   49.50%   49.50%           
=======================================
  Files          83       83           
  Lines       14818    14818           
=======================================
  Hits         7336     7336           
  Misses       7482     7482           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@njzjz njzjz merged commit cbecd99 into deepmodeling:devel Mar 6, 2024
7 checks passed
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

Successfully merging this pull request may close these issues.

[BUG] A bug when generate the CP2K input if there is same subsection name in different sections
3 participants