# Test of diffusion on surfaces
# This requires Smoldyn version 2.01 to run

graphics opengl

dim 2
boundaries x 0 100
boundaries y 0 100

frame_thickness 0

species red

difc red(all) 3

color red(all) red
display_size red(all) 5

time_start 0
time_stop 1000
time_step 0.002

start_surface surf1
color both 0 0 0
panel rect +x 50 20 40 r1
panel rect +y 30 60 40 r2
panel tri 40 10 50 20 t1
panel tri 45 10 50 20 t2
panel tri 50 10 50 20 t3
panel tri 55 10 50 20 t4
panel tri 60 10 50 20 t5
neighbors r1 r2 t1 t2 t3 t4 t5
neighbors r2 r1
# molecules do not diffuse from r2 to r1 because r2 does not have an endpoint at r1
# but they do transfer correctly, using a surface collision
neighbors t1 r1 t2 t3 t4 t5
neighbors t2 r1 t1 t3 t4 t5
neighbors t3 r1 t1 t2 t4 t5
neighbors t4 r1 t1 t2 t3 t5
neighbors t5 r1 t1 t2 t3 t4

name surf2
color both 0.5 0.5 0.5
panel hemi 50 60 20 0 -1 30 h1
panel disk 40.5 57 10 1 -3 d1
panel sphere 70 50 10 20 s1
panel cyl 10 30 25 62 5 c1

neighbors h1 surf1:r2 c1
neighbors d1 surf1:r1
neighbors c1 surf1:r2 h1

name surf1
neighbors r2 surf2:h1
neighbors r1 surf2:d1
neighbors r2 surf2:s1 surf2:c1

end_surface

surface_mol 20 red(up) surf1 rect r2

text_display red(all)

end_file

