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
#!/bin/sh | |
#Automagic .com CX1 (Imperial College London HPC) job submitter. A WIP. | |
#JMF 2007-09 | |
#Bash is a stranger in an open car... | |
#2012-04-27: Finally got around to adding single CPU defaults (for quick semi-empirical QC) | |
#2012-06-19: Merged in 'these are my options' echo from the NWCHEM branch of this script, as it is well useful | |
#Get Options |
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
#!/bin/sh | |
#Automagic .com CX1 job submitter. A WIP. | |
#JMF 2007-09 | |
#Bash is a stranger in an open car... | |
#Get Options | |
NCPUS=8 | |
MEM=11800mb #Simon Burbidge correction - lots of nodes with 12GB physical memory, leaves no overhead for OS |
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
#!/bin/sh | |
mplayer -playlist "http://bbc.co.uk/radio/listen/live/r4.asx" | |
#Nb: also replace with r4x, r6 etc. | |
#Also you can write get the script to ask for the stream with the same name as | |
# it's called with (i.e. ${0}) and then generate a load of sym-links from r4/r4x/r6 to this script |
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
#Strip emails from mediauk via some horrific re hacks + direct parsing of HTML. | |
# Their site breaks Beautiful Soup :( | |
#B wants all the email addresses in this linked to page | |
wget -O - "http://www.mediauk.com/tags/local" | sed 's/>/\n/g' | grep "href" | cut -f2 -d\' | grep "^\/" > urls.list | |
#I think I manually deleted the false ones in the top + bottom of urls.list | |
for URL in ` cat urls.list ` | |
do | |
echo -n "${URL} " |
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
/* C99 so compile with 'c99 -o pi pi.c' | |
/* From http://www.codecodex.com/wiki/Calculate_digits_of_pi#C */ | |
#include "stdio.h" | |
#include "stdlib.h" | |
//now generates in base 12... | |
#define SCALE 12 //4096 //8*8*8*8 | |
#define ARRINIT 2 //1024 |
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
import fileinput | |
import numpy as np | |
#expects input as: | |
#Energy(eV) Lambda(nm) OscillatorStrength | |
oscillators=[] | |
for line in fileinput.input(): | |
oscillators.append(map(float, line.split())) | |
#print oscillators |
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 | |
#Generates Gaussians from a set of Dirac Delta inputs, to simulate vibrational / experimental broadening | |
#Currently designed for raman spectra | |
BEGIN{ | |
} | |
{ | |
c=0.1 | |
if ($2>10.0) |
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
#!/bin/sh | |
qstat > ~/q.tmp | |
running=` grep \ R\ ~/q.tmp | wc -l ` | |
qd=` grep \ Q\ ~/q.tmp | wc -l ` | |
echo "My Jobs: ${running} running, ${qd} queued." | |
echo |
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
#! /bin/awk -f | |
#Filthy hack to project a 'pair' of molecules by reading the TV vectors from a .com file | |
#~Jarv 2012-05-10 | |
BEGIN{ | |
} | |
{ | |
if ($1=="0") | |
{ |
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 file | |
do | |
#separate out A and B molecules | |
grep -v "UNK B" "${file}" > A.pdb | |
grep -v "UNK A" "${file}" > B.pdb | |
#Now we have coords of both in $file, molecule A in A.pdb and B in B.pdb | |
babel -ipdb A.pdb -ogau "${file%.*}_A.com" | |
babel -ipdb B.pdb -ogau "${file%.*}_B.com" | |
babel -ipdb "${file}" -ogau "${file%.*}_AB.com" |