the non - equilibrium green function ( negf ) method@xcite potentially has several advantages to investigate electronic transport properties of nano - scale materials such as single molecules,@xcite atomic wires,@xcite carbon based materials,@xcite and thin layers.@xcite the potential advantages are summarized by the following features of the negf method : ( i ) the source and drain contacts are treated based on the same theoretical framework as for the scattering region .
@xcite ( ii ) the electronic structure of the scattering region under a finite source - drain bias voltage is self - consistently determined by combining with first principle electronic structure calculation methods such as the density functional theory ( dft ) and the hartree - fock ( hf ) method .
@xcite ( iii ) many body effects in the transport properties , e.g. , electron - phonon@xcite and electron - electron interactions,@xcite might be included through self - energies without largely deviating the theoretical framework .
( iv ) its applicability to large - scale systems can be anticipated , since the negf method relies practically on the locality of basis functions in real space , resulting in computations for sparse matrices.@xcite due to those potential advantages , recently several groups have implemented the negf method coupled with the dft or hf method using atomic - type or the other local basis functions with successful applications for calculations of the electronic transport properties .
@xcite    however , a highly accurate and efficient implementation method must be still developed from the following two reasons : the first obvious reason is to extend the applicability of the negf method to large - scale systems .
the efficient implementation might lead to more challenging applications of the negf method to very large - scale complicated systems .
the majority part in the computational effort of the negf method mainly comes from the evaluation of the density matrix which is decomposed into the evaluation of green functions and numerical integrations .
thus , the efficient calculation of the part is a key factor for extending the applicability to large - scale systems .
nevertheless , accurate and efficient methods for evaluating density matrix within the negf method have not been fully developed , although several methods have been already proposed .
@xcite to extend the applicability of the negf method to large - scale systems , a remarkably efficient method that we have recently developed@xcite will be applied for the problem in this study , and we will show that the new method is much faster than the other method.@xcite the second reason is that spurious scattering should be negligible when the negf method is extended to include the many body effects beyond the one particle picture.@xcite the spurious scattering accompanied by the inaccurate implementation might make the many body effects indistinct in the electronic transport properties .
one can imagine that the spurious scattering can be easily produced in the negf method , since unlike the conventional band structure calculations negf has to be evaluated by a patch work that the self consistent field ( scf ) calculations of the source and drain leads are performed beforehand , and the calculated results are incorporated in the negf calculations through the self energy and the boundary conditions between the scattering region and leads .
therefore , a careful treatment to handle the boundary conditions should be developed to avoid the spurious scattering .    in this paper , to address the above two issues we present an accurate and efficient implementation of the negf method , in combination with dft using pseudo - atomic orbitals ( paos ) and pseudopotentials , using a contour integration method which is based on a continued fraction representation of the fermi - dirac function .
for the accurate treatment of the boundary conditions between the scattering region and leads , we also develop a method for calculating the hartree potential by a combination of the two dimensional fast fourier transform ( fft ) and a finite difference method so that the boundary condition can be correctly reproduced .
in addition , we discuss a careful treatment to construct the charge density near the boundaries .
the efficiency and accuracy of our implementation are demonstrated by several numerical test calculations on convergence of the density matrix .
this paper is organized as follows : in sec .
ii the details of our implementation for treating the equilibrium state of the scattering region are discussed by focusing on the evaluation of the equilibrium density matrix , the treatment for constructing the charge density near the boundaries , and an efficient method for calculating the hartree potential . in sec .
iii our implementation for the nonequilibrium state is described . in sec .
iv we demonstrate the accuracy and efficiency of the implementation by a series of numerical calculations and several applications . in sec .  v our implementation of the negf method
is summarized .
since most of practical aspects in the implementation of the negf method coupled with dft using the localized paos@xcite appear in the ground state calculation of the system at equilibrium , we start our discussion from the electronic structure calculation of the equilibrium ground state by using the green function method with dft .
let us consider a system where one dimensional infinite cells are arranged with two dimensional periodicity as shown in fig .  1 . throughout the paper ,
we assume that the electronic transport along the * a*-axis is of interest , and that the two dimensional periodicity spreads over the * bc*-plane .
the one dimensional infinite cell consists of the central region denoted by @xmath2 and the cells denoted by @xmath3 and @xmath4 , where @xmath5 .
all the cells @xmath3 and @xmath4 , arranged semi - infinitely , contain the same number of atoms with the same structural configuration , respectively , but the cells @xmath3 and @xmath4 can be different from each other . in the equilibrium state with a common chemical potential everywhere in the system , the electronic structure of the system may be determined by dft.@xcite     is an extended central region consisting of @xmath6 , @xmath7 , and @xmath8 . , width=302 ]    due to the periodicity of the * bc*-plane the one - particle kohn - sham ( ks ) wave function in the system is expressed by the bloch function on the * bc*-plane using paos @xmath9 located on site @xmath10 as : @xmath11 where @xmath12 , @xmath13 , @xmath14 , and @xmath15 are indices for the spin , eigenstate , site , and basis orbital , respectively .
the lattice vector @xmath16 and the bloch wave vector @xmath17 are given by @xmath18 , where @xmath19 and @xmath20 are the lattice vectors , and @xmath21 , where @xmath22 and @xmath23 are the reciprocal lattice vectors , respectively .
the summation over @xmath14 and @xmath15 is considered for all the basis orbitals in the one dimensional infinite cell , which indicates no periodicity along the @xmath24-axis .
considering the variation of the total energy , within the conventional dft , of the system expressed by the ks wave function eq .
( [ eq : c1 - 1 ] ) with respect to coefficients @xmath25 we obtain the following ks matrix equation : @xmath26 where @xmath27 is a column vector consisting of the coefficients @xmath28 .
the hamiltonian @xmath29 and overlap matrices @xmath30 are given by @xmath31 where @xmath32 and @xmath33 are the hamiltonian and overlap matrix elements between two basis functions @xmath34 and @xmath35 , respectively .
the overlap matrix arises from the non - orthogonality of the pao basis functions.@xcite now we consider an extended central region @xmath36 composed of the regions @xmath2 , @xmath37 , and @xmath38 as shown in figs .  1 ( a ) and ( b ) .
the extension of the central region @xmath2 is made so that the relaxation of electronic structure around the interfaces between the leads , @xmath37 and @xmath38 , and the central region @xmath2 can be allowed . in addition , we impose two conditions :    1 .   the localized basis orbitals @xmath39 in the region @xmath2 overlap with those in the regions @xmath37 and @xmath38 , but do not overlap with those in the regions @xmath40 and @xmath41 .
the localized basis orbitals @xmath39 in the @xmath3 ( @xmath4 ) region has no overlap with basis orbitals in the cells beyond the nearest neighboring cells @xmath42 ( @xmath43 ) and @xmath44 ( @xmath45 ) .    in our implementation the basis functions
are strictly localized in real space because of the generation of basis orbitals by a confinement scheme.@xcite therefore , once the localized basis orbitals with specific cutoff radii are chosen for each region , the two conditions can be always satisfied by just adjusting the size of the unit cells for @xmath3 and @xmath4 .
this is a benefit in the use of the strictly localized basis orbitals compared to other local basis orbitals such as slater- and gaussian - type orbitals . in the use of the strictly localized basis orbitals , the eigenvalue problem in the hilbert space spanned by the basis orbitals
are solved without introducing any cutoff scheme . on the other hand , in the green function method
the matrix elements of the hamiltonian and overlap matrices have to be truncated so as to satisfy the above two conditions in case of the other localized basis orbitals with the small but long tail . with the above two conditions ( i ) and
( ii ) , the hamiltonian matrix given by eq .
( [ eq : c1 - 3 ] ) is written by a block tridiagonal form as follows : @xmath46 where @xmath47 , @xmath48 , and @xmath49 are hamiltonian matrices of the central @xmath36 , left @xmath50 and right @xmath51 regions of which matrix size are the same as the number of basis orbitals @xmath52 , @xmath53 , and @xmath54 in the regions @xmath36 , @xmath40 , and @xmath41 , respectively . the other block components in eq .
( [ eq : c1 - 5 ] ) are the hamiltonian matrices connecting two regions among the regions , and these matrix sizes are deduced from those of the two regions .
also the completely same structure is found in the overlap matrix .
thus , the electronic structure of the system given by fig .
1(a ) can be obtained by solving the one dimensional block chain model , being @xmath17-dependent , given by fig .
1(b ) and the corresponding eq .
( [ eq : c1 - 2 ] ) . by noting @xmath55 and making use of the block tridiagonal form of the hamiltonian and overlap matrices , the green function of the central region
@xmath36 can be written by @xmath56 with self energies @xmath57 and @xmath58 defined by @xmath59 where @xmath60 and @xmath61 are surface green functions of the left and right regions .
it is worth pointing out that there is a total energy functional which can be variationally minimized with respect to charge density @xmath62 if eq .
( [ eq : c1 - 6 ] ) is self - consistently solved .
the details of derivation for the functional is given in appendix a.      in general , the surface green function @xmath63 is defined by @xmath64 , where @xmath65 and @xmath66 are the hamiltonian and overlap matrices for the lead regions , and the suffix , @xmath67 , is @xmath68 or @xmath69 .
it is noted that due to the two conditions ( i ) and ( ii ) mentioned above the hamiltonian and overlap matrices for the lead regions can be written by a block tridiagonal form as follows : @xmath70 where the hamiltonian can be spin and @xmath17-dependent , while the indices for them are omitted for simplification of the notation , and also the index @xmath14 appearing in @xmath71 corresponds to the cell number for the lead @xmath72 or @xmath73 .
it seems to be difficult to directly diagonalize the ks equation eq .
( [ eq : c1 - 2 ] ) for the one dimensional block chain model because of the infinite dimension of the matrices .
however , instead by focusing on only the central region one can evaluate the green function of the central region as a rather small problem of @xmath74 in size .
the effect of semi infinite regions @xmath68 and @xmath69 are included through the corresponding self energies @xmath57 and @xmath58 . in order to practically calculate the green function of the central region given by eq .
( [ eq : c1 - 6 ] ) , we introduce an approximation where the regions @xmath75 are all equivalent to each other with respect to the spatial charge distribution , the ks hamiltonian , and the relevant density matrix which are calculated in advance by adopting the system of which unit cell is @xmath40 and by using the conventional band structure calculation .
the same approximation also applies for the regions @xmath76 .
strictly speaking , the assumption is not correct , since the charge distribution must be affected by the interaction between the central region @xmath36 and the regions @xmath3 ( @xmath4 ) .
however , if the size of the unit vector along the @xmath24-axis for the regions @xmath37 and @xmath38 in the extended central region @xmath36 is large enough , the assumption will be asymptotically correct as the unit vector becomes larger .
the approximation enables us to evaluate the surface green function by the iterative method.@xcite the efficient iterative scheme can be performed by the following procedure : @xmath77 with a set of initial values @xmath78 by the iterative calculation , in most cases the inverse of @xmath79 rapidly converges at a part of the surface green function : @xmath80 where @xmath81 is the ( 1,1 ) block element of the surface green function @xmath82 .
the ( 1,1 ) block element @xmath81 of @xmath83 ( or @xmath84 ) in size has all the necessary information to calculate the self - energies @xmath57 and @xmath58 , since there is no contribution from the other block elements because of the two conditions ( i ) and ( ii ) mentioned above . in practice , the convergence in the iterative calculation is very fast and the frobenius norm , defined by @xmath85 , of @xmath86 ( ev ) is obtained by typically only 7 iterations .
one of practical difficulties in the implementation of the green function method is how the equilibrium density matrix is evaluated efficiently and accurately.@xcite in our implementation , the equilibrium density matrix is highly efficiently computed using the contour integration method with a special treatment of the fermi - dirac function @xmath87.@xcite if the hamiltonian and overlap matrices associated with eq .
( [ eq : c1 - 6 ] ) are @xmath17-dependent , it turns out that the spectrum function in the lehmann representation of the central green function is complex number in general as discussed in appendix b of ref .
then , the density matrix @xmath88 , where one of the associated basis orbitals is in the central cell and the other is in the cell denoted by @xmath16 , is given by making use of both the retarded and advanced green functions @xmath89 and @xmath90 as @xmath91 with @xmath92 where @xmath93 is the volume of the unit cell , @xmath94 represents the integration over the first brillouin zone , @xmath95 a positive infinitesimal , and @xmath96 a chemical potential .
the integration over @xmath17-space is numerically performed by using the monkhorst - pack mesh.@xcite it is also noted that the phase factor @xmath97 appears through eq .  ( [ eq : c1 - 1 ] ) . if the hamiltonian and overlap matrices are @xmath17-independent , eq .  ( [ eq : c1 - 22 ] ) can be simplified into a well - known formula : @xmath98 .
\label{eq : c1 - 24}\end{aligned}\ ] ] in case of the @xmath17-independent problem , the simplified formula is used , since the number of the evaluation of the green function is reduced by half .    for the efficient integration in eq .
( [ eq : c1 - 23 ] ) , in our implementation the fermi - dirac function is expressed by a continued fraction representation derived from a hypergeometric function@xcite so that the structure of poles can be suitable for the integration associated with the green function as follows : @xmath99 where @xmath100 with @xmath101 , @xmath102 is electronic temperature , @xmath103 and @xmath104 are complex variables .
also , @xmath105 and @xmath106 are the poles and the associated residues of the continued fraction representation eq .
( [ eq : c1 - 25 ] ) , which are obtained via an eigenvalue problem derived from eq .
( [ eq : c1 - 25]).@xcite since all the @xmath105 are real numbers , the poles @xmath107 are located on the imaginary axis
. one may find an interesting distribution of the poles on the complex plane that the interval between neighboring poles are uniformly located up to about 61  % of the total number of poles on the half complex plane with the same interval @xmath108 , and from then onward it increases very rapidly as the distance between the pole and the real axis increases .
the structure of the poles in eq .
( [ eq : c1 - 25 ] ) allows us to efficiently evaluate eq .
( [ eq : c1 - 23 ] ) because of the asymptotic change , @xmath109 , of the green function in the faraway region of the real axis . in other words ,
the denser poles are allocated for the rapidly varying range of the green function , and the coarser for smoothly .
in addition , there is no ambiguity in the choice of the path in the contour integration unlike the other schemes,@xcite which is one of advantages in our method . by terminating the summation of eq .
( [ eq : c1 - 25 ] ) at a finite number of poles @xmath110 , the integration of eq .
( [ eq : c1 - 23 ] ) can be performed by the contour integration where the poles in the upper and lower half planes are taken into account for the terms with plus and minus signs in eq .
( [ eq : c1 - 23 ] ) , respectively , and the explicit formula is given by @xmath111 where @xmath112 , and @xmath113 is the zeroth order moment of the green function @xmath114 .
the zeroth order moment @xmath113 is easily calculated by @xmath115 which can be derived from the moment representation of the green function,@xcite where @xmath69 is a large real number and in this study @xmath116 ( ev ) is used in order to make the higher order moments negligible .
although the number of poles in the summation of eq .
( [ eq : c1 - 26 ] ) required for the sufficient convergence depends on the electronic temperature @xmath102 , the fully convergent result within double precision is achieved by the use of only 100 poles in case of @xmath117 as shown later .
if forces on atoms are calculated based on the conventional dft scheme using the non - orthogonal basis orbitals,@xcite the evaluation of the energy density matrix @xmath118 is needed . in appendix b ,
we derive the calculation scheme of the equilibrium energy density matrix @xmath119 based on the contour integration method .
even though the basis functions we used are strictly localized in real space , there is the nonnegligible contribution for the charge density near the boundary between the central and lead regions from the basis functions located in the lead regions .
note that any treatment for the contribution to the charge density has not been clarified in the other implementations.@xcite thus , we carefully calculate the charge density in the central region by considering three contributions : @xmath120 where the suffix , s , is @xmath68 or @xmath69 , and @xmath121 , @xmath122 , and @xmath123 are the charge densities contributed from the basis functions located in the central , the lead and central , and the lead regions , respectively .
note that the summation over s is not required in eq .
( [ eq : c1 - 43 ] ) because of the conditions ( i ) and ( ii ) .
each charge contribution is explicitly given by @xmath124 where * a * is the lattice vector of the unit cell for the @xmath37 or @xmath38 region along the * a*-axis .
the displacement of @xmath125 ( @xmath126 ) denotes that the basis function is placed in the @xmath40 ( @xmath41 ) region in the configuration shown in fig .  1 .
the charge density given by eq .
( [ eq : c1 - 44 ] ) is calculated by the equilibrium density matrix @xmath127 given by eq .
( [ eq : c1 - 22 ] ) . although eq .
( [ eq : c1 - 44 ] ) can give a finite electron density on the outside of the central cell with @xmath128 because of the overlap of basis functions , the contribution is reflected in the central cell with @xmath128 by considering the periodicity on the * bc*-plane .
in the nonequilibrium case , the equilibrium density matrix is only replaced by the nonequilibrium density matrix which will be discussed in the next section .
each term in the summations for the two contributions @xmath122 and @xmath123 survive only if the overlap of the associated two basis orbitals is not zero in the central region . since the original central region @xmath2
is extended by adding the @xmath37 and @xmath38 regions , it is expected that the density matrix elements @xmath129 and @xmath130 in eqs .
( [ eq : c1 - 45 ] ) and  ( [ eq : c1 - 46 ] ) are close to those of the leads in the equilibrium condition .
therefore , the density matrix elements of the leads calculated by the conventional band structure calculations are used for eqs .
( [ eq : c1 - 45 ] ) and ( [ eq : c1 - 46 ] ) . due to the treatment the charge densities @xmath122 and @xmath123 are independent of the scf iteration so that for the computational efficiency they can be computed on a numerical mesh and stored before the scf iteration . the factor 2 for @xmath122 in eq .
( [ eq : c1 - 43 ] ) is due to taking account of the contribution from @xmath131 , while the factor does not appear for @xmath123 , since all the paired terms are included by the double summation in eq .
( [ eq : c1 - 46 ] ) .
we add a note that the same consideration has to be applied even for the calculation of the density of states ( dos ) . in this case
, the contribution from off - diagonal block green functions connecting the central and lead regions should be added to the dos of the central region @xmath36 calculated by @xmath132 .
the off - diagonal block green functions can be calculated from @xmath132 and the surface green functions , @xmath133 and @xmath134 , by making use of the identity @xmath55 as follows : @xmath135 where s is @xmath68 or @xmath69 .
the hartree potential in the central region is calculated under the boundary condition that the hartree potential at the boundary between the central @xmath36 and @xmath136 regions is same as that of the lead , where the hartree potential in both the lead regions is calculated using the conventional band structure calculation before the calculation of the infinite @xmath137 in fig .
1(b ) using the green function . in our implementation ,
the hartree potential for the central region with the boundary condition is efficiently evaluated by a combination of the two dimensional fft and a finite difference method , while other schemes are used in the other implementations.@xcite the majority part of the hartree potential in our treatment is accurately calculated by considering the neutral atom potential which is the sum of the local potential of the pseudopotential and the hartree potential by the confined charge for the neutralization.@xcite the neutral atom potential depends on only the atomic structure and atomic species , and has no relation with the boundary condition .
the effect of the relaxation of charge distribution on the hartree potential is taken into account by the remaining minority part of the hartree potential @xmath138 given by @xmath139 where @xmath140 is defined by the difference between the electron density @xmath141 calculated by the green function and the atomic electron density@xcite @xmath142 calculated by superposition of each atomic electron density @xmath143 at atomic site @xmath14 as follows : @xmath144 the fourier transformation of eq .
( [ eq : c1 - 35 ] ) on the yz plane , corresponding to the * bc*-plane depicted in fig .
1(a ) , yields @xmath145 where @xmath146 with integer numbers @xmath147 and @xmath148 . by approximating the second derivative in eq .
( [ eq : c1 - 37 ] ) with the simplest finite difference , @xmath149 we obtain a simultaneous linear equation @xmath150 of @xmath151 in size with a tridiagonal matrix defined by @xmath152 and a vector defined by @xmath153 where @xmath154 is the interval between neighboring points @xmath155 and @xmath156 , @xmath62 runs from @xmath157 to @xmath158 , and @xmath159 and @xmath160 are the boundary conditions . since the lattice vector of the extended central region @xmath36 along the * a*-axis is divided by @xmath161 for the discretization , the positions @xmath162 and @xmath163 are situated at the boundary , along the * a*-axis , of the unit cell of the central region @xmath36 .
thus , @xmath159 and @xmath160 can be calculated from the hartree potential at the left boundaries along the * a*-axis of the left and right leads , respectively . after solving the simultaneous linear equations for all the @xmath164 points , the inverse two dimensional fft on the * bc*-plane yields the difference hartree potential @xmath138 under the boundary conditions .
it is apparent that there is no ambiguity for the inclusion of the boundary conditions in the method .
although the treatment can be easily extended to the higher order finite difference to the second derivative , we restrict ourselves to the simplest case in the implementation because of its sufficient accuracy . employing fft for two dimensional fourier transformation , the whole computational effort to solve the poisson equation eq .
( [ eq : c1 - 35 ] ) under the boundary conditions is estimated to be @xmath165 which is slightly superior to that of the three dimensional fft , where @xmath161 , @xmath166 , and @xmath167 are the number of meshes for the discretization along the @xmath24- , @xmath19- , and @xmath20-axes .
our implementation of the negf method with dft is based on the strictly localized paos@xcite and a norm - conserving pseudopotential method.@xcite within the scheme , the calculation of the matrix elements such as the overlap and kinetic energy integrals , consisting of two center integrals , is performed using a fourier transform method,@xcite while the other matrix elements for @xmath168 and @xmath138 , which can not be decomposed into two center integrals , are evaluated by the numerical integration on the regular mesh in real space.@xcite the further details on how the elements of the hamiltonian and overlap matrices are calculated can be found in ref .
@xcite .
in addition to the above evaluation of the hamiltonian and overlap matrix elements , the hamiltonian matrix elements associated with the basis orbitals situated at near the boundary are treated in a special way as explained below .
if the tails of two basis orbitals located on atoms in the central region @xmath36 go beyond the boundary between the central and the lead regions , the associated hamiltonian matrix element is replaced by the corresponding element in the lead region calculated by the conventional band structure calculation .
the case can happen only if the two basis orbitals are located in the region @xmath37(@xmath38 ) because of the condition ( i ) so that the replacement of the hamiltonian matrix element can be always possible .
the replacement is made by assuming that the potential profile near the boundary is similar to that near the boundary between the regions @xmath169 and @xmath170 , and can be justified if the size of the region @xmath171 is large enough .
compared to conventional band structure calculations , it seems that the negf method tends to suffer from difficulty in obtaining the scf convergence .
our observation in several cases suggests that the difficulty may come from charge sloshing along the * a*-axis during the scf iteration .
the difference hartree potential @xmath138 change largely by imposition of the boundary condition even for a small variation in the charge density distribution , resulting in a serious charge sloshing along the * a*-axis .
thus , we consider suppression of the charge sloshing along the * a*-axis by introducing the following weight factor @xmath172 : @xmath173 where @xmath174 is a smaller one of either @xmath175 or @xmath176 , and @xmath177 and @xmath178 are adjustable parameters , while keeping @xmath179 .
the prefactor @xmath180 is given by @xmath181 with definitions : @xmath182 where @xmath183 is an adjustable parameter .
noting that @xmath184 is the number of difference electron density of each layer indexed by @xmath185 , and that the coulomb potential induced by each charged layer depends linearly on the distance from the layer , one can notice that @xmath186 is proportional to the electric field at position @xmath14 .
therefore , eq .  ( [ eq : b1 - 1 ] ) takes charge density under a large electric field into significant account in addition to the suppression of the charge sloshing in the * bc*-plane in a sense by the kerker method.@xcite in our implementation , the weight factor given by eq .
( [ eq : b1 - 1 ] ) is combined with the kerker method@xcite and the residual minimization method in a direct inversion iterative subspace ( rmm - diis)@xcite with substantial improvement .    a technical remark
should also be added to avoid a local trap problem in the scf calculation . in systems having a long * a*-axis ,
a unphysical charge distribution , corresponding to a large charge separation in real space , tends to be obtained even after achieving the self consistency . in this case
the hamiltonian of the central region @xmath36 at the first scf iteration , which are calculated via superposition of atomic charge density , is far from the self - consistently converged one , while the hamiltonian matrix used in the calculation for the self - energy is determined in a self - consistent manner beforehand .
the inconsistency between the two matrices tends to produce a unphysical charge distribution at the first scf iteration .
once the situation happens at the first scf iteration , in many cases the electronic structure keeps trapped during the subsequent scf iteration , which is a serious problem in practical applications .
however , the local trap problem can be overcome by a simple scheme that the first few scf iterations are performed by using the conventional band scheme and then onward the solver is switched from the band scheme to the negf method . in the band structure calculation for the first few iterations , such a unphysical charge distribution does not appear due to no self - energy involved . in most cases we find that the simple scheme works well to avoid the local trap problem in the scf convergence .
based on the negf theory mainly developed by schwinger@xcite and keldysh@xcite , the density matrix in the nonequilibrium state of the central region is evaluated by@xcite @xmath187 in addition to the equilibrium density matrix @xmath88 given by eq .
( [ eq : c1 - 22 ] ) , a correction term defined by @xmath188 is taken into account , where @xmath189 is defined by @xmath190 with @xmath191 and @xmath192 either the left @xmath193 or right chemical potential @xmath194 which is lower than the other is used for the calculation of the equilibrium density matrix in eq .
( [ eq : c1 - 40 ] ) .
as well , in eqs .
( [ eq : c1 - 42 ] ) and ( [ eq : c1 - 52 ] ) the chemical potentials are given by the rule that @xmath195 and @xmath196 if @xmath197 , and @xmath198 and @xmath199 if @xmath200 .
starting from the negf theory , the formula , eq .
( [ eq : c1 - 40 ] ) , may be derived by introducing two assumptions .
the first assumption is that the occupation of the wave functions incoming from the left ( right ) region still obeys the fermi - dirac function with the left ( right ) chemical potential even in the central region .
the assumption can be justified within at least the one - particle picture , since the same result can be obtained from the lippmann - schwinger equation for a non - interacting system.@xcite the second assumption is that in the central region the states in the energy regime below the lower chemical potential is in equilibrium due to the other physical obstacles such as the electron - phonon@xcite and electron - electron interactions,@xcite which are not considered explicitly in our implementation , although the definite role of those obstacles is obscure as for the occupation of the states .
the second assumption allows electrons to occupy in highly localized states below the lower chemical potential through the first term of eq .
( [ eq : c1 - 40 ] ) . only the states in the energy regime between two chemical potentials
are treated as in the nonequilibrium condition in which the contribution of the wave functions incoming from the lead with the higher chemical potential is taken into account to form the correction term given by eq .
( [ eq : c1 - 41 ] ) .    the integrand in eq .
( [ eq : c1 - 42 ] ) is not analytic apart from the real axis , since the integrand is a function of both @xmath201 and @xmath202 .
thus , one can not apply the contour integration method that we use for the equilibrium density matrix .
instead , a simple rectangular quadrature scheme is applied to the integration of eq .
( [ eq : c1 - 42 ] ) on the real axis with a small imaginary part @xmath203 .
since the integrand contains the difference between two fermi - dirac functions , the energy range for the integration can be effectively reduced to a narrow range that the difference is larger than a threshold , where the threshold of @xmath204 is used in this study . with the threshold and the step width of 0.01 ( ev ) ,
the number of meshes on the real axis is 152 for @xmath205 ( ev ) at @xmath206 .
the convergence speed depends on the shape of the integrand and how large @xmath203 is employed for smearing the integrand , which will be discussed later .
the source - drain bias voltage applied to the left and right leads is easily incorporated by adding a constant electric potential @xmath207 to the hartree potential in the right lead region .
the effect of the bias voltage appears at three places .
the first effect is that the hamiltonian matrix in the right region given by eq .
( [ eq : c1 - 9 ] ) is replaced using eq .
( [ eq : c1 - 10 ] ) as @xmath208 this can be easily confirmed by noting that the matrix elements for the constant potential @xmath207 is @xmath209 .
the off - diagonal block elements @xmath210 , @xmath211 @xmath212 , and @xmath213 appearing eqs .
( [ eq : c1 - 7 ] ) and ( [ eq : c1 - 8 ] ) are also replaced in the same way .
the second effect is that the chemical potential of the right lead is replaced as @xmath214 the treatment is made so that the first replacement can be regarded as just shifting the origin of energy in the right lead .
the last effect is that the boundary condition in eq .
( [ eq : c1 - 39 ] ) is replaced as @xmath215 where @xmath216 is calculated by the fourier transformation on the * bc*-plane for @xmath138 at @xmath163 plus @xmath207 .
since only the difference of the bias voltages applied to the left and right leads affects the result , one can consider the replacements on only the right lead at the three places as shown above .
it is noted that the replacement by eq .
( [ eq : c1 - 55 ] ) corresponds to adding a linear potential @xmath217 to the hartree potential in the central region @xmath36 , where @xmath218 and @xmath219 are determined by the boundary conditions : @xmath216 and @xmath220 .    in our implementation
, the gate voltage @xmath221 is treated by adding an electric potential defined by @xmath222 ,   \label{eq : c1 - 56}\end{aligned}\ ] ] where @xmath223 is a constant value corresponding to the gate voltage , @xmath224 the center of the region @xmath2 , and @xmath225 the length of the unit vector along * a*-axis for the region @xmath2 . due to the form of eq .
( [ eq : c1 - 56 ] ) , the applied gate voltage affects mainly the region @xmath2 in the central region @xmath36 .
the electric potential may resemble the potential produced by the image charges.@xcite      the spin resolved transmission is evaluated by the landauer formula for the non - interacting central region @xmath36 connected with two leads : @xmath226 where @xmath227 is the spin and @xmath228-resolved transmission defined by @xmath229    \label{eq : c1 - 58}.\end{aligned}\ ] ] using the transmission formula , the current is evaluated by @xmath230 the formula can be derived by starting from a more general formula of the current for the interacting central region @xmath36 and by replacing the involved green functions with the non - interacting green functions as shown by meir and wingreen.@xcite we perform the integration in eq .
( [ eq : c1 - 59 ] ) on the real axis with a small imaginary part @xmath203 by the same way as for the nonequilibrium density matrix of eq .
( [ eq : c1 - 42 ] ) .
all the calculations in this study were performed by the dft code , openmx.@xcite the paos centered on atomic sites are used as basis functions.@xcite the pao basis functions we used , generated by a confinement scheme,@xcite are specified by h5.5-s2 , c4.5-s2p2 , o5.0-s2p2d1 , fe5.0-s2p2d1 , mg5.5-s2p2 , la7.0-s3p2d1f1 , sr7.0-s3p2d1f1 , and mn6.0-s3p2d2 , where the abbreviation of basis functions , such as c4.5-s2p2 , represents that c stands for the atomic symbol , 4.5 the cutoff radius ( bohr ) in the generation by the confinement scheme , and s2p2 means the employment of two primitive orbital for each of s- and p - orbitals .
norm - conserving pseudopotentials are used in a separable form with multiple projectors to replace the deep core potential into a shallow potential.@xcite also , a local density approximation ( lda ) to the exchange - correlation potential is employed.@xcite , while a generalized gradient approximation ( gga)@xcite is used only for calculations of the lamno@xmath0srmno@xmath1 superlattice .
the real space grid techniques are used with the cutoff energies of 120 - 200 ry in numerical integrations and the solution of poisson equation using fft.@xcite in addition , the projector expansion method is employed in the calculation of three - center integrals for the deep neutral atom potentials.@xcite      ) per atom of a linear carbon chain with a bond length of 1.4    under the zero bias voltage at electronic temperature of 300 , 600 , and 1200 k , where the regions @xmath37 , @xmath38 , and @xmath2 contain four carbon atoms , respectively . for comparison the same calculation _ ( closed contour ) _ using a closed contour method@xcite is also shown for t=600  k. the definitions of @xmath231 and @xmath232 are found in appendix a. the reference values are obtained from calculations with a large number of poles .
( b ) total dos of the carbon linear chain , calculated by the conventional band structure calculation ( solid line ) and the egf method ( dotted line ) , under the zero bias voltage at 300 k , where 160 poles are used for the integration of the equilibrium density matrix .
it is hard to distinguish two lines due to the nearly equivalent results.,width=302 ]    the accuracy and efficiency of the implementation are mainly determined by the evaluation of density matrix given by eq .
( [ eq : c1 - 40 ] ) which consists of two contributions : the equilibrium and non - equilibrium terms given by eqs .
( [ eq : c1 - 22 ] ) and ( [ eq : c1 - 41 ] ) , respectively . in this subsection
, we discuss the convergence properties of the equilibrium and non - equilibrium terms in the density matrix as a function of numerical parameters .    ) per atom of the same linear carbon chain as in fig .  2 , calculated by various imaginary parts , under a finite bias voltage of 0.5 v , where the other calculation conditions are same as for fig .
the number pointed by the arrow denotes a grid spacing ( ev ) corresponding to the number of grid points .
the reference values are obtained from calculations with a large number of grid points .
( b ) mulliken populations in the carbon chain .
the sequential numbers 1 and 12 correspond to the most left and right hand side atoms in the central region @xmath36 , respectively.,width=302 ]    since the majority part of the density matrix given by eq .
( [ eq : c1 - 40 ] ) is the equilibrium contribution , let us first discuss convergency of the equilibrium density matrix as a function of poles . the absolute error in @xmath233 of a carbon linear chain is shown in fig .
2(a ) as a function of the number of poles in order to illustrate the convergence property for the equilibrium density matrix under zero bias voltage , where @xmath233 can be regarded as a conventional expression of the total energy in dft , and the definitions of the two energy terms @xmath231 and @xmath232 with the fermi - dirac function are given in appendix a. for comparison the result calculated by a closed contour method is also shown.@xcite one can see that the accuracy of @xmath234 ev per atom is obtained using 140 , 100 , and 70 poles for the electronic temperature of 300 , 600 , and 1200  k , respectively , while about 400 energy points are needed to obtain the same accuracy using the closed contour method at 600  k.@xcite for most cases , we find that the convergence rate is similar to the case shown in fig .
in general , the number of poles to achieve the accuracy of @xmath234 ev per atom must be proportional to the inverse of @xmath102 , since the interval between neighboring poles of the continued fraction given by eq .
( [ eq : c1 - 25 ] ) is scaled by @xmath235 .
this fact implies that the computational effort increases as the electronic temperature decreases .
however , we generally use electronic temperature from 300 to 1000  k for practical calculations , which means that the use of 100 poles is enough for practical purposes .
therefore , it can be concluded that the most contribution of the density matrix can be very accurately evaluated with a small number of poles , i.e. , 100 .    to demonstrate the proper treatment of the boundary between the lead and the central regions in our implementation , in fig .
2(b ) we show a comparison between the conventional band structure and the egf calculations with respect to dos of the carbon linear chain .
the comparison provides a severe test to check whether the egf method is properly implemented or not .
it can be confirmed that dos calculated by the egf method is nearly equivalent to that by the conventional band structure calculation , which clearly shows the proper treatment of the boundary between the lead and the central regions in our scheme .    as explained before , the integration of eq .
( [ eq : c1 - 42 ] ) required for the evaluation of the nonequilibrium term in the density matrix has to be performed on the real axis with a small imaginary part because contour integration schemes may not be applied due to the non - analytic nature of the integrand .
the treatment might suffer from numerical instabilities in the scf iteration , since the integrand can rapidly vary due to the existence of poles of green function located on the real axis . a remedy to avoid the numerical problem is to smear the green function by introducing a relatively large imaginary part.@xcite    to investigate convergency of the nonequilibrium term in the density matrix , in fig .
3(a ) we show the absolute error in @xmath233 of the same infinite carbon chain as in fig .  2 but under a finite bias voltage of 0.5 ev as a function of the number of regular grid points used for the evaluation of the nonequilibrium term in the density matrix given by eqs .  ( [ eq : c1 - 41 ] ) and ( [ eq : c1 - 42 ] ) .
we also tested the gauss - legendre quadrature for the integration of the nonequilibrium term besides the integration using the regular grid , but found that the convergence rate of the gauss - legendre quadrature is rather slower than the simple scheme possibly due to the spiky structure of the integrand .
thus , we have decided to use the simple scheme using the regular grid . as expected , it turns out that the number of grid points to achieve the accuracy of @xmath234 ev per atom increases as the imaginary part becomes smaller .
however , the accuracy of @xmath234 ev is attainable using about 100 grid points in case of the imaginary part of 0.01 ev , while a few thousands grid points have to be used to achieve the same accuracy for the imaginary part of 0.0001 ev .
although the accuracy of @xmath234 ev can be achieved by introducing the smearing scheme , however , one may consider that results can be affected by the introduction of an imaginary part . in order to find a compromise between the accuracy and efficiency , the mulliken population of the carbon linear chain under the finite bias voltage of 0.5 ev
is shown in fig .
we see that the use of the imaginary part of 0.01 ev gives a result comparable to that obtained by the use of 0.0001 ev .
thus , the imaginary part of 0.01 ev can be a compromise between the accuracy and efficiency in this case . as a result
, one can find that the energy points of 200 ( 100 and 100 for the equilibrium and nonequilibrium density matrices , respectively ) are enough to achieve the accuracy of @xmath234 ev per atom in @xmath233 at 600 k. however , it should be mentioned that a proper choice of the imaginary part must depend on the electronic structure of systems , and the careful consideration must be taken into account especially for a case that the spiky dos appears in between two chemical potentials of the leads , while for the equilibrium part of the density matrix the convergence property is insensitive to the electronic structure .
we also note that the accurate evaluation of the density matrix makes the scf calculation stable even under a finite bias voltage .
in fact , for the case with the bias voltage of 0.5 v the number of the scf iterations to achieve the residual norm of @xmath236 for the charge density difference is 29 which is nearly equivalent to that , 30 , for the zero bias case .
since for large - scale systems it is very time - consuming to perform the scf calculation at each bias voltage , here we propose an interpolation scheme to reduce the computational cost in the calculations by the negf method .
the interpolation scheme is performed in the following way : ( i ) the scf calculations are performed for a few bias voltages which are selected in the regime of the bias voltage of interest .
( ii ) when the transmission and current are calculated , a linear interpolation is made for the hamiltonian block elements , @xmath47 and @xmath237 , of the central scattering region and the right lead , and the chemical potential , @xmath238 , of the right lead by @xmath239 where the indices @xmath157 and @xmath240 in the superscript mean that the quantities are calculated or used at the corresponding bias voltages where the scf calculations are performed beforehand .
note that it is also possible to perform the interpolation for @xmath17-independent hamiltonian matrix elements instead of eqs .
( [ eq : c1 - 60 ] ) and ( [ eq : c1 - 61 ] ) . in general
, @xmath241 should range from 0 to 1 for the moderate interpolation .
a comparison between the fully self consistent and the interpolated results is shown with respect to the current and transmission in the linear carbon chain in figs .
4(a ) and ( b ) .
in this case , the scf calculations at three bias voltages of 0 , 0.5 , and 1.0 v are performed , and the results at the other bias voltages are obtained by the interpolation scheme . for comparison
we also calculate the currents via the scf calculations at all the bias voltages .
it is confirmed that the simple interpolation scheme gives notably accurate results for both the calculations of the current and transmission .
although the proper selection of bias voltages used for the scf calculations may depend on systems , the result suggests that the simple scheme is very useful to interpolate the effect of the bias voltage while keeping the accuracy of the calculations .         v. the zigzag edges are terminated by hydrogen atoms .
the isosurface value of @xmath242 is used for drawing the spin density.,width=302 ]    as an illustration of our implementation , we investigate transport properties of zigzag graphene nanoribbons ( zgnrs ) with different magnetic configurations .
a characteristic feature in the band structure of zgnr is the appearance of flat bands around x - point near the fermi level , resulting in spin - polarization of associated states located at the zigzag edges.@xcite thus , so far several intriguing transport properties have been theoretically predicted especially for zgnrs among gnrs by focusing on the spin polarized edge states.@xcite for instance , it is found that zgnrs might exhibit an extraordinary large magnetoresistance ( mr ) effect and a spin polarized current.@xcite    -@xmath207 curves for ( a ) the up - spin and ( b ) the down - spin states in the fm junction , and ( c ) the up - spin and ( d ) the down - spin states in the afm junction of 7- and 8-zgnrs.,width=302 ]    here we focus on the current - bias voltage ( @xmath243-@xmath207 ) characteristic of @xmath244- and @xmath245-zgnrs with two magnetic configurations : ferromagnetic ( fm ) and antiferromagnetic ( afm ) junctions as shown in figs .
5(a ) and ( b ) , respectively , where the number , @xmath244 or @xmath245 , is the number of carbon atom in the sublattice being across zgnr along the lateral direction .
the odd and even cases will also be referred to as _
asymmetric _ and _ symmetric _ , respectively .
the extended central region @xmath36 consists of one sublattice and four unit cells , and contains 72 and 82 atoms for 7- and 8-zgnrs , respectively .
the poles of 100 is used for the evaluation of the equilibrium density matrix with the electronic temperature of 300 k , while the nonequilibrium term in the density matrix is evaluated using the simple quadrature method with the imaginary part of 0.01 ev and the grid spacing of 0.02 ev .
the geometric structures used are optimized under the periodic boundary condition until the maximum force is less than @xmath246 hartree / bohr . at each bias voltage
the electronic structure of zgnr is self - consistently determined .     for the fm junction of 8-zgnr under various applied source - drain bias
voltages @xmath207.,width=302 ]    figures  6(a ) and ( b ) show the current - voltage ( @xmath243-@xmath207 ) curves for the up- and down - spin states in the fm junctions of 7- and 8-zgnrs .
it is found that the current for 7-zgnr linearly depends on the bias voltage , while the current for 8-zgnr is saturated at the bias voltage of about @xmath247 .
the distinct behavior of 8-zgnr from 7-zgnr can be more definitely seen in the afm junction as shown in figs .
6(c ) and ( d ) .
interestingly , 8-zgnr with the afm junction exhibits a diode behavior for the spin resolved current .
only the up - spin state contributes substantially to the current in the negative bias regime . in contrary in the positive bias regime only the down - spin state contributes to the current .
it is worth mentioning that the effect can also be regarded as a spin filter effect . on the other hand ,
the @xmath243-@xmath207 characteristics for 7-zgnr is nearly equivalent to that for the fm junction .
the considerable difference between 7- and 8-zgnrs in the @xmath243-@xmath207 characteristics can be attributed to the symmetry of two wave functions , @xmath248 and @xmath249 states , around the fermi level . for 8-zgnr the wave functions of the @xmath248 and
@xmath249 states are antisymmetric and symmetric with respect to the @xmath12 mirror plane which is the mid plane between two edges , respectively , while those wave functions for 7-zgnr are neither symmetric nor antisymmetric . from a detailed analysis@xcite
, it can be concluded that the unique distinction in the @xmath243-@xmath207 characteristics arises from an interplay between the symmetry of wave functions and band structures of zgnrs .
in addition , we find that spin moments are reduced by applying the finite bias voltage as shown in fig .
since the flat bands around x - point of the minority spin state are located about 0.25 ev above the fermi level , the spin moments at the zigzag edges are largely reduced by increasing the occupation of the flat bands for the minority spin states when the bias voltage exceeds the threshold as shown in fig .
7.@xcite the details of the analysis on the unique spin diode and filter effect of zgnrs is discussed elsewhere.@xcite     region , sandwiched by fe(100 ) , being the @xmath37 and @xmath38 regions .
the red large and small and blue circles denote fe , o , and mg atoms , respectively .
( b ) the net charge and spin magnetic moment of a fe or mg atom belonging to each layer in the parallel magnetic configuration between the left and right leads .
the position in the horizontal axis exactly corresponds to that of the layer in the above figure.,width=321 ]      the applicability of our implementation to bulk systems is demonstrated by an application to a tunneling junction consisting of mgo(100 ) layers sandwiched by iron .
the magneto - tunneling junction was theoretically predicted to exhibit a large tunneling - magnetoresistance ( tmr),@xcite and subsequently the tmr effect has been experimentally confirmed.@xcite we consider four mgo(100 ) layers sandwiched by iron with the ( 100 ) surface of which atomic configuration is shown in fig .
8(a ) , where the lattice constant of the * bc*-plane used is 2.866   , and they are 2.866 and 4.054    in iron and mgo regions along the * a*-axis , and the distance between the mgo and iron layers is assumed to be 2.160   .
the four mgo(100 ) layers corresponds to the region @xmath2 in fig .
1(a ) , and four fe layers of the left and right hand correspond the region @xmath37 and @xmath38 , respectively .
the scf calculations were performed at 1000 k under zero bias voltage using * k*-points of @xmath250 and 130 poles for the integration of the equilibrium density matrix .
it is found that obtaining the scf is much harder than the case of zgnr discussed before , and that a careful and modest treatment for the charge mixing is required .     were used.,width=302 ]    as shown in fig .
8(b ) , the net charge of iron atoms in the interfacial layer is positive due to the coordination to an oxygen atom , and the reduction of electrons leads to the increase of the magnetic moment of iron atoms at the interfacial layer .
the increase of the magnetic moment at the interfacial layer makes the distinction of the majority and minority spin states at the fermi energy clear , i.e. , the nature of the majority and minority spin states at the fermi energy can be assigned to @xmath251- and @xmath225-states , respectively .
the * k*-resolved transmissions at the chemical potential for the majority and minority spin states for the parallel magnetic configuration between the left and right leads are shown in figs .
9(a ) and ( b ) , respectively .
the large peak at the @xmath252 point in the majority spin state can be attributed to the @xmath251-state , while sharp peaks around four pillars come from the @xmath225-state as discussed in ref.@xcite .
note that the position of the sharp peaks is rotated by 45 degrees because of the unit cell rotated by 45 degrees compared to that in ref.@xcite .
the conductances , @xmath253 and @xmath254 , for the majority and minority spin states , calculated from the average transmission integrated over the first brillouin zone , are 11.99 and 2.82 @xmath255 , respectively , which implies that the tunneling junction may behave as a spin filter .
the distinction in the conductance should be attributed to decay properties of states in the insulating mgo region coupled with the two states.@xcite for the antiparallel magnetic configuration the * k*-resolved transmission at the chemical potential is understood as a multiplication of the transmissions for the majority and minority spin states in the parallel configuration as shown in fig .
the conductance , @xmath256 , of the antiparallel magnetic configuration is 0.34 ( @xmath257 ) which is smaller than those of the parallel case . by defining tmr@xmath258
, we obtain tmr of 2082  % , which is compared to 3700  % for a 5 layer mgo case reported in ref.@xcite .
when the transmission of a system with the periodicity along the * a*-axis as well as the periodicity of the * bc*-plane is evaluated under zero bias voltage , it can be easily obtained by making use of the hamiltonian calculated by the conventional band structure calculation without employing the green function method described in the paper .
this scheme enables us to explore transport properties for a wide variety of possible geometric and magnetic structures with a low computational cost , and thereby can be very useful for many materials such as supperlattice structures .
once the hamiltonian and overlap matrices are obtained from the conventional band structure calculation for the periodic structure , the transmission is evaluated by eq .
( [ eq : c1 - 57 ] ) , where all the necessary information to evaluate eq .
( [ eq : c1 - 57 ] ) can be reconstructed by the result of the band structure calculation . as an example of the scheme
, we calculate the conductance of a ( lamno@xmath1)/(srmno@xmath1 ) superlattice with four different magnetic structures , i.e. , ferromagnetic , a - type , g - type , and c - type antiferromagnetic configurations of mn sites.@xcite    ) /(srmno@xmath1 ) superlattice with the ferromagnetic spin configuration of mn sites .
the middle sized blue and small red circles denote mn and o atoms , while sr and la atoms are denoted by the mark .
density of states ( dos ) of the ( lamno@xmath1)/(srmno@xmath1 ) superlattice for ( b ) ferromagnetic and ( c ) a - type antiferromagnetic configurations .
, width=302 ]    in recent years , it has been found experimentally that the superlattice structures consisting of lamno@xmath1 and srmno@xmath1 layers exhibit a metal - insulator transition in terms of the layer thickness.@xcite bhattacharya et al .
fabricated ( lamno@xmath1)@xmath259/(srmno@xmath1)@xmath260 superlattices on a srtio@xmath1 ( 001 ) substrate , and measured the in - plane resistivity as a function of temperature.@xcite the resistivity measurement indicates that the superlattices are metallic and insulating for @xmath261 and @xmath262 , respectively . on the other hand , the ( lamno@xmath1)@xmath263/(srmno@xmath1)@xmath263 superlattices fabricated on the same substrate by nakano et al .
exhibit a sample dependence in the resistivity measurement , i.e. , one of three samples is metallic and the others are insulating.@xcite they argued that the metallic behavior observed in the one sample may be attributed to a certain structural incompleteness in the superlattice structure , and that the ideal superlattice should become insulating based on their experimental results .
a theoretical model calculation for the ( lamno@xmath1)@xmath259/(srmno@xmath1)@xmath260 superlattices suggests that the metal - insulator transition at @xmath264 can be explained by existence of the g - type antiferromagnetic barrier in the srmno@xmath1 layers sandwiched by the lamno@xmath1 layers with the ferromagnetic configuration.@xcite since the analysis by nakano et al .
suggests that the charge transfer between the lamno@xmath1 and srmno@xmath1 layers is rather localized in the vicinity of the interface,@xcite the model should be applicable to the case of ( lamno@xmath1)@xmath263/(srmno@xmath1)@xmath263 without significantly depending on the ratio between the thicknesses of ( lamno@xmath1 ) and ( srmno@xmath1 ) layers , indicating that ( lamno@xmath1)@xmath263/(srmno@xmath1)@xmath263 is metallic .
however , the naive consideration evidently contradicts the experimental result.@xcite    as a first step towards comprehensive understanding of transport properties of the superlattice structures by the first principle calculations , we consider the simplest superlattice , i.e. , ( lamno@xmath265srmno@xmath1 ) . in the calculations , the in - plane lattice constant is fixed to be 3.905   which is equivalent to that of the srtio@xmath1 substrate .
the out - of - plane lattice constant is assumed to be 7.735  , since those are experimentally determined to be 3.959   and 3.776   for the lamno@xmath1 and the srmno@xmath1 layers , respectively , grown on the srtio@xmath1 substrate and the average out - of - plane lattice constant for the superlattices is nearly equivalent to the average of the two values.@xcite with those lattice constants internal structural parameters are optimized for each magnetic configuration without any constraint until the maximum force is less than @xmath266 hartree / bohr . the optimized structure for the ferromagnetic configuration is shown in fig .
it is found that the position of oxygen atoms is largely distorted due to the different ionic radii between la and sr atoms , showing that mn atoms are located in the center of each distorted octahedron .
also , bond angles of mn - o - mn are found to be 167.4 and 161.6 ( degree ) for the in - plane and out - of - plane , respectively .
the total energies relative to the ferromagnetic configuration are listed in table  [ l1m1-tb ] .
the calculated ground state is the ferromagnetic configuration , and the a - type antiferromagnetic configuration lies just above 5 mev per formula unit .
it may be considered that the nearly degeneracy between the two configurations corresponds to the neighborhood of the boundary at @xmath267 and @xmath268 in the phase diagram for the tetragonal la@xmath269sr@xmath270mno@xmath1.@xcite the two configurations have both a metallic dos , while the ferromagnetic configuration is half - metallic as shown in figs .
10(b ) and ( c ) , reflecting the large in - plane and out - of - plane conductances as shown in table  [ l1m1-tb ] . from a detailed analysis
( not shown ) of doss , we see that the electronic states at the fermi level are composed of @xmath271 orbitals of mn atoms and @xmath272 orbitals of oxygen atoms . also , the mulliken population analysis ( not shown ) suggests that the charge state of mn atoms in the superlattice is in between those in the lamno@xmath1 and srmno@xmath1 bulks .
this implies that the metallic band structures are induced by partial filling of the @xmath271 bands .
since the bond angle of mn - o - mn for the out - of - plane is slightly acute , therefore , this may be attributed to reduction of the conductance of the ferromagnetic state in the out - of - plane as shown in table  [ l1m1-tb ] . a systematic study for the thicker cases and the effect of coulomb interaction@xcite in the @xmath271 orbitals
is highly desirable , and the details will be discussed elsewhere .
.total energy ( mev ) per formula unit , lamno@xmath0srmno@xmath1 , and conductance @xmath273 ( @xmath257 ) of the ( lamno@xmath265srmno@xmath1 ) supperlattice with four different magnetic configurations , i.e. , ferromagnetic ( f ) , a - type ( a ) , g - type ( g ) , and c - type ( c ) antiferromagnetic configurations of mn sites .
the total energy is measured relative to that of the ferromagnetic configuration .
@xmath274 is the in - plane conductance for the up spin state , and the others are construed in the similar way . for the conductance calculations * k*-points of @xmath275 were used . [ cols="^,^,^,^,^",options="header " , ]      , where @xmath276 and @xmath277 are the elapsed times by a single core and a parallel calculations .
the cores used in the mpi and openmp parallelizations are called _ process _ and _ thread _ , respectively .
the parallel calculations were performed on a cray xt5 machine consisting of amd opteron quad core processors ( 2.3ghz ) . in the benchmark calculations ,
the number of processes is taken to be equivalent to that of processors .
therefore , in the parallelization using 1 or 2 threads , 3 or 2 cores are idle in a quad core processor.,width=302 ]    the computation in the the negf method can be parallelized in many aspects such as * k*-points , energies in the complex plane at which the green functions are evaluated , spin index , matrix multiplications , and calculation of the inverse of the matrix . here
we demonstrate a good scalability of the negf in the parallel computation by a hybrid scheme using the message passing interface ( mpi ) and openmp which are used for inter - nodes and intra - node parallelization , respectively . the green function defined by eq .
( [ eq : c1 - 6 ] ) is specified by the * k*-point , energy @xmath278 , and spin index @xmath12 . since the calculation of the green function specified by each set of three indices
can be independently performed without any communication among the nodes , we parallelize triple loops corresponding to the three indices using mpi .
each node only has to calculate the green functions for an allocated domain of the set of indices , and partly sum up eq .
( [ eq : c1 - 26 ] ) or ( [ eq : c1 - 42 ] ) in a discretized form .
after all the calculations finish , a global summation among the nodes is required to complete the calculation of eq .
( [ eq : c1 - 26 ] ) or ( [ eq : c1 - 42 ] ) , which , in most cases , is a very small fraction of the computational time even including the mpi communication among the nodes .
thus , the reduction of scalability for the parallelization of the three indices is mainly due to imbalance in the allocation of the domain of the set of indices .
the imbalance can happen in the case that the number of combination for the three indices and the number of processes in the mpi parallelization are relatively small and large , respectively .
in addition to the three indices , one may notice that the matrix multiplications and the calculation of the matrix inverse can be parallelized , which are situated in the inner loops of the three indices .
the evaluation of the central green function given by eq .
( [ eq : c1 - 6 ] ) and the surface green functions given by eq .
( [ eq : c1 - 21 ] ) , and the self energies given by eqs .
( [ eq : c1 - 7 ] ) and ( [ eq : c1 - 8 ] ) are mainly performed by the matrix multiplications and the calculation of the matrix inverse .
we parallelize these two computations using openmp in one node .
since the memory is shared by threads in the node , the communication of the data is not required unlike the mpi parallelization . however , the conflict in the data access to the memory can reduce the scalability in the openmp parallelization . as a whole , in our implementation
the * k*-point , energy @xmath278 , and spin index @xmath12 are parallelized by mpi , and the matrix multiplications and the calculation of the matrix inverse are parallelized by openmp .    in fig .
11 we show the speed - up ratio in the elapsed time for the evaluation of the density matrix of 8-zgnr under a finite bias voltage of 0.5 ev .
the geometric and magnetic structures and computational conditions for 8-zgnr are same as before .
the energy points of 197 ( 101 and 96 for the equilibrium and nonequilibrium terms , respectively ) are used for the evaluation of the density matrix .
only the @xmath252 point is employed for the * k*-point sampling , and the spin polarized calculation is performed .
thus , the combination of 394 for the three indices are parallelized by mpi .
it is found that the speed - up ratio of the flat mpi parallelization , corresponding to 1 thread , reasonably scales up to 64 processes .
furthermore , it can be seen that the hybrid parallelization , corresponding to 2 and 4 threads , largely improves the speed - up ratio . by fully using 64 quad core processors , corresponding to 64 processes and 4 threads ,
the speed - up ratio is about 140 , demonstrating the good scalability of the negf method .
we have presented an efficient and accurate implementation of the negf method for electronic transport calculations in combination with dft using pseudo - atomic orbitals and pseudopotentials . in the implementation
, we have developed accurate methods for the evaluation of the density matrix and the treatment of the boundary between the scattering region and the leads .
a contour integration method with a continued fraction representation of the fermi - dirac function has been successfully applied for the evaluation of the equilibrium term in the density matrix , which evidently outperforms the previous method,@xcite while a simple quadrature scheme on the real axis with a small imaginary part is employed for that for the nonequilibrium term in the density matrix .
it has been demonstrated by numerical calculations that the accuracy of @xmath234 ev per atom in @xmath233 is attainable using the energy points of 200 in the complex plane even under a finite bias voltage of 0.5 v at 600 k. however , the evaluation of the nonequilibrium density matrix still requires a careful treatment where the pole structure of the green functions has to be smeared by introducing a finite imaginary part .
the numerical calculations suggest that the number of energy points required for the convergence can be largely reduced by introducing the imaginary part of 0.01 ev without largely changing the calculated results in a practical sense .
we also note that the accurate evaluation of the density matrix provides another advantage that the scf calculations even under a finite bias voltage smoothly converge in a similar fashion as the conventional band structure calculation does .
we have also developed an efficient method for calculating the hartree potential by a combination of the two dimensional fft and a finite difference method without any ambiguity in reproducing the boundary conditions .
in addition , a careful evaluation of the charge density near the boundary between the scattering region and the leads is presented in order to avoid the spurious scattering accompanied by the inaccurate construction of the charge density .
the proper treatment for the charge evaluation in our implementation can definitely be verified by a comparison between the conventional band structure calculation and the egf method with respect to the dos of the carbon chain .
finally , we have demonstrated the applicability of our implementation by calculations of spin resolved @xmath243-@xmath207 characteristics of zgnrs , showing that the @xmath243-@xmath207 characteristics depend on the symmetry of zgnr , and that the symmetric zgnr exhibits a unique spin diode and filter effect .
also , the applicability of our implementation to bulk systems is demonstrated by applications to a fe / mgo / fe tunneling junction and a lamno@xmath0srmno@xmath1 superlattice .
based on the above discussions and the good parallel efficiency in the hybrid parallelization shown in the study , it is concluded that our implementation of the negf method can be applicable to challenging problems related to large - scale systems , and can be a starting point , apart from numerical spurious effects , to include many body effects beyond the one particle picture in the electronic transport .
the authors would like to thank h. kondo for providing a prototype fortran code of the negf method .
this work is partly supported by crest - jst , the next generation supercomputing project , nanoscience program , and nedo ( as part of the nanoelectronics project ) .
let us introduce the following density functional which may define the total energy of the central region @xmath36 being a part of the extended system at equilibrium with a common chemical potential @xmath96 : @xmath279 where @xmath280 is the coulomb interaction energy between electrons and the external potential of the central region @xmath36 given by @xmath281 and @xmath282 is the hartree energy defined by @xmath283 where @xmath284 is an additional electron density which arises from the boundary condition between the central and lead regions . in fact , the additional electron density @xmath284 can be obtained by back fourier transforming eq .
( [ eq : c1 - 39 ] ) divided by @xmath285 within our treatment .
the last term of eq .
( [ eq : a-1 ] ) , @xmath232 , is a self energy density functional , which may correspond to the energy contribution from the self energy due to the semi infinite leads , given by @xmath286    \label{eq : a-4}\end{aligned}\ ] ] with @xmath287 where @xmath288 , the factor of 2 is due to the spin multiplicity , and the self energy @xmath289 is the sum of the self energies arising from the left and right leads .
although we neglect the spin and * k*-dependency on the formulation for the simplicity throughout the appendix , its generalization with the dependency is straightforward .
the kinetic energy @xmath290 can be evaluated by eq .
( [ eq : c1 - 6 ] ) as the band energy @xmath291 minus double counting corrections as follows : @xmath292\\   \nonumber   & = &    e_{\rm band }    -    \int dr^3     n({\bf r } )     v_{\rm eff}({\bf r})\\   \nonumber   & &    -     { \rm tr}\left [     -\frac{2}{\pi }     { \rm i m }     \int_{-\infty}^{\mu }     de     g_{c}(e^+ )     \sigma(e^+ )    \right ]    \label{eq : a-6},\\\end{aligned}\ ] ] where @xmath291 is defined by @xmath293 .
\label{eq : a-7}\end{aligned}\ ] ] it is noted that the last term in eq .
( [ eq : a-6 ] ) cancels the contribution from the first term in eq .
( [ eq : a-5 ] ) .
the effective potential @xmath294 in the second term of eq .
( [ eq : a-6 ] ) will be defined later . also , the exchange - correlation energy @xmath295 in eq .
( [ eq : a-1 ] ) is considered to be a density functional such as local density approximations ( lda ) and generalized gradient approximations ( gga ) evaluated using electron density @xmath62 in the central region @xmath36 .
we now consider the variation of the total energy @xmath231 with respect to @xmath62 .
the variations of @xmath280 and @xmath282 are simply given by @xmath296    =     \int dr^3     \delta n({\bf r } )     v_{\rm ext}({\bf r } )    \label{eq : a-8}\end{aligned}\ ] ] and @xmath297    =      \int dr^3     \delta n({\bf r } )     \int dr'^3     \frac{n({\bf r}')+n'({\bf r } ' ) }          { \vert { \bf r } - { \bf r } ' \vert}.    \label{eq : a-9}\end{aligned}\ ] ] by noting the dyson equation and @xmath298 which are both derived from eq .
( [ eq : c1 - 6 ] ) , and @xmath299 , the variation of @xmath291 is given by two contributions : @xmath300   } \\
\nonumber   & & =     \int dr^3    \delta n({\bf r } )    { \rm tr}\left [     -\frac{2}{\pi }     { \rm i m }     \int_{-\infty}^{\mu }     de\right.\\    \nonumber    & &    \qquad\qquad    \left .
\times     e     g_{c}(e^+ )     \frac{\delta h_{v } }          { \delta n({\bf r } ) }      g_{c}(e^+ )     s_{c }    \right]\\   \nonumber   & & =     \int dr^3    \delta n({\bf r } )    { \rm tr}\left [     -\frac{2}{\pi }     { \rm i m }     \int_{-\infty}^{\mu }     de     \right.\\    & &   \nonumber     \left .
\qquad\qquad     \times     e\left (     \frac{-\delta h_{v } }          { \delta n({\bf r } ) }      \right )     \frac{\partial g_{c}(e^+)}{\partial e }    \right]\\    \nonumber    & &     \quad    +    \int dr^3    \delta n({\bf r } )    { \rm tr}\left [     -\frac{2}{\pi }     { \rm i m }     \int_{-\infty}^{\mu }     de    \right.\\    \nonumber    & &      \qquad     \qquad     \left .
\times     e     g_{c}(e^+ )     \frac{\delta h_{v}}{\delta n({\bf r } ) }     g_{c}(e^+ )     \frac{\partial \sigma(e^+)}{\partial e }    \right].\\    \label{eq : a-10}\end{aligned}\ ] ] the trace in the first term of eq .
( [ eq : a-10 ] ) can be transformed by considering a partial integral and assuming the system to be insulating as follows : @xmath301    } \\
\nonumber    & & =    -{\rm tr}\left [     -\frac{2}{\pi }     { \rm i m }     \int_{-\infty}^{\mu }     de     \left (     \frac{-\delta h_{v}}{\delta n({\bf r } ) }      \right )     g_{c}(e^+ )     \right]\\    & & =    \int dr'^3    n({\bf r } ' )    \frac{\delta v_{\rm eff}({\bf r}')}{\delta n({\bf
r})}.    \label{eq : a-11}\end{aligned}\ ] ]
it is also noted that the second term in eq .
( [ eq : a-10 ] ) cancels the variation of the contribution from the second term in eq .
( [ eq : a-5 ] ) .
the variation of the second term in eq .
( [ eq : a-6 ] ) is easily found as @xmath302    & = &    \int dr^3    \delta n({\bf r } )    v_{\rm eff}({\bf r})\\    \nonumber    & + &    \int dr^3    \delta n({\bf r } )    \int dr'^3    n({\bf r } ' )    \frac{\delta v_{\rm eff}({\bf r}')}{\delta n({\bf r})}.\\    \label{eq : a-12}\end{aligned}\ ] ] thus , it turns out using eqs .
( [ eq : a-8])-([eq : a-12 ] ) that the variation of the total energy @xmath231 is given by @xmath303    } \\    \nonumber    & &    =     \int dr^3     \delta n({\bf r})\\    \nonumber    & &    \times    \left (    -v_{\rm eff}({\bf r } )    + v_{\rm ext}({\bf r } )    +      \int dr'^3     \frac{n({\bf r}')+n'({\bf r } ' ) }          { \vert { \bf r } - { \bf r } ' \vert }    + \frac{\delta e_{\rm xc}}{\delta n({\bf r } ) }    \right).\\    \label{eq : a-13}\end{aligned}\ ] ] letting @xmath304 $ ] be zero so that the variation of the total energy @xmath231 can be always zero with respect to @xmath62 , we obtain a form of the effective potential : @xmath305 it is found that the effective potential takes the same form as in the kohn - sham method.@xcite the fact implies that the self consistent solution of the green function under the zero bias condition may correspond to the minimization of the total energy functional defined by eq .
( [ eq : a-1 ] ) , since in practice the green function defined by eq .
( [ eq : c1 - 6 ] ) is calculated using the effective potential given by eq .
( [ eq : a-14 ] ) as a consequence of combining the negf method with dft .
the generalization of the functional to the metallic case with a finite temperature and the nonequilibrium state might be an important direction in the future study so that forces on atoms can be _ variationally _ calculated from the functional , since the existence of a variational functional has been recently suggested for the nonequilibrium steady state.@xcite
the equilibrium energy density matrix @xmath306 , where one of the associated basis orbitals is in the central cell and the other is in the cell denoted by @xmath16 , is calculated using the contour integration method applied to the equilibrium density matrix as follow : @xmath307 with @xmath308 if the hamiltonian and overlap matrices are @xmath17-independent , as well as eq .
( [ eq : c1 - 22 ] ) , eq .
( [ eq : c1 - 28 ] ) can be simplified to : @xmath309 .
\label{eq : c1 - 29}\end{aligned}\ ] ] for the general case with the @xmath17-dependent hamiltonian and overlap matrices , eq .
( [ eq : c1 - 28 ] ) is evaluated by the contour integration method with the special form of fermi - dirac function given by eq .
( [ eq : c1 - 25 ] ) as follows : @xmath310 with @xmath311 where @xmath312 is the first order moment of the green function @xmath114 . in eq .
( [ eq : c1 - 30 ] ) , a term , @xmath313 , which appears mutually for @xmath314 , is omitted , since the diverging terms cancel each other out in eq .
( [ eq : c1 - 27 ] ) . by making use of the moment representation of the green function,@xcite the following simultaneous linear equation
is derived for the zero and first order moments : @xmath315 letting @xmath316 and @xmath317 be @xmath318 and @xmath319 , respectively , the zero and first order moments can be evaluated by @xmath320 where @xmath69 is a large real number so that the higher order moments can be neglected .
for the nonequilibrium green function , the nonequilibrium contribution @xmath321 in the the energy density matrix @xmath322 can be calculated using the simple quadrature scheme in the same way as for the nonequilibrium term in the density matrix .                                                                                in a similar fashion to the charge density , the atomic electron density @xmath142 in the central region consists of two contributions .
one of them comes from atoms located in the central region @xmath36 , and the other is the contribution by the tail of atomic electron densities associated with atoms in the leads regions . since the latter is independent of the the scf iteration , it is computed on the regular mesh before the scf iteration .
we used @xmath323  ev , eb=27.21 ev , and @xmath324 , being the parameters in the closed contour integration depicted in fig .  2 of ref.@xcite .
the value for @xmath325 gives four enclosed matsubara poles for @xmath326  k. the path @xmath68 toward the positive direction is extended by @xmath327 from the chemical potential .
the paths @xmath68 and @xmath36 are integrated using the gauss - legendre quadrature scheme , respectively .
it turns out that 40 grid points for the path @xmath36 is enough to achieve the fully convergent result within double precision .
so , we used 40 grid points for the path @xmath36 , and only changed the number of grid points for the path @xmath68 in the calculation for fig .
2(a ) of ref.@xcite .
therefore , the number of energy points in the closed contour integration is given by 4 ( the enclosed matsubara poles ) plus 40 ( the path @xmath36 ) plus the number of grid points for the path @xmath68 .