Electronic Convergence Issue in Geometry Optimization of Molecule Adsorption

151 views
Skip to first unread message

Rishikanta Mayengbam

unread,
Jan 30, 2025, 11:24:09 AM1/30/25
to cp2k

Dear CP2K Users,

I am running a geometry optimization for a molecule adsorption system with vacuum along the y-axis, but I am struggling to achieve electronic SCF convergence even after 1000 iterations. I would appreciate any suggestions on improving the convergence.

Below is my input script:

&GLOBAL
   PRINT_LEVEL  MEDIUM
   PROJECT_NAME mol_absorp_OPT
   RUN_TYPE  GEO_OPT
   EXTENDED_FFT_LENGTHS T
&END GLOBAL

&FORCE_EVAL
  METHOD  QS
  &DFT
    UKS .FALSE.
    BASIS_SET_FILE_NAME BASIS_MOLOPT
    POTENTIAL_FILE_NAME POTENTIAL
    &MGRID
      NGRIDS 4
      CUTOFF 600
      REL_CUTOFF 60
    &END MGRID
    &QS
      METHOD GPW
      EPS_DEFAULT 1.000E-12
    &END QS
    &POISSON
      PERIODIC XZ
      PSOLVER MT
    &END POISSON
    &SCF
      &DIAGONALIZATION ON
      &END DIAGONALIZATION
      &MIXING
        ALPHA 0.5
        METHOD PULAY_MIXING
        NBROYDEN 8
      &END MIXING
      EPS_SCF 1.0E-5
      SCF_GUESS ATOMIC
      MAX_SCF  5000
      ADDED_MOS 100
    &END SCF
    &XC
      &XC_FUNCTIONAL
         &PBE
         &END PBE
      &END XC_FUNCTIONAL
      &VDW_POTENTIAL
         POTENTIAL_TYPE PAIR_POTENTIAL
         &PAIR_POTENTIAL
            PARAMETER_FILE_NAME dftd3.dat
            TYPE DFTD3
            REFERENCE_FUNCTIONAL PBE
            R_CUTOFF [angstrom] 16
         &END
      &END VDW_POTENTIAL
    &END XC
    &PRINT
      &MULLIKEN OFF
      &END
      &HIRSHFELD OFF
      &END
    &END PRINT
  &END DFT
  &SUBSYS
    &CELL
      A   24.8975601196000014    0.0000000000000000    0.0000000000000000
      B   0.0000000000000000    55.6124382018999981    0.0000000000000000
      C   0.0000000000000000     0.0000000000000000   24.9615383147999985
      PERIODIC  XZ
    &END CELL
    &TOPOLOGY
      COORD_FILE_NAME ABC.xyz
      COORD_FILE_FORMAT XYZ
    &END
    &KIND  Cs
      BASIS_SET DZVP-MOLOPT-SR-GTH
      POTENTIAL GTH-PBE-q9
    &END KIND
    &KIND Pb
      BASIS_SET DZVP-MOLOPT-SR-GTH
      POTENTIAL GTH-PBE-q4
    &END KIND
    &KIND Br
      BASIS_SET  DZVP-MOLOPT-SR-GTH
      POTENTIAL  GTH-PBE-q7
    &END KIND
    &KIND C
      BASIS_SET DZVP-MOLOPT-GTH
      POTENTIAL GTH-PBE-q4
    &END KIND
    &KIND N
     BASIS_SET DZVP-MOLOPT-GTH
     POTENTIAL GTH-PBE-q5
    &END KIND
    &KIND H
     BASIS_SET DZVP-MOLOPT-GTH
     POTENTIAL GTH-PBE-q1
    &END KIND
  &END SUBSYS
&END FORCE_EVAL

&MOTION
 &GEO_OPT
   OPTIMIZER BFGS
   MAX_ITER 500
   MAX_DR [bohr] 0.01
   MAX_FORCE [hartree*bohr^-1] 0.01
   RMS_DR [bohr] 0.01
   RMS_FORCE [hartree*bohr^-1] 0.01
 &END GEO_OPT

 &CONSTRAINT
   &FIXED_ATOMS
     LIST 1 2 3 4 5 6 10 11 12 13 14 15 .........................
   &END FIXED_ATOMS
 &END CONSTRAINT

 &PRINT
   &TRAJECTORY
     &EACH
       GEO_OPT 5
     &END EACH
     FORMAT XYZ
   &END TRAJECTORY
   &VELOCITIES OFF  
   &END VELOCITIES
   &FORCES ON      
   &END FORCES
   &RESTART
     BACKUP_COPIES 1
     &EACH
       GEO_OPT 10
     &END EACH
   &END RESTART
 &END PRINT
&END MOTION

Marcella Iannuzzi

unread,
Jan 31, 2025, 7:31:44 AM1/31/25
to cp2k
Hi ...

