SCF with problem= Poisson and Solver=fixed_point

211 views
Skip to first unread message

Maria Voccia

unread,
Jun 19, 2023, 9:33:57 AM6/19/23
to quantum-environ-users
Hello to everyone,
I'm trying to do scf calculation of a cuprite slab with environ, using a layer charged above and below it. When I use the keyword problem = generalized it works but when I use the keyword 'problem= poisson it doesn't work. 
Can anyone tell me why this happens?

&ENVIRON
   verbose = 2
   environ_thr = 1.d-4
   environ_type = 'water'
   env_external_charges = 1
/
&BOUNDARY
solvent_mode = 'full'
/
&ELECTROSTATIC
 pbc_correction = 'parabolic'
pbc_dim = 2  
pbc_axis = 3
tol = 1.D-5
solver = 'fixed_point'
problem = 'poisson'
auxiliary = 'full'
/
EXTERNAL_CHARGES (bohr)
-0.5 0. 0. 25.697 1.0 2 3
-0.5 0. 0. -10.303 1.0 2 3

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
&CONTROL
    calculation   = "scf"
    forc_conv_thr =  1.00000e-4
    outdir        = '/workhpc/FCA/FCA_CRF_STRUT/sd40171/temp/OPT-water-charge-0.5-prova1'
    prefix        = 'suf-water'
    pseudo_dir    = "/workhpc/FCA/FCA_CRF_STRUT/sd40171/DATABASE/ESPRESSO"
    restart_mode  = 'from_scratch'
    nstep         = 1000
/
&SYSTEM
    ecutrho                   =  440
    ecutwfc                   =  55
    ibrav                     = 0
    nat                       = 72
    ntyp                      = 2
    occupations               = "smearing"
    smearing                  = "gaussian"
    degauss                   = 1.00000e-02
    Hubbard_occ(1,1)          = 8.0
    Hubbard_occ(2,1)          = 6.0
    nosym                     = .true.
    assume_isolated           = "esm"
    esm_bc                    = "bc1"
    tot_charge                = 1
/
&ELECTRONS
    electron_maxstep = 300
    conv_thr         =  1.00000e-06
    mixing_beta      =  4.00000e-01
    startingpot      = "atomic"
    startingwfc      = "atomic+random"
