James Lawson wrote:
> Hi Andrew,
>
> I have to confess I really didn't understand Erik Butterworth's email. 
> However this is a forward of a reply I just got from Frank Sachse, the 
> original model author.
>
> I think he has a point - it seems that Jsim does do the dimensional 
> conversion but PCEnv appears not to. What do you think?
Hi James,

Changing the mathematical equation by inserting new units to be 
something other than what the user specified is not a good idea - it 
means that the software is overriding what the modeller specified 
automatically. At most the software should alert the user / modeller to 
a possible units problem.

CellML requires unit conversions at the connections - so for example, it 
is possible to connect something in milliamps to something in nanoamps, 
and then the conversion is performed - this is so components from 
different groups can be seamlessly connected up, while we expect that 
authors can (possibly with the help of tools) ensure that the 
mathematics inside components are consistent with the units variables on 
units in the component.

This is also the behaviour specified in CellML 1.0 and 1.1 (which is a 
bit unclear, unfortunately, but I have made it entirely clear in my 
CellML 1.2 drafts).

This has been discussed a few times in the past. See for example 
http://www.cellml.org/pipermail/cellml-discussion/2007-April/000570.html

Best regards,
Andrew

>
> Just to elucidate his last comment, he mentions that my simulation 
> problems might be because of the conversion factor, but I have 
> problems simulating his original version too.
>
> Cheers,
> James
>
> ------------------------------------------------------------------------
>
> Subject:
> Re: CellML model of "Electrophysiological Modeling of Fibroblasts and 
> their Interaction with Myocytes"
> From:
> "Frank B. Sachse" <[EMAIL PROTECTED]>
> Date:
> Wed, 28 May 2008 18:38:25 -0600
> To:
> James Lawson <[EMAIL PROTECTED]>
>
> To:
> James Lawson <[EMAIL PROTECTED]>
>
>
> Dear James,
>
> Yes, your figure looks correct for high coupling and a small number of
> coupled fibroblasts.
>
> I agree that your conversion for I_inter_fibro is "value wise" correct, but
> assumed that CellML automatically handles the conversion because it has
> knowledge of the units. Why doesn't CellML convert the unit in this case?
>
> I never ran in the mentioned problems with the JSim simulation environment,
> which is probably caused by overflow using the 1e6 too large current
> (assuming that it handles the units correct). My JSim contact was Dr.
> Carlson ([EMAIL PROTECTED]). He created the webpage for our model.
> He might be able to explain the differences in the unit handling and point
> at potential causes for the errors. However, I would at first look into the
> unit handling in CellML. Another thing to test: Do the myocyte/fibroblast
> current traces look reasonable?
>
> Best regards,
> Frank
>
> On 5/28/08 5:46 PM, "James Lawson" <[EMAIL PROTECTED]> wrote:
>
>   
>> Dear Frank,
>>
>> Thanks for your help, I have the model working in PCEnv now. I've
>> attached a screenshot of the behaviour of the model with 1 fibroblast.
>> Adding extra fibroblasts produces the correct behaviour as well.
>>
>> The problem was that I had to multiply the I_inter current by a scaling
>> factor of 1 million. This has something to do with the differences
>> between the way PCEnv and Jsim handle units, but I am not sure of the
>> details here.
>>
>> Basically the issue that I have addressed is that units for the
>> variables in the equation for I_inter_fibro aren't dimensionally equivalent:
>>
>> The equation is: I_inter_fibro =(V_fibro - V) / R_mf
>>
>> Where I_inter_fibro is in nanoamperes, V_fibro and V are in millivolts
>> and R_mf is in ohms. So the equation says that nanoamps = millivolts /
>> ohms. Thus I have changed the equation to say I_inter_fibro = 1e+06 *
>> (V_fibro - V) / R_mf
>>
>> So at the moment I do not know how to get the model to run in both PCEnv
>> and Jsim. What I'll do for now is upload a variant of the model to the
>> repository with different curation notes, but ideally I should be able
>> to get one model that runs in both environments.
>>
>> I've been trying to run your original version of the model in Jsim but I
>> keep getting solver errors saying 'aborted: NaNs detected during
>> evaluation' or 'aborted: Expression "time Attempt to set domain grid ct < 2"
>>
>> If you could give me any tips at all here I would really appreciate it.
>>
>> Thanks very much.
>>
>> Kind regards,
>> James Lawson
>>
>> Frank B. Sachse wrote:
>>     
>>> Dear James,
>>>
>>> I agree, Fig 7 would be best to illustrate myocyte-fibroblast interactions.
>>> It shows that fibroblasts follow closely the myocyte transmembrane voltage
>>> and that fibroblast coupling modulates strongly this voltage.
>>>
>>> We tested the CellML cell pair model by importing it in JSim and
>>> reconstructing this figure:
>>> http://www.physiome.org/model/doku.php?id=Cell_Physiology:Action_potential:M
>>> yocyte_fibroblast_coupling:model_index
>>> This java applet might be a help to check your results.
>>>
>>> Regarding the stimulus protocol: Current is only applied to the myocyte. The
>>> fibroblast's "stimulus" current is only through the gap junction channels to
>>> the mycoyte (represented as an ohmic resistor). Please use the stimulus
>>> parameters from our paper (last paragraph in section Methods). The original
>>> Pandit's protocol is not a standard experimental protocol and leads to Na
>>> channel inactivation.
>>>
>>> I hope this explanation is helpful. I appreciate your efforts to get the
>>> model running in PCEnv.
>>>
>>> Best regards,
>>> Frank
>>>
>>>
>>> On 5/22/08 6:17 PM, "James Lawson" <[EMAIL PROTECTED]> wrote:
>>>
>>>   
>>>       
>>>> Dear Frank,
>>>>
>>>> My name is James Lawson, I work with Catherine Lloyd on curating the
>>>> CellML model repository.
>>>>
>>>> I'm just looking through your model at
>>>>
>>>>         
> http://www.cellml.org/models/sachse_moreno_abildskov_2007_version01_variant0>>>
> 1
>   
>>>> and http://www.cellml.org/models/sachse_moreno_abildskov_2007_version01
>>>> - which are the Pandit-fibroblast combined model and fibroblast only
>>>> models, respectively.
>>>>
>>>> Basically I'm trying to reproduce some of the figures in your
>>>> publication so I can make a "PCEnv session" file for Peter Hunter. This
>>>> is a file that you can load up in our CellML software PCEnv that I can
>>>> configure so it can automatically use the model to reproduce graphs from
>>>> the publication which the model is based on.
>>>>
>>>> The main figures I'm trying to reproduce are the action potentials shown
>>>> in Figure 7 - would you say this is appropriate?
>>>>
>>>> I've attached a number of screenshots, and if you can, I'd be very
>>>> appreciative if you could provide some feedback on whether we're getting
>>>> the right simulation results here.
>>>>
>>>> The first one is a screenshot of a PCEnv simulation of the combined
>>>> model. The top graph shows an AP in yellow which is produced by graphing
>>>> the main 'V' from the 'membrane' component against time. The bottom
>>>> green graph is what I get if I plot 'V_fibro' from the component
>>>> 'membrane_fibro' - I don't think its behaving like it should.
>>>>
>>>> I noticed in your paper, the equations you give for the fibroblast model
>>>> include the i_Stim stimulus current in the main membrane potential
>>>> equation, so what I did was to import the i_Stim variable from the main
>>>> 'membrane' component into the 'membrane_fibro' component, and added it
>>>> into the fibroblast membrane potential equation [CellML file attached].
>>>> What I could also have done was create another stimulus protocol, using
>>>> the values from the fibroblast only model, but that model seems to
>>>> produce behaviour on a different timescale, so I stuck with the main
>>>> stimulus protocol. Also, having two different protocols seems to violate
>>>> the concept of the coupling you're trying to describe.
>>>>
>>>> If you look at the image I've called 'sachse_stim-added-to-Vfibro.png'
>>>> you can see the results of simulating this new version. The V and
>>>> V_fibro potentials are plotted together in the top graph - the former in
>>>> red and the latter in blue. Then below, I've plotted just V in yellow,
>>>> and below that, just V_fibro in green.
>>>>
>>>> The next image to look at is called '1fibroblast_fig7c.png' - I've tried
>>>> to reproduce Figure 7c here, so I'm plotting the I_inter current for the
>>>> fibroblast and myocyte cells together. This result does look reasonably
>>>> similar to the figure in the paper but the timescale is all wrong - the
>>>> peaks are too wide. For the image '10_fibroblasts_fig7d.png I've changed
>>>> the variable 'number_of_fibroblasts' in the 'I_inter' component to 10,
>>>> to try to reproduce figure 7d. Again I think it does look reasonable but
>>>> the timescale is wrong and the peaks are far too wide.
>>>>
>>>> So the final image I've attached is just called 'fibroblast.png' and it
>>>> is the simulation result from just the fibroblast model. I noticed the
>>>> behaviour is pretty different to what the fibroblast model produces when
>>>> coupled to the myocyte model. There are also the different values for
>>>> amplitude etc. in the stimulus protocol - is this all fine?
>>>>
>>>> If you could shed any light on this for me that would be really great.
>>>>
>>>> Kind regards,
>>>> James Lawson
>>>>
>>>>
>>>>     
>>>>         
>>>   
>>>       
>
>   

_______________________________________________
cellml-discussion mailing list
cellml-discussion@cellml.org
http://www.cellml.org/mailman/listinfo/cellml-discussion

Reply via email to