-
Notifications
You must be signed in to change notification settings - Fork 11
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
0 parents
commit 70038c9
Showing
20 changed files
with
4,372 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.ipynb_checkpoints/ | ||
*~ | ||
.*.swp |
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 |
---|---|---|
@@ -0,0 +1,106 @@ | ||
{ | ||
"cells": [ | ||
{ | ||
"cell_type": "markdown", | ||
"id": "statewide-honey", | ||
"metadata": {}, | ||
"source": [ | ||
"# A mathematical look at electronic structure theory" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"id": "dried-concrete", | ||
"metadata": {}, | ||
"source": [ | ||
"## About this workshop\n", | ||
"\n", | ||
"<img src=\"img/dftkfields.png\" width=40% align=\"right\" />\n", | ||
"\n", | ||
"- Electronic structure theory is a fascinating interdisciplinary field\n", | ||
"- Why bother? -> See [my JuliaCon 2020 talk](https://www.youtube.com/watch?v=-RomkxjlIcQ)\n", | ||
"\n", | ||
"\n", | ||
"- Multiple philosophies and general approaches exist\n", | ||
"- Focus of this workshop:\n", | ||
" * Solid-state problems (crystals, lattices, ...)\n", | ||
" * Plane-wave discretisations\n", | ||
" * Density functional theory (DFT)\n", | ||
" * Highly successful, but still many open mathematical problems\n", | ||
"\n", | ||
"\n", | ||
"- Topics:\n", | ||
" * Specialities of periodic problems\n", | ||
" * Mathematical formulation of the DFT\n", | ||
" * Numerical solution using the self-consistent field (SCF) procedure\n", | ||
" * Numerical tools for analysis and understanding convergence\n", | ||
" * Opportunities for modern software programming techniques (tracking floating-point error, automatic differentation).\n", | ||
"\n", | ||
"\n", | ||
"- Goals:\n", | ||
" * Allow applied mathematicians to gain access to the topic\n", | ||
" * Allow practitioners to deepen mathematical insight\n", | ||
" * Introduce the [density-functional toolkit](https://dftk.org)\n", | ||
" and its interplay with the Julia package ecosystom." | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"id": "several-receipt", | ||
"metadata": {}, | ||
"source": [ | ||
"## Whoami and whoareyou?\n", | ||
"\n", | ||
"* Michael F. Herbst\n", | ||
" - Postdoc at Applied and Computational Mathematics departmant at RWTH Aachen University\n", | ||
" - Chemistry background, but worked in maths departments for the past few years\n", | ||
" - Active Julia user since about Julia 0.6\n", | ||
" \n", | ||
" \n", | ||
" - Email: [email protected]\n", | ||
" - Web: https://michael-herbst.com\n", | ||
" \n", | ||
" \n", | ||
"* So who are you?\n", | ||
" - Quick poll: http://etc.ch/rWup" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"id": "representative-employment", | ||
"metadata": {}, | ||
"source": [ | ||
"## Some general remarks\n", | ||
"\n", | ||
"- The examples in this notebook were primarily chosen to be quick to run and yield mathematical insight. In particular:\n", | ||
" * Parameters will not give fully converged results\n", | ||
" * Not all examples make physical sense (i.e. it might be better to model things differently in practice)\n", | ||
"\n", | ||
"\n", | ||
"- I have prepared:\n", | ||
" * Some theory\n", | ||
" * Many examples\n", | ||
" * Short exercises \n", | ||
" \n", | ||
" \n", | ||
"- This is meant to be interactive:\n", | ||
" * Please ask questions ..." | ||
] | ||
} | ||
], | ||
"metadata": { | ||
"kernelspec": { | ||
"display_name": "Julia 1.6.1", | ||
"language": "julia", | ||
"name": "julia-1.6" | ||
}, | ||
"language_info": { | ||
"file_extension": ".jl", | ||
"mimetype": "application/julia", | ||
"name": "julia", | ||
"version": "1.6.1" | ||
} | ||
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 5 | ||
} |
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 |
---|---|---|
@@ -0,0 +1,140 @@ | ||
{ | ||
"cells": [ | ||
{ | ||
"cell_type": "markdown", | ||
"id": "burning-pharmacology", | ||
"metadata": {}, | ||
"source": [ | ||
"# Installation and setup" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"id": "coated-execution", | ||
"metadata": {}, | ||
"source": [ | ||
"## Requirements\n", | ||
"\n", | ||
"- **Julia $\\geq$ 1.6**\n", | ||
"- Some working python setup\n", | ||
"\n", | ||
"These notes have been made targeting DFTK 0.3.9." | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"id": "mysterious-snake", | ||
"metadata": {}, | ||
"source": [ | ||
"## Jupyter notebooks\n", | ||
"\n", | ||
"To get these notebooks run from a shell as usual:\n", | ||
"```shell\n", | ||
"$ git clone https://github.com/mfherbst/juliacon_dft_workshop.git\n", | ||
"```" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"id": "permanent-syndication", | ||
"metadata": {}, | ||
"source": [ | ||
"## 1. Julia dependencies\n", | ||
"\n", | ||
"Either instantiate the Manifest of this git repository or run the following code to install the packages needed for this workshop:" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"id": "automotive-citizen", | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"using Pkg\n", | ||
"Pkg.add([\n", | ||
"\"DFTK\", \"DoubleFloats\", \"FiniteDiff\", \"ForwardDiff\",\n", | ||
"\"GenericLinearAlgebra\", \"Infiltrator\", \"IntervalArithmetic\",\n", | ||
"\"KrylovKit\", \"LineSearches\", \"NLsolve\", \"Plots\", \"PyCall\",\n", | ||
"\"Unitful\", \"UnitfulAtomic\"\n", | ||
"])" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"id": "baking-young", | ||
"metadata": {}, | ||
"source": [ | ||
"## 2. Python dependencies\n", | ||
"\n", | ||
"DFTK has a python dependency, that is unfortunately required for a few tasks. We are [currently working](https://github.com/JuliaMolSim/DFTK.jl/issues/483) on switching to a pure-Julia solution, however.\n", | ||
"\n", | ||
"But for the moment you need to install `pymatgen`.\n", | ||
"\n", | ||
"- If you use `Conda.jl`, the DFTK build script has already installed this package to Julia's conda environment.\n", | ||
"\n", | ||
"- If you use `pip` to manage your packages, run:" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"id": "experimental-fifty", | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"using PyCall\n", | ||
"if !isempty(PyCall.python)\n", | ||
" run(`$(PyCall.python) -m pip install pymatgen`)\n", | ||
"end" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"id": "opponent-federal", | ||
"metadata": {}, | ||
"source": [ | ||
"- If you use an external conda environment then install `pymatgen` from the `conda-forge` channel." | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"id": "american-hello", | ||
"metadata": {}, | ||
"source": [ | ||
"## 3. Verify things are working\n", | ||
"\n", | ||
"Run this code to see the relevant packages can be found:" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"id": "stuffed-motion", | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"using PyCall\n", | ||
"@show pyimport(\"pymatgen\").__name__ # \"pymatgen\"\n", | ||
"\n", | ||
"using DFTK\n", | ||
"DFTK.setup_threading() # Prints some threading info" | ||
] | ||
} | ||
], | ||
"metadata": { | ||
"kernelspec": { | ||
"display_name": "Julia 1.6.1", | ||
"language": "julia", | ||
"name": "julia-1.6" | ||
}, | ||
"language_info": { | ||
"file_extension": ".jl", | ||
"mimetype": "application/julia", | ||
"name": "julia", | ||
"version": "1.6.1" | ||
} | ||
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 5 | ||
} |
Oops, something went wrong.