Difference between revisions of "Example model files for Magrathea"

From irefindex
Line 518: Line 518:
 
instantiate 1 determined point - 30 10 10
 
instantiate 1 determined point - 30 10 10
 
[/coordinatorType]
 
[/coordinatorType]
 +
 +
#****************************************************************
 +
 +
EOF
 +
 +
</pre>
 +
 +
 +
== Example 6. Coordinators and rules.  ==
 +
 +
<pre>
 +
 +
###########
 +
#rules.1.txt
 +
#a simple demonstration of the use of rules by coordinators
 +
#this example shows a substrate (molecule 1) that undergoes
 +
#a state-change (phosphorylation) upon interaction with a
 +
#kinase (molecule 2)
 +
#
 +
#last tested with breve 2.6.1 and magrathea.tz 1.44
 +
#at the time of testing, neighbor lines are only drawn if breve 2.5 is used
 +
###########
 +
 +
 +
[simulation]
 +
camera-at-from 10 15 10 0 1 30
 +
light-source 0 20 20
 +
movie-length 40
 +
[/simulation]
 +
 +
 +
 +
[moleculeType]
 +
id 1
 +
label substrate
 +
show-label 1
 +
color .81 .60 .21
 +
shape Sphere 1
 +
show-neighbor-lines 1
 +
neighborhood-size 1
 +
dynamic-neighborhood-sizing 1
 +
 +
###
 +
#the following line is read as:
 +
#there is some feature with an identifier of 234
 +
#and this feature is given the label of "Tyr234"
 +
###
 +
feature 234 Tyr234
 +
 +
#-----------------------------------------------------------------
 +
#the following line is read as:
 +
#there is some feature with an identifier of 234
 +
#and this feature may have the value of 0
 +
#and this feature-value pair is given the label "unphosphorylated"
 +
#see the "Making Models" section of the Magrathea manual
 +
#for more a more detailed explanation
 +
#-----------------------------------------------------------------
 +
feature-state 234 0 unphosphorylated
 +
 +
#-----------------------------------------------------------------
 +
#the following line is read as:
 +
#there is some feature with an identifier of 234
 +
#and this feature may have the value of 1
 +
#and this feature-value pair is given the label "phosphorylated"
 +
#see the "Making Models" section of the Magrathea manual
 +
#for more a more detailed explanation
 +
#-----------------------------------------------------------------
 +
feature-state 234 1 phosphorylated
 +
 +
coordinator 1 3
 +
instantiate 1 determined point - 10 10 10
 +
[/moleculeType]
 +
 +
 +
[moleculeType]
 +
id 2
 +
label kinase
 +
show-label 1
 +
color .92 .32 .11
 +
shape Sphere 1
 +
show-neighbor-lines 1
 +
neighborhood-size 1
 +
dynamic-neighborhood-sizing 1
 +
coordinator 1 3
 +
instantiate 1 determined point - 10 20 10
 +
[/moleculeType]
 +
 +
 +
[coordinatorType]
 +
id 3
 +
label complex_with_rules
 +
color 1 1 1
 +
shape Cube 1 1 1
 +
neighborhood-size 10
 +
molecule 1 1 0
 +
molecule 2 1 0
 +
[rule]
 +
#-----------------------------------------------------------------
 +
#this rule describes the complex formation
 +
#the first two "if" lines specify
 +
#which molecules must be present for the rule to be executed
 +
#the "then" line specifies what happens if the rule is executed and
 +
#the "parameters" line specifies a probability that
 +
#the rule will be executed should the conditions be met
 +
#see the "Making Models" section of the Magrathea manual
 +
#for more a more detailed explanation
 +
#-----------------------------------------------------------------
 +
id 1
 +
#-----------------------------------------------------------------
 +
#the following line is read (from left to right)
 +
#if present a "tag" of 1 will be used to refer to
 +
#molecule of type 1 (where 1 instance is present)
 +
