Some help with elementary set-up in Copasi

211 views
Skip to first unread message

Vic Truesdale

unread,
Jul 23, 2018, 6:16:22 AM7/23/18
to copasi-u...@googlegroups.com
Hi

I'm a novice with Copasi and would appreciate a strong lead on what will be the simple matter of using Global Quantities with  forward and back reaction rate constants. I'm working this through 'on the side' in a simple system of a consecutive series of equilibria, K1, K2, etc. Since K1 = kf/kb for  step 1, and similarly thereafter, I see that I can 'gang' the ratios of the rate constants, to constrain the model to fewer 'essential parameters'.

Now the problem is that I haven't worked out how to use Global Quantities with the kf/kb for each step. Instead, I've got myself totally confused! Can you state explicitly then, what I should do? Here are a couple of questions I haven't managed to answer. I'll pose them as if we were dealing with k1 , k2 and K1:

Am I right in thinking that I need to define either one of the rate constants, or K1, as a Global Quantity?

If it is K1, I'll have to define that as the ratio of k1 and k2 - My instinct though is that I should be defining one of the rate constants in terms of K1 and the other rate constant, so that I place a numerical value for one in the reaction definition box, and the other will be computed by the programme. 

Whichever it is, does the syntax going into the Expression box include an = sign, or is that implied?

If we settled the above, I'm assuming that we would similarly work through the other equilibria. It is correct, isn't it, that I'd be best to use a series of rate constants, rather than keep using k1 and k2, as the programme does.

I'm a little troubled about 'mapping'. Am I right in thinking though, that in effect, clicking on this 'switches on the relationship' that one has defined. If one leaves it in 'local', it remains witched off. 

Thanks for any help.

Vic

James Sluka

unread,
Jul 23, 2018, 1:11:40 PM7/23/18
to copasi-u...@googlegroups.com

I believe you need to assign all your variables as global. I would use;

k1f,k1r,K1

k2f,k2r,K2

etc.

To replace one of the rate constants for a reaction with a function of the equilibrium constant you set the one to be replaced as “assignment” (on the “Global Quantities” list), then double click that row to get to the assignment dialog.  Then in the equation box put the proper ratio, e.g.;

Values[k1f].InitalValue/Values[K1].InitalValue

No equal sign and you need to use the Copasi logo button to get to the parameter lists. If Copasi likes the formula the box turns blue. If it can’t parse the formula the box is pink.

The other parameters for that reaction, k1f and K1, are assigned initial values in the Global Quantities list. When you change one the dependent calculated value should automatically change as well.

 

Now when you create equation one as “reversible mass action” you can click on the rate constants in the “Mapping” column and point them at the appropriate global variable (k1f and k1r).

 

I hope that helps.

 

jim

--
You received this message because you are subscribed to the Google Groups "COPASI User Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to copasi-user-fo...@googlegroups.com.
To post to this group, send email to copasi-u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/copasi-user-forum/CAF%3D4GRgBj3bb6y%3DmQ4OnLX%2Bpn-4MFU9hGDRWvMuRjBr8kegQYw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Vic Truesdale

unread,
Jul 24, 2018, 3:27:26 AM7/24/18
to copasi-u...@googlegroups.com
Dear Jim

Thanks for that. there's no way I would have worked that out and I was completely on the wrong tack!

Vic

To unsubscribe from this group and stop receiving emails from it, send an email to copasi-user-forum+unsubscribe@googlegroups.com.
To post to this group, send email to copasi-user-forum@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "COPASI User Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to copasi-user-forum+unsubscribe@googlegroups.com.
To post to this group, send email to copasi-user-forum@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/copasi-user-forum/179b01d422a8%243d435520%24b7c9ff60%24%40gmail.com.

Vic Truesdale

unread,
Jul 24, 2018, 6:32:22 AM7/24/18
to copasi-u...@googlegroups.com
Hi

Jim has explained that 'to gang' all my rate constants in a consecutive equilibrium reaction scheme  I need to enter all my rate and  equilibrium constants as Global Quantities. He advised me to use the syntax:  Values[k1f].InitalValue/Values[K1].InitalValue    . I am trying this out on reaction 3 as a test case. but haven't managed to get the Expression compartment to go blue!

