Revisão | e75257537fafaf77bbb69e9c0307a445a3b92c61 (tree) |
---|---|
Hora | 2008-09-16 00:14:21 |
Autor | iselllo |
Commiter | iselllo |
I modified the code plot_statistics_single.py and corrected the
calculation of the coordination number by adding a better way of taking
the average of the coordination number on the generated clusters.
@@ -32,13 +32,13 @@ | ||
32 | 32 | |
33 | 33 | collisions =1 #whether I should take statistics about the collisions or not. |
34 | 34 | |
35 | -ini_config=1480 | |
36 | -fin_config=1485 #for large data post-processing I need to declare an initial and final | |
35 | +ini_config=0 | |
36 | +fin_config=1000 #for large data post-processing I need to declare an initial and final | |
37 | 37 | |
38 | 38 | #configuration I want to read and post-process |
39 | 39 | |
40 | 40 | |
41 | -by=1 #this tells how many configurations there are in the file I am reading | |
41 | +by=100 #this tells how many configurations there are in the file I am reading | |
42 | 42 | |
43 | 43 | figure=0 #whether I sould print many figures or not |
44 | 44 |
@@ -930,6 +930,7 @@ | ||
930 | 930 | mean_dist_part_single_cluster=s.zeros(n_config) |
931 | 931 | |
932 | 932 | overall_coord_number=s.zeros(n_config) |
933 | + overall_coord_number_cluster=s.zeros(n_config) | |
933 | 934 | v_aver=s.zeros(n_config) |
934 | 935 | size_single_cluster=s.zeros(n_config) |
935 | 936 | r_gyr_single_cluster=s.zeros(n_config) |
@@ -1033,6 +1034,8 @@ | ||
1033 | 1034 | |
1034 | 1035 | #print "coord_list is, ", coord_list |
1035 | 1036 | coord_arr=s.asarray(coord_list) |
1037 | + overall_coord_number[i]=s.mean(coord_arr) | |
1038 | + print "the overall_coord_number is, ", overall_coord_number[i] | |
1036 | 1039 | |
1037 | 1040 | cluster_obj.simplify() |
1038 | 1041 | clustering=cluster_obj.clusters() |
@@ -1438,8 +1441,9 @@ | ||
1438 | 1441 | |
1439 | 1442 | |
1440 | 1443 | |
1441 | - overall_coord_number[i]=s.mean(coord_arr) | |
1442 | - | |
1444 | + #overall_coord_number[i]=s.mean(coord_arr) | |
1445 | + | |
1446 | + | |
1443 | 1447 | |
1444 | 1448 | |
1445 | 1449 | coord_clust=coord_arr[part_in_clust[my_lim[m]:my_lim[m+1]]] |
@@ -1512,7 +1516,9 @@ | ||
1512 | 1516 | cluster_name="coord_number_dist%05d"%my_selection[i] |
1513 | 1517 | p.save(cluster_name,coord_number_dist) |
1514 | 1518 | |
1515 | - | |
1519 | + #print "coord_number_dist.mean() is, ", coord_number_dist.mean() | |
1520 | + | |
1521 | + overall_coord_number_cluster[i]=coord_number_dist.mean() | |
1516 | 1522 | |
1517 | 1523 | # cluster_name="df_corr%05d"%my_selection[i] |
1518 | 1524 | # p.save(cluster_name,df_corr) |
@@ -1652,6 +1658,20 @@ | ||
1652 | 1658 | p.clf() |
1653 | 1659 | |
1654 | 1660 | |
1661 | + p.save("coord_number_averaged_on_clusters.dat",overall_coord_number_cluster) | |
1662 | + | |
1663 | + p.plot(time, overall_coord_number_cluster, "ko") | |
1664 | + p.xlabel('time') | |
1665 | + p.ylabel('coordination number') | |
1666 | + #p.legend(('beta=1e-2,100 part','beta=1e-1, 100 part', 'beta=1e-1, 200 part')) | |
1667 | + p.title('Evolution Coordination Number') | |
1668 | + p.grid(True) | |
1669 | + p.savefig('coordination_number_averaged_on_cluster_vs_time.pdf') | |
1670 | + p.hold(False) | |
1671 | + p.clf() | |
1672 | + | |
1673 | + | |
1674 | + | |
1655 | 1675 | for i in xrange(len(time_vertical)): |
1656 | 1676 | y_vertical[:,i]=s.linspace(r_gyr_single_cluster.min(),\ |
1657 | 1677 | r_gyr_single_cluster.max(),10) |