修订版 | 5cf65824a9b1c972c6ea91cf9c80d4b2de02052a (tree) |
---|---|
时间 | 2008-01-14 02:52:46 |
作者 | iselllo |
Commiter | iselllo |
Now read_test.tcl is able to read configurations from a selected one to
a final one (specified by the user) and with a given spacing.
@@ -27,20 +27,41 @@ | ||
27 | 27 | |
28 | 28 | |
29 | 29 | |
30 | - | |
30 | +#Now I start reading the configurations | |
31 | 31 | |
32 | 32 | #The following 2 parameters are needed to read the saved configurations |
33 | 33 | |
34 | -set my_increase 1 | |
35 | 34 | |
36 | 35 | # number of snapshots of the system |
37 | -set tot_config 10 | |
36 | +set tot_config 1000 | |
37 | + | |
38 | + | |
39 | +#my_increase tells me how often I want to read the saved configurations | |
40 | +#in the system | |
41 | + | |
42 | +set my_increase 100 | |
43 | + | |
44 | + | |
45 | +#The parameters I set above mean that I will read one configuration every my_increase | |
46 | +#out of the tot_config configurations saved | |
47 | + | |
48 | +set ini_conf 0 | |
49 | + | |
50 | +#I set the value of the initial configuration I want to start reading | |
51 | + | |
38 | 52 | |
39 | 53 | # number of particles |
40 | 54 | |
41 | -set n_part 10 | |
55 | +set n_part 5000 | |
42 | 56 | |
43 | -set new_iter [expr $n_part*$tot_config] | |
57 | +#set new_iter [expr $n_part*$tot_config] | |
58 | + | |
59 | + | |
60 | +set new_iter [expr $n_part*($tot_config-$ini_conf)/$my_increase] | |
61 | + | |
62 | +puts "new_iter is, $new_iter" | |
63 | + | |
64 | + | |
44 | 65 | |
45 | 66 | #counter |
46 | 67 | set cnt 0 |
@@ -51,7 +72,7 @@ | ||
51 | 72 | set Mvel {} |
52 | 73 | |
53 | 74 | |
54 | -set j 0 | |
75 | +set j $ini_conf | |
55 | 76 | while {$j< $tot_config} { |
56 | 77 | puts "j is $j" |
57 | 78 | set f [open "config_vel_$j" "r"] |
@@ -109,7 +130,9 @@ | ||
109 | 130 | lappend wlist [lindex $value ] |
110 | 131 | |
111 | 132 | } |
112 | -incr j $my_increase | |
133 | +#incr j $my_increase | |
134 | +incr j | |
135 | + | |
113 | 136 | } |
114 | 137 | |
115 | 138 |
@@ -136,7 +159,8 @@ | ||
136 | 159 | lappend wlist2 [lindex $value ] |
137 | 160 | |
138 | 161 | } |
139 | -incr j $my_increase | |
162 | +#incr j $my_increase | |
163 | +incr j | |
140 | 164 | } |
141 | 165 | |
142 | 166 |