3.12.9. horton.part.proatomdb – Pro-atom databases

class horton.part.proatomdb.ProAtomRecord(number, charge, energy, rgrid, rho, deriv=None, pseudo_number=None, ipot_energy=None)

Bases: object

Arguments:

number
The element number of the proatom.
charge
The net charge of the proatom. (integer)
energy
The total energy of the proatom.
rgrid
The radial grid on which the density (and optional radial density derivatives) are tabulated.
rho
The electron density on the grid.

Optional arguments:

deriv
The radial derivative of the electron density.
pseudo_number
The effective core charge (defaults to number).
ipot_energy
The ionization potential.
chop(npoint)

Reduce the proatom to the given number of radial grid points.

compute_radii(populations)

Compute approximate radii and grid points at which the atom contains the given populations

Arguments:

populations
A list of populations for which the corresponding radii have to be computed.
classmethod from_dm(center, number, pseudo_number, obasis, dm_full, energy, agspec='fine')

Construct a proatom record from a single-atom density matrix

Arguments:

center
The position of the nuclues (needed for spherical average)
number
The atomic number
pseudo_number
The effective core charges
obasis
The orbital basis
dm_full
The spin-summed density matrix object
energy
The electronic energy of the atom

Optional arguments:

agspec
A specifications of the atomic grid. This can either be an instance of the AtomicGridSpec object, or the first argument of its constructor.
classmethod from_iodata(iodata, agspec='fine')

Construct a proatom record from a data dictionary and an atomic grid

Arguments:

iodata
IOData instance

Optional arguments:

agspec
A specifications of the atomic grid. This can either be an instance of the AtomicGridSpec object, or the first argument of its constructor.
get_moment(order)

Return the integral of rho*r**order

update_safe(other)

Updates the safe attribute based on a comparison with other records

Arguments:

other
Another instance of ProAtomRecord
charge

The charge

deriv

The radial derivative of the density on a radial grid

energy

The total electronic energy

ipot_energy

The ionization potential

number

The element number

population

The total number of electrons

pseudo_number

The pseudo element number (effective core charge)

pseudo_population

The total effective number of electrons

rgrid

The radial grid

rho

The density on a radial grid

safe

When safe is True, this pro atom is safe to use, i.e. not know to be basis-set bound

class horton.part.proatomdb.ProAtomDB(records)

Bases: object

Arguments:

records
A list of ProAtomRecord instances. If two or more records have the same number and charge, only the lowest in energy is retained.

Based on the records present it is determined which records are safe to use, i.e. apparently not bound by the basis set.

compact(nel_lost)

Make the pro-atoms more compact

Argument:

nel_lost
This parameter controls the part of the tail that gets neglected. This is the (maximym) number of electrons in the part that gets discarded.

Note that only ‘safe’ atoms are considered to determine the cutoff radius.

classmethod from_file(filename)

Construct an dabase from an HDF5 file

Arguments:

filename
A string with the filename of the hdf5 file, or a h5.File or h5.Group object.

Note that the records are loaded and given as argument to the constructor, which may weed out duplicates.

classmethod from_files(fns, agspec='fine')

Construct a ProAtomDB from a series of HORTON checkpoint files.

Arguments:

fns_chk
A list of atomic output files.

Optional arguments:

agspec
A specifications of the atomic grid. This can either be an instance of the AtomicGridSpec object, or the first argument of its constructor.
classmethod from_refatoms(numbers=None, max_kation=3, max_anion=2, agspec='fine')

Construct a ProAtomDB from reference atoms included in HORTON

Arguments:

fns_chk
A list of HORTON checkpoint files.

Optional Arguments:

numbers
A list of atom numbers to limit the selection of atoms in the database. When not given, all reference atoms are loaded.
max_kation
The charge of the most positive kation to include
max_anion
Minus the charge of the most negativ anion to include. (This is typically a positive argument.)
agspec
A specifications of the atomic grid. This can either be an instance of the AtomicGridSpec object, or the first argument of its constructor.
get_charges(number, safe=False)
get_numbers()

Return the element numbers present in the database

get_record(number, charge)
get_rgrid(number)
get_rho(number, parameters=0, combine='linear', do_deriv=False)

Construct a proatom density on a grid.

Arguments:

number
The element

Optional arguments:

parameters

This argument may take two forms:

  • Integer: the charge of the pro-atom
  • Dictionary: a linear or geometric combination of different charged pro-atoms. The keys are the charges and the values are the coefficients.
combine
In case parameters is an array, this determines the type of combination: ‘linear’ or ‘geometric’.
do_deriv
When set to True, the derivative of rho is also returned. In case the derivative is not available, the second return value is None.
get_spline(number, parameters=0, combine='linear')

Construct a proatom spline.

Arguments: See get_rho method.

normalize()
to_file(filename)

Write the database to an HDF5 file

Arguments:

filename
A string with the filename of the hdf5 file, or a h5.File or h5.Group object.
size