9th international ABINIT developer workshop
20-22nd May 2019 - Louvain-la-Neuve, Belgium
Use the Space key to navigate through all slides.
Dependencies listed in ~abinit/requirements.txt. Must be installed manually with pip
JS/CSS libraries are downloaded by the browser at runtime. Well, we are building a website so I assume you have an internet connection 🤦♂️ 🤦♀️
Order, title, and nesting of each page in the navigation header specified in mkdocs.yml:
site_name: abinit
pages:
- Home: index.md
- About: about.md
cd ~abinit
pip install -r requirements.txt [--user]
./mksite.py serve --dirtyreload
Regenerating database...
Saving database to /Users/gmatteo/git_repos/abidocs/doc/tests/test_suite.cpkl
Initial website generation completed in 9.17 [s]
Generating markdown files with input variables of code: `abinit`...
...
...
INFO - Building documentation...
INFO - Cleaning site directory
[I 170826 03:37:05 server:283] Serving on http://127.0.0.1:8000
[I 170826 03:37:05 handlers:60] Start watching changes
[I 170826 03:37:05 handlers:62] Start detecting changes
pages:
- Tutorial:
- Overview: tutorial/index.md
- Base Tutorials:
- Base1: tutorial/base1.md
- Base2: tutorial/base2.md
$ head ~abinit/doc/developers/markdown.md
---
authors: MG, XG
plotly: true
---
Metavariables are stored in page.meta
For our markdown dialect, see https://docs.abinit.org/developers/markdown/
Excerpt of ~abinit_theme/main.html
{% extends "base.html" %} <!-- Reuse base template from mkdocs-material -->
{% block libs %}
{{ super() }} <!-- Include libs defined in the super class -->
<!-- Add MathJax support -->
<script type="text/javascript" async
src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_SVG">
</script>
<!-- Add plotly support if "plotly" in page metavariables -->
{% if page.meta and page.meta.plotly %}
<script type="text/javascript" src="https://cdn.plot.ly/plotly-latest.min.js"></script>
{% endif %}
{% endblock %}
{% block content %}
{{ super() }} <!-- HTML content generated from MD file goes here -->
<!-- Add dropdown button with toolbar and return to Top button -->
<div class="md-container"> HERE BE HTML 🐲🐲🐲 </div>
{% endblock %}
[See here](http://bfy.tw/P9e)
[[token]]
regexSyntax: [[namespace:name#fragment|text]]
TEST_INFO
$...$
for inlined LaTeX formula.$$...$$
for display mode: formula rendered on one line without label.\begin{equation}\label{eq:my_awesome_result}
1 + 1 = 3
\end{equation}
Using Eq.(\ref{eq:my_awesome_result}), one obtains...
<script type="text/javascript" async
src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_SVG">
</script>
<!--
Configure MathJax to produce automatic equation numbers
See http://docs.mathjax.org/en/latest/tex.html
-->
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
TeX: {
equationNumbers: { autoNumber: "AMS" },
extensions: ["AMSmath.js"],
// Hic sunt Macros
Macros: {
GG: "{\\bf G}",
kk: "{\\bf k}",
qq: "{\\bf q}",
kq: "{\\kk + \\qq}",
// PAW
tpsi: "{\\tilde\\psi}",
tphi: "{\\tilde\\phi}",
tprj: "{\\tilde p}"
}
}
});
</script>
_AbiPy.md
.{{ variables }}
:---
description: How to to perform a Δ-SCF calculation of neutral excitations
authors: FJ
---
Hints on how to to perform a Δ-SCF calculation of neutral excitations.
## Introduction
Although formally not justified, difference in total energy using constrained
occupation numbers sometimes results in surprisingly good agreement with
experimental neutral excitations. See e.g. [[cite:Jia2017]].
## Related Input Variables
{{ related_variables }}
## Selected Input Files
{{ selected_input_files }}
# Build database with all input variables indexed by code name.
codevars = get_codevars()
ecut_var = codevars["abinit"]["ecut"]
for var in codevars.iter_allvars():
print("Metadata:", var.name, var.varset, var.executable)
print("Documentation in MD format:", var.text)
url = "/variables/%s#%s" % (var.varset, var.name)
for test in all_abinit_tests:
vd = codevars[test.executable]
for vname in test.get_varnames(list(vd.keys())):
var = vd[vname]
var.tests.append(test)
Variable(
abivarname="accuracy",
varset="basic",
vartype="integer",
topics=['Planewaves_basic', 'SCFControl_basic'],
dimensions="scalar",
defaultval=0,
mnemonics="ACCURACY",
text=r"""
Allows to tune the accuracy of a calculation according to the following table:
accuracy | 1 | 2 | 3 | 4
--- |--- |--- |--- |---
[[ecut]] | E_min | E_med | E_med | E_max
[[pawecutdg]] | ecut | ecut | 1.2 * ecut | 1.5 * ecut
[[fband]] | 0.5 | 0.5 | 0.5 | 0.5
*accuracy* = 4 corresponds to the default tuning of ABINIT. It is already a very accurate tuning.
""",
),
$ betterbib-doi2bibtex 10.1103/PhysRevLett.96.066402
@article{Amadon2008,
author = {Amadon, B. and Biermann, S. and Georges, A. and Aryasetiawan, F.},
doi = {10.1103/physrevlett.96.066402},
issn = {0031-9007, 1079-7114},
journal = {Physical Review Letters},
month = feb,
number = {6},
publisher = {American Physical Society (APS)},
source = {Crossref},
title = {{The α−γ Transition} of Cerium Is Entropy Driven},
url = {http://dx.doi.org/10.1103/physrevlett.96.066402},
volume = {96},
year = {2006}
}
[[cite:Amadon2008]] produces a link to one of the entries in the bibliography page...
%embed https://docs.abinit.org/theory/bibliography/#amadon2008
ROOT/theory/bibliography/#amadon2008
is an example of permalink ...
A permalink is a URL that is intended to remain unchanged for many years into the future, yielding a hyperlink that is less susceptible to link rot (wikipedia)
Good news: we don't need to master all this stuff, we mainly interact with MD extensions 🎉
Still, we need human supervision to be sure the HTML looks OK so, please, build the website on your machine before git push!
Pull request won't be accepted if:
## Abinit extensions
To create a button that opens a dialog containing the input file, use:
{% dialog tests/v1/Input/t01.in %}
%embed https://docs.abinit.org/developers/markdown#abinit-extensions