• R/O
  • SSH

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

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

Commit MetaInfo

Revisão3ad4a6a44268d717414b1c522001d8f289f85b34 (tree)
Hora2009-02-03 01:24:02
Autoriselllo
Commiteriselllo

Mensagem de Log

Now the code has everything: it creates a linear chain and it reads the set of corresponding eta factors.

Mudança Sumário

Diff

diff -r e6ade52c0c2e -r 3ad4a6a44268 TCL-codes/test_bond_angle_8_monomers.tcl
--- a/TCL-codes/test_bond_angle_8_monomers.tcl Mon Feb 02 15:21:57 2009 +0000
+++ b/TCL-codes/test_bond_angle_8_monomers.tcl Mon Feb 02 16:24:02 2009 +0000
@@ -8,7 +8,7 @@
88
99 #number of chains
1010
11-set type_of_part 3
11+set type_of_part 200
1212
1313 #total number of monomers
1414
@@ -19,7 +19,7 @@
1919
2020
2121
22-set box_l 1000.
22+set box_l 10000.
2323
2424
2525 setmd box_l $box_l $box_l $box_l
@@ -28,23 +28,56 @@
2828 puts "the box side is, $box_l"
2929
3030
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+
3153 set q 0
3254
3355 for {set i 0} { $i < $tot_part } {incr i} {
3456
57+set eta0_temp [lindex $eta0 $i]
58+
59+set eta1_temp [lindex $eta1 $i]
60+
61+
3562 set type [expr $i/$n_part]
3663
3764 puts "type is, $type"
3865
3966
4067 set posx [expr -$n_part/2+($i%$n_part)*1.05 +$box_l/2.]
41-puts "posx is, $posx"
68+#puts "posx is, $posx"
4269 set posy [expr $box_l/2.]
4370 set posz [expr $box_l/2.]
4471
4572
4673
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+
4881
4982
5083 }
@@ -57,7 +90,7 @@
5790
5891 for {set i 0} { $i < $type_of_part } { incr i} {
5992
60-puts "i now is, $i"
93+#puts "i now is, $i"
6194
6295 inter $i $i tabulated tabulated_interaction.dat
6396
@@ -73,7 +106,7 @@
73106 for {set i 0} { $i < $type_of_part } { incr i} {
74107
75108 for {set m 1} {$m< [expr $n_part-1]} {incr m} {
76-puts "m is, $m"
109+#puts "m is, $m"
77110
78111 part [expr $m +$i*$n_part] bond 4 [expr $m-1+$i*$n_part] [expr $m+1+$i*$n_part]
79112
@@ -87,20 +120,10 @@
87120
88121
89122
90-# inter 4 angle 500.
91-
92-# part 1 bond 4 0 2
93-
94-# part 2 bond 4 1 3
95123
96-# part 3 bond 4 2 4
97-
98-# part 4 bond 4 3 5
99124
100-# part 5 bond 4 4 6
101125
102-# part 6 bond 4 5 7
103-
126+
104127
105128
106129
@@ -150,7 +173,7 @@
150173 setmd time_step $my_step; setmd skin 0.4
151174 set temp 0.5 ; set gamma 1.
152175 thermostat langevin $temp $gamma
153-set vmd "yes"
176+set vmd "no"
154177
155178 if { $vmd == "yes" } {
156179 # This calls a small tcl script which starts the program #
@@ -181,7 +204,7 @@
181204
182205 #initialization random numbers
183206
184-expr srand(100)
207+expr srand(400)
185208 set l ""; for {set i 0} {$i < [setmd n_nodes]} {incr i} {
186209 lappend l [expr int(32768*rand())]
187210 }