Skip to content

Instantly share code, notes, and snippets.

@tjlane
tjlane / find_big_files.py
Created June 24, 2013 17:02
Derek's script for finding big files in a repo
import os, sys
# source
# http://stackoverflow.com/questions/298314/find-files-in-git-repo-over-x-megabytes-that-dont-exist-in-head
def getOutput(cmd):
return os.popen(cmd).read()
if (len(sys.argv) <> 2):
print "usage: %s size_in_bytes" % sys.argv[0]
@tjlane
tjlane / run_jcpl_sim.py
Created June 26, 2013 21:54
TJ's script for running Osama's j-coupling simulations.
#!/usr/bin/env python
"""
Usage: ./run_sim.py <pdb> <cuda_device> <output_name>
"""
from __future__ import print_function
from simtk.openmm import app
import simtk.openmm as mm
from simtk import unit
@tjlane
tjlane / parse_cxi.py
Created July 4, 2013 23:25
First attempt to parse the cheetah CXIdb files from LCLS
import tables
import numpy as np
class CheetahCXI(object):
"""
A parser for the CXIdb files generated by cheetah at LCLS.
"""
def __init__(self, filename):
@tjlane
tjlane / normalization_scaling_w_molec_num.ipynb
Created July 7, 2013 00:34
normalization as a function of molecules ipython notebook
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@tjlane
tjlane / subtracting shot-by-shot vs. avg over shots.ipynb
Created July 7, 2013 01:54
ipython notebook investigating the effects of subtracting means shot-by-shot vs. over an entire dataset
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@tjlane
tjlane / doniach_hist.py
Created July 8, 2013 23:51
Perform the FFT-PCA-Projection histogram method on SSRL/LCLS/Simulations.
import h5py
import numpy as np
from scipy import fftpack
import matplotlib.pyplot as plt
from odin import xray
def PCA(A):
@tjlane
tjlane / heavy_mutants.py
Created July 9, 2013 03:10
A dumb script to convert methionines in a PDB file to their tellurium and selenium replacement mutants.
#!/usr/bin/env bash
"""
Generates a selenomethionine (MSE) or telluromethionine (MTE) mutant.
usage: ./heavy_mutant <pdb>
"""
import sys
@tjlane
tjlane / 1ubq-ramachandran.ipynb
Created July 10, 2013 23:18
Ramachandran for 100ns trajectory of 1UBQ
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@tjlane
tjlane / effect of gaps on correlations.ipynb
Created July 14, 2013 04:27
comparing *numpy* ffts vs. python/c reference implementations for correlation computation (including w/masks)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@tjlane
tjlane / measure_psa.py
Created August 2, 2013 04:20
Compute polar surface area, etc for a list of molecules using OpenEye's toolkit.
#!/usr/bin/env python
import csv
import numpy as np
from openeye.oechem import *
from openeye.oemolprop import *
from openeye.oespicoli import *
from openeye.oeomega import *