• R/O
  • SSH

標籤
無標籤

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

File Info

修訂. e6e3273bd5e082ed4109d2927a538b4338f535f1
大小 1,702 bytes
時間 2008-09-18 23:34:01
作者 iselllo
Log Message

I added the file coord_number_calc.py used to calculate the mean-ensemble-averaged time-dependent coordination number.

Content

#! /usr/bin/env python
#from matplotlib import rc

import scipy as s
#from scipy import stats #I need this module for the linear fit
import numpy as n
import pylab as p

#import scipy.optimize as sopt

#p.rc('text', usetex=True)

ini_conf=0  
fin_conf=3000   #configurations I read initially in read_test.tcl





by=2 #I need it to select the elements from time.dat




ini_conf=ini_conf/by
fin_conf=fin_conf/by


time=p.load("../1/time.dat")





#print "time (initially read) is, ", time
print "by is, ", by
#print "len(time) is, ", len(time)
pick_time=s.arange(ini_conf*by,fin_conf*by, by)
#print "pick_time is, ", pick_time
time=time[pick_time]
#print "len(time) at first is, ", len(time)

print "time at the beginning is, ", time

p.save("time_red.dat",time)






overall_coord_number_time_dep=s.zeros((fin_conf-ini_conf))

print "fin_conf-ini_conf is, ", fin_conf-ini_conf


count_config=0


    

n_dir=10

mean_coord_number_single_box=s.zeros(n_dir)

dir_list=s.arange(n_dir)+1

    
count_config=0

for my_config in xrange(ini_conf,fin_conf):



    my_config=my_config*by

    print "my_config is, ", my_config


    for m in xrange(len(dir_list)):

        dir_name="../%01d"%(dir_list[m])

        print "my_config is, ", my_config
        #cluster_long=s.zeros(1)
        #r_gyr_long=s.zeros(1)

        temp_name=dir_name+"/coord_number_dist%05d"%my_config
        coord_dist=p.load(temp_name)

        mean_coord_number_single_box[m]=coord_dist.mean()

        
    overall_coord_number_time_dep[count_config]=mean_coord_number_single_box.mean()
    count_config=count_config+1

p.save("time_evolution_coord_number.dat", overall_coord_number_time_dep)

  
  



print "So far so good"