/
&IONS          
/
&CELL
/
K_POINTS {gamma}
ATOMIC_SPECIES
Cu     63.54600  Cu.pbe-dn-kjpaw_psl.1.0.0.UPF
O      15.99940  O.pbe-n-kjpaw_psl.0.1.UPF
ATOMIC_POSITIONS angstrom
O        6.015256056      3.149009163     6.371321718
Cu       1.347942158      3.927337006     5.683866113
Cu       4.505247842      4.028137088     5.731309528
Cu      -0.087692257      6.623046504     5.711089471
Cu       2.910008930      6.687192987     5.646796009
O        2.916128725      4.849089640     5.108094730
O        2.901532984      1.347183536     3.765540878
Cu       4.440676877      2.232594014     3.164099500 0 0 0
Cu       7.540864476      2.232594014     3.164099500 0 0 0
Cu       2.890576877      4.917445971     3.164099500 0 0 0
Cu       5.990764476      4.917445971     3.164099500 0 0 0
O        5.990770676      3.127541087     2.531301237 0 0 0
O        2.890576877      4.917445971     1.265652055 0 0 0
Cu       2.890570676      3.127541087     0.632827464 0 0 0
Cu       5.990770676      3.127541087     0.632827464 0 0 0
Cu       1.340470676      5.812393044     0.632827464 0 0 0
Cu       4.440670676      5.812393044     0.632827464 0 0 0
O        2.890570676      1.337646942     0.000002872 0 0 0
O        2.818832048      8.468334515     6.191974026
Cu      -1.860039395      9.471996613     5.653325403
Cu       1.325323099      9.450528536     5.653536028
Cu       2.370995758      0.978832587     5.614886232
Cu       6.035828983      1.401879340     5.741919792
O       -0.262196315     10.364591755     5.104698392
O       -0.215804922      6.700907211     3.824542372
Cu       1.340476877      7.602297928     3.164099500 0 0 0
Cu       4.440664476      7.602297928     3.164099500 0 0 0
Cu      -0.209616923     10.287139145     3.164099500 0 0 0
Cu       2.890570676     10.287139145     3.164099500 0 0 0
O        2.890570676      8.497245000     2.531301237 0 0 0
O       -0.209616923     10.287139145     1.265652055 0 0 0
Cu      -0.209629324      8.497245000     0.632827464 0 0 0
Cu       2.890570676      8.497245000     0.632827464 0 0 0
Cu       4.440664476      0.442699869     0.632827464 0 0 0
Cu       7.540864476      0.442699869     0.632827464 0 0 0
O       -0.209623123      6.707340116     0.000002872 0 0 0
O       -0.218074268      3.106814030     6.280094508
Cu       7.535073302      4.005047361     5.761534301
Cu      -1.771386076      3.949857544     5.677257736
Cu       5.974240410      6.217419070     5.645953507
Cu      -3.389461061      6.734016805     5.649086563
O        9.071383613      4.900026652     5.123128131
O        9.100122467      1.338205391     3.765935801
Cu      10.641064476      2.232594014     3.164099500 0 0 0
Cu       1.340476877      2.232594014     3.164099500 0 0 0
Cu       9.090964476      4.917445971     3.164099500 0 0 0
Cu      -0.209623123      4.917445971     3.164099500 0 0 0
O       -0.209616923      3.127541087     2.531301237 0 0 0
O        9.090964476      4.917445971     1.265652055 0 0 0
Cu       9.090970676      3.127541087     0.632827464 0 0 0
Cu      -0.209616923      3.127541087     0.632827464 0 0 0
Cu       7.540870676      5.812393044     0.632827464 0 0 0
Cu      -1.759716923      5.812393044     0.632827464 0 0 0
O        9.090970676      1.337646942     0.000002872 0 0 0
O       -3.374022065      8.518304979     6.177993752
Cu       4.360561508      9.355624389     5.661250191
Cu      -4.915974739      9.398055790     5.682602360
Cu       8.629970936      1.568436816     5.651140162
Cu      -0.199187850      1.337067014     5.724595837
O        5.926478729     10.288266783     5.108252699
O        5.994224299      6.712043977     3.764882673
Cu       7.540864476      7.602297928     3.164099500 0 0 0
Cu      -1.759723123      7.602297928     3.164099500 0 0 0
Cu       5.990770676     10.287139145     3.164099500 0 0 0
Cu      -3.309816923     10.287139145     3.164099500 0 0 0
O       -3.309816923      8.497245000     2.531301237 0 0 0
O        5.990770676     10.287139145     1.265652055 0 0 0
Cu       5.990770676      8.497245000     0.632827464 0 0 0
Cu      -3.309816923      8.497245000     0.632827464 0 0 0
Cu      10.641064476      0.442699869     0.632827464 0 0 0
Cu       1.340476877      0.442699869     0.632827464 0 0 0
O        5.990776877      6.707340116     0.000002872 0 0 0
CELL_PARAMETERS angstrom
12.40080000    0.00000000    0.00000000
-6.20040000   10.73940783    0.00000000
0.00000000    0.00000000   26.32820000

andr...@gmail.com

unread,
Jun 21, 2023, 4:37:07 PM6/21/23
to quantum-environ-users
Hi Maria, 

I am not sure what you are trying to do by setting problem = Poisson. What this means is that Environ will try to solve for the electrostatic in vacuum, but I feel like it may conflict with your other keywords. If you are trying to setup a Poisson-Boltzmann simulation, you should specify electrolytes and the corresponding parameters. If you want to simulate the system in vacuum, I would specify environ_type = 'vacuum', and env_electrostatic = .true. (which should already be the case since you have external charges). 

Let me know if you have more questions or you have more info on the problem.

