//chemesis2.0 //cal2.g //function to create rxnpools of calcium, buffer and bimolecular reaction include cabuf.g //dimensions of compartments defined near the top for ease of changing float somarad=4e-4 float somalen=2e-4 float dendrad=2e-4 float dendlen=2e-4 //neutral element which acts as directory, to organize elements create neutral cell ce cell //invoke to function to create rxnpools and reaction cabuf soma 0.1e-3 0.003 0.153 {somarad} {somalen} cabuf dend 0.1e-3 0.003 0.153 {dendrad} {dendlen} //create diffusion element which allows movement of Ca between compartments. create diffusion somadend setfield somadend D 6e-9 units 1e-3 addmsg somaCa somadend POOL1 len SAside Conc addmsg dendCa somadend POOL2 len SAside Conc addmsg somadend somaCa RXN0MOLES difflux1 addmsg somadend dendCa RXN0MOLES difflux2 //setup graphs to display results include cal2graph.g //again, use a larger dt for output setclock 0 0.002 setclock 1 0.1 reset //this simulation will not show diffusion, because the compartments are too large setfield somaCa Cinit 4e-3 setfield /graph1/# xmax 1000 reset step 500000 //Repeate simulation with faster diffusion constant to compensate for too large compartments. setfield /graph1/# overlay 1 setfield somadend D 6e-7 reset step 500000 //Better implementation would use smaller compartments /*Repeat sim with D=6e-8, and somarad=2e-4 somalen=1e-4 dendrad=1e-4 dendlen=1e-4 to see more accurate buffered diffusion */