1.  I am not understanding whether the syntax should go in, as written, with say  3 in place of 1.
2. I've looked at the example for Michaelis-Menten given in the Manual, and that suggests that one could use a simple ratio:  That doesn't help, either.
3. Jim's instructions suggested that as I typed, the programme would anticipate my writing. I don't anything like that. Also, am I supposed to use the button that looks like the Copasi  Emblem, situated to the right of the Expression block? If so, what sub-section would I need to select?

If I could only see a properly constructed emplacement, I'd be able to replicate that. Accordingly, I attach my little programme - it is by no-means finished, but if someone could settle this little section on reaction 3, I'd be very grateful.

Vic 
SO model OPEN to CO2.cps

James Sluka

unread,
Jul 25, 2018, 12:10:37 PM7/25/18
to copasi-u...@googlegroups.com

To clarify; Copasi won’t “auto-complete” but it does parse the expression and changes the box’s background color depending on if it parses as a valid expression (to Copasi). You can manually enter the expression but the syntax for species, globals etc. is a bit tricky so I find it much easier to use the Copasi button. The click-path is [Copasi][Global Quantities][Initial values][your global var]. Note that once a valid equation has been entered the next time you go to edit the expression the Copasi button is gone and you need to first click the button that is where the Copasi button was before, it has a square with a partial diagonal as the button’s symbol. The mouse-over note for the button is “edit expression”

 

For your equation 3 the syntax is {Values[k3f].InitialValue}/{Values[K3].InitialValue}, which is easiest to enter via the Copasi button and will give a blue box when it is completely entered.

 

If you want to include a concentration in the expression the usual click path is [Copasi][Species][Transient Concentrations][your species(t)]

 

jim

 

From: copasi-u...@googlegroups.com <copasi-u...@googlegroups.com> On Behalf Of Vic Truesdale
Sent: Tuesday, July 24, 2018 6:32 AM
To: copasi-u...@googlegroups.com
Subject: Re: [copasi-user-forum] Some help with elementary set-up in Copasi

 

Hi

 

Jim has explained that 'to gang' all my rate constants in a consecutive equilibrium reaction scheme  I need to enter all my rate and  equilibrium constants as Global Quantities. He advised me to use the syntax:  Values[k1f].InitalValue/Values[K1].InitalValue    . I am trying this out on reaction 3 as a test case. but haven't managed to get the Expression compartment to go blue!

To unsubscribe from this group and stop receiving emails from it, send an email to copasi-user-fo...@googlegroups.com.
To post to this group, send email to copasi-u...@googlegroups.com.

--

You received this message because you are subscribed to the Google Groups "COPASI User Forum" group.

To unsubscribe from this group and stop receiving emails from it, send an email to copasi-user-fo...@googlegroups.com.
To post to this group, send email to copasi-u...@googlegroups.com.

 

 

--

You received this message because you are subscribed to the Google Groups "COPASI User Forum" group.

To unsubscribe from this group and stop receiving emails from it, send an email to copasi-user-fo...@googlegroups.com.
To post to this group, send email to copasi-u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/copasi-user-forum/CAF%3D4GRhzix1QQuxkSEWsUgcgXXBR2xb%2BWJHRhv2DTj%3DGonYmGg%40mail.gmail.com.

Vic Truesdale

unread,
Jul 25, 2018, 12:22:47 PM7/25/18
to copasi-u...@googlegroups.com
Thanks Jim; I'll start to try that right now. You state  'the syntax for species, globals etc. is a bit tricky so I find it much easier to use the Copasi button'. Sounds to me that I need to use the Copasi button - that's the one to the right of the definition window - yes? I take it then that if I press the Copasi button, something will open up in the definition window, and that will deal with the syntax.  

Just for the record, and my broader education, where are the syntax rules held? Are they another language? I have to say that the syntax given to me earlier in the week was unrecognisable to me, and something I would never have generated spontaneously, myself. (Just checking that I should expect that!)

Now I'll try again.

Vic



To unsubscribe from this group and stop receiving emails from it, send an email to copasi-user-forum+unsubscribe@googlegroups.com.
To post to this group, send email to copasi-user-forum@googlegroups.com.

--

You received this message because you are subscribed to the Google Groups "COPASI User Forum" group.

