CDFT error no OUTER_SCF loop

147 views
Skip to first unread message

Yun Liu

unread,
Jun 3, 2021, 3:59:58 PM6/3/21
to cp2k
I'm a new user for CP2K, and trying to run a CDFT calculations on benzene dimer. Please find attached my input file, which has followed closely the CDFT example. I'm running cp2k v7.1.

The following error is encountered

The SCF&OUTER_SCF loop must be present for CDFT calculations.

The scf and outer_scf loops are specified in the input files, so not sure what is missing.

Any help would be appreciated.



# ====================================================
# ===== GLOBAL Section  ==============================
# ====================================================
&GLOBAL
  PROJECT cdft1       
#  RUN_TYPE MD
  RUN_TYPE ENERGY 
  PRINT_LEVEL LOW
#  WALLTIME 35500
&END GLOBAL


# ====================================================
# ===== FORCE_EVAL Section ===========================
# ====================================================
&FORCE_EVAL
  METHOD Quickstep

# ====================================================
# ===== DFT Section, Subsection of FORCE_EVAL ========
# ====================================================
  &DFT
    MULTIP 3
    LSD
    BASIS_SET_FILE_NAME BASIS_MOLOPT
    POTENTIAL_FILE_NAME GTH_POTENTIALS
    &MGRID
      CUTOFF 400
      NGRIDS 4
    &END MGRID

    &SCF
      MAX_SCF 200
      EPS_SCF 1.0E-6
      SCF_GUESS ATOMIC
      &OT
        MINIMIZER DIIS
        N_DIIS 7
      &END OT
    &END SCF
    &XC
      &XC_FUNCTIONAL PBE
      &END XC_FUNCTIONAL
    &END XC

# ====================================================
# ===== CDFT Section, Subsection of FORCE_EVAL/DFT ===
# ====================================================
    &QS
      METHOD GPW
      &CDFT
        TYPE_OF_CONSTRAINT BECKE
        ATOMIC_CHARGES TRUE
        STRENGTH 1.0
        TARGET 16
        &ATOM_GROUP
          ATOMS 1 2 3 4 5 6 7 8 9 10 11 12
          COEFF 1 1 1 1 1 1 1 1 1 1  1  1
          CONSTRAINT_TYPE ALPHA
#          FRAGMENT_CONSTRAINT TRUE
        &END ATOM_GROUP
        &DUMMY_ATOMS
          ATOMS 13 14 15 16 17 18 19 20 21 22 23 24
        &END DUMMY_ATOMS
        &OUTER_SCF ON 
          TYPE CDFT_CONSTRAINT 
          MAX_SCF 200
          OPTIMIZER NEWTON_LS
          &CDFT_OPT 
            CONTINUE_LS TRUE 
          &END CDFT_OPT
        &END  
        &BECKE_CONSTRAINT
          ADJUST_SIZE FALSE
          CUTOFF_TYPE ELEMENT
          ELEMENT_CUTOFF 6.0 
          CAVITY_CONFINE TRUE
          CAVITY_SHAPE VDW
          EPS_CAVITY 1.0E-7
          IN_MEMORY TRUE
          SHOULD_SKIP TRUE
        &END BECKE_CONSTRAINT
        &PROGRAM_RUN_INFO ON 
          &EACH
            QS_SCF 1
          &END EACH
          COMMON_ITERATION_LEVELS 2
          ADD_LAST NUMERIC
          FILENAME test_out.out
        &END 
      &END CDFT
    &END QS
  &END DFT
 

# ====================================================
# ===== SUBSYS Section, Subsection of Force Eval =====
# ====================================================
  &SUBSYS
    &CELL
      ABC [angstrom] 30.0 30.0 30.0
      PERIODIC NONE
    &END CELL
    &TOPOLOGY
      COORDINATE XYZ
      COORD_FILE_NAME ./benzene.xyz    
      &CENTER_COORDINATES
      &END
    &END TOPOLOGY
    &KIND C
       BASIS_SET DZVP-MOLOPT-GTH-q4
#      BASIS_SET TZV2P-GTH
       POTENTIAL GTH-PBE-q4
    &END KIND
    &KIND H
       BASIS_SET DZVP-MOLOPT-GTH-q1
#      BASIS_SET TZV2P-GTH
       POTENTIAL GTH-PBE-q1
    &END KIND
  &END SUBSYS
&END FORCE_EVAL


Matt Watkins

unread,
Jun 7, 2021, 1:07:19 PM6/7/21
to cp2k
I suspect that you need to include a OUTER_SCF section in the SCF section as well...? I guess this could be a feature.

Yun Liu

unread,
Jun 8, 2021, 4:10:50 AM6/8/21
to cp2k
Thank you very much for the suggestions. I tried that and the following error is raised instead.

CDFT constraints must be defined in QS&CDFT

I think these constraints have been defined in the correct subsection. 

Matt Watkins

unread,
Jun 8, 2021, 8:23:45 AM6/8/21
to cp2k

Not sure I'm afraid.
You can look at examples in the regtests to figure out what the syntax has to be
https://github.com/cp2k/cp2k/tree/master/tests/QS/regtest-cdft-1 
for instance (other cdft folders are there too)
Matt

Yun Liu

unread,
Jun 15, 2021, 3:42:03 AM6/15/21
to cp2k
Thank you very much for the suggestions. I will have a look at the input files again.
Reply all
Reply to author
Forward
0 new messages