{"id":16572308,"url":"https://github.com/jonocarroll/dirac","last_synced_at":"2026-03-18T20:36:23.657Z","repository":{"id":195928286,"uuid":"692632435","full_name":"jonocarroll/Dirac","owner":"jonocarroll","description":null,"archived":false,"fork":false,"pushed_at":"2023-09-20T03:44:14.000Z","size":1342,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-05T14:22:16.298Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Fortran","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jonocarroll.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-09-17T04:59:37.000Z","updated_at":"2023-09-20T03:45:15.000Z","dependencies_parsed_at":"2023-09-20T06:39:20.493Z","dependency_job_id":null,"html_url":"https://github.com/jonocarroll/Dirac","commit_stats":null,"previous_names":["jonocarroll/dirac"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jonocarroll/Dirac","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonocarroll%2FDirac","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonocarroll%2FDirac/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonocarroll%2FDirac/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonocarroll%2FDirac/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jonocarroll","download_url":"https://codeload.github.com/jonocarroll/Dirac/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonocarroll%2FDirac/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30279777,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-08T20:45:49.896Z","status":"ssl_error","status_checked_at":"2026-03-08T20:45:49.525Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6: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":[],"created_at":"2024-10-11T21:27:07.230Z","updated_at":"2026-03-09T01:31:10.384Z","avatar_url":"https://github.com/jonocarroll.png","language":"Fortran","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Dirac\n\n## Solve the Dirac Equation for Hydrogen (electron + proton)\n\n### Dr. Jonathan Carroll, PhD; Original ca 2010. Revised 2023.\n\nThis Fortran code was written to solve the Dirac equation for _muonic_ hydrogen, but has\nbeen retrofitted to solve for regular hydrogen. Some comments removing additional\nfunctionality remain for context or for re-use.\n\nA (draft?) copy of the research article relevant to this calculation is\n[included](https://github.com/jonocarroll/Dirac/blob/main/muH.pdf). This contains the \nrelevant equations and a brief explanation of the approach.\n\n## Running the program\n\n1. Download or clone this repository, e.g. `git clone git@github.com:jonocarroll/Dirac.git`\n1. Edit the `Makefile` to use whichever Fortran compiler you have. This has been tested with `gfortran`\n1. Ensure a clean start with `make clean` which removes all `.o` and `.mod` files as well as the compiled binary\n1. Compile the code with `make` (which automatically builds `make Dirac`)\n1. Run the program with `./Dirac` which will perform the integration and produce the `Wavefunctions.dat` data file. \n   This will take some time, but provides progress updates to the terminal\n1. Use your favourite plotting program to visualise the `F` and `G` components of the spinor\n\n![F and G components of the spinor](Wavefunction.png)\n\n## Editing Configuration\n\nTwo solvers are implemented; [Runge-Kutta](https://en.wikipedia.org/wiki/Runge%E2%80%93Kutta_methods)\nand [Adams-Bashforth](https://en.wikipedia.org/wiki/Linear_multistep_method#Adams%E2%80%93Bashforth_methods). These\nare selected by changing the\n[`solving_method` parameter](https://github.com/jonocarroll/Dirac/blob/d94cd1988a0e5ccef8351424acd57a1c5950981f/FindEigenvalue.f90#L31-L32).\n\nThe step-size, maximum number of iterations, and other shared parameters are found in the\n[shared.f90](https://github.com/jonocarroll/Dirac/blob/main/shared.f90) file. As this code was originally designed for\nmuonic hydrogen, many equations still refer to that, but I have set `m_muon = m_electron` as a shortcut to\nsolving for traditional hydrogen.\n\nThe Coulomb potential is set to the point distribution in [funcs.f90](https://github.com/jonocarroll/Dirac/blob/main/funcs.f90)\nbut this can be changed to a finite charge distribution if desired. Additional integration is required in that case, in which\ncase the additional required files are provided (as-is, without any cleanup) in the\n[integration/](https://github.com/jonocarroll/Dirac/tree/main/integration) subdirectory.\n\nThe 1s state is solved for by default, but this can be changed by setting the\n[`state`](https://github.com/jonocarroll/Dirac/blob/164fbcf5581fc054ed3b6c71de123a17e699e6db/FindEigenvalue.f90#L68)\nvariable. Three options are available; the 1s, 2s, and 2p states. Coding for additional states requires\nadjusting many parameters including the known number of nodes, etc...\n\n## Questions\n\nI'm happy to take questions, but keep in mind I haven't really worked on this for more than a dozen years, so\nmy memory of how all the pieces fit together is limited. You can contact me either via \n[Issues here](https://github.com/jonocarroll/Dirac/issues/new/choose) or my website, \n[jcarroll.com.au](https://jcarroll.com.au).\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonocarroll%2Fdirac","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjonocarroll%2Fdirac","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonocarroll%2Fdirac/lists"}