Hello everyone
Can anyone tell me the solution for it. When i tried to calculate rdf it showed the error.
missing operand at address@hidden
in _expression_ "0 + address@hidden"
(parsing _expression_ "0 + ")
invoked from within
"expr $ai + $bi"
(procedure "vecadd" line 3)
invoked from within
"vecadd $avg_rdf $rdflist"
("foreach" body line 12)
invoked from within
"foreach filename config_$i {
set f [open $filename "r"]
while { [blockfile $f read auto] != "eof" } {}
close $f
set rdf [analyze rdf 0 0 0.15 ..."
(file "rdf.tcl" line 4)
This is my script for rdf
set cnt 0
for {set i 0} {$i < 6949} {incr i} { lappend avg_rdf 0}
#for {set j 0} {$j < 6950} {incr j} {
foreach filename config_$i {
set f [open $filename "r"]
while { [blockfile $f read auto] != "eof" } {}
close $f
set rdf [analyze rdf 0 0 0.15 250 50]
set rlist ""
set rdflist ""
foreach value [lindex $rdf 1] {
lappend rlist [lindex $value 0]
lappend rdflist [lindex $value 1]
}
set avg_rdf [vecadd $avg_rdf $rdflist]
incr cnt
puts "you are on step $j"
}
}
set avg_rdf [vecscale [expr 1.0/$cnt] $avg_rdf]
set plot [open "rdf_00_50.data" "w"]
puts $plot "\# r rdf(r)"
foreach r $rlist rdf $avg_rdf { puts $plot "$r $rdf" }
close $plot
Thank you,
Uday
--
UDAY KUMAR PADIDELA
SRF (CSIR) Department Of Chemistry,
BITS Pilani, Goa,