Magrathea Installation and Use

From irefindex

The Magrathea Manual Contents

The Magrathea Manual: Coordinated Agent Modelling Explained

The Magrathea Manual: Coordinated Agent Modelling By Example

The Magrathea Manual: Building Coordinated Agent Models

Magrathea Installation and Use

Example model files for Magrathea


How to install and use Magrathea: Quick start

For Windows

1. Download a copy of breve from http://spiderland.org. These examples have been tested using breve 2.7.2.

2. Obtain a copy of magrathea.tz. Presently, you must email ian.donaldson at biotek.uio.no.

3. Copy and paste any one of the examples from the section Example model files for Magrathea to a file named model.txt and move to the same directory as magrathea.tz.

4. Double click on breveIDE.exe to start breve.

5. Under the File menu, choose Open and then choose magrathea.tz

6. Hit the "play" button on the bottom of the breve interface.

More help with breve is available at http://spiderland.org.


Moving the camera during simulations

Movies of simulations are captured to a file called simulation.png. The camera may be moved using rotate, zoom and move buttons at the bottom of the breve simulation window. However, more sophisticated camera movements are possible using a number of keyboard controls that are described in the table below.


camera controls
key action
arrow-left move left
arrow-right move right
arrow-up move forward
arrow-down move backward
o move up
l move down
h rotate left
k rotate right
u rotate up
n rotate down
d circle left
f circle right
r circle up
c circle down
+ zoom in
- zoom out
q increase camera velocity
a decrease camera velocity
s reset velocity


Advanced settings

The following are defined at the top of the magrathea.tz file. There is probably no reason to change them. A number of these values can be altered in the model file under the simulation section.

#DEFINES
#simulation defaults
#set the following to 1 for the Windows (or breve CLI) distribution (otherwise 0)
@define WINDOWS 1. 
@define INPUT_FILE "model.txt".
@define DEBUG 3.	          
# 0 for no debugging, 
# 1 for all debug statements, 
# 2 for code that is possibly not reached because of breve tk bug (change to 1 if this code is found to be reached successfully)
# 3 hand-set debug statements

#constants
@define PI_VALUE 3.14159265358979323846264338327950288419716939937510.
@define UNASSEMBLED 1.  
@define ASSEMBLING 2. 
@define ASSEMBLED 3.      
@define MAX_DYNAMIC_NEIGHBORHOOD_SIZE 1000.  
#defines for animation
#used as default values for molecular properties init values
@define MAX_VELOCITY 1. 
@define MAX_ACCELERATION 2.
@define COORDINATOR_FORCE_WEIGHT 5.0.             
@define RANDOM_FORCE_WEIGHT 5.0.                 
@define SPACING_FORCE_WEIGHT 5.0.               


#other inputs
#these settings are overridden by values in the [simulation] section of the model file
@define STEP 0.2.
@define MOVE_REALISTICALLY 0.
@define SIMULATION_LENGTH 0.  # set to zero for a simulation that does not end
@define THIS_MOLTYPE "1".	  # Print out positions for this molecule type id (default)
@define PRODUCE_VISUAL_OUTPUT 1.
@define LIGHT_POSITION (20,20,20).
@define CAMERA_TARGET (20,20,0).
@define CAMERA_POSITION (1,5,50).
@define MOVIE_LENGTH 5.0.