Best,
Oliviero

Oliviero Andreussi (he/him)
--
Associate Professor
Department of Chemistry and Biochemistry
Boise State University
Office: SCNC 316
Email: oliviero...@boisestate.edu
Web: https://www.materialab.org

Maria Voccia

unread,
Jun 22, 2023, 11:05:53 AM6/22/23
to quantum-environ-users
Hi again ,
sorry for my misunderstanding of the above problem.

I want study my system introducing an electrolite. 
I'm trying to use environ with 1) a helmholtz plane and 2) via a  Poisson-Boltzmann Problems.

For the second way, I use the input here reported with pbc_correction= gcs  and without define the electrostatic problem  and the solver. But  I saw that when it starts in the output is reported that it was choosen as electrostatic problem = "generalized" and as solver= "fixed-point" as default and  in agreement with what is reported in the manual. 
Is this a way good for understand the influence of the electrolite for  my system?


&ENVIRON
   verbose = 2
   environ_thr = 1.d-4
   environ_type = 'input'
   env_static_permittivity = 80
   env_surface_tension = 0.D0
   env_pressure = 0.D0
   env_electrolyte_ntyp = 2
   zion(1) = 1
   zion(2) = -1
   cion(1) = 1.0
   cion(2) = 1.0
   cionmax = 27.5
   temperature = 300
   system_dim = 2
   system_axis = 3
   system_ntyp = 1
   electrolyte_linearized = .false.

/
&BOUNDARY
   solvent_mode = 'full'
   electrolyte_mode = 'system'
   electrolyte_distance = 30.0
   electrolyte_spread = 0.01
/
&ELECTROSTATIC
   pbc_correction = 'gcs'

   pbc_dim = 2
   pbc_axis = 3
   tol = 5.D-13
   inner_tol = 5.D-18

Finally, the job stops with this error: 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     Error in routine rdiaghg (415):
     eigenvectors failed to converge
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

     stopping ...

Thank you in advance for the helping.
Best regards,Maria.

andr...@gmail.com

unread,
Jun 30, 2023, 11:17:56 AM6/30/23
to quantum-environ-users
Hi Maria,

Sorry for the long delay, I forgot about your follow up message. I think the setup is correct, using GCS should be a good starting point for a more realistic model of the electrolyte, without having to numerically solve a real non-linear electrostatic problem.  I am not sure why the default solver is defined as fixed-point, I need to check, but you should be able to select a different one. The fact that the code says the problem is 'generalized' is because GCS is an analytical correction applied onto an algorithm that needs to numerically solve the electrostatic problem in the dielectric medium, but I can see how that would be confusing. 

Most of the setup looks good, however I see that your environ_thr is very small, while I guess your system is not very small. When you have SCF convergence issues, you should probably increase environ_thr, not decrease it. This threshold controls at which SCF step Environ is allowed to add its contributions to the Hamiltonian. If the threshold is too small, the electrons are getting close to what they think it's their minimum energy, but then Environ adds its potential and kicks them out of there. This usually results into a big jump in the SCF accuracy and in an SCF cycle that goes up and down, in some cases the diagonalization of the Hamiltonian may fail with a c-bands error or an error similar to the one you report. The reason we don't want Environ to add its contribution all the time is because most SCF cycles start with a random guess for the electronic density and the Environ potentials would be very unphysical in these circumstances. However, you may only want to skip one or two steps, so environ_thr should be set as high as the SCF accuracy after a couple of SCF steps. Since the SCF accuracy is size-extensive, larger systems have larger SCF accuracy to start with, so you would need a larger environ_thr. 

I would try to setup environ_thr to a much larger value (even 1. or 1d1, depending on your starting SCF accuracy) and see if the SCF decides to converge. It may still be that there are other issues, maybe related to the position of the diffuse layer with respect to the atoms of your system (if by any chance they overlap), but I would start with this parameter first.

I hope this helps, sorry for waiting so long to reply.

Best,

Oliviero
Reply all
Reply to author
Forward
0 new messages