[QE-users] Error about incorrect atomic position for ESM

Giuseppe Mattioli giuseppe.mattioli at ism.cnr.it
Mon Sep 19 14:39:13 CEST 2022


Dear Jibiao Li
Please read carefully the documentation, particularly when performing  
calculations very far from "plain vanilla" dft.

 From the PW manual

                    'esm' :
                         Effective Screening Medium Method.
                         For polarized or charged slab calculation, embeds
                         the simulation cell within an effective semi-
                         infinite medium in the perpendicular direction
                         (along z). Embedding regions can be vacuum or
                         semi-infinite metal electrodes (use "esm_bc" to
                         choose boundary conditions). If between two
                         electrodes, an optional electric field
                         ("esm_efield") may be applied. Method described in
                         M. Otani and O. Sugino, "First-principles calculations
                         of charged surfaces and interfaces: A plane-wave
                         nonrepeated slab approach", PRB 73, 115407 (2006).

                         NB:
                            - Two dimensional (xy plane) average charge density
                              and electrostatic potentials are printed out to
                              'prefix.esm1'.

                            - Requires cell with a_3 lattice vector along z,
                              normal to the xy plane, with the slab centered
                              around z=0.

                            - For bc2 with an electric field and bc3 boundary
                              conditions, the inversion symmetry along  
z-direction
                              is automatically eliminated.

                            - In case of calculation='vc-relax', use
                              "cell_dofree"='2Dxy' or other parameters so that
                              c-vector along z-axis should not be  
moved. <------------------

and

    Variable:       esm_w

    Type:           REAL
    See:            assume_isolated
    Default:        0.d0
    Description:    If "assume_isolated" = 'esm', determines the  
position offset
                    [in a.u.] of the start of the effective screening region,
                    measured relative to the cell edge. (ESM region begins at
                    z = +/- [L_z/2 + esm_w] ).

In other words, you should first of all increase celldm(3); the  
*charge density* of your system should be contained inside a region  
between -c/4 and +c/4, being c the lattice parameter parallel to the z  
axis. You may provide an offset if your system is not placed across 0,  
but in my past experience you may sometimes encounter problems with  
the offset, thus I sugget (but maybe it is useless) to shift your  
system in order to place it centered around z=0.

If you are studying intercalation between graphene planes instead, and  
your system must be considered as strictly periodic along z, then you  
should not use esm at all.
HTH
Giuseppe

Quoting Jibiao Li <jibiaoli at foxmail.com>:

