1
0
mirror of https://github.com/TREX-CoE/qmc-lttc.git synced 2024-12-22 04:15:01 +01:00

Fixed Python code

This commit is contained in:
Anthony Scemama 2021-01-21 12:49:12 +01:00
parent c9696b0944
commit 4583a51266
2 changed files with 28 additions and 5 deletions

29
QMC.org
View File

@ -3,9 +3,32 @@
# SETUPFILE: https://fniessen.github.io/org-html-themes/org/theme-readtheorg.setup # SETUPFILE: https://fniessen.github.io/org-html-themes/org/theme-readtheorg.setup
# SETUPFILE: https://fniessen.github.io/org-html-themes/org/theme-bigblow.setup # SETUPFILE: https://fniessen.github.io/org-html-themes/org/theme-bigblow.setup
#+STARTUP: latexpreview #+STARTUP: latexpreview
#+LATEX_CLASS: report
#+LATEX_HEADER_EXTRA: \usepackage{minted}
#+HTML_HEAD: <link rel="stylesheet" title="Standard" href="worg.css" type="text/css" /> #+HTML_HEAD: <link rel="stylesheet" title="Standard" href="worg.css" type="text/css" />
#+OPTIONS: H:2 num:t toc:nil \n:nil @:t ::t |:t ^:t -:t f:t *:t <:t
#+OPTIONS: TeX:t LaTeX:t skip:nil d:nil todo:t pri:nil tags:not-in-toc
#+EXPORT_EXCLUDE_TAGS: solution
#+BEGIN_SRC elisp :output none :exports none
(setq org-latex-listings 'minted
org-latex-packages-alist '(("" "minted"))
org-latex-pdf-process
'("pdflatex -shell-escape -interaction nonstopmode -output-directory %o %f"
"pdflatex -shell-escape -interaction nonstopmode -output-directory %o %f"
"pdflatex -shell-escape -interaction nonstopmode -output-directory %o %f"))
(setq org-latex-minted-options '(("breaklines" "true")
("breakanywhere" "true")))
(setq org-latex-minted-options
'(("frame" "lines")
("fontsize" "\\scriptsize")
("linenos" "")))
(org-beamer-export-to-pdf)
#+END_SRC
#+RESULTS:
: /home/scemama/TREX/qmc-lttc/QMC.pdf
* Introduction * Introduction
@ -1159,8 +1182,8 @@ def MonteCarlo(a,tau,nmax):
d_old = d_new d_old = d_new
d2_old = d2_new d2_old = d2_new
psi_old = psi_new psi_old = psi_new
N += 1. N += 1.
E += e_loc(a,r_old) E += e_loc(a,r_old)
return E/N, accep_rate/N return E/N, accep_rate/N

View File

@ -27,8 +27,8 @@ def MonteCarlo(a,tau,nmax):
d_old = d_new d_old = d_new
d2_old = d2_new d2_old = d2_new
psi_old = psi_new psi_old = psi_new
N += 1. N += 1.
E += e_loc(a,r_old) E += e_loc(a,r_old)
return E/N, accep_rate/N return E/N, accep_rate/N