Example #1
0
def S_c(c):
  
  from Simulator import *
  import numpy as np
  
  s = Simulator(50000, 5.0e-3, c)
  s.trajectory()
  #s.draw_trajectory()
  #s.draw_energy()
  #m = s.force_dipole()
  #print m
  #c = s.correlation(10000)
  #print c
  t,x = s.correlation_spectrum(110.0,100)
  spec = s.correlation_integral(100.0,t,x)
  return spec
Example #2
0
  cluster.close()
  res = np.sum(res) / float(n)
  print conc, res
  
  f = open('/home/dima/Dropbox/Results/Force_dipoles/S_c','a')
  f.write(str(conc)+'    '+str(res)+'\n')
  f.close()

c_max, n, k = 50.0, 30, 5

c = np.arange(0,c_max,c_max/(float(k)))

for i in range(k):
  print 'running '+str(i)+'th cycle.'
  #S(c[i],n)

#Simulator.plot_graph(5)

s = Simulator(10000, 5.0e-3,0.0)
s.trajectory()
s.draw_trajectory()
#s.draw_energy()
#m = s.force_dipole()
#print m
#c = s.correlation(10000)
#print c
t,x = s.correlation_spectrum(200.0,100)
spec = s.correlation_integral(5.0,t,x)
print spec
s.draw_correlation(t,x)