Skip to content

Instantly share code, notes, and snippets.

View ajd98's full-sized avatar

Alex DeGrave ajd98

View GitHub Profile
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# testrates.py
#
# Test two schemes for rate estimation.
#
# Written 18.04.05 by Alex DeGrave
import numpy
@ajd98
ajd98 / encode.h.264.sh
Created August 29, 2017 14:33
Encode 1280x720 video using h.264. Adjust bitrate as per comments. File extension (default .sgi) can be changed
#!/bin/sh
# Set the mplayer environment variables; this probably is not needed
export LD_LIBRARY_PATH=/local/usr/lib
export PATH=${PATH}:/local/usr/bin
# high motion = 5928 kbps
# moderate motion = 4512 kbps
mencoder \
-ovc x264 \
@ajd98
ajd98 / logticks_example.py
Created March 17, 2017 17:13
Example for making log ticks in matplotlib
def _format_axes(self):
axes = self.axes
fig = self.fig
#nvertical = len(axes)
#nhorizontal = len(axes[0])
line_width=0.8
#fig.subplots_adjust(bottom=0.2, left=0.1, right=1.05)
minorticks = [1.0e-2*i for i in range(10)] +\
[1.0e-1*i for i in range(10)] +\
@ajd98
ajd98 / visualizer.py
Last active August 29, 2015 14:24
A script for visualizing trajectories with only C-alpha coordinates.
#!/usr/bin/env python
# Written 7/2015 by Alex DeGrave
################################# FUNCTIONS ###################################
from __future__ import print_function
import argparse
import MDAnalysis
import numpy
import h5py
@ajd98
ajd98 / generate_surface_evolution.sh
Created May 29, 2015 19:32
This script is used to generate a movie of the time evolution of an energy surface from a WESTPA simulation.
#!/bin/bash
# Written 29 May 2015 by Alex DeGrave <ajd98@pitt.edu>
# This script generates a movie of a free energy surface, evolving in time.
# The script uses a moving block of width $BLOCK_SIZE.
# A movie is output to evolution_plots/energy_surface_evolution.avi.
# Make sure the utility mencoder is installed.
############ USER VARIABLES ############
# Set location of westpa tools