How bad is the convergence? You might need smearing of the occupation number and a smaller alpha parameter in the density mixing. 
Regards
marcella 

Rishikanta Mayengbam

unread,
Feb 1, 2025, 1:41:35 AM2/1/25
to cp2k
Thanks for the response. 

It was not able to converge even within 4000 steps. So, I tried many things, loosening the convergence criteria, changing cut-off and relative cut offs, etc. I haven't tried with the smearing, but have tried reducing the mixing alpha parameter. 
Finally, I used CG Minimiser as follows and it's converging. Is this approach correct?

&GLOBAL
   PRINT_LEVEL  MEDIUM
   PROJECT_NAME CsPb_Br3_TmPyPB_OPT

   RUN_TYPE  GEO_OPT
   EXTENDED_FFT_LENGTHS T
&END GLOBAL

&FORCE_EVAL
  METHOD  QS
  &DFT
    UKS .FALSE.
    BASIS_SET_FILE_NAME BASIS_MOLOPT
    POTENTIAL_FILE_NAME POTENTIAL
    &MGRID
      NGRIDS 4
      CUTOFF 500
      REL_CUTOFF 50

    &END MGRID
    &QS
      METHOD GPW
      EPS_DEFAULT 1.000E-12
    &END QS
    &POISSON
      PERIODIC XZ
      PSOLVER MT
    &END POISSON
    &SCF
      EPS_SCF 1.0E-6
      SCF_GUESS RESTART
      MAX_SCF 5000
        &OT
        MINIMIZER CG
        PRECONDITIONER FULL_SINGLE_INVERSE
        &END OT
      &OUTER_SCF          
        MAX_SCF 500
        EPS_SCF 1.0E-5
      &END OUTER_SCF
      COORD_FILE_NAME CsBr-TmPyPB.xyz
   OPTIMIZER LBFGS
   MAX_ITER 1000
   MAX_DR [bohr] 0.002
   MAX_FORCE [hartree*bohr^-1] 3.000E-4
   RMS_DR [bohr] 0.002
   RMS_FORCE [hartree*bohr^-1] 3.000E-4
 &END GEO_OPT

 &CONSTRAINT
   &FIXED_ATOMS
     LIST 1 2 3 4 5 6 ...........

   &END FIXED_ATOMS
 &END CONSTRAINT

 &PRINT
   &TRAJECTORY
     &EACH
       GEO_OPT 5
     &END EACH
     FORMAT XYZ
   &END TRAJECTORY
   &VELOCITIES OFF  
   &END VELOCITIES
   &FORCES ON       
   &END FORCES
   &RESTART
     BACKUP_COPIES 1
     &EACH
       GEO_OPT 10
     &END EACH
   &END RESTART
 &END PRINT
&END MOTION

Rishikanta Mayengbam

unread,
Feb 6, 2025, 3:34:05 AM2/6/25
to cp...@googlegroups.com
Dear Prof. Marcella,

Thank you for your suggestion! I tried applying smearing to the occupation numbers and reducing the alpha parameter in the density mixing, and it worked wonderfully. The convergence has improved significantly, and the calculations are now much more stable.
The OT method resulted in a weird optimized structure. 



--
You received this message because you are subscribed to the Google Groups "cp2k" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cp2k+uns...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/cp2k/24aa87ce-f708-43fb-a7c7-59d7e068f636n%40googlegroups.com.

Rishikanta Mayengbam

unread,
Feb 11, 2025, 2:19:25 AM2/11/25
to cp2k
Hi users,

After the geometry optimization with OT method, the surface layers of the perovskite slab become so weird, some atoms of the molecule break and move far upwards. 

So, I tried with the standard diagonalization. But after several steps, I stopped the geometry optimization in the mid-way because the structure changed in the similar fashion as above. 
I have no idea what is going wrong here.

Can someone suggest something? 
OT method_geo_opt.mp4
geo_OT.inp
geo_dia_method.inp
geo_dia_method.mp4

Tyler Sterling

unread,
Feb 11, 2025, 11:53:30 AM2/11/25
to cp2k
It seems like your structure is metallic since you are using smearing and added mos. In which case, you shouldn't be using OT or other minimization methods. Only use diagonalization. Also, if the structure is blowing up, make sure it is charge neutral. 

Rishikanta Mayengbam

unread,
Feb 13, 2025, 3:02:30 AM2/13/25
to cp2k
Thanks Tyler.

 My system is a perovskite slab over which an organic molecule is placed, both are semiconductors.  

Now, I use diagonalization and removed smearing.  The main issue was with the POISSON_PSOLVER, which was set to MT.  With ANALYTIC, it converges quite smoothly and fast (in 4 hours, 128 cores).  
The optimized structure quite resembles the one obtained from VASP package.

I would like to know: Is dipole corrections very essential for subsequent MD simulations for the optimized structure? 
Reply all
Reply to author
Forward
0 new messages