Studies of stimulus parameters for seizure disruption using NN simulations (Anderson et al. 2007)

 Download zip file 
Help downloading and running models
Accession:98902
Architecturally realistic neocortical model using seven classes of excitatory and inhibitory single compartment Hodgkin-Huxley cells. Wiring is adapted to minicolumn hypothesis and incorporates visual and neocortical data. Simulation demonstrates spontaneous bursting onset and cessation, and activity can be altered with external electric field.
Reference:
1 . Anderson WS, Kudela P, Cho J, Bergey GK, Franaszczuk PJ (2007) Studies of stimulus parameters for seizure disruption using neural network simulations. Biol Cybern 97:173-94 [PubMed]
Citations  Citation Browser
Model Information (Click on a link to find other models with that property)
Model Type: Realistic Network;
Brain Region(s)/Organism:
Cell Type(s): Neocortex L5/6 pyramidal GLU cell; Neocortex L2/3 pyramidal GLU cell; Neocortex V1 interneuron basket PV GABA cell; Neocortex fast spiking (FS) interneuron;
Channel(s): I A; I K; I K,leak; I K,Ca; I Sodium; I Calcium;
Gap Junctions:
Receptor(s): AMPA; Gaba;
Gene(s):
Transmitter(s):
Simulation Environment: C or C++ program;
Model Concept(s): Bursting; Epilepsy; Vision;
Implementer(s):
Search NeuronDB for information about:  Neocortex L5/6 pyramidal GLU cell; Neocortex L2/3 pyramidal GLU cell; Neocortex V1 interneuron basket PV GABA cell; AMPA; Gaba; I A; I K; I K,leak; I K,Ca; I Sodium; I Calcium;
#!/usr/bin/tclsh
if {$argc < 9} {
    puts "Usage: rnets <nodes file> <inp> <path> <sqrt(no subnet/node)> <no_conn/link> <time> <seed> <decr> <port>"
        exit
}

set cont 0
if {$argc > 9} {set cont [lindex $argv 9]}
exec touch start

set name [lindex $argv 0]
set inp [lindex $argv 1] 
set path [lindex $argv 2]   
set ns [lindex $argv 3]
set ncon [lindex $argv 4]
set tim [lindex $argv 5]
set seed [lindex $argv 6]
set decr [lindex $argv 7]
set port [lindex $argv 8]
set delay 0.3
set f [open $name r]

gets $f nproc


exec cp $name tmp.nodes.tab


for {set i 0} {$i<$nproc} {incr i 1} {
	gets $f node
	lappend nodelist $node
}
close $f

set f [open "$inp.cfg" r]
gets $f line
close $f
set flags [split $line ,]
set hist [lsearch $flags H]
set out  [lsearch $flags O]
set vout [lsearch $flags V]
set link [lsearch $flags L]
set stim [lsearch $flags S]

if {($hist==-1) && ($out==-1) && ($vout==-1)} {
	puts { no output generated }
	exit
} 
set proc [expr sqrt($nproc)]


set filelist1 {par syn neu}
if {$link>-1} {
	set filelist1 "$filelist1 lin lout"
}
#exec rm -f tmp.link 
if {$stim>-1} {
	set filelist1 "$filelist1 stim"
}

set filelist2  "$filelist1 cfg"


if {$cont < 1} {
    puts  "$filelist2"
puts "mknode $inp tmp $ns $proc $seed" 
exec ./mknode $inp tmp $ns $proc $seed >rnet.log
puts "mklink $inp [expr $proc*$ns] $seed" 
exec ./mklink $inp [expr $proc*$ns] $seed >>rnet.log
puts "sublink tmp $ncon $delay $seed" 
exec ./sublink tmp $ncon $delay $seed >>rnet.log
puts  "crl tmp $nproc" 
exec ./crl tmp $nproc >>rnet.log



puts copy
      
for {set i 0} {$i<$nproc} {incr i 1} {
	set node [lindex $nodelist $i]
	puts $node
        exec rsh -n $node rm -rf $path
        exec rsh -n $node mkdir $path
	exec rcp ./tmp.conn.tab "$node:$path/"
	exec rcp ./tmp.nodes.tab "$node:$path/"
	exec rcp ./netclustwacnmdadiff "$node:$path/"
	foreach ext $filelist2 {
		exec rcp "./tmp.$ext.$i" "$node:$path/"
	      	}
	foreach ext $filelist1 {
		exec rcp "./tmp.$ext.$i" "$node:$path/"
	        exec rm -f "./tmp.$ext.$i"
		}
}

#exec rm -f  ./tmp.nodes.tab ./tmp.conn.tab


}
for {set i 0} {$i<$nproc} {incr i 1} {
        set node [lindex $nodelist $i]
 
    while { ![catch { exec rsh -n $node netstat -n -A inet | grep $port } ]} {
        puts "...waiting for port in $node"
        after 1000
        }
}


puts run
exec touch run
for {set i 0} {$i<$nproc-1} {incr i 1} {
	set node [lindex $nodelist $i]
	puts $node

#	exec rsh -n $node "$path/netclustwacnmdadiff" tmp $tim $decr & 
       
	exec rsh -n $node /bin/nice -n3 "$path/netclustwacnmdadiff" tmp $tim $decr $port & 

}
set node [lindex $nodelist $i]
puts $node
exec rsh -n $node /bin/nice -n3  "$path/netclustwacnmdadiff" tmp $tim  $decr $port >@stdout  
#exec rsh -n $node "$path/netclustwacnmdadiff" tmp $tim  $decr >@stdout  
exec touch end
puts "computation time: [expr [file mtime end]-[file mtime run]] sec"

for {set i 0} {$i<$nproc} {incr i 1} {
        set node [lindex $nodelist $i]
    while {  ![catch { exec rsh -n $node stat $tmp/done } ]} {
        puts "...waiting for $node"
        after 5000
        }
}

puts copyout
set f [open "nclust.log" w]
for {set i 0} {$i<$nproc} {incr i 1} {
	set node [lindex $nodelist $i]
	puts $node
        exec rcp -r "$node:$path/" .
	exec rsh -n $node cat netclust.log >>nclust.log
}

#foreach ext $filelist2 {
#                exec rm -f "$path/tmp.$ext.$i"
#                }



if {$hist >-1} {
puts  "jhist tmp $inp" 
exec ./jhist tmp $inp >>rnet.log
}
puts  "mkhist histo_$inp tmp.node 1"
exec	./mkhist histo_$inp tmp.node 1 >>rnet.log
#if {$vout >-1} {
#exec ./jvout1 tmp $inp $proc >>rnet.log
#}
#exec ./linknet $inp tmp $proc >>rnet.log
puts clean
#eval exec rm -f [glob "./tmp.*.*"]    
	if {$hist>-1} {
#	    eval exec rm -f [ glob "./histo_tmp.*"]
	}
	#if {$vout>-1} {
	#   eval exec rm -f [glob "./V_tmp.out.*"]
	#}

exec touch end
puts "total time: [expr [file mtime end]-[file mtime start]] sec"