proc clear() {local i
	pc.gid_clear()
	for i=0, mgrs_list.count-1 {
		mgrs_list.object(i).clear()
	}
	mgrs_list.remove_all
	cells.remove_all()
	objref cell, stim_list
	if (name_declared("clear_weight_movie")) { execute("clear_weight_movie()") }
}

proc reload_onecell() {
	clear()
	one_gid_ = $1
	if ($1 != -1) {
		gidvec.resize(0)
		gidvec.append($1)
	}else{
		gidvec.resize(num_mitral + num_granule - 1)
		gidvec.indgen()		
	}
	create_cells()
	connect_cells()
	create_stim()
	topology()
}

proc reload_wholenet() {local i, j
	clear()
	gidvec.resize(0)
	for i=0, num_mitral-1 {gidvec.append(i)}
	for i=0, num_granule-1 {gidvec.append(num_mitral+i)}
	create_cells()
	connect_cells()
	create_stim()
}