Calculation of the Madelung potential coefficients for a 2D structure, the coefficients are then stored in an unformatted file, starting first writing the coefficients inside the slab, if a decimation run is performed also the left and right host constants are written.
C a l c u l a t i o n
o f
t h e
M a d e l u n g
p o t e n t i a l
c o e f f i c i e n t s
f o r
a
2 D
s t r u c t u r e
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | lpot |
Maximum l component in potential expansion |
||
real(kind=dp), | intent(in), | dimension(lassld, 0:lassld, 0:lassld) | :: | yrg |
Spherical harmonics (GAUNT2) |
|
real(kind=dp), | intent(in), | dimension(lassld) | :: | wg |
Integr. weights for Legendre polynomials |
|
integer, | intent(in) | :: | naez |
Number of atoms in unit cell |
||
real(kind=dp), | intent(in) | :: | alat |
Lattice constant in a.u. |
||
real(kind=dp), | intent(in) | :: | vol | |||
real(kind=dp), | intent(in), | dimension(3,3) | :: | bravais |
Bravais lattice vectors |
|
real(kind=dp), | intent(in), | dimension(3,3) | :: | recbv |
Reciprocal basis vectors |
|
real(kind=dp), | intent(in), | dimension(3,*) | :: | rbasis |
Position of atoms in the unit cell in units of bravais vectors |
|
real(kind=dp), | intent(inout) | :: | rmax |
Ewald summation cutoff parameter for real space summation |
||
real(kind=dp), | intent(inout) | :: | gmax |
Ewald summation cutoff parameter for reciprocal space summation |
||
integer, | intent(in) | :: | nlbasis |
Number of basis layers of left host (repeated units) |
||
integer, | intent(in) | :: | nleft |
Number of repeated basis for left host to get converged electrostatic potentials |
||
real(kind=dp), | intent(in), | dimension(3) | :: | zperleft |
Vector to define how to repeat the basis of the left host |
|
real(kind=dp), | intent(in), | dimension(3,nembd1) | :: | tleft |
Vectors of the basis for the left host |
|
integer, | intent(in) | :: | nrbasis |
Number of basis layers of right host (repeated units) |
||
integer, | intent(in) | :: | nright |
Number of repeated basis for right host to get converged electrostatic potentials |
||
real(kind=dp), | intent(in), | dimension(3) | :: | zperight |
Vector to define how to repeat the basis of the right host |
|
real(kind=dp), | intent(in), | dimension(3,nembd1) | :: | tright |
Vectors of the basis for the right host |
|
integer, | intent(in) | :: | lmxspd |
(2lpot+1)*2 |
||
integer, | intent(in) | :: | lassld |
4*lmax |
||
integer, | intent(in) | :: | lpotd |
Maximum l component in potential expansion |
||
integer, | intent(in) | :: | lmpotd |
(lpot+1)**2 |
||
integer, | intent(in) | :: | nmaxd |
Paremeters for the Ewald summations |
||
integer, | intent(in) | :: | ishld |
Paremeters for the Ewald summations |
||
integer, | intent(in) | :: | nembd1 |
Number of 'embedding' positions +1 |
||
integer, | intent(in) | :: | wlength |
Word length for direct access files, compiler dependent ifort/others (1/4) |