Skip to content

Instantly share code, notes, and snippets.

@vdikan
vdikan / Dockerfile
Created May 2, 2021 16:32
Siesta spacked distribution Dockerfile
FROM vdikan/siesta-spack:latest as builder
# What we want to install and how we want to install it
# is specified in a manifest file (spack.yaml)
RUN mkdir /opt/spack-environment \
&& (echo "spack:" \
&& echo " specs:" \
&& echo " - siesta+libxc ^[email protected]" \
&& echo " - atom-dft ^[email protected]" \
@vdikan
vdikan / vega-serv.bb
Last active September 13, 2022 10:34
Single-script Vega-Lite plotter made with Babashka (Clojure). A remix of wee-httpd.
#!/usr/bin/env bb
(ns vega-serv)
(import (java.net ServerSocket))
(require '[clojure.string :as string]
'[clojure.java.io :as io]
'[cheshire.core :as json]
'[clojure.tools.cli :refer [parse-opts]])
@vdikan
vdikan / gist:e2e5eee952ce36bc5125a091bc935799
Created October 12, 2020 11:22 — forked from matthewp/gist:2324447
String Split in Scheme
;;; str-split : Apr 2006 Doug Hoyte, hcsw.org.
;;; ----
;;; Splits a string 'str into a list of strings
;;; that were separated by the delimiter character 'ch
;;; ----
;;; Efficient as possible given that we can't count on
;;; 'str being an immutable string.
(define (str-split str ch)
(let ((len (string-length str)))
@vdikan
vdikan / bibtex.lisp
Created September 19, 2020 23:54 — forked from Neronus/bibtex.lisp
Bibtex parser using parser combinators in Common Lisp
(defpackage bibtex
(:use :cl :parser-combinators :alexandria)
(:export parse)
(:documentation
"Parse bibtex files.
The current state is quite fragile and didn't go through any extensive testing.
There is one external function: PARSE."))
@vdikan
vdikan / notes-on-siesta-deps.org
Created August 5, 2020 15:29
Notes on SIESTA's deps manual installation

Assembled notes on SIESTA’s deps manual installation

Where the ml environment module command is shown the previous dependencies are meant to be made visible, usually through $LD_LIBRARY_PATH variable or similarly. Check README files.

Also, edit --prefix-es accordingly.

LibXC v.3.0.1

version="3.0.1"
@vdikan
vdikan / arch.make
Created June 28, 2020 00:01
Siesta's arch-experimental makefile with library paths obtained from calls to `spack location -i`. Serial version (adding links to MPI is straightforward).
#
SIESTA_ARCH=Spack-shell-in-Master-template-Serial
#
# Machine specific settings might be:
#
# 1. Inherited from environmental variables
# (paths, libraries, etc)
# 2. Set from a 'fortran.mk' file that is
# included below (compiler names, flags, etc) (Uncomment first)
#