To unsubscribe from this group and stop receiving emails from it, send an email to copasi-user-forum+unsubscribe@googlegroups.com.
To post to this group, send email to copasi-user-forum@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "COPASI User Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to copasi-user-forum+unsubscribe@googlegroups.com.
To post to this group, send email to copasi-user-forum@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "COPASI User Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to copasi-user-forum+unsubscribe@googlegroups.com.
To post to this group, send email to copasi-user-forum@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/copasi-user-forum/1965901d42432%240992fe20%241cb8fa60%24%40gmail.com.

Frank Bergmann

unread,
Jul 26, 2018, 5:15:29 AM7/26/18
to COPASI User Forum
Hello Vic, 

Under [1] you find the general syntax allowed in COPASI expressions. That leaves out the expressions for the object. Since model elements in COPASI can have the same name (contain spaces and special characters), and have different values (like initial value / rate / value ...), we needed a way to come up with a scheme that would work for us. If you cannot enter the expressions directly, you can change the value in the properties called 'Use Advanced Editing', which does allow you to enter the expressions for the elements yourself. Generally: 

- object expressions are surrounded by curly brackets: i.e; {Time} for the model time
- expressions involving species will be surrounded by square brackets additionally:  i.e {[species]} for the transient concentration of the species or {[species]_0} for the species initial value
- expressions involving parameters will be prefixed by "Values" followed by square brackets: i.e {Values[quantity]} for the transient value of the parameter 'quantity' or {Values[quantity].InitialValue} for its initial value
- expressions involving compartments will be prefixed by "Compartments" followed by square brackets: i.e: {Compartments[compartment].Volume} for the compartments transient volume, or {Compartments[compartment].InitialVolume} for the initial volume

As Jim mentioned the easiest way to get around this, is to select the element once in the object browser (COPASI button), and then just note the syntax for the expression. 

I hope this helps, 
best
Frank

James Sluka

unread,
Jul 26, 2018, 11:23:21 AM7/26/18
to copasi-u...@googlegroups.com

Vic-

Thanks for the articles. You clearly are way ahead of me on modeling solubility and already know of the challenges and alternative viewpoints. If you have any other questions on getting Copasi to do what you want feel free to email me.

 

Jim

 

From: copasi-u...@googlegroups.com <copasi-u...@googlegroups.com> On Behalf Of Vic Truesdale
Sent: Wednesday, July 25, 2018 12:23 PM
To: copasi-u...@googlegroups.com
Subject: Re: [copasi-user-forum] Some help with elementary set-up in Copasi

 

Thanks Jim; I'll start to try that right now. You state  'the syntax for species, globals etc. is a bit tricky so I find it much easier to use the Copasi button'. Sounds to me that I need to use the Copasi button - that's the one to the right of the definition window - yes? I take it then that if I press the Copasi button, something will open up in the definition window, and that will deal with the syntax.  

To unsubscribe from this group and stop receiving emails from it, send an email to copasi-user-fo...@googlegroups.com.
To post to this group, send email to copasi-u...@googlegroups.com.

--

You received this message because you are subscribed to the Google Groups "COPASI User Forum" group.

To unsubscribe from this group and stop receiving emails from it, send an email to copasi-user-fo...@googlegroups.com.
To post to this group, send email to copasi-u...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "COPASI User Forum" group.

To unsubscribe from this group and stop receiving emails from it, send an email to copasi-user-fo...@googlegroups.com.
To post to this group, send email to copasi-u...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "COPASI User Forum" group.

To unsubscribe from this group and stop receiving emails from it, send an email to copasi-user-fo...@googlegroups.com.
To post to this group, send email to copasi-u...@googlegroups.com.


For more options, visit https://groups.google.com/d/optout.

 

--

You received this message because you are subscribed to the Google Groups "COPASI User Forum" group.

To unsubscribe from this group and stop receiving emails from it, send an email to copasi-user-fo...@googlegroups.com.
To post to this group, send email to copasi-u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/copasi-user-forum/CAF%3D4GRi9KKEj_U1_Jp30ob8jQCxt82CLcNRJbs5ODt5%2B2iuKiQ%40mail.gmail.com.

Reply all
Reply to author
Forward
0 new messages