#that is not (0) assembled with this coordinator
 +
#and does not (0) have a feature-state pair of 234.1
 +
#i.e. feature 234 in state 1
 +
#see the "Making Models" section of the Magrathea manual
 +
#for more a more detailed explanation
 +
#-----------------------------------------------------------------
 +
if 1.1.1.0.0.234.1
 +
if 2.2.1.0
 +
 +
#-----------------------------------------------------------------
 +
#the following line is read
 +
#molecule(s) assigned with tag 1 (see if lines above)
 +
#are allowed to begin asembly with the coordinator
 +
#see the "Making Models" section of the Magrathea manual
 +
#for more a more detailed explanation
 +
#-----------------------------------------------------------------
 +
then 1 begins-assembly
 +
then 2 begins-assembly
 +
 +
#-----------------------------------------------------------------
 +
#the following line indicates that the event
 +
#described by the "then" lines above
 +
#will be executed with a probability of 1
 +
#if the conditions specified in the "if"
 +
#lines above are met
 +
#see the "Making Models" section of the Magrathea manual
 +
#for more a more detailed explanation
 +
#-----------------------------------------------------------------
 +
parameters p 1
 +
[/rule]
 +
 +
 +
[rule]
 +
#-----------------------------------------------------------------
 +
#this rule describes a state change of the substrate (molecule 1)
 +
#generated by the presence of the kinase (molecule 2)
 +
#the state change is visualized by a change of colour of
 +
#the substrate molecule
 +
#see the "Making Models" section of the Magrathea manual
 +
#for more a more detailed explanation
 +
#-----------------------------------------------------------------
 +
id 2
 +
if 1.1.1.1.0.234.1
 +
if 2.2.1.1
 +
#-----------------------------------------------------------------
 +
#the following line is read as:
 +
#the molecule with the tag of 1 (see first "if" line above)
 +
#changes state such that
 +
#feature 234 assumes state 1
 +
#see the "Making Models" section of the Magrathea manual
 +
#for more a more detailed explanation
 +
#-----------------------------------------------------------------
 +
then 1 changes-state-to 234.1
 +
then 1 changes-colour-to .1:.32:.11
 +
parameters p 1
 +
[/rule]
 +
 +
 +
[rule]
 +
#-----------------------------------------------------------------
 +
#this rule describes the idea that the substrate (molecule 1)
 +
#leaves the coordinator once it has been phosphorylated
 +
#i.e. feature 234 has a state value of 1
 +
#see the "Making Models" section of the Magrathea manual
 +
#for more a more detailed explanation
 +
#-----------------------------------------------------------------
 +
#unbinding
 +
#id 3
 +
if 1.1.1.1.1.234.1
 +
if 2.2.1.1
 +
then 1 leaves-coordinator
 +
then 2 leaves-coordinator
 +
parameters p 1
 +
[/rule]
 +
[/coordinatorType]
 +
 +
  
 
#****************************************************************
 
#****************************************************************

Revision as of 17:03, 5 March 2009

Copy and paste any of the examples below to a file named model.txt and move to the same directory as magrathea.tz to run.

Example 1. Point coordinator representing an interaction


###########
#interaction.1.txt
#showing a coordinator used to model an interaction between two molecules
#
#last tested with breve 2.6.1 and magrathea.tz 1.40
###########


[simulation]
camera-at-from 10 10 0 0 1 30
light-source 0 20 20
movie-length 10
[/simulation]

[moleculeType]
id 1
label a
show-label 1
color .81 .60 .21
shape Sphere 1
show-neighbor-lines 1
neighborhood-size 1.0
dynamic-neighborhood-sizing 1
coordinator 1 3
instantiate 1 random spherical volume 10 10 0 1
[/moleculeType]

[moleculeType]
id 2        
label b
show-label 1
color 0.67 0.08 0.37
shape Sphere 1
show-neighbor-lines 1
neighborhood-size 1.0
dynamic-neighborhood-sizing 1
coordinator 1 3
instantiate 1 random spherical volume 15 10 10 1
[/moleculeType]

