Skip to content

Instantly share code, notes, and snippets.

@cstein
Created May 2, 2012 13:48
Show Gist options
  • Save cstein/2576631 to your computer and use it in GitHub Desktop.
Save cstein/2576631 to your computer and use it in GitHub Desktop.
Starting point of an MD simulation of non-interacting particles.
import random
import pylab as plt
npart = 100
nsteps = 10000
dt = 0.001
X = [random.random() for i in range(npart)]
Y = [2*(random.random()-0.5) for i in range(npart)]
plt.plot(X,Y,'ro')
plt.axis((-1,1,-1,1))
plt.savefig('startcoord.png')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment