Revisão | 3ad4a6a44268d717414b1c522001d8f289f85b34 (tree) |
---|---|
Hora | 2009-02-03 01:24:02 |
Autor | iselllo |
Commiter | iselllo |
Now the code has everything: it creates a linear chain and it reads the set of corresponding eta factors.
@@ -8,7 +8,7 @@ | ||
8 | 8 | |
9 | 9 | #number of chains |
10 | 10 | |
11 | -set type_of_part 3 | |
11 | +set type_of_part 200 | |
12 | 12 | |
13 | 13 | #total number of monomers |
14 | 14 |
@@ -19,7 +19,7 @@ | ||
19 | 19 | |
20 | 20 | |
21 | 21 | |
22 | -set box_l 1000. | |
22 | +set box_l 10000. | |
23 | 23 | |
24 | 24 | |
25 | 25 | setmd box_l $box_l $box_l $box_l |
@@ -28,23 +28,56 @@ | ||
28 | 28 | puts "the box side is, $box_l" |
29 | 29 | |
30 | 30 | |
31 | +#Now I read the eta factors | |
32 | + | |
33 | +set filename "eta_0_8_200" | |
34 | + | |
35 | + | |
36 | +set fp [open $filename "r"] | |
37 | +set eta0 [split [read $fp [file size $filename]] "\n"] | |
38 | +close $fp | |
39 | + | |
40 | + | |
41 | +set filename "eta_1_8_200" | |
42 | + | |
43 | + | |
44 | +set fp [open $filename "r"] | |
45 | +set eta1 [split [read $fp [file size $filename]] "\n"] | |
46 | +close $fp | |
47 | + | |
48 | + | |
49 | + | |
50 | + | |
51 | + | |
52 | + | |
31 | 53 | set q 0 |
32 | 54 | |
33 | 55 | for {set i 0} { $i < $tot_part } {incr i} { |
34 | 56 | |
57 | +set eta0_temp [lindex $eta0 $i] | |
58 | + | |
59 | +set eta1_temp [lindex $eta1 $i] | |
60 | + | |
61 | + | |
35 | 62 | set type [expr $i/$n_part] |
36 | 63 | |
37 | 64 | puts "type is, $type" |
38 | 65 | |
39 | 66 | |
40 | 67 | set posx [expr -$n_part/2+($i%$n_part)*1.05 +$box_l/2.] |
41 | -puts "posx is, $posx" | |
68 | +#puts "posx is, $posx" | |
42 | 69 | set posy [expr $box_l/2.] |
43 | 70 | set posz [expr $box_l/2.] |
44 | 71 | |
45 | 72 | |
46 | 73 | |
47 | -part $i pos $posx $posy $posz q $q type $type | |
74 | +part $i pos $posx $posy $posz q $q type $type eta $eta0_temp $eta1_temp | |
75 | + | |
76 | +# set test_eta [part $i print eta] | |
77 | + | |
78 | +# puts "eta for the i-th particle is, $test_eta" | |
79 | + | |
80 | + | |
48 | 81 | |
49 | 82 | |
50 | 83 | } |
@@ -57,7 +90,7 @@ | ||
57 | 90 | |
58 | 91 | for {set i 0} { $i < $type_of_part } { incr i} { |
59 | 92 | |
60 | -puts "i now is, $i" | |
93 | +#puts "i now is, $i" | |
61 | 94 | |
62 | 95 | inter $i $i tabulated tabulated_interaction.dat |
63 | 96 |
@@ -73,7 +106,7 @@ | ||
73 | 106 | for {set i 0} { $i < $type_of_part } { incr i} { |
74 | 107 | |
75 | 108 | for {set m 1} {$m< [expr $n_part-1]} {incr m} { |
76 | -puts "m is, $m" | |
109 | +#puts "m is, $m" | |
77 | 110 | |
78 | 111 | part [expr $m +$i*$n_part] bond 4 [expr $m-1+$i*$n_part] [expr $m+1+$i*$n_part] |
79 | 112 |
@@ -87,20 +120,10 @@ | ||
87 | 120 | |
88 | 121 | |
89 | 122 | |
90 | -# inter 4 angle 500. | |
91 | - | |
92 | -# part 1 bond 4 0 2 | |
93 | - | |
94 | -# part 2 bond 4 1 3 | |
95 | 123 | |
96 | -# part 3 bond 4 2 4 | |
97 | - | |
98 | -# part 4 bond 4 3 5 | |
99 | 124 | |
100 | -# part 5 bond 4 4 6 | |
101 | 125 | |
102 | -# part 6 bond 4 5 7 | |
103 | - | |
126 | + | |
104 | 127 | |
105 | 128 | |
106 | 129 |
@@ -150,7 +173,7 @@ | ||
150 | 173 | setmd time_step $my_step; setmd skin 0.4 |
151 | 174 | set temp 0.5 ; set gamma 1. |
152 | 175 | thermostat langevin $temp $gamma |
153 | -set vmd "yes" | |
176 | +set vmd "no" | |
154 | 177 | |
155 | 178 | if { $vmd == "yes" } { |
156 | 179 | # This calls a small tcl script which starts the program # |
@@ -181,7 +204,7 @@ | ||
181 | 204 | |
182 | 205 | #initialization random numbers |
183 | 206 | |
184 | -expr srand(100) | |
207 | +expr srand(400) | |
185 | 208 | set l ""; for {set i 0} {$i < [setmd n_nodes]} {incr i} { |
186 | 209 | lappend l [expr int(32768*rand())] |
187 | 210 | } |