[coordinatorType]
id 3
label complex
shape Cube 1 1 1
neighborhood-size 1
molecule 1 1
molecule 2 1
[/coordinatorType]

#****************************************************************

EOF

Example 2. Point coordinator representing a complex


###########
#complex.1.txt
#showing a coordinator used to model a complex between three molecules
#complex stoichiometry is a,b,c (note one extra c molecule is left out)
#last tested with breve 2.6.1 and magrathea.tz 1.42
###########


[simulation]
camera-at-from 10 10 0 0 1 30
light-source 0 20 20
movie-length 10
[/simulation]

[moleculeType]
id 1
label a
show-label 1
color .81 .60 .21
shape Sphere 1
show-neighbor-lines 1
neighborhood-size 1.0
dynamic-neighborhood-sizing 1
coordinator 1 4
instantiate 1 random spherical volume 10 10 0 1
[/moleculeType]

[moleculeType]
id 2        
label b
show-label 1
color 0.67 0.08 0.37
shape Sphere 1
show-neighbor-lines 1
neighborhood-size 1.0
dynamic-neighborhood-sizing 1
coordinator 1 4
instantiate 1 random spherical volume 15 10 10 1
[/moleculeType]

[moleculeType]
id 3        
label c
show-label 1
color 0.47 0.11 0.37
shape Sphere 1
show-neighbor-lines 1
neighborhood-size 1.0
dynamic-neighborhood-sizing 1
coordinator 1 4
instantiate 2 random spherical volume 5 10 10 1
[/moleculeType]


[coordinatorType]
id 4
label complex
shape Cube 1 1 1
neighborhood-size 1
molecule 1 1
molecule 2 1
molecule 3 1
[/coordinatorType]

#****************************************************************

EOF


###########
#complex.2.txt
#showing a coordinator used to model a complex between four molecules
#stoichiometry of complex is a,b,2c
#last tested with breve 2.6.1 and magrathea.tz 1.42
###########


[simulation]
camera-at-from 10 10 0 0 1 30
light-source 0 20 20
movie-length 10
[/simulation]

[moleculeType]
id 1
label a
show-label 1
color .81 .60 .21
shape Sphere 1
show-neighbor-lines 1
neighborhood-size 1.0
dynamic-neighborhood-sizing 1
coordinator 1 4
instantiate 1 random spherical volume 10 10 0 1
[/moleculeType]

[moleculeType]
id 2        
label b
show-label 1
color 0.67 0.08 0.37
shape Sphere 1
show-neighbor-lines 1
neighborhood-size 1.0
dynamic-neighborhood-sizing 1
coordinator 1 4
instantiate 1 random spherical volume 15 10 10 1
[/moleculeType]

[moleculeType]
id 3        
label c
show-label 1
color 0.47 0.11 0.37
shape Sphere 1
show-neighbor-lines 1
neighborhood-size 1.0
dynamic-neighborhood-sizing 1
coordinator 1 4
instantiate 2 random spherical volume 5 10 10 1
[/moleculeType]


[coordinatorType]
id 4
label complex
shape Cube 1 1 1
neighborhood-size 1
molecule 1 1
molecule 2 1
molecule 3 2
[/coordinatorType]

#****************************************************************

EOF


Example 3. Point coordinator representing a compartment


###########
#compartment.1.txt
#showing a coordinator used to model a compartment with 20 
#closely packed "surface" molecules
#one coordinator type is used with one molecule type
#
#last tested with breve 2.6.1 and magrathea.tz 1.42
#at the time of testing, neighbor lines are only drawn if breve 2.5 is used
###########


[simulation]
camera-at-from 10 10 0 0 1 30
light-source 0 20 20
movie-length 10
[/simulation]

