Skip to main content

Localized-orbital Density Functional Theory code for educational purposes.

Project description

PyDFT

build PyPI License: GPL v3

[!NOTE]
Python based Density Functional Theory code for educational purposes. The documentation of PyDFT can be found here.

Purpose

PyDFT is a pure-Python package for performing localized-orbital DFT calculations using Gaussian Type Orbitals. PyDFT currently supports LDA and PBE exchange-correlation functionals. The purpose of PyDFT is mainly to serve as an educational tool to explain the inner workings of a DFT calculation. This program is not intended for professional calculations. It is not particularly fast nor offers a lot of features that more mature open-source of commercial packages offer. It does offer a unique insight into a working code and a considerable effort was made in documenting everything.

[!TIP]
Interested in other educational quantum chemical codes? Have a look at the packages below.

  • PyQInt is a hybrid C++/Python (Cython) code for performing Hartree-Fock calculations. This code contains many relevant features, such a geometry optimization, orbital localization and crystal orbital hamilton population analysis.
  • HFCXX is a full C++ code for performing Hartree-Fock calculations.
  • DFTCXX is a full C++ code for performing Density Functional Theory Calculations.

Features

Numerical integration using Becke grids

Electron-electron interaction terms (both classical as well as exchange-correlation) are performed by means of extensive numerical integration schemes performed over so-called Becke grids. Utilizing these grids, molecular integrals are decomposed into series of weighted atomic integrals.

Becke grids

Molecular orbital visualization

PyDFT can be readily used alongside matplotlib to make figures of molecular orbitals or density fields.

Molecular orbitals of CO

Extensive output

Internal matrices, e.g. overlap or Hamiltonian matrix, are exposed to the user and can be readily visualized using specific matrix visualization routines.

Matrices

Installation

This code depends on a few other packages. To install this code and its dependencies, run the following one-liner

pip install pydft pyqint pylebedev pytessel

Usage

Check the current version

import pydft
print(pydft.__version__)

Performing a simple calculation

from pydft import MoleculeBuilder, DFT

CO = MoleculeBuilder().get_molecule("CO")
dft = DFT(CO, basis='sto3g')
res = dft.scf(1e-4, verbose=True)
print("Total electronic energy: %f Ht" % res['energy'])

Community guidelines

License

Unless otherwise stated, all code in this repository is provided under the GNU General Public License version 3.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pydft-0.8.0-py3-none-any.whl (49.6 kB view details)

Uploaded Python 3

File details

Details for the file pydft-0.8.0-py3-none-any.whl.

File metadata

  • Download URL: pydft-0.8.0-py3-none-any.whl
  • Upload date:
  • Size: 49.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pydft-0.8.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f5ac1b5a6b0c18fc40af31dde538551706c36b87f7bb26bc1be25387225b85cf
MD5 ddd3ec4a092d9b9bc291ff835c991128
BLAKE2b-256 9d5f8252e56a647b4b55466f300bdfd7dbcdff51e175f3d2ca9610ca612018d5

See more details on using hashes here.

Provenance

The following attestation bundles were made for pydft-0.8.0-py3-none-any.whl:

Publisher: build_pypi.yml on ifilot/pydft

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page