[CP2K-user] [CP2K:19973] Does the boundary setting affect the charge distribution under the electric field?

Jürg Hutter hutter at chem.uzh.ch
Mon Feb 26 09:07:48 UTC 2024


Hi

you are using a probably not tested combination of features.
xTB with 2D periodicity and external electrical field (and hoping
for the correct default Ewald setting) might not result in a
correct setup. You should also use the PERIODIC_EFIELD option.
I would suggest to simplify your system: use 3 D periodic cell with a large
vacuum space (e.g. 80 A). This should correctly choose the Ewald settings
and together with PERIODIC_EFIELD might work.

regards
JH

________________________________________
From: cp2k at googlegroups.com <cp2k at googlegroups.com> on behalf of Evelyn Navarro <easauasqc at gmail.com>
Sent: Friday, February 23, 2024 2:03 PM
To: cp2k
Subject: [CP2K:19964] Does the boundary setting affect the charge distribution under the electric field?

Dear all
  I was studying the charge changes of two-dimensional piezoelectric materials under electric fields, and found that when the boundary is set as a period, the charge is actually concentrated in the middle of the material, which is not understandable. But if you use aperiodic boundaries, the charge will accumulate towards both ends of the material, which is normal. I tried the electric field and the periodic electric field respectively, and as long as the boundary is periodic, the charge will gather in the middle, which is incomprehensible, and I want to know why. What I want to study is periodic materials, and this periodic boundary is unavoidable.

&GLOBAL
  PROJECT 468-zhouqi-0.004d-xybianjie-2024
  PRINT_LEVEL LOW
  RUN_TYPE MD
&END GLOBAL

&FORCE_EVAL
  METHOD Quickstep
  &SUBSYS
    &CELL
      ABC    38.9946780817  32.5196269485    20.000
      PERIODIC XY #Direction of applied PBC (geometry aspect)
    &END CELL
    &TOPOLOGY
COORD_FILE_FORMAT XYZ
    COORD_FILE_NAME 468.xyz
      &CENTER_COORDINATES #Centering the atoms in the box
      &END
    &END
#   &VELOCITY #You can set initial atomic velocities in this section
#   &END VELOCITY
  &END SUBSYS

  &DFT
#   WFN_RESTART_FILE_NAME 400-RESTART.wfn
    CHARGE    0 #Net charge
    MULTIPLICITY    1 #Spin multiplicity

      &EFIELD
      INTENSITY 0.004
      POLARISATION -1.00000 0.00000 0.00000
    &END

    &QS
      EPS_DEFAULT 1E-10 #This is default. Set all EPS_xxx to values such that the energy will be correct up to this value
      EXTRAPOLATION ASPC #Extrapolation for wavefunction during e.g. MD. ASPC is default, PS also be used
      EXTRAPOLATION_ORDER 3 #Order for PS or ASPC extrapolation. 3 is default
      METHOD xTB
      &xTB
        CHECK_ATOMIC_CHARGES F #xTB calculation often crashes without setting this to false
        &PARAMETER
          DISPERSION_PARAMETER_FILE dftd3.dat
          PARAM_FILE_NAME xTB_parameters
        &END PARAMETER
      &END xTB
    &END QS
    &POISSON
      PERIODIC XY #Direction(s) of PBC for calculating electrostatics
      PSOLVER ANALYTIC #The way to solve Poisson equation
    &END POISSON
    &SCF
      MAX_SCF 20 #Maximum number of steps of inner SCF
      EPS_SCF 1.0E-05 #Convergence threshold of density matrix of inner SCF
#     SCF_GUESS RESTART #Use wavefunction from WFN_RESTART_FILE_NAME file as initial guess
      &OT
        PRECONDITIONER FULL_SINGLE_INVERSE
        MINIMIZER DIIS #CG is worth to consider in difficult cases
        LINESEARCH 2PNT #1D line search algorithm for CG. 2PNT is default, 3PNT is better but more costly. GOLD is best but very expensive
      &END OT
       &OUTER_SCF
         MAX_SCF 20 #Maximum number of steps of outer SCF
         EPS_SCF 1.0E-05 #Convergence threshold of outer SCF
       &END OUTER_SCF
      &PRINT
        &RESTART OFF #Do not generate wfn file to suppress meaningless I/O cost
        &END RESTART
      &END PRINT
    &END SCF
  &END DFT
&END FORCE_EVAL

&MOTION
  &MD
    ENSEMBLE NVT
    STEPS 250000 #Number of steps to run
    TIMESTEP 1.0 #Step size in fs. Decrease it properly for high temperature simulation
    TEMPERATURE 5 #Initial and maintained temperature (K)
    &THERMOSTAT
      TYPE NOSE
    &END THERMOSTAT
  &END MD
  &CONSTRAINT
    &FIXED_ATOMS #Set atoms to be fixed
      COMPONENTS_TO_FIX XYZ #Which fractional components will be fixed, can be X, Y, Z, XY, XZ, YZ, XYZ
      LIST            357..468

    &END FIXED_ATOMS
  &END CONSTRAINT
  &PRINT
    &TRAJECTORY
      &EACH
        MD     1 #Output frequency of coordinate
      &END EACH
      FORMAT xyz
    &END TRAJECTORY
       &RESTART
      BACKUP_COPIES 0 #Maximum number of backing up restart file, 0 means never
      &EACH
        MD 100 #Frequency of updating last restart file. Default is 20
      &END EACH
    &END RESTART
    &RESTART_HISTORY
      &EACH
        MD 1000 #How many steps a history .restart file is generated. Default is 500
      &END EACH
    &END RESTART_HISTORY
  &END PRINT
&END MOTION

Thanks
Evelyn  Navarro

--
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+unsubscribe at googlegroups.com<mailto:cp2k+unsubscribe at googlegroups.com>.
To view this discussion on the web visit https://groups.google.com/d/msgid/cp2k/0b163d78-c506-4817-97d6-ba7f187a4e85n%40googlegroups.com<https://groups.google.com/d/msgid/cp2k/0b163d78-c506-4817-97d6-ba7f187a4e85n%40googlegroups.com?utm_medium=email&utm_source=footer>.

-- 
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+unsubscribe at googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cp2k/ZR0P278MB075990C7A1D178EFDF0E22BD9F5A2%40ZR0P278MB0759.CHEP278.PROD.OUTLOOK.COM.


More information about the CP2K-user mailing list