[moleculeType]
id 1
label a
show-label 0
color .81 .60 .21
shape Sphere 1
show-neighbor-lines 1
neighborhood-size 1.0
dynamic-neighborhood-sizing 1
coordinator 1 2
instantiate 20 random spherical volume 10 10 0 1
[/moleculeType]



[coordinatorType]
id 2
label compartment
shape Sphere 0.1
opacity 0.5
geometricType point
neighborhood-size 5
#
isSizeDynamic 1
#
molecule 1 20
[/coordinatorType]

#****************************************************************

EOF


###########
#compartment.2.txt
#showing a coordinator used to model a compartment with 20 
#surface marker molecules
#the actual diameter of these marker molecules is larger than what is 
#rendered using the line
#shape Sphere 1 2
#one coordinator type is used with one molecule type

#last tested with breve 2.6.1 and magrathea.tz 1.42
#at the time of testing, neighbor lines are only drawn if breve 2.5 is used
###########


[simulation]
camera-at-from 10 10 0 0 1 30
light-source 0 20 20
movie-length 10
[/simulation]

[moleculeType]
id 1
label a
show-label 0
color .81 .60 .21
#
shape Sphere 1 2
#
show-neighbor-lines 1
neighborhood-size 1.0
dynamic-neighborhood-sizing 1
coordinator 1 2
instantiate 20 random spherical volume 10 10 0 1
[/moleculeType]



[coordinatorType]
id 2
label compartment
shape Sphere 0.1
opacity 0.5
geometricType point
neighborhood-size 5
isSizeDynamic 1
molecule 1 20
[/coordinatorType]

#****************************************************************

EOF

Example 4. Plane coordinator representing a membrane section.


###########
#membrane.1.txt
#showing a coordinator used to model a membrane section 
#20 member molecules are moved to the surface of the plane and 
#their random movement is constrained to the surface of this plane
#
#last tested with breve 2.6.1 and magrathea.tz 1.42
#at the time of testing, neighbor lines are only drawn if breve 2.5 is used
###########


[simulation]
camera-at-from 10 10 0 0 1 50
light-source 0 20 20
movie-length 15
[/simulation]

[moleculeType]
id 1
label a
show-label 0
color .81 .60 .21
shape Sphere 1
show-neighbor-lines 1
neighborhood-size 1.0
dynamic-neighborhood-sizing 1
coordinator 1 2
instantiate 20 random spherical volume 10 10 0 5
[/moleculeType]



[coordinatorType]
id 2
label membrane
color .383 .466 .561
opacity 0.5
shape Cube 30 .2 30
geometricType plane
neighborhood-size 5
#
isCreationDynamic 0
isMobile 0
isSizeDynamic 1
#
molecule 1 20
#orientation vertex 0 1 0 pointing-at 0 1 0
#orientation vertex 0 1 0 pointing-at 1 0 0
#orientation vertex 0 1 0 pointing-at 0 0 1
instantiate 1 determined point - 10 5 10
[/coordinatorType]

#****************************************************************

EOF


###########
#membrane.2.txt
#showing a coordinator used to model a membrane section 
#20 member molecules are moved to the surface of the plane and 
#their random movement is constrained to the surface of this plane
#non-membrane molecules (molecule type 2) will collide and be reprelled
#by the surface of this planar coordinator
#
#last tested with breve 2.6.1 and magrathea.tz 1.44
#at the time of testing, neighbor lines are only drawn if breve 2.5 is used
###########


[simulation]
camera-at-from 10 10 0 0 1 50
light-source 0 20 20
movie-length 15
[/simulation]

[moleculeType]
id 1
label compartment_marker
show-label 0
color .81 .60 .21
shape Sphere .5 2
show-neighbor-lines 1
neighborhood-size 1.0
dynamic-neighborhood-sizing 1
coordinator 1 3
instantiate 20 random spherical volume 10 10 10 5
[/moleculeType]

