Skip to content

Instantly share code, notes, and snippets.

View whitead's full-sized avatar
:atom:

Andrew White whitead

:atom:
View GitHub Profile
@whitead
whitead / make_movie.tcl
Created March 9, 2020 01:19
Follow atoms with rotation
proc take_picture {args} {
global take_picture
# when called with no parameter, render the image
if {$args == {}} {
set f [format $take_picture(format) $take_picture(frame)]
# take 1 out of every modulo images
if { [expr $take_picture(frame) % $take_picture(modulo)] == 0 } {
render $take_picture(method) $f
# call any unix command, if specified
@whitead
whitead / make_movie.tcl
Created March 9, 2020 01:17
Rotate and Change Rep VMD Movie
proc take_picture {args} {
global take_picture
# when called with no parameter, render the image
if {$args == {}} {
set f [format $take_picture(format) $take_picture(frame)]
# take 1 out of every modulo images
if { [expr $take_picture(frame) % $take_picture(modulo)] == 0 } {
render $take_picture(method) $f
# call any unix command, if specified
@whitead
whitead / example.py
Created March 28, 2019 20:28
Moviepy and FFMPEG Example
import matplotlib.pyplot as plt
import matplotlib
import numpy as np
import moviepy
from moviepy.editor import VideoClip
from moviepy.video.io.bindings import mplfig_to_npimage
x = np.linspace(-5,5,100)
fig, ax = plt.subplots(figsize=(12,8))
line = ax.plot(x, x**2 + np.cos(5 * x))[0]
@whitead
whitead / some-owl-data.json
Created April 21, 2018 16:55
OWL Matches up to 4/21/2018
[
{
"home": "GLA",
"away": "FLA",
"scores": [
[
2,
1
],
[
@whitead
whitead / convert_gr.py
Last active April 29, 2017 19:56
A simple tool to convert RDFs into smoothed coordination numbers for biasing in EDS
#!/usr/bin/env python
from scipy.integrate import *
from scipy.interpolate import interp1d
from math import pi, exp, sqrt,erf
import numpy as np
grtypes = ["gromacs", "lammps", "aimd"]
@whitead
whitead / sanderson.ipynb
Created March 14, 2017 11:40
Brandon Sanderson Stochastic Bibliography Model
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@whitead
whitead / lecture_2.ipynb
Created April 14, 2016 16:30
Unit 13 Lecture 2
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@whitead
whitead / lecture.ipynb
Created March 24, 2016 16:38
unit 10 lecture 2
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@whitead
whitead / lecture.ipynb
Created February 9, 2016 17:24
Unit 5 Lecture 1
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@whitead
whitead / example.mplstyle
Created February 4, 2016 15:25
Example MPLStyle File
#set the font-size and size of things
figure.figsize: 5, 3
axes.labelsize: 14.3
axes.titlesize: 15.6
xtick.labelsize: 13
ytick.labelsize: 13
legend.fontsize: 13
grid.linewidth: 1.3
lines.linewidth: 2.275