From 4583a51266f6c485a6c23a9fc76aa3f030526c95 Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Thu, 21 Jan 2021 12:49:12 +0100 Subject: [PATCH] Fixed Python code --- QMC.org | 29 ++++++++++++++++++++++++++--- vmc_metropolis.py | 4 ++-- 2 files changed, 28 insertions(+), 5 deletions(-) diff --git a/QMC.org b/QMC.org index 286e3f4..c77214e 100644 --- a/QMC.org +++ b/QMC.org @@ -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-bigblow.setup #+STARTUP: latexpreview - +#+LATEX_CLASS: report +#+LATEX_HEADER_EXTRA: \usepackage{minted} #+HTML_HEAD: +#+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 @@ -1159,8 +1182,8 @@ def MonteCarlo(a,tau,nmax): d_old = d_new d2_old = d2_new psi_old = psi_new - N += 1. - E += e_loc(a,r_old) + N += 1. + E += e_loc(a,r_old) return E/N, accep_rate/N diff --git a/vmc_metropolis.py b/vmc_metropolis.py index d22c8cc..6521e58 100644 --- a/vmc_metropolis.py +++ b/vmc_metropolis.py @@ -27,8 +27,8 @@ def MonteCarlo(a,tau,nmax): d_old = d_new d2_old = d2_new psi_old = psi_new - N += 1. - E += e_loc(a,r_old) + N += 1. + E += e_loc(a,r_old) return E/N, accep_rate/N