7. API

7.1. chilli_py

This is a pure Python self-consistent field code utilizing
Gaussian-type orbitals (GTOs).
Thus you will find only source code written
in this package in Python and no other language.

by Sebastian Schwalbe and Kai Trepte

7.2. How to use

>>> from chilli_py import simple_run
>>> simple_run.run("H2","RHF")
class chilli_py.Atoms(sym, pos, spin=0, charge=0)[source]

Atoms class Contains variables describing the system.

Input
  • sym: list(str), chemical symbols

  • pos: list(list(3,), positions

  • spin: int(), spin of the system

  • charge: int(), charge of the system

show()[source]

Show the representation of a class instance.

class chilli_py.BasisSet[source]

BasisSet class Construct for atoms object the CGBF basis.

add(bf)[source]

Add new basis function (bf) to basis. For Gaussians bf is a CGBF.

static initialize(atoms, basis_name='sto-3g')[source]

Initialize a BasisSet instance from a basis name.

Input
  • atoms: Atoms(), chilli_pys Atoms object

  • basis_name: str(), basis set name, e.g., “sto-3g”

show()[source]

Show the representation of the instance.

class chilli_py.Grids(atoms, n_rad, n_ang, **kwargs)[source]

Grids class Produce a real-space grid (optimal) for Gaussian integrals.

Input
  • atoms: Atoms()

  • n_rad: int()

  • n_ang: int()

eval(basis)[source]

Evaluate basis on grid.

get_grad(D)[source]
get_grid()[source]

For all atoms in the system a atomic grid is produced and combined to a system grid (real-space grid).

get_rho(D)[source]

Get rho(r) from density matrix D using the basis evaluated on the grid basis_ongrid.

get_sigma(grad)[source]
grad(basis)[source]
class chilli_py.RHF(atoms, basis_name='sto-3g', **kwargs)[source]

RHF class Restricted Hartree-Fock (RHF) class.

Input
  • atoms

  • basis

class chilli_py.RKS(atoms, basis_name='sto-3g', grids=(100, 110), **kwargs)[source]

RKS class Restricted Kohn-Sham (RKS). Performs a RKS calculation.

Input
  • atoms: Atoms()

  • basis_name: str(), basis set name

  • grids: tuple(), e.g., (100,110)

kernel()[source]

Kernel function executing the self-consistent field calculation.