-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Documenter.jl
committed
Jan 4, 2025
1 parent
fd2c9be
commit 0afe43f
Showing
9 changed files
with
19 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
{"documenter":{"julia_version":"1.11.2","generation_timestamp":"2025-01-03T14:38:17","documenter_version":"1.8.0"}} | ||
{"documenter":{"julia_version":"1.11.2","generation_timestamp":"2025-01-04T03:00:16","documenter_version":"1.8.0"}} |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>Home · CGcoefficient.jl</title><meta name="title" content="Home · CGcoefficient.jl"/><meta property="og:title" content="Home · CGcoefficient.jl"/><meta property="twitter:title" content="Home · CGcoefficient.jl"/><meta name="description" content="Documentation for CGcoefficient.jl."/><meta property="og:description" content="Documentation for CGcoefficient.jl."/><meta property="twitter:description" content="Documentation for CGcoefficient.jl."/><script data-outdated-warner src="assets/warner.js"></script><link href="https://cdnjs.cloudflare.com/ajax/libs/lato-font/3.0.0/css/lato-font.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/juliamono/0.050/juliamono.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/fontawesome.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/solid.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/brands.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.16.8/katex.min.css" rel="stylesheet" type="text/css"/><script>documenterBaseURL="."</script><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js" data-main="assets/documenter.js"></script><script src="search_index.js"></script><script src="siteinfo.js"></script><script src="../versions.js"></script><link class="docs-theme-link" rel="stylesheet" type="text/css" href="assets/themes/catppuccin-mocha.css" data-theme-name="catppuccin-mocha"/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="assets/themes/catppuccin-macchiato.css" data-theme-name="catppuccin-macchiato"/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="assets/themes/catppuccin-frappe.css" data-theme-name="catppuccin-frappe"/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="assets/themes/catppuccin-latte.css" data-theme-name="catppuccin-latte"/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="assets/themes/documenter-dark.css" data-theme-name="documenter-dark" data-theme-primary-dark/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="assets/themes/documenter-light.css" data-theme-name="documenter-light" data-theme-primary/><script src="assets/themeswap.js"></script></head><body><div id="documenter"><nav class="docs-sidebar"><a class="docs-logo" href><img src="assets/logo.svg" alt="CGcoefficient.jl logo"/></a><div class="docs-package-name"><span class="docs-autofit"><a href>CGcoefficient.jl</a></span></div><button class="docs-search-query input is-rounded is-small is-clickable my-2 mx-auto py-1 px-2" id="documenter-search-query">Search docs (Ctrl + /)</button><ul class="docs-menu"><li class="is-active"><a class="tocitem" href>Home</a><ul class="internal"><li><a class="tocitem" href="#Install"><span>Install</span></a></li><li><a class="tocitem" href="#Usage"><span>Usage</span></a></li><li><a class="tocitem" href="#About"><span>About</span></a></li></ul></li><li><a class="tocitem" href="api/">API</a></li><li><span class="tocitem">Formula</span><ul><li><a class="tocitem" href="wigner/">Wigner Symbols</a></li><li><a class="tocitem" href="lsjj/">LS-jj recoupling</a></li><li><a class="tocitem" href="moshinsky/">Moshinsky</a></li><li><a class="tocitem" href="pfrational/">Prime Factorization</a></li></ul></li></ul><div class="docs-version-selector field has-addons"><div class="control"><span class="docs-label button is-static is-size-7">Version</span></div><div class="docs-selector control is-expanded"><div class="select is-fullwidth is-size-7"><select id="documenter-version-selector"></select></div></div></div></nav><div class="docs-main"><header class="docs-navbar"><a class="docs-sidebar-button docs-navbar-link fa-solid fa-bars is-hidden-desktop" id="documenter-sidebar-button" href="#"></a><nav class="breadcrumb"><ul class="is-hidden-mobile"><li class="is-active"><a href>Home</a></li></ul><ul class="is-hidden-tablet"><li class="is-active"><a href>Home</a></li></ul></nav><div class="docs-right"><a class="docs-navbar-link" href="https://github.com/0382/CGcoefficient.jl" title="View the repository on GitHub"><span class="docs-icon fa-brands"></span><span class="docs-label is-hidden-touch">GitHub</span></a><a class="docs-navbar-link" href="https://github.com/0382/CGcoefficient.jl/blob/master/docs/src/index.md" title="Edit source on GitHub"><span class="docs-icon fa-solid"></span></a><a class="docs-settings-button docs-navbar-link fa-solid fa-gear" id="documenter-settings-button" href="#" title="Settings"></a><a class="docs-article-toggle-button fa-solid fa-chevron-up" id="documenter-article-toggle-button" href="javascript:;" title="Collapse all docstrings"></a></div></header><article class="content" id="documenter-page"><h1 id="Home"><a class="docs-heading-anchor" href="#Home">Home</a><a id="Home-1"></a><a class="docs-heading-anchor-permalink" href="#Home" title="Permalink"></a></h1><p>A package to calculate CG-coefficient, Racha coefficient, and Wigner 3j, 6j, 9j symbols. We offer two versions of API for all these coefficients.</p><ol><li>The exact functions return <code>SqrtRational</code>, which are designed for demonstration. They use <code>BigInt</code> in the internal calculation, and do not cache the binomial table, so they are not efficient.</li><li>The floating-point functions return <code>Float64</code>, which are designed for numeric calculation. They use <code>Int, Float64</code> in the internal calculation, and you should pre-call <a href="api/#CGcoefficient.wigner_init_float"><code>wigner_init_float</code></a> to calculate and cache the binomial table for later calculation. They may give inaccurate result for vary large angular momentum, due to floating-point arithmetic. You can find the max error at here: <a href="https://github.com/0382/wigner-benchmark">wigner-benchmark</a>.</li></ol><h2 id="Install"><a class="docs-heading-anchor" href="#Install">Install</a><a id="Install-1"></a><a class="docs-heading-anchor-permalink" href="#Install" title="Permalink"></a></h2><p>Just install with Julia REPL and enjoy it.</p><pre><code class="language-julia-repl hljs">pkg> add CGcoefficient</code></pre><h2 id="Usage"><a class="docs-heading-anchor" href="#Usage">Usage</a><a id="Usage-1"></a><a class="docs-heading-anchor-permalink" href="#Usage" title="Permalink"></a></h2><pre><code class="language-julia hljs">using CGcoefficient | ||
sixJ(1,2,3,4,5,6)</code></pre><p class="math-container">\[\frac{1}{3}\sqrt{\frac{2}{715}}\]</p><p>In a markdown enviroment, such as jupyter notebook, it will give you a latex output. You can also do some arithmetics with the result, thus do arithmetics using the <code>SqrtRational</code> type.</p><pre><code class="language-julia hljs">x = sixJ(1,2,3,4,5,6) * exact_sqrt(1//7) * exact_sqrt(1//13) * iphase(2+3+5+6)</code></pre><p class="math-container">\[\frac{1}{3}\sqrt{\frac{2}{65065}}\]</p><p>The result is not simplified by default, you can use <code>simplify</code> function to simplify it.</p><pre><code class="language-julia hljs">simplify(x)</code></pre><p class="math-container">\[\frac{1}{39}\sqrt{\frac{2}{385}}\]</p><p>In a console enviroment it will give out a text output.</p><pre><code class="language-julia-repl hljs" style="display:block;">julia> nineJ(1,2,3,5,4,3,6,6,0)</code><code class="nohighlight hljs ansi" style="display:block;">1//39√(2//385)</code></pre><p>You can convert a <code>SqrtRational</code> in to <code>BigFloat</code>,</p><pre><code class="language-julia hljs">t = sixJ(17/2,9,19/2,15/2,10,15/2) | ||
float(t)</code></pre><pre class="documenter-example-output"><code class="nohighlight hljs ansi">0.006625060239168051702701949513657948806045797449799216745233646948167908577160755</code></pre><p>Calling <code>wigner_init_float</code> first to pre-calculate and cache binomial table.</p><pre><code class="language-julia hljs">wigner_init_float(10, "Jmax", 6)</code></pre><p>Then call a float version function</p><pre><code class="language-julia hljs">f6j(17,18,19,15,20,15)</code></pre><pre class="documenter-example-output"><code class="nohighlight hljs ansi">0.006625060239168052</code></pre><h2 id="About"><a class="docs-heading-anchor" href="#About">About</a><a id="About-1"></a><a class="docs-heading-anchor-permalink" href="#About" title="Permalink"></a></h2><p>This package is inspired by Ref <sup class="footnote-reference"><a id="citeref-1" href="#footnote-1">[1]</a></sup>. See <a href="https://github.com/ManyBodyPhysics/CENS/blob/master/MBPT/VEffective/bhf-modules.f90">CENS-MBPT</a> for details.</p><p>The idea is to simplify 3nj Symbols to sum combinations of binomial coefficients. We can calculate binomial coefficients by Pascal's Triangle, and store them first. Then we calculate 3nj Symbols using the stored binomial coefficients.</p><p>In this package, we just use the builtin <code>binomial</code> function for exact calculation. Only the float version uses stored <code>binomial</code>s.</p><section class="footnotes is-size-7"><ul><li class="footnote" id="footnote-1"><a class="tag is-link" href="#citeref-1">1</a>T. Engeland and M. Hjorth-Jensen, the Oslo-FCI code. <a href="https://github.com/ManyBodyPhysics/CENS">https://github.com/ManyBodyPhysics/CENS</a>.</li></ul></section></article><nav class="docs-footer"><a class="docs-footer-nextpage" href="api/">API »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="auto">Automatic (OS)</option><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="catppuccin-latte">catppuccin-latte</option><option value="catppuccin-frappe">catppuccin-frappe</option><option value="catppuccin-macchiato">catppuccin-macchiato</option><option value="catppuccin-mocha">catppuccin-mocha</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.8.0 on <span class="colophon-date" title="Friday 3 January 2025 14:38">Friday 3 January 2025</span>. Using Julia version 1.11.2.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html> | ||
float(t)</code></pre><pre class="documenter-example-output"><code class="nohighlight hljs ansi">0.006625060239168051702701949513657948806045797449799216745233646948167908577160755</code></pre><p>Calling <code>wigner_init_float</code> first to pre-calculate and cache binomial table.</p><pre><code class="language-julia hljs">wigner_init_float(10, "Jmax", 6)</code></pre><p>Then call a float version function</p><pre><code class="language-julia hljs">f6j(17,18,19,15,20,15)</code></pre><pre class="documenter-example-output"><code class="nohighlight hljs ansi">0.006625060239168052</code></pre><h2 id="About"><a class="docs-heading-anchor" href="#About">About</a><a id="About-1"></a><a class="docs-heading-anchor-permalink" href="#About" title="Permalink"></a></h2><p>This package is inspired by Ref <sup class="footnote-reference"><a id="citeref-1" href="#footnote-1">[1]</a></sup>. See <a href="https://github.com/ManyBodyPhysics/CENS/blob/master/MBPT/VEffective/bhf-modules.f90">CENS-MBPT</a> for details.</p><p>The idea is to simplify 3nj Symbols to sum combinations of binomial coefficients. We can calculate binomial coefficients by Pascal's Triangle, and store them first. Then we calculate 3nj Symbols using the stored binomial coefficients.</p><p>In this package, we just use the builtin <code>binomial</code> function for exact calculation. Only the float version uses stored <code>binomial</code>s.</p><section class="footnotes is-size-7"><ul><li class="footnote" id="footnote-1"><a class="tag is-link" href="#citeref-1">1</a>T. Engeland and M. Hjorth-Jensen, the Oslo-FCI code. <a href="https://github.com/ManyBodyPhysics/CENS">https://github.com/ManyBodyPhysics/CENS</a>.</li></ul></section></article><nav class="docs-footer"><a class="docs-footer-nextpage" href="api/">API »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="auto">Automatic (OS)</option><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="catppuccin-latte">catppuccin-latte</option><option value="catppuccin-frappe">catppuccin-frappe</option><option value="catppuccin-macchiato">catppuccin-macchiato</option><option value="catppuccin-mocha">catppuccin-mocha</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.8.0 on <span class="colophon-date" title="Saturday 4 January 2025 03:00">Saturday 4 January 2025</span>. Using Julia version 1.11.2.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html> |
Oops, something went wrong.