> Dear all,
>
>
> I try to relax a structure with ESM, but I got an error below
>
>
>      number of k points=    12   
> Methfessel-Paxton smearing, width (Ry)=  0.0200
>                    
>      cart. coord. in units 2pi/alat
>         k(    1) = (   
>  0.0000000   0.0000000   0.0000000), wk  
> =   0.1250000
>         k(    2) = (   
>  0.0000000   0.0000000   0.4993936), wk  
> =   0.2500000
>         k(    3) = (   
>  0.0000000   0.0000000  -0.9987873), wk =   
>  0.1250000
>         k(    4) = (   
>  0.0000000  -0.5773503   0.0000000), wk =   
>  0.1250000
>         k(    5) = (   
>  0.0000000  -0.5773503   0.4993936), wk =   
>  0.2500000
>         k(    6) = (   
>  0.0000000  -0.5773503  -0.9987873), wk =   
>  0.1250000
>         k(    7) = (   
>  0.5000000  -0.2886751   0.0000000), wk =   
>  0.1250000
>         k(    8) = (   
> -0.5000000  -0.2886751   0.0000000), wk =   
>  0.1250000
>         k(    9) = (   
>  0.5000000  -0.2886751   0.4993936), wk =   
>  0.2500000
>         k(   10) = (   
> -0.5000000  -0.2886751   0.4993936), wk =   
>  0.2500000
>         k(   11) = (   
>  0.5000000  -0.2886751  -0.9987873), wk =   
>  0.1250000
>         k(   12) = (   
> -0.5000000  -0.2886751  -0.9987873), wk =   
>  0.1250000
>
>
>      Dense  grid:  1344013 G-vectors   
>    FFT dimensions: ( 192, 192,  96)
>
>
>      Smooth grid:   389147 G-vectors   
>    FFT dimensions: ( 120, 120,  60)
>
>
>      Estimated max dynamical RAM per process  
> >     377.41 MB
>
>
>      Estimated total dynamical RAM >     
>   11.79 GB
>
>
>  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
>      Error in routine esm_check (1):
>      incorrect atomic position for ESM
>  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
>
>
>      stopping ...
>
>
>
> I examined the whole input file, but found no mistakes. The input  
> file is shown below and included as the attachment. 
>
>
> Any idea to crack this problem?
>
>
>
>
>  &CONTROL
>                 calculation  
> = 'vc-relax' ,
>                 restart_mode  
> = 'from_scratch' ,
>                    
>     outdir = './' ,
>                    
> pseudo_dir = '/home/jibiaoli/pseudo/PAW' ,
>                    
>     prefix = 'bt' ,
> 		       nstep = 199, 
>                    
>    tstress = .true. ,
>                    
>    tprnfor = .true. ,
> 		        lfcp = .TRUE.,     
>  /
>  &SYSTEM
>                    
>      ibrav = 4,
>                    
>  celldm(1) = 28.03332990783,
>                    
>  celldm(3) = 0.5006071,
>                    
>        nat = 80,
>                    
>       ntyp = 4,
>                    
>    ecutwfc = 45 ,
>                    
>    ecutrho = 411 ,
>                    
>  input_dft = 'sla+pw+ggx+vdw1' ,
>                  
>  occupations = 'smearing' ,
>                    
>    degauss = 0.02D0 ,
>                    
>   smearing = 'methfessel-paxton' ,
>              assume_isolated = 'esm',
>                    
>     esm_bc = 'bc3',
> /
>  &ELECTRONS
>             electron_maxstep = 299,
>                  
>  mixing_beta = 0.2D0 ,
>              diagonalization = 'david' ,
>  /
>  &IONS
>                  
>  ion_dynamics = 'bfgs' ,
>  /
>  &CELL
>  /
>  &FCP
>                    
>     fcp_mu = -5.219576,
>                    
>     fcp_dynamics = 'bfgs',
>                    
>     fcp_tempw = 1,
>                    
>     freeze_all_atoms= .FALSE.,
>  /
> ATOMIC_SPECIES
>     Br   79.9100  Br.pbe-dn-kjpaw_psl.1.0.0.UPF
>     F    18.9980  F.pbe-n-kjpaw_psl.1.0.0.UPF
>     P    30.9740  P.pbe-nl-kjpaw_psl.1.0.0.UPF 
>     C    12.0100  C.pbe-n-kjpaw_psl.1.0.0.UPF
> ATOMIC_POSITIONS angstrom
> Br            4.8857064708   
>      11.7768394079         
> 3.9407468281
> F             3.8197174274   
>       4.4597110794         
> 4.7181716817
> F             6.1744957101   
>       4.3394270012         
> 4.7152037304
> F             4.8931069224   
>       2.3705875468         
> 4.5561838920
> P             4.9650890846   
>       3.8015572354         
> 3.7192840419
> F             3.7566375831   
>       3.2595433439         
> 2.7242934995
> F             6.1097595794   
>       3.1430454823         
> 2.7198097728
> F             5.0367554331   
>       5.2311497524         
> 2.8808884101
> C             0.0000000000   
>       0.0000000000         
> 0.0000000000    0   0   0
> C             1.2361900607   
>       0.7170517096       
>  -0.0138171839
> C             2.4745523828   
>       0.0073581771       
>  -0.0448272197
> C             3.7101907474   
>       0.7241136134       
>  -0.0572176935
> C             4.9461994089   
>       0.0101040361       
>  -0.0863797199
> C             6.1820578624   
>       0.7251457619       
>  -0.0828109698
> C             7.4176619616   
>       0.0089705107       
>  -0.0883946780
> C             8.6551903712   
>       0.7202023957       
>  -0.0603186182
> C             9.8909505105   
>       0.0053753049       
>  -0.0427731456
> C            11.1279529839   
>       0.7166862952       
>  -0.0121655509
> C            12.3628679472   
>       0.0029247779       
>  -0.0025228560
> C            13.5985969881   
>       0.7147863623         
> 0.0110001690
> C            -1.2342764689   
>       2.1429530459         
> 0.0181043859
> C             0.0024003497   
>       2.8577643822         
> 0.0204839124
> C             1.2401865535   
>       2.1458894037         
> 0.0013599653
> C             2.4761630563   
>       2.8595809474         
> 0.0015451766
> C             3.7122363408   
>       2.1496027948       
>  -0.0273663690
> C             4.9464737546   
>       2.8630747660       
>  -0.0146793099
> C             6.1806980931   
>       2.1502829260       
>  -0.0463756610
> C             7.4161500403   
>       2.8612203653       
>  -0.0218290368
> C             8.6518314190   
>       2.1481555526       
>  -0.0336305043
> C             9.8901607936   
>       2.8587098803       
>  -0.0048730476
> C            11.1267472325   
>       2.1438196754         
> 0.0019971875
> C            12.3636445079   
>       2.8569763878         
> 0.0200815823
> C            -2.4711937241   
>       4.2853488039         
> 0.0249202360
> C            -1.2338369649   
>       4.9991066858         
> 0.0365309494
> C             0.0032481085   
>       4.2854945862         
> 0.0352579279
> C             1.2415393747   
>       4.9980020840         
> 0.0529725484
> C             2.4769033437   
>       4.2857833200         
> 0.0429444112
> C             3.7119127277   
>       4.9978396952         
> 0.0675414101
> C             4.9462507117   
>       4.2856397140         
> 0.0404226256
> C             6.1801544254   
>       4.9984549476         
> 0.0632981383
> C             7.4150498301   
>       4.2864649840         
> 0.0325796465
> C             8.6507650586   
>       4.9981049219         
> 0.0451196154
> C             9.8889676933   
>       4.2857170240         
> 0.0212735505
> C            11.1261803200   
>       4.9991355997         
> 0.0312193338
> C            -3.7077605676   
>       6.4273122556         
> 0.0502024657
> C            -2.4707707909   
>       7.1413755217         
> 0.0579266693
> C            -1.2338320314   
>       6.4271914837         
> 0.0527292585
> C             0.0035270392   
>       7.1403619794         
> 0.0751485318
> C             1.2400808211   
>       6.4260958758         
> 0.0786314435
> C             2.4766161323   
>       7.1389471757         
> 0.1093129145
> C             3.7110817006   
>       6.4224940502         
> 0.1055736985
> C             4.9461572831   
>       7.1379282005         
> 0.1291761472
> C             6.1814691185   
>       6.4227956617         
> 0.1076923856
> C             7.4164285695   
>       7.1381818651         
> 0.1180161778
> C             8.6530876314   
>       6.4255094881         
> 0.0820559688
> C             9.8895104371   
>       7.1400398116         
> 0.0808612137
> C            -4.9443461491   
>       8.5682115418         
> 0.1112338937
> C            -3.7077546465   
>       9.2834166091         
> 0.1054738699
> C            -2.4708750334   
>       8.5694590592         
> 0.0812215343
> C            -1.2340998158   
>       9.2837141630         
> 0.0935732776
> C             0.0026467008   
>       8.5687481228         
> 0.0961884153
> C             1.2390053120   
>       9.2823526931         
> 0.1257256553
> C             2.4752913601   
>       8.5672098249         
> 0.1377526017
> C             3.7104092166   
>       9.2814910408         
> 0.1683633344
> C             4.9455242075   
>       8.5646106959         
> 0.1639022560
> C             6.1810320547   
>       9.2797968930         
> 0.1812835417
> C             7.4170311281   
>       8.5658219451         
> 0.1560512784
> C             8.6534519955   
>       9.2807854615         
> 0.1528772627
> C            -6.1813449556   
>      10.7086618913         
> 0.1767895913
> C            -4.9446616408   
>      11.4244280124         
> 0.1633881046
> C            -3.7077392754   
>      10.7114996002         
> 0.1300302244
> C            -2.4712557593   
>      11.4275338898         
> 0.1223106464
> C            -1.2345466857   
>      10.7120855486         
> 0.1099089414
> C             0.0019510066   
>      11.4259908842         
> 0.1241121465
> C             1.2386816088   
>      10.7107204043         
> 0.1391473407
> C             2.4748267037   
>      11.4228996714         
> 0.1720290525
> C             3.7096081115   
>      10.7080418335         
> 0.1894854994
> C             4.9453339628   
>      11.4206956373         
> 0.2114298160
> C             6.1802465576   
>      10.7059532510         
> 0.2075739383
> C             7.4159381224   
>      11.4189623464         
> 0.2098980144
> K_POINTS automatic 
>   2 2 4   0 0 0 
>
>
>
>
>
>
>
> Jibiao Li
>
> Department of Materials Science and Engineering
>
> Yangtze Normal University
>
> Juxian Avenue 16, Fuling, Chongqing, China 408100
>
>
>
>
>
>  



GIUSEPPE MATTIOLI
CNR - ISTITUTO DI STRUTTURA DELLA MATERIA
Via Salaria Km 29,300 - C.P. 10
I-00015 - Monterotondo Scalo (RM)
Mob (*preferred*) +39 373 7305625
Tel + 39 06 90672342 - Fax +39 06 90672316
E-mail: <giuseppe.mattioli at ism.cnr.it>



More information about the users mailing list