This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Physics Constants for electronic structure + stat physics | |
# defined as const to help with type stability | |
# 2016-07 - Updated accuracy from https://github.com/DataWookie/PhysicalConstants.jl | |
const c = 2.99792458e8; # m / s # speed of light in this universe | |
#const G = 6.673e-11; # m^3 / kg s^2 | |
const h= 6.62606896e-34; # kg m^2 / s | |
const hbar = const ħ = 1.05457162825e-34; # kg m^2 / s | |
const eV = const q = const ElectronVolt = 1.602176487e-19; # kg m^2 / s^2 | |
const MassElectron = 9.10938188e-31; # kg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/awk -f | |
BEGIN{j=0 | |
a=0} | |
{ | |
if (($1=="Frequencies")) | |
{ | |
freq[j]=$3 | |
j++ | |
freq[j]=$4 | |
j++ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Requires: https://github.com/speleo3/inkscape-speleo/blob/master/extensions/survex.py by Thomas Holder | |
from survex import Survex3D | |
#This is the Oxford Draenen data: | |
# http://www.oucc.org.uk/DraenenSurvey/ | |
mig=Survex3D('OD2.3d') | |
for destination in 'wiggly2.1','luck3.19','rifleman.1','pow.44': | |
print "OD2 entrance.20 <> ",destination | |
length, path = mig.shortestpath('entrance.20',destination) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
theend=` date --date "30 December 2013 17:00" +%s ` | |
now=` date +%s ` | |
diff=` expr $theend - $now ` | |
echo "Really Unemployed in: " `expr $diff / 86400` days `expr \( $diff % 86400 \) / 3600` hours `expr \( \( $diff % 86400 \) % 3600 \) / 60` minutes `expr $diff % 60` seconds. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<gpx version="1.1" xmlns="http://www.topografix.com/GPX/1/1"> | |
<wpt lat="54.164537" lon="-2.026381"> | |
<name>DowCav</name> | |
</wpt> | |
<wpt lat="54.098515" lon="-1.974449"> | |
<name>Fossil</name> | |
</wpt> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original length 12.87m ( 1 legs), moved 0.49m ( 0.49m/leg). Error 3.79% | |
Original length 17.43m ( 1 legs), moved 0.19m ( 0.19m/leg). Error 1.10% | |
Original length 21.24m ( 1 legs), moved 0.46m ( 0.46m/leg). Error 2.17% | |
Original length 5.98m ( 1 legs), moved 0.02m ( 0.02m/leg). Error 0.34% | |
Original length 13.45m ( 2 legs), moved 0.57m ( 0.28m/leg). Error 4.22% | |
Original length 21.15m ( 2 legs), moved 0.33m ( 0.16m/leg). Error 1.56% | |
Original length 26.66m ( 2 legs), moved 0.13m ( 0.06m/leg). Error 0.48% | |
Original length 32.36m ( 2 legs), moved 0.00m ( 0.00m/leg). Error 0.00% | |
Original length 23.05m ( 3 legs), moved 0.36m ( 0.12m/leg). Error 1.56% | |
Original length 50.81m ( 3 legs), moved 0.00m ( 0.00m/leg). Error 0.00% |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# Version 1.5 | |
# one dimensional chain | |
# Copyright under GNU General Public License 2010, 2012 | |
# by Sinisa Coh and David Vanderbilt (see gpl-pytb.txt) | |
from pytb import * # import TB model class | |
import pylab as pl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for i #in */*.out | |
do | |
# echo -n "${i}" | |
#'sed -n 1p' will print 1st line, etc. | |
ELECTRONS=` grep "No. of electrons :" "${i}" | sed -n 1p | awk '{print $5/2}' ` | |
#OK, this is now orbitals, not electrons (i.e. #electrons / 2) | |
ENERGY=` grep "Total DFT energy" "${i}" | sed -n 1p | awk '{print $5}' ` | |
CAM=` grep " cam " "${i}" | sed -n 1p | awk '{print $2}' ` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Forgot about this gist, and made a full blown GitHub repo separately:- https://github.com/jarvist/polaron-lambda | |
Slight edits to allow more easy Method for the E calculations, a version to work from .log files rather than checkpoints, and a better description (perhaps). | |
Consider this Gist obsolete. |