m_bader/aim_follow [ Functions ]

This routine follows the gradient line starting from the point
vv. It stop when it arrives to the atom (nearer than rminl(iat))
or - if srch=true - also if it arrives under the already known
part of Bader surface

INPUTS

aim_dtset= the structured entity containing all input variables
iatinit,iposinit= indexes of initial atom
npmax= maximum number of division in each step

OUTPUT

iat,ipos= index of final atom
nstep= returns the number of step needed

SIDE EFFECTS

srch= (true/false) check if the line is outside or
inside the atomic surface.
vv(3)= initial point in orthogonal coordinates

m_bader/cpdrv [ Functions ]

Critical points (CPs) searching driver
First Bond CPs are searched for each pair atom-its neighbor
(distance cutoff=maxatdst)
then Ring CPs for each pair of BCPs
and finally Cage CPs for each pair of RCPs.

INPUTS

aim_dtset= the structured entity containing all input variables

OUTPUT

SIDE EFFECTS

this routine treat information contained in the aim_prom module
WARNING
This file does not follow the ABINIT coding rules (yet)

m_bader/critics [ Functions ]

Search for critical points starting between
atom inxat and its neighbors.

INPUTS

aim_dtset= the structured entity containing all input variables
dstmax=maximum distance to search for neighbors
stwo, sthree, sfour: logical switches (TRUE/FALSE) indicating
to search CP starting in the middle point
of two, three or four atoms. One of these
atoms is inxat.

OUTPUT

(see side effects)

SIDE EFFECTS

This routines acts primarily on the data contained in the aim_prom module
WARNING
This file does not follow the ABINIT coding rules (yet)

m_bader/initaim [ Functions ]

Initialization for the 3D interpolation for the AIM code:
- this procedure reads the charge density of the electrons of valence on
the equidistant 3D grid (*_DEN output file of ABINIT) and the core charge
density of electrons from *.fc files (fhi package)
- the Cholesky decomposition of the general matrix for
the computation of the 1D spline coeficients in each direction is done.
Warning - the procedure is modified to use periodic boundary conditions
already during the decomposition
- the second derivations of valence density in three directions are computed
and stored in the real space grid of the density for interpolation.
- the core density is stored separately in the radial grid together with th
second radial derivation

INPUTS

aim_dtset= the structured entity containing all input variables

OUTPUT

znucl_batom= the nuclear charge of the Bader atom
(see side effects)

SIDE EFFECTS

thie routine works on the data contained in the aim_fields and aim_prom modules
WARNING
This file does not follow the ABINIT coding rules (yet)

m_bader/inspln [ Functions ]

This procedure gives the values of the spline coefficients
(second derivatives) in the 1D grid with periodic boundary
conditions at rsid - the values of the unknown functions specified
in the vector valf of direction idir

INPUTS

idir= direction following which the derivatives are evaluated
snn, tnn=remaining bi-dimensional coordinates of the line along which
the derivative is to be computed

OUTPUT

(see side effects)

SIDE EFFECTS

This routine works on the data contained in the aimfields module
WARNING
This file does not follow the ABINIT coding rules (yet)

m_bader/integrho [ Functions ]

This routine integrates the electron density inside the
atomic surface already calculated - it reads the file *.surf
The radial integration is always performed with splines and
the two angular integrations with Gauss quadrature

m_bader/plint [ Functions ]

This simple routine gives the profile of the density
integrated in xy plane belong the z-axes (it works only
for orthogonal coordinates at present - it is better to use cut3d)
integration in plane - with equilateral triangles (not really
finished and not tested!)

INPUTS

(this routine works on the data in the aimprom module)

OUTPUT

(this routine works on the data in the aimprom module)
WARNING
This file does not follow the ABINIT coding rules (yet)

m_bader/rsurf [ Functions ]

Basic routine for determination of the radius of Bader surface
for spherical rayon theta,phi
the bassin is tested by following the gradient line
If srch==true (in general for calls from surf) the routine aim_follow
is called to stop when it arrives under already known part of surface
Simple bissection method is used to obtain the radius
WARNING
This file does not follow the ABINIT coding rules (yet)

INPUTS

aim_dtset= the structured entity containing all input variables
rr0= starting radius
theta,phi = the spherical direction
iatinit= the atom index
srch= see above
npmax= maximum number of divisions in one step for follow

m_bader/surf [ Functions ]

Determination of the Bader surface.
Use rsurf to determine radius for one direction
simple bisection method is used
the bassin is tested following the gradient (follow) =
= the most time consuming
follow stops if the gradient line is near the atom
or if it is under already known part of surface - this is why
the surface is not computed row by row.

INPUTS

aim_dtset= the structured entity containing all input variables

OUTPUT

(see side effects)

SIDE EFFECTS

This routine works primarily on the data contained in the defs_aimprom module
WARNING
This file does not follow the ABINIT coding rules (yet)