[moleculeType]
id 2
label non_membrane_molecule
show-label 0
color .37 .51 .26
shape Sphere 1
show-neighbor-lines 1
neighborhood-size 1.0
dynamic-neighborhood-sizing 1
instantiate 20 random spherical volume 10 15 10 5
instantiate 20 random spherical volume 10 5 10 5
[/moleculeType]


[coordinatorType]
id 3
label membrane
color .383 .466 .561
opacity 0.5
shape Cube 30 .2 30
geometricType plane
neighborhood-size 5
isCreationDynamic 0
isMobile 0
isSizeDynamic 1
molecule 1 20
#orientation vertex 0 1 0 pointing-at 0 1 0
#orientation vertex 0 1 0 pointing-at 1 0 0
#orientation vertex 0 1 0 pointing-at 0 0 1
instantiate 1 determined point - 10 10 10
[/coordinatorType]

#****************************************************************

EOF

Example 5. Line coordinator representing a microtubule.


###########
#microtubule.1.txt
#showing a linear coordinator used to model a microtubule or some
#other linear macromolecular structure 
#20 member molecules are moved to the line coordinator and 
#their random movement is constrained to this line
#the line coordinator is dynamically sized so it grows in length 
#as molecules join it
#the molecules have an effective radius of 2 (versus the rendered 1 unit)
#so the molecules appear spaced out along the line
#
#last tested with breve 2.6.1 and magrathea.tz 1.44
#at the time of testing, neighbor lines are only drawn if breve 2.5 is used
###########


[simulation]
camera-at-from 20 10 0 1 1 70
light-source 0 20 20
movie-length 40
[/simulation]

[moleculeType]
id 1
label line_coordinator_component_1
show-label 0
color .81 .60 .21
shape Sphere 1 2
show-neighbor-lines 1
neighborhood-size 1
dynamic-neighborhood-sizing 1
coordinator 1 2
instantiate 20 random cylindrical volume 10 15 10 0 1 0 0 35
[/moleculeType]



[coordinatorType]
id 2
label line_coordinator
color .383 .466 .561
opacity 1
shape Cube .2 .2 .2
geometricType line
neighborhood-size 5
isCreationDynamic 0
isMobile 0
isSizeDynamic 1
molecule 1 20

#various orientations to try
#remove the # sign in front of one of these lines
#orientation vertex 1 0 0 pointing-at 0 1 0
#orientation vertex 1 0 0 pointing-at 1 0 0
#orientation vertex 1 0 0 pointing-at 0 0 1
#
#orientation vertex 1 0 0 pointing-at 1 1 0
#orientation vertex 1 0 0 pointing-at 1 0 1
#orientation vertex 1 0 0 pointing-at 0 1 1
#orientation vertex 1 0 0 pointing-at 1 1 1
instantiate 1 determined point - 30 10 10
[/coordinatorType]

#****************************************************************

EOF


Example 6. Coordinators and rules.


###########
#rules.1.txt
#a simple demonstration of the use of rules by coordinators
#this example shows a substrate (molecule 1) that undergoes 
#a state-change (phosphorylation) upon interaction with a 
#kinase (molecule 2) 
#
#last tested with breve 2.6.1 and magrathea.tz 1.44
#at the time of testing, neighbor lines are only drawn if breve 2.5 is used
###########


[simulation]
camera-at-from 10 15 10 0 1 30
light-source 0 20 20
movie-length 40
[/simulation]



[moleculeType]
id 1
label substrate
show-label 1
color .81 .60 .21
shape Sphere 1
show-neighbor-lines 1
neighborhood-size 1
dynamic-neighborhood-sizing 1

###
#the following line is read as: 
#there is some feature with an identifier of 234
#and this feature is given the label of "Tyr234"
###
feature 234 Tyr234

#-----------------------------------------------------------------
#the following line is read as: 
#there is some feature with an identifier of 234
#and this feature may have the value of 0
#and this feature-value pair is given the label "unphosphorylated"
#see the "Making Models" section of the Magrathea manual
#for more a more detailed explanation
#-----------------------------------------------------------------
feature-state 234 0 unphosphorylated

#-----------------------------------------------------------------
#the following line is read as: 
#there is some feature with an identifier of 234
#and this feature may have the value of 1
#and this feature-value pair is given the label "phosphorylated"
#see the "Making Models" section of the Magrathea manual
#for more a more detailed explanation
#-----------------------------------------------------------------
feature-state 234 1 phosphorylated

coordinator 1 3
instantiate 1 determined point - 10 10 10
[/moleculeType]


[moleculeType]
id 2
label kinase
show-label 1
color .92 .32 .11
shape Sphere 1
show-neighbor-lines 1
neighborhood-size 1
dynamic-neighborhood-sizing 1
coordinator 1 3
instantiate 1 determined point - 10 20 10
[/moleculeType]


[coordinatorType]
id 3
label complex_with_rules
color 1 1 1
shape Cube 1 1 1
neighborhood-size 10
molecule 1 1 0
molecule 2 1 0
[rule]
#-----------------------------------------------------------------
#this rule describes the complex formation
#the first two "if" lines specify
#which molecules must be present for the rule to be executed
#the "then" line specifies what happens if the rule is executed and
#the "parameters" line specifies a probability that
#the rule will be executed should the conditions be met 
#see the "Making Models" section of the Magrathea manual
#for more a more detailed explanation
#-----------------------------------------------------------------
id 1
#-----------------------------------------------------------------
#the following line is read (from left to right)
#if present a "tag" of 1 will be used to refer to 
#molecule of type 1 (where 1 instance is present)
#that is not (0) assembled with this coordinator
#and does not (0) have a feature-state pair of 234.1
#i.e. feature 234 in state 1 
#see the "Making Models" section of the Magrathea manual
#for more a more detailed explanation
#-----------------------------------------------------------------
if 1.1.1.0.0.234.1
if 2.2.1.0

#-----------------------------------------------------------------
#the following line is read
#molecule(s) assigned with tag 1 (see if lines above)
#are allowed to begin asembly with the coordinator
#see the "Making Models" section of the Magrathea manual
#for more a more detailed explanation
#-----------------------------------------------------------------
then 1 begins-assembly
then 2 begins-assembly

#-----------------------------------------------------------------
#the following line indicates that the event 
#described by the "then" lines above
#will be executed with a probability of 1
#if the conditions specified in the "if"
#lines above are met
#see the "Making Models" section of the Magrathea manual
#for more a more detailed explanation
#-----------------------------------------------------------------
parameters p 1
[/rule]


[rule]
#-----------------------------------------------------------------
#this rule describes a state change of the substrate (molecule 1)
#generated by the presence of the kinase (molecule 2)
#the state change is visualized by a change of colour of 
#the substrate molecule
#see the "Making Models" section of the Magrathea manual
#for more a more detailed explanation
#-----------------------------------------------------------------
id 2
if 1.1.1.1.0.234.1 
if 2.2.1.1
#-----------------------------------------------------------------
#the following line is read as:
#the molecule with the tag of 1 (see first "if" line above)
#changes state such that
#feature 234 assumes state 1
#see the "Making Models" section of the Magrathea manual
#for more a more detailed explanation
#-----------------------------------------------------------------
then 1 changes-state-to 234.1
then 1 changes-colour-to .1:.32:.11
parameters p 1
[/rule]


[rule]
#-----------------------------------------------------------------
#this rule describes the idea that the substrate (molecule 1) 
#leaves the coordinator once it has been phosphorylated
#i.e. feature 234 has a state value of 1
#see the "Making Models" section of the Magrathea manual
#for more a more detailed explanation
#-----------------------------------------------------------------
#unbinding
#id 3
if 1.1.1.1.1.234.1
if 2.2.1.1
then 1 leaves-coordinator
then 2 leaves-coordinator
parameters p 1
[/rule]
[/coordinatorType] 



#****************************************************************

EOF