Basis sets

class pylada.dftcrystal.basis.BasisSet[source]

Bases: pylada.dftcrystal.input.AttrBlock

Basis set block.

Sub-block defining the basis set of the CRYSTAL calculation. In practice, it is composed of a dictionary which holds the description of each specie-dependent sets of guassians, and of keyword parameters, such as ghosts.

Currently, only the general basis sets have been implemented, via the Shell. The input looks as follows:

functional.basis['Si'] = [ Shell('s', a0=[16120.0,  0.001959],
                                      a1=[ 2426.0,  0.01493], 
                                      a2=[  553.9,  0.07285],
                                      a3=[  156.3,  0.2461], 
                                      a4=[   50.07, 0.4859],
                                      a5=[   17.02, 0.325]),
                           Shell('sp', a0=[292.7,   -0.002781, 0.004438],
                                       a1=[ 69.87,  -0.03571,  0.03267],
                                       a2=[ 22.34,  -0.115,    0.1347],
                                       a3=[  8.15,   0.09356,  0.3287],
                                       a4=[  3.135,  0.603,    0.4496]), 
                           Shell('sp', 4.0, a0=[1.22, 1.0, 1.0]),
                           Shell('sp', 0.0, a0=[0.55, 1.0, 1.0]),
                           Shell('sp', 0.0, a0=[0.27, 1.0, 1.0]) ]

 functional.basis.atomsymm = True

There are few moving parts to the code above.

Indexing: The basis set of each atomic function can be accessed equivalently via its atomic symbol (‘Si’), its name (‘Silicon’, first letter capitalized), or its atomic number. To create basis-sets with numbers greater than 100, then one should use the integer format only (e.g. 201, 301, ...) In practice, the indexing codes for same information as the first record of a basis set description.

List of orbitals: Each item of the list is a single set of orbitals. At present, only the general basis set has been implemented. The full description is given in Shell.

Usage and keywords:Unlike CRYSTAL, any number of species can be defined. Which should actually enter the input is determined at run-time. This makes it somewhat easier to define functionals for a whole set of calculations. Finally, other parameters from the basis-block are defined simply as attributes (see last line of code above). As with other input-blocks, additional keywords can be defined via add_keyword().

add_keyword(name, value=None)

Adds/Sets input keyword.

add_specie(string)[source]

Add specie using CRYSTAL string input.

Just a convenience function to quickly add species by copy/pasting crystal input.

Parameters:string (str) – Full CRYSTAL input for an atomic specie.
append(specie, shell)[source]

Adds shell to set.

items()[source]

Tuples (specie, basis-functions)

iteritems()[source]

Iterates over tuple (key, basis-functions).

keys()[source]

List of species.

iterkeys()[source]

Iterates over species.

values()[source]

List of basis functions,

itervalues()[source]

Iterates over basis-functions.

update(basis)[source]

Updates dictionary of basis-sets.

Overwrites existing species.

atomsymm = None

Prints point symmetry for each atomic position.

charged = None

Allows charged system.

chemod = None

Sets initial electronic occupation.

gaussian94[source]

Basis set in GAUSSIAN94 format

ghosts = None

Removes atoms but keeps basis functions.

This keyword should be in the basis subsection of the input. In practice, it can be set as follows:

>>> functional.basis.ghosts = [1, 3, 5], False

The second item means that symmetries are kept. This results in the following crystal input:

KEEPSYMM
GHOSTS
3
1 3 5

The first item in the tuple is a sequence of atomic lables (e.g. integers). The second is whether or not to break symmetries. It is True by default. In the above, symmetries are kept. Hence atoms equivalent those explicitely given are also removed.

The two attributes can also be obtained and set using value and breaksym:

>>> functional.basis.ghosts.breaksym
True
>>> functional.basis.ghosts.value
[1, 3, 5],
noprint = None

Disable basis set printing.

paramprt = None

Print code dimensions parameters.

symmops = None

Prints point symmetry operators/

class pylada.dftcrystal.basis.Shell(type='s', charge=None, **kwargs)[source]

Bases: object

Defines a general gaussian basis set for a specific orbital shell.

This class encodes a set of basis functions as follows.

Shell('s', a0=[16120.0,  0.001959],
           a1=[ 2426.0,  0.01493], 
           a2=[  553.9,  0.07285],
           a3=[  156.3,  0.2461], 
           a4=[   50.07, 0.4859],
           a5=[   17.02, 0.325], charge=0.0) 
Parameters:
  • type (str) – The first argument can be ‘s’, ‘p’, ‘d’, or ‘sp’ and defines the channel for the set of orbitals.
  • charge (float) – Number of electrons assigned to this orbital at the start of the calculation. It should not be greater than the number of electrons that particular orbital channel can accomodate. For ‘s’ it defaults to 2.0, for ‘p’ to 6, for ‘d’ to 10, and for ‘sp’ to 8.
  • a0 – First set of paramaters. For ‘s’, ‘p’, ‘d’ channels, this should be a sequence of two floats, where the first float is the exponent of the gaussian and the second the contraction coefficient. In the case of ‘sp’ orbitals, it should be a sequence of three floats, where the first is the common exponent, and the second and third are the contraction coefficients for ‘s’ and ‘p’ orbitals respectively.
  • aN – N-th set of orbital parameters.
append(alpha, coef1, coef2=None)[source]

Appends a gaussian to the basis set.

charge[source]

Nominal charge of the shell

functions = None

Radial functions description

raw[source]

Prints CRYSTAL input.

type[source]

Orbital type of this shell

type_as_int[source]

Orbital type as CRYSTAL input.

Previous topic

Geometry optimization block

Next topic

Computational and Hamiltonian parameters

This Page