Skip to content

Instantly share code, notes, and snippets.

View awvwgk's full-sized avatar

Sebastian Ehlert awvwgk

View GitHub Profile
@awvwgk
awvwgk / modern-fortran.svg
Created October 21, 2022 20:03
Modern Fortran logo suggestion
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@awvwgk
awvwgk / PKGBUILD
Created October 4, 2021 18:43
Package build file for stdlib (mingw-w64)
# Maintainer: Sebastian Ehlert <awvwgk@disroot.org>
_realname=fortran_stdlib
pkgbase=mingw-w64-${_realname}
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
pkgver=0.1.0
pkgrel=1
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64')
pkgdesc="Fortran standard library (mingw-w64)"
@awvwgk
awvwgk / PKGBUILD
Created October 4, 2021 18:27
Package build files for fypp (mingw-w64)
# Maintainer: Sebastian Ehlert <awvwgk@disroot.org>
_pyname=fypp
_realname=fypp
pkgbase=mingw-w64-python-${_realname}
pkgname=("${MINGW_PACKAGE_PREFIX}-python-${_realname}")
provides=("${MINGW_PACKAGE_PREFIX}-python3-${_realname}")
conflicts=("${MINGW_PACKAGE_PREFIX}-python3-${_realname}")
replaces=("${MINGW_PACKAGE_PREFIX}-python3-${_realname}")
pkgver=3.1
@awvwgk
awvwgk / PKGBUILD
Created August 28, 2021 20:54
Fortran package manager (fpm)
# Maintainer: Sebastian Ehlert <awvwgk@disroot.org>
_realname=fpm
pkgbase=mingw-w64-${_realname}
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}-git"
pkgver=0.4.0
pkgrel=1
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64')
pkgdesc="Fortran package manager (mingw-w64)"
@awvwgk
awvwgk / gather-tm.py
Created August 24, 2021 09:58
Transfer Turbomole gradient files to tagged data outputs
#!/usr/bin/env python
import sys
from ase.io.turbomole import read_turbomole_gradient
from ase.units import Bohr, Hartree
def get_data(path):
try:
with open(path) as fd:
mol = read_turbomole_gradient(fd)
@awvwgk
awvwgk / gather-outcar.awk
Created August 24, 2021 09:55
Extract DFTB+ compatibile tagged data from Vasp's OUTCAR file
#!/usr/bin/awk -f
BEGIN {
evtoau = 1.0 / 27.21138505
aatoau = 1.0 / 0.52917726
poscar = 0
tag = 1
}
$1 ~ /Total/ && NF == 7 {
@awvwgk
awvwgk / bug3.adoc
Last active May 19, 2020 15:55
Bugs with pgfortran 19.10-0 LLVM 64-bit target on x86-64 Linux -tp sandybridge
pgfortran -Mallocatable=03 bug3.f90
PGF90-S-0000-Internal compiler error. transform_call:Array Expression can't be here     168  (bug3.f90: 35)
Lowering Error: bad ast optype in expression [ast=163,asttype=12,datatype=0]
PGF90-F-0000-Internal compiler error. Errors in Lowering       1  (bug3.f90: 39)
PGF90/x86-64 Linux 19.10-0: compilation aborted
@awvwgk
awvwgk / diag3x3.f90
Last active May 10, 2020 22:22
Diagonalization of 3x3 matrices
! This is free and unencumbered software released into the public domain.
!
! Anyone is free to copy, modify, publish, use, compile, sell, or
! distribute this software, either in source code form or as a compiled
! binary, for any purpose, commercial or non-commercial, and by any
! means.
!
! In jurisdictions that recognize copyright laws, the author or authors
! of this software dedicate any and all copyright interest in the
! software to the public domain. We make this dedication for the benefit
@awvwgk
awvwgk / zoom2ics.awk
Last active April 21, 2020 18:57
Convert a zoom email invitation to ics, in case the host forgot the to attach an ics
BEGIN {
print "BEGIN:VCALENDAR";
print "VERSION:2.0";
print "BEGIN:VEVENT";
"date -u +'%Y%m%dT%H%M%SZ'" | getline datetime;
print "CREATED:"datetime;
description = "DESCRIPTION:"
}
/Amsterdam, Berlin, Rome, Stockholm, Vienna$/ {
tzid = "Europe/Berlin";
@awvwgk
awvwgk / tbdef_atomlist.f90
Created October 17, 2019 20:01
A simplistic list of atoms for easy IO
!> implemenation of a list of atoms
module tbdef_atomlist
implicit none
public :: tb_atomlist
public :: size, len, assignment(=), write(formatted), read(formatted)
private
character, parameter :: p_delimiter = ','
character, parameter :: p_skip = '-'