Skip to content

Instantly share code, notes, and snippets.

View dceresoli's full-sized avatar

Davide Ceresoli dceresoli

View GitHub Profile
@dceresoli
dceresoli / qe2boltz_dc.py
Created May 6, 2024 13:07
Improved version of qe2boltz.py
#! /usr/bin/python
eps3 = 1.0e-3
inf6 = 1.0e6
rydberg = 13.60569253
def main(argv = None):
if argv is None:
argv = sys.argv
if len(argv) < 5 or len(argv) > 7:
@dceresoli
dceresoli / fqha.py
Last active March 18, 2024 08:35
Calculate the free energy and related quantities from the phonon density of states
#!/usr/bin/env python
# Calculate the free energy and related quantities from the phonon density
# of states. Optionally, renormalize "imaginary" frequencies according to
# a simple scheme.
# Davide Ceresoli <dceresoli@gmail.com>
import numpy as np
import sys, argparse
def omega_to_Ry(hbar_omega): # omega in cm^-1
@dceresoli
dceresoli / cif2fdmnes.py
Last active March 26, 2024 14:51
Create an input file for FDMNES from a cif or poscar file
#!/usr/bin/env python
#
# Create an input file for FDMNES from a cif or poscar file
# Davide Ceresoli <dceresoli@gmail.com>, 27/02/2024
#
import os, sys, argparse
import ase.io
import ase.data
@dceresoli
dceresoli / eos-fit-poly.py
Last active February 22, 2024 15:00
Fit polynomial Equations of State (EoS) to (lattice,enery) or (volume,energy) data
#!/usr/bin/env python
# Fit polynomial equations of state (EOS) to energy vs volume curves
# and optionally plot the results
# Davide Ceresoli <dceresoli@gmail.com>, 10/03/2012
# Inspired by ase.utils.eosase2
import sys, numpy, math
from scipy.optimize import leastsq
import numpy.polynomial.polynomial as poly
@dceresoli
dceresoli / eos-fit.py
Last active February 22, 2024 14:58
Fit four different Equations of State (EoS) to (lattice,enery) or (volume,energy) data
#!/usr/bin/env python
# Fit equations of state (EOS) to energy vs volume curves and optionally plot the results
# Davide Ceresoli <dceresoli@gmail.com>, 03/22/2011
# Inspired by ase.utils.eosase2
# TODO: Keane
import sys, numpy, math
from scipy.optimize import leastsq
# Murnaghan equation of state
@dceresoli
dceresoli / CUJ-make-month-pdf.sh
Created April 17, 2020 11:23
Create a PDF of a monthly CUJ or DDJ issue from the DDJ developers DVD #6
#!/bin/bash
# Create a PDF of a monthly CUJ or DDJ issue from the DDJ developers DVD #6
# Requires: pandoc, pdflatex, eisvogel.tex template, perl, sed, ghostscript
#
# Davide Ceresoli <dceresoli@gmail.com>
# adjust the path to this file
TEMPLATE=$HOME/CNR-COVID19/PANDOC/eisvogel.tex
journal=CUJ
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.