{"id":28252938,"url":"https://github.com/theozeud/atomickohnsham","last_synced_at":"2026-02-17T04:32:55.875Z","repository":{"id":241360301,"uuid":"801951244","full_name":"Theozeud/AtomicKohnSham","owner":"Theozeud","description":"Solver to compute the groundstate of atoms and ions formulated in the Extended-Kohn-Sham framework.","archived":false,"fork":false,"pushed_at":"2026-01-27T16:28:55.000Z","size":19817,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-01-28T01:43:00.479Z","etag":null,"topics":["atoms","computational-chemistry","density-functional-theory","finite-element-methods","ions","julia","kohn-sham"],"latest_commit_sha":null,"homepage":"https://theozeud.github.io/AtomicKohnSham/","language":"Julia","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Theozeud.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-05-17T08:25:47.000Z","updated_at":"2026-01-27T16:28:59.000Z","dependencies_parsed_at":"2024-07-08T14:18:21.208Z","dependency_job_id":"f03eef90-6564-41a5-a993-4c30c6e4f3b9","html_url":"https://github.com/Theozeud/AtomicKohnSham","commit_stats":null,"previous_names":["theozeud/kohnshamresolution","theozeud/atomickohnsham"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Theozeud/AtomicKohnSham","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Theozeud%2FAtomicKohnSham","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Theozeud%2FAtomicKohnSham/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Theozeud%2FAtomicKohnSham/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Theozeud%2FAtomicKohnSham/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Theozeud","download_url":"https://codeload.github.com/Theozeud/AtomicKohnSham/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Theozeud%2FAtomicKohnSham/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29533702,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-17T03:01:11.216Z","status":"ssl_error","status_checked_at":"2026-02-17T03:00:31.803Z","response_time":100,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["atoms","computational-chemistry","density-functional-theory","finite-element-methods","ions","julia","kohn-sham"],"created_at":"2025-05-19T16:17:08.733Z","updated_at":"2026-02-17T04:32:55.859Z","avatar_url":"https://github.com/Theozeud.png","language":"Julia","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AtomicKohnSham.jl\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"assets/logov1.png\" style=\"width: 20%; height: auto;\"\u003e\n\u003c/p\u003e\n\n[![Build Status](https://github.com/Theozeud/AtomicKohnSham/actions/workflows/CI.yml/badge.svg?branch=master)](https://github.com/Theozeud/AtomicKohnSham/actions/workflows/CI.yml?query=branch%3Amain)\n[![Coverage](https://codecov.io/gh/Theozeud/AtomicKohnSham/branch/master/graph/badge.svg)](https://codecov.io/gh/Theozeud/AtomicKohnSham)\n![License](https://img.shields.io/badge/license-MIT-blue.svg)\n[![SciML Code Style](https://img.shields.io/static/v1?label=code%20style\u0026message=SciML\u0026color=9558b2\u0026labelColor=389826)](https://github.com/SciML/SciMLStyle)\n\n**AtomicKohnSham.jl** is a Julia package designed to **compute the ground state of isolated atoms and ions** within the framework of **Extended Kohn-Sham models**. Originally developed to investigate the existence of negative ions, the code can also serve as a versatile tool for testing new density functionals and exploring numerical precision issues.\n\n## Installation \n\nYou can install the package via Julia's package manager:\n```julia\n] add AtomicKohnSham\n```\n## Overview \n\nExtended Kohn-Sham models involve solving nonlinear eigenvalue PDEs in 3D, where the Kohn–Sham potential depends on a finite set of eigenfunctions. The standard approach applies a fixed-point (Self-Consistent Field, SCF) iteration, alternating with eigenvalue solves.\n\nAssuming spherical symmetry, the eigenvalue problem can be reduced to a family of radial 1D equations. This package implements a **high-precision finite element method (FEM)** for solving these equations, using **polynomials of degree up to 20** on exponential meshes. This approach allows for highly accurate results with relatively few mesh points, often outperforming low-order methods on refined meshes.\n\nThe code supports both **double (Float64)** and **quadruple (Double64)** floating-point precision. This level of precision is crucial for resolving subtle numerical questions that remain open in the literature. For example, in certain Extended Kohn–Sham models, it is still unclear whether the energy of the outermost orbital in some atoms is exactly zero or simply very close to zero but negative—a distinction that this package is designed to investigate numerically.\n\n## Key Features\nCurrently supported functionalities:\n\n- **SCF Algorithms:** CDA | ODA | Quadratic  \n- **Symmetry:** Spherical → radial  \n- **FEM Basis:** Integrated Legendre polynomials (order ≤ 20)  \n- **Exchange–Correlation:** LDA, LSDA  \n- **Mesh Types:** Linear, Geometric, Exponential  \n- **Precision:** Float64 (double), Double64 (quadruple)\n\n## Recommendations\nBased on our experiments, the following setup provides excellent results:\n- Use an exponential mesh with a parameter between 1 and 2.\n- Combine it with the Integrated Legendre polynomial basis of order up to 20.\n  \nThis combination offers a good balance between numerical accuracy and computational efficiency.\n\n## Notes :\n- Currently, only one FEM basis has been implemented. However, adding a new one is straightforward, as all FEM matrix assemblies are handled automatically\n\n\n- Higer precision should works but this has not been thoroughly tested.\n\n## Example\n\nHere is one example on the hydrogen atom with the Slater exchange. You can directly create the whole problem with\nall parameters.\n```julia\nproblem = AtomProblem(;\n                       # MODEL PARAMETERS\n                       \n                       z = 1,                               # Nuclear Charge\n                       N = 1,                               # Number of electrons\n                       ex = Functional(:lda_x, n_spin = 1), # Exchange Functional\n                       ec = NoFunctional(1),                # Correlation Functional\n\n                       # DISCRETIZATION PARAMETERS\n                       lh = 0,                              # Angular momentum cutoff       \n                       Nmesh = 10,                          # Number of points of the mesh\n                       Rmax = 300,                          # Radial domain cutoff\n\n                       typemesh = expmesh,                  # How the mesh is generated\n                       optsmesh = (s = 1.5,),               # Options to this generation\n\n                       typebasis = P1IntLegendreBasis,      # Choice of FEM Basis\n                       optsbasis = (ordermax = 10,),        # Polynomials up to order 10.\n\n                       integration_method = GaussLegendre,  # Method for integrals quadrature\n                       optsintegration = (npoints = 1000,)  # Options for this method\n\n                       # ALGORITHMS\n                       alg = ODA(0.4),                      # SCF alg : Optimal Dampling\n\n                       # SOLVER OPTIONS\n                       T = Float64,                         # Data type for computations\n                       scftol = 1e-11,                      # SCF Tolerance\n                       maxiter = 100,                       # Max number of SCF iterations\n                       degen_tol = 1e-2,                    # Tolerance between orbital\n                                                            # energies to detect degeneracy\n                       verbose = 0)                         # Verbosity level: \n                                                            # 0 = silent, 3 = maximum verbosity\n``` \nAdditional options are available but have been omitted here for simplicity.\n\nThen, you can find the groundstate :\n\n```julia\nsol = groundstate(problem)\n\njulia\u003e sol\nName : Hydrogen\nSucess = SUCCESS\nniter = 20\nStopping criteria = 7.588619340831631e-12\nAll Energies :\n            Ekin = 0.40653407924275053 \n            Ecou = -0.9000752043172076 \n            Ehar = 0.27492250294985154 \n            Eexc = -0.1879154570959805 \n            Etot = -0.40653407922058604 \nOccupation number = \n            1s : (-0.19425006196620562,1.0) \n``` \nThe associated density can be plotted with a logarithmic y-axis: \n\n![](assets/readme_density.png)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheozeud%2Fatomickohnsham","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftheozeud%2Fatomickohnsham","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheozeud%2Fatomickohnsham/lists"}