3.10.1. horton.scripts.atomdb – Code used by horton-atomdb.py

class horton.scripts.atomdb.Template(*args, **kwargs)

Bases: string.Template

A template with modifications to support inclusion of other files.

__init__(*args, **kwargs)
get_subs(number, pop, mult)
safe_substitute(*args, **kws)
substitute(*args, **kws)
delimiter = ‘$’
idpattern = ‘[_a-z0-9.:-]+’
pattern = <_sre.SRE_Pattern object>
class horton.scripts.atomdb.EnergyTable

Bases: object

__init__()
add(number, pop, energy)
log()
horton.scripts.atomdb.iter_mults(nel, hund)

Iterate over atomic spin multiplicites for the given number of electrons

Arguments:

nel
The number of electrons (1-56)
hund
When set to True, only one spin multiplicity is returned. Otherwise several reasonable spin multiplicities are given.
horton.scripts.atomdb.iter_states(elements, max_cation, max_anion, hund)

Iterate over all requested atomic states

Arguments:

elements
A string that is suitable for iter_elements
template
An instance of the atomdb.Template class
max_cation
The limit for the most positive cation
max_anion
The limit for the most negative anion
hund
Flag to adhere to hund’s rule for the spin multiplicities.
horton.scripts.atomdb.plot_atoms(proatomdb, dn=’.’)

Make PNG figures for all atoms in a pro-atom database.

Warning: this script writes a bunch of PNG files!

Parameters:
  • proatomdb (horton.part.proatomdb.ProAtomDB) – A database of pro-atoms.
  • dn (str) – Directory where the PNG files will be written. Local directory if not given.