% This is a configuration file for Cytosim, an Open Source project:
% http://www.github.com/nedelec/cytosim
%
% Simulation of a network of actin filaments driven by depolymerization
% withpolymerization at the edges of the network
%
% This is a supplementary material to:
% Disassembly-driven contraction of an F-actin network transports chromosomes in starfish oocytes
% Philippe Bun, Serge Dmitrieff, Julio Belmonte, François Nedelec and Peter Lenart
%
%
% Julio M. Belmonte and Francois Nedelec  20 Aug 2016


set simul starfish
{
    time_step = 0.1     % the lower, the more precise and correct the simulation
      viscosity = 0.3     % ~viscosity of drosophila embryo - replace with proper value
      kT = 0.0042         % room temperature (Kelvin) times Boltzmann constant
}

set space cell
{
    geometry = ( sphere 10 ) % number indicates the radius in microns
}

new space cell

%%%%% ACTIN

set fiber actin
{
    rigidity = 0.075      % real rigidity of actin filaments
    segmentation = 0.15    % lower -> more precise, but slower
    binding_key = 1       % use this to specify which motors/xlinkers bind to these

    display = ( line_width=1.0; end_style = 0; color=white )
    activity        = treadmill
    growing_speed   =  0.00,  0.00    % Plus-end, Minus-end
    shrinking_speed = -0.00, -0.00    % Plus-end, Minus-end  | use neg, val. (pos -> grow)
    growing_force   =     1,  1       % Plus-end, Minus-end  | picoNewtons
    min_length = 0.05 
}

set fiber actin2
{ 
    rigidity = 0.075      % real rigidity of actin filaments
    segmentation = 0.15    % lower -> more precise, but slower
    binding_key = 1       % use this to specify which motors/xlinkers bind to these

    display = ( line_width=1.0; end_style = 0; color=white )
    activity        = treadmill
    growing_speed   =  0.00,  0.00      % Plus-end, Minus-end
    shrinking_speed = -0.0015, -0.0015  % Plus-end, Minus-end  | use neg, val. (pos -> grow)
    growing_force   =     1,  1         % Plus-end, Minus-end  | picoNewtons
    min_length = 0.05 
}

new 5000 fiber actin 
{
    length = 1.5         % length of actin fibers in microns
    position = ball 10   % actin created inside sphere 
    end_state = 1, 4     % 0=stop; 1=grow; 4=shrink | Plus-ends grow, Minus-ends shrink
}

%%%%%% CROSS-LINKER

set hand EndTracker 
{
    binding = 10, 0.01      % binding rate, binding distance
    unbinding = 0.01, 3      % unbinding rate, unbinding force
    display = { size = 2; color=red }
    binding_key = 1         % only binds to fibers with key=1
    activity = track        % track -> hold on fiber
    bind_end = minus_end, 0.1
    hold_shrinking_end = 1  % self-explanatory
}      


set hand Binder
{
    binding = 10, 0.01      % binding rate, binding distance
    unbinding = 0.01, 3     % unbinding rate, unbinding force
    display = { size = 1; color=gray }
    binding_key = 1         % only binds to fibers with key=1
    activity = track        % track -> hold on fiber
}

set couple harvester
{
    hand1 = EndTracker      % both hands are made of EndTracker’s 
    hand2 = Binder
    diffusion = 10          % diffusion rate in micronˆ2/second
    fast_diffusion = 1      % if in use, diff is instantaneous & simulation is faster
    length = 0.01           % resting length between hands
    stiffness = 250         % restoration force
}

set couple Xlink
{
    hand1 = Binder     
    hand2 = Binder
    diffusion = 10          % diffusion rate in micronˆ2/second
    fast_diffusion = 1      % if in use, diff is instantaneous & simulation is faster
    length = 0.01           % resting length between hands
    stiffness = 250         % restoration force
}

new 40000 couple harvester

new 0 couple Xlink { } 


%%%%% CHROMOSOMES

set hand kinetochore
{
    binding = 10, 0.1
    unbinding = 0.0001, inf
    display =  ( size = 10; color = cyan )
    activity = track 
    hold_shrinking_end = 1 
    binding_key = 1 
}

set single centromere
{
    hand = kinetochore
    stiffness = 250
}

% outside
new 23 single centromere 
{
    position = edge 4
}
% inside
new 13 single centromere 
{
    position = ball 6
} 


%%%%%%% SIMULATION

run 500 simul * 
{ 
    solve = 0; 
    nb_frames=2 
}

change fiber actin
{ 
    growing_speed   =  0.0000,   0.0000
    shrinking_speed = -0.0015,  -0.0015
}

change simul fiber 
{
    time_step = 0.01
}

run 100 simul *
{
    solve = 0;
    nb_frames=2
}


run 150000 simul *
{  
    nb_frames = 75   
  
    % at a rate of 12 per second, add a new fiber and 8 new couple
    event = 12, ( new 1 fiber actin2 { length = 1.5; position = edge 0.8; end_state = 1, 4 }   
                  new 8 couple harvester { position = edge 0.8 } )
}
