From 3f70a09fc04a3f4b01912cd347cd9eb65d6dd015 Mon Sep 17 00:00:00 2001 From: Michael Clerx Date: Wed, 18 Mar 2026 20:00:03 +0000 Subject: [PATCH] Added meta data to CellML files. Closes #10. --- models-cellml-v1/vc-level-0.cellml | 39 ++++++++++++++++++++++++++ models-cellml-v1/vc-level-1.cellml | 40 +++++++++++++++++++++++++++ models-cellml-v1/vc-level-2.cellml | 41 ++++++++++++++++++++++++++++ models-cellml-v1/vc-level-3.cellml | 42 ++++++++++++++++++++++++++++ models-cellml-v1/vc-level-4.cellml | 41 ++++++++++++++++++++++++++++ models-cellml-v1/vc-level-5.cellml | 44 ++++++++++++++++++++++++++++++ models-cellml-v2/vc-level-0.cellml | 39 ++++++++++++++++++++++++++ models-cellml-v2/vc-level-1.cellml | 40 +++++++++++++++++++++++++++ models-cellml-v2/vc-level-2.cellml | 41 ++++++++++++++++++++++++++++ models-cellml-v2/vc-level-3.cellml | 42 ++++++++++++++++++++++++++++ models-cellml-v2/vc-level-4.cellml | 41 ++++++++++++++++++++++++++++ models-cellml-v2/vc-level-5.cellml | 44 ++++++++++++++++++++++++++++++ models-mmt/vc-level-0.mmt | 26 +++++++++--------- models-mmt/vc-level-1.mmt | 26 +++++++++--------- models-mmt/vc-level-2.mmt | 26 +++++++++--------- models-mmt/vc-level-3.mmt | 26 +++++++++--------- models-mmt/vc-level-4.mmt | 26 +++++++++--------- models-mmt/vc-level-5.mmt | 26 +++++++++--------- tests/test-models.py | 16 +++++++++++ 19 files changed, 588 insertions(+), 78 deletions(-) diff --git a/models-cellml-v1/vc-level-0.cellml b/models-cellml-v1/vc-level-0.cellml index ce574e6..20aa3dd 100644 --- a/models-cellml-v1/vc-level-0.cellml +++ b/models-cellml-v1/vc-level-0.cellml @@ -1,4 +1,43 @@ + diff --git a/models-cellml-v1/vc-level-1.cellml b/models-cellml-v1/vc-level-1.cellml index 5f78592..7b124dd 100644 --- a/models-cellml-v1/vc-level-1.cellml +++ b/models-cellml-v1/vc-level-1.cellml @@ -1,4 +1,44 @@ + diff --git a/models-cellml-v1/vc-level-2.cellml b/models-cellml-v1/vc-level-2.cellml index 405e78b..72af78a 100644 --- a/models-cellml-v1/vc-level-2.cellml +++ b/models-cellml-v1/vc-level-2.cellml @@ -1,4 +1,45 @@ + diff --git a/models-cellml-v1/vc-level-3.cellml b/models-cellml-v1/vc-level-3.cellml index 7b54305..0a9c2a7 100644 --- a/models-cellml-v1/vc-level-3.cellml +++ b/models-cellml-v1/vc-level-3.cellml @@ -1,4 +1,46 @@ + diff --git a/models-cellml-v1/vc-level-4.cellml b/models-cellml-v1/vc-level-4.cellml index a18b2c2..4765f53 100644 --- a/models-cellml-v1/vc-level-4.cellml +++ b/models-cellml-v1/vc-level-4.cellml @@ -1,4 +1,45 @@ + diff --git a/models-cellml-v1/vc-level-5.cellml b/models-cellml-v1/vc-level-5.cellml index f6ce5a8..81e0319 100644 --- a/models-cellml-v1/vc-level-5.cellml +++ b/models-cellml-v1/vc-level-5.cellml @@ -1,4 +1,48 @@ + diff --git a/models-cellml-v2/vc-level-0.cellml b/models-cellml-v2/vc-level-0.cellml index 0470834..3bb4754 100644 --- a/models-cellml-v2/vc-level-0.cellml +++ b/models-cellml-v2/vc-level-0.cellml @@ -1,4 +1,43 @@ + diff --git a/models-cellml-v2/vc-level-1.cellml b/models-cellml-v2/vc-level-1.cellml index be684bd..784de7e 100644 --- a/models-cellml-v2/vc-level-1.cellml +++ b/models-cellml-v2/vc-level-1.cellml @@ -1,4 +1,44 @@ + diff --git a/models-cellml-v2/vc-level-2.cellml b/models-cellml-v2/vc-level-2.cellml index 79bacb3..2860838 100644 --- a/models-cellml-v2/vc-level-2.cellml +++ b/models-cellml-v2/vc-level-2.cellml @@ -1,4 +1,45 @@ + diff --git a/models-cellml-v2/vc-level-3.cellml b/models-cellml-v2/vc-level-3.cellml index 7b2dfec..ea03495 100644 --- a/models-cellml-v2/vc-level-3.cellml +++ b/models-cellml-v2/vc-level-3.cellml @@ -1,4 +1,46 @@ + diff --git a/models-cellml-v2/vc-level-4.cellml b/models-cellml-v2/vc-level-4.cellml index f5d82b2..296ec20 100644 --- a/models-cellml-v2/vc-level-4.cellml +++ b/models-cellml-v2/vc-level-4.cellml @@ -1,4 +1,45 @@ + diff --git a/models-cellml-v2/vc-level-5.cellml b/models-cellml-v2/vc-level-5.cellml index 8de77b7..df84d97 100644 --- a/models-cellml-v2/vc-level-5.cellml +++ b/models-cellml-v2/vc-level-5.cellml @@ -1,4 +1,48 @@ + diff --git a/models-mmt/vc-level-0.mmt b/models-mmt/vc-level-0.mmt index 0d36a89..742ae73 100644 --- a/models-mmt/vc-level-0.mmt +++ b/models-mmt/vc-level-0.mmt @@ -1,6 +1,6 @@ [[model]] name: voltage-clamp-model-level-0 -version: 20260317 +version: 20260318 mmt_authors: Michael Clerx display_name: L0 VC Model desc: """ @@ -10,8 +10,12 @@ desc: """ a 6-pole and 4-pole Bessel output filter, a finite amplifier speed and fast capacitance cancellation. - [1] Clerx, M. (2026) Voltage-clamp notebooks. - https://github.com/CardiacModelling/VoltageClampModel + [1] Lei, C. L., Clark, A. P., Clerx, M., Wei, S., Bloothooft, M., De Boer, + T., Christini, D. J., Krogh-Madsen, T., & Mirams, G. R. (2025) + Resolving Artifacts in Voltage-Clamp Experiments with Computational + Modeling: An Application to Fast Sodium Current Recordings. Advanced + Science. + https://doi.org/10.1002/advs.202500691 [2] Lei, C. L., Clerx, M., Whittaker, D. G., Gavaghan, D. J., De Boer, T. P., & Mirams, G. R. (2020) Accounting for variability in ion current @@ -19,29 +23,25 @@ desc: """ experiments. Phil. Trans. R. Soc. A. 378: 20190348 https://doi.org/10.1098/rsta.2019.0348 - [3] Lei, C. L., Clark, A. P., Clerx, M., Wei, S., Bloothooft, M., De Boer, - T., Christini, D. J., Krogh-Madsen, T., & Mirams, G. R. (2025) - Resolving Artifacts in Voltage-Clamp Experiments with Computational - Modeling: An Application to Fast Sodium Current Recordings. Advanced - Science. - https://doi.org/10.1002/advs.202500691 - - [4] Abrasheva, V. O., Kovalenko, S. G., Slotvitsky, M., Romanova, S. A., + [3] Abrasheva, V. O., Kovalenko, S. G., Slotvitsky, M., Romanova, S. A., Aitova, A. A., Frolova, S., Tsvelaya, V., & Syunyaev, R. A. (2024) Human sodium current voltage-dependence at physiological temperature measured by coupling a patch-clamp experiment to a mathematical model. J. Physiol., 602: 633-661. https://doi.org/10.1113/JP285162 - [5] Weerakoon, P., Culurciello, E., Klemic, K. G., & Sigworth, F. J. (2009) + [4] Weerakoon, P., Culurciello, E., Klemic, K. G., & Sigworth, F. J. (2009) An Integrated Patch-Clamp Potentiostat With Electrode Compensation. IEEE Trans. Biomed. Circ. 3-2: 117-125 https://doi.org/10.1109/TBCAS.2008.2005419 - [6] Sigworth, F. J. (1995) Electronic design of the patch clamp. + [5] Sigworth, F. J. (1995) Electronic design of the patch clamp. In: Single-channel recording (1995): 95-127. https://doi.org/10.1007/978-1-4419-1229-9_4 + [6] Clerx, M. (2026) Voltage-clamp model tutorial. + https://github.com/CardiacModelling/VoltageClampModel + """ amp.Vm = -120 [mV] amp.Vp = -120 [mV] diff --git a/models-mmt/vc-level-1.mmt b/models-mmt/vc-level-1.mmt index e4593fc..fba8f4b 100644 --- a/models-mmt/vc-level-1.mmt +++ b/models-mmt/vc-level-1.mmt @@ -1,6 +1,6 @@ [[model]] name: voltage-clamp-model-level-1 -version: 20260317 +version: 20260318 mmt_authors: Michael Clerx display_name: L1 VC Model desc: """ @@ -11,8 +11,12 @@ desc: """ - L1: Output filters replaced by a single filter. All filters implemented as first order. - [1] Clerx, M. (2026) Voltage-clamp notebooks. - https://github.com/CardiacModelling/VoltageClampModel + [1] Lei, C. L., Clark, A. P., Clerx, M., Wei, S., Bloothooft, M., De Boer, + T., Christini, D. J., Krogh-Madsen, T., & Mirams, G. R. (2025) + Resolving Artifacts in Voltage-Clamp Experiments with Computational + Modeling: An Application to Fast Sodium Current Recordings. Advanced + Science. + https://doi.org/10.1002/advs.202500691 [2] Lei, C. L., Clerx, M., Whittaker, D. G., Gavaghan, D. J., De Boer, T. P., & Mirams, G. R. (2020) Accounting for variability in ion current @@ -20,29 +24,25 @@ desc: """ experiments. Phil. Trans. R. Soc. A. 378: 20190348 https://doi.org/10.1098/rsta.2019.0348 - [3] Lei, C. L., Clark, A. P., Clerx, M., Wei, S., Bloothooft, M., De Boer, - T., Christini, D. J., Krogh-Madsen, T., & Mirams, G. R. (2025) - Resolving Artifacts in Voltage-Clamp Experiments with Computational - Modeling: An Application to Fast Sodium Current Recordings. Advanced - Science. - https://doi.org/10.1002/advs.202500691 - - [4] Abrasheva, V. O., Kovalenko, S. G., Slotvitsky, M., Romanova, S. A., + [3] Abrasheva, V. O., Kovalenko, S. G., Slotvitsky, M., Romanova, S. A., Aitova, A. A., Frolova, S., Tsvelaya, V., & Syunyaev, R. A. (2024) Human sodium current voltage-dependence at physiological temperature measured by coupling a patch-clamp experiment to a mathematical model. J. Physiol., 602: 633-661. https://doi.org/10.1113/JP285162 - [5] Weerakoon, P., Culurciello, E., Klemic, K. G., & Sigworth, F. J. (2009) + [4] Weerakoon, P., Culurciello, E., Klemic, K. G., & Sigworth, F. J. (2009) An Integrated Patch-Clamp Potentiostat With Electrode Compensation. IEEE Trans. Biomed. Circ. 3-2: 117-125 https://doi.org/10.1109/TBCAS.2008.2005419 - [6] Sigworth, F. J. (1995) Electronic design of the patch clamp. + [5] Sigworth, F. J. (1995) Electronic design of the patch clamp. In: Single-channel recording (1995): 95-127. https://doi.org/10.1007/978-1-4419-1229-9_4 + [6] Clerx, M. (2026) Voltage-clamp model tutorial. + https://github.com/CardiacModelling/VoltageClampModel + """ amp.Vm = -120 [mV] amp.Vp = -120 [mV] diff --git a/models-mmt/vc-level-2.mmt b/models-mmt/vc-level-2.mmt index 42e31f8..655a040 100644 --- a/models-mmt/vc-level-2.mmt +++ b/models-mmt/vc-level-2.mmt @@ -1,6 +1,6 @@ [[model]] name: voltage-clamp-model-level-2 -version: 20260317 +version: 20260318 mmt_authors: Michael Clerx display_name: L2 VC Model desc: """ @@ -12,8 +12,12 @@ desc: """ as first order. - L2: Idealised op-amp, without stray capacitance Cf. - [1] Clerx, M. (2026) Voltage-clamp notebooks. - https://github.com/CardiacModelling/VoltageClampModel + [1] Lei, C. L., Clark, A. P., Clerx, M., Wei, S., Bloothooft, M., De Boer, + T., Christini, D. J., Krogh-Madsen, T., & Mirams, G. R. (2025) + Resolving Artifacts in Voltage-Clamp Experiments with Computational + Modeling: An Application to Fast Sodium Current Recordings. Advanced + Science. + https://doi.org/10.1002/advs.202500691 [2] Lei, C. L., Clerx, M., Whittaker, D. G., Gavaghan, D. J., De Boer, T. P., & Mirams, G. R. (2020) Accounting for variability in ion current @@ -21,29 +25,25 @@ desc: """ experiments. Phil. Trans. R. Soc. A. 378: 20190348 https://doi.org/10.1098/rsta.2019.0348 - [3] Lei, C. L., Clark, A. P., Clerx, M., Wei, S., Bloothooft, M., De Boer, - T., Christini, D. J., Krogh-Madsen, T., & Mirams, G. R. (2025) - Resolving Artifacts in Voltage-Clamp Experiments with Computational - Modeling: An Application to Fast Sodium Current Recordings. Advanced - Science. - https://doi.org/10.1002/advs.202500691 - - [4] Abrasheva, V. O., Kovalenko, S. G., Slotvitsky, M., Romanova, S. A., + [3] Abrasheva, V. O., Kovalenko, S. G., Slotvitsky, M., Romanova, S. A., Aitova, A. A., Frolova, S., Tsvelaya, V., & Syunyaev, R. A. (2024) Human sodium current voltage-dependence at physiological temperature measured by coupling a patch-clamp experiment to a mathematical model. J. Physiol., 602: 633-661. https://doi.org/10.1113/JP285162 - [5] Weerakoon, P., Culurciello, E., Klemic, K. G., & Sigworth, F. J. (2009) + [4] Weerakoon, P., Culurciello, E., Klemic, K. G., & Sigworth, F. J. (2009) An Integrated Patch-Clamp Potentiostat With Electrode Compensation. IEEE Trans. Biomed. Circ. 3-2: 117-125 https://doi.org/10.1109/TBCAS.2008.2005419 - [6] Sigworth, F. J. (1995) Electronic design of the patch clamp. + [5] Sigworth, F. J. (1995) Electronic design of the patch clamp. In: Single-channel recording (1995): 95-127. https://doi.org/10.1007/978-1-4419-1229-9_4 + [6] Clerx, M. (2026) Voltage-clamp model tutorial. + https://github.com/CardiacModelling/VoltageClampModel + """ amp.Vm = -120 [mV] amp.Ve = -120 [mV] diff --git a/models-mmt/vc-level-3.mmt b/models-mmt/vc-level-3.mmt index 74b5c1b..c807641 100644 --- a/models-mmt/vc-level-3.mmt +++ b/models-mmt/vc-level-3.mmt @@ -1,6 +1,6 @@ [[model]] name: voltage-clamp-model-level-3 -version: 20260317 +version: 20260318 mmt_authors: Michael Clerx display_name: L3 VC Model desc: """ @@ -13,8 +13,12 @@ desc: """ - L2: Idealised op-amp, without stray capacitance Cf. - L3: Removed fast capacitative current and its cancellation. - [1] Clerx, M. (2026) Voltage-clamp notebooks. - https://github.com/CardiacModelling/VoltageClampModel + [1] Lei, C. L., Clark, A. P., Clerx, M., Wei, S., Bloothooft, M., De Boer, + T., Christini, D. J., Krogh-Madsen, T., & Mirams, G. R. (2025) + Resolving Artifacts in Voltage-Clamp Experiments with Computational + Modeling: An Application to Fast Sodium Current Recordings. Advanced + Science. + https://doi.org/10.1002/advs.202500691 [2] Lei, C. L., Clerx, M., Whittaker, D. G., Gavaghan, D. J., De Boer, T. P., & Mirams, G. R. (2020) Accounting for variability in ion current @@ -22,29 +26,25 @@ desc: """ experiments. Phil. Trans. R. Soc. A. 378: 20190348 https://doi.org/10.1098/rsta.2019.0348 - [3] Lei, C. L., Clark, A. P., Clerx, M., Wei, S., Bloothooft, M., De Boer, - T., Christini, D. J., Krogh-Madsen, T., & Mirams, G. R. (2025) - Resolving Artifacts in Voltage-Clamp Experiments with Computational - Modeling: An Application to Fast Sodium Current Recordings. Advanced - Science. - https://doi.org/10.1002/advs.202500691 - - [4] Abrasheva, V. O., Kovalenko, S. G., Slotvitsky, M., Romanova, S. A., + [3] Abrasheva, V. O., Kovalenko, S. G., Slotvitsky, M., Romanova, S. A., Aitova, A. A., Frolova, S., Tsvelaya, V., & Syunyaev, R. A. (2024) Human sodium current voltage-dependence at physiological temperature measured by coupling a patch-clamp experiment to a mathematical model. J. Physiol., 602: 633-661. https://doi.org/10.1113/JP285162 - [5] Weerakoon, P., Culurciello, E., Klemic, K. G., & Sigworth, F. J. (2009) + [4] Weerakoon, P., Culurciello, E., Klemic, K. G., & Sigworth, F. J. (2009) An Integrated Patch-Clamp Potentiostat With Electrode Compensation. IEEE Trans. Biomed. Circ. 3-2: 117-125 https://doi.org/10.1109/TBCAS.2008.2005419 - [6] Sigworth, F. J. (1995) Electronic design of the patch clamp. + [5] Sigworth, F. J. (1995) Electronic design of the patch clamp. In: Single-channel recording (1995): 95-127. https://doi.org/10.1007/978-1-4419-1229-9_4 + [6] Clerx, M. (2026) Voltage-clamp model tutorial. + https://github.com/CardiacModelling/VoltageClampModel + """ amp.Vm = -120 [mV] amp.Ve = -120 [mV] diff --git a/models-mmt/vc-level-4.mmt b/models-mmt/vc-level-4.mmt index f5243e6..d469ae0 100644 --- a/models-mmt/vc-level-4.mmt +++ b/models-mmt/vc-level-4.mmt @@ -1,6 +1,6 @@ [[model]] name: voltage-clamp-model-level-4 -version: 20260317 +version: 20260318 mmt_authors: Michael Clerx display_name: L4 VC Model desc: """ @@ -12,8 +12,12 @@ desc: """ - L3: Removed fast capacitative current and its cancellation. - L4: All filters removed. - [1] Clerx, M. (2026) Voltage-clamp notebooks. - https://github.com/CardiacModelling/VoltageClampModel + [1] Lei, C. L., Clark, A. P., Clerx, M., Wei, S., Bloothooft, M., De Boer, + T., Christini, D. J., Krogh-Madsen, T., & Mirams, G. R. (2025) + Resolving Artifacts in Voltage-Clamp Experiments with Computational + Modeling: An Application to Fast Sodium Current Recordings. Advanced + Science. + https://doi.org/10.1002/advs.202500691 [2] Lei, C. L., Clerx, M., Whittaker, D. G., Gavaghan, D. J., De Boer, T. P., & Mirams, G. R. (2020) Accounting for variability in ion current @@ -21,29 +25,25 @@ desc: """ experiments. Phil. Trans. R. Soc. A. 378: 20190348 https://doi.org/10.1098/rsta.2019.0348 - [3] Lei, C. L., Clark, A. P., Clerx, M., Wei, S., Bloothooft, M., De Boer, - T., Christini, D. J., Krogh-Madsen, T., & Mirams, G. R. (2025) - Resolving Artifacts in Voltage-Clamp Experiments with Computational - Modeling: An Application to Fast Sodium Current Recordings. Advanced - Science. - https://doi.org/10.1002/advs.202500691 - - [4] Abrasheva, V. O., Kovalenko, S. G., Slotvitsky, M., Romanova, S. A., + [3] Abrasheva, V. O., Kovalenko, S. G., Slotvitsky, M., Romanova, S. A., Aitova, A. A., Frolova, S., Tsvelaya, V., & Syunyaev, R. A. (2024) Human sodium current voltage-dependence at physiological temperature measured by coupling a patch-clamp experiment to a mathematical model. J. Physiol., 602: 633-661. https://doi.org/10.1113/JP285162 - [5] Weerakoon, P., Culurciello, E., Klemic, K. G., & Sigworth, F. J. (2009) + [4] Weerakoon, P., Culurciello, E., Klemic, K. G., & Sigworth, F. J. (2009) An Integrated Patch-Clamp Potentiostat With Electrode Compensation. IEEE Trans. Biomed. Circ. 3-2: 117-125 https://doi.org/10.1109/TBCAS.2008.2005419 - [6] Sigworth, F. J. (1995) Electronic design of the patch clamp. + [5] Sigworth, F. J. (1995) Electronic design of the patch clamp. In: Single-channel recording (1995): 95-127. https://doi.org/10.1007/978-1-4419-1229-9_4 + [6] Clerx, M. (2026) Voltage-clamp model tutorial. + https://github.com/CardiacModelling/VoltageClampModel + """ amp.Vm = -120 [mV] amp.Ve = -120 [mV] diff --git a/models-mmt/vc-level-5.mmt b/models-mmt/vc-level-5.mmt index e510473..fdba576 100644 --- a/models-mmt/vc-level-5.mmt +++ b/models-mmt/vc-level-5.mmt @@ -1,6 +1,6 @@ [[model]] name: voltage-clamp-model-level-5 -version: 20260317 +version: 20260318 mmt_authors: Michael Clerx display_name: L5 VC Model desc: """ @@ -15,8 +15,12 @@ desc: """ - L4: All filters removed. - L5: Removed charging current and its cancellation. - [1] Clerx, M. (2026) Voltage-clamp notebooks. - https://github.com/CardiacModelling/VoltageClampModel + [1] Lei, C. L., Clark, A. P., Clerx, M., Wei, S., Bloothooft, M., De Boer, + T., Christini, D. J., Krogh-Madsen, T., & Mirams, G. R. (2025) + Resolving Artifacts in Voltage-Clamp Experiments with Computational + Modeling: An Application to Fast Sodium Current Recordings. Advanced + Science. + https://doi.org/10.1002/advs.202500691 [2] Lei, C. L., Clerx, M., Whittaker, D. G., Gavaghan, D. J., De Boer, T. P., & Mirams, G. R. (2020) Accounting for variability in ion current @@ -24,29 +28,25 @@ desc: """ experiments. Phil. Trans. R. Soc. A. 378: 20190348 https://doi.org/10.1098/rsta.2019.0348 - [3] Lei, C. L., Clark, A. P., Clerx, M., Wei, S., Bloothooft, M., De Boer, - T., Christini, D. J., Krogh-Madsen, T., & Mirams, G. R. (2025) - Resolving Artifacts in Voltage-Clamp Experiments with Computational - Modeling: An Application to Fast Sodium Current Recordings. Advanced - Science. - https://doi.org/10.1002/advs.202500691 - - [4] Abrasheva, V. O., Kovalenko, S. G., Slotvitsky, M., Romanova, S. A., + [3] Abrasheva, V. O., Kovalenko, S. G., Slotvitsky, M., Romanova, S. A., Aitova, A. A., Frolova, S., Tsvelaya, V., & Syunyaev, R. A. (2024) Human sodium current voltage-dependence at physiological temperature measured by coupling a patch-clamp experiment to a mathematical model. J. Physiol., 602: 633-661. https://doi.org/10.1113/JP285162 - [5] Weerakoon, P., Culurciello, E., Klemic, K. G., & Sigworth, F. J. (2009) + [4] Weerakoon, P., Culurciello, E., Klemic, K. G., & Sigworth, F. J. (2009) An Integrated Patch-Clamp Potentiostat With Electrode Compensation. IEEE Trans. Biomed. Circ. 3-2: 117-125 https://doi.org/10.1109/TBCAS.2008.2005419 - [6] Sigworth, F. J. (1995) Electronic design of the patch clamp. + [5] Sigworth, F. J. (1995) Electronic design of the patch clamp. In: Single-channel recording (1995): 95-127. https://doi.org/10.1007/978-1-4419-1229-9_4 + [6] Clerx, M. (2026) Voltage-clamp model tutorial. + https://github.com/CardiacModelling/VoltageClampModel + """ amp.Vm = -120 [mV] diff --git a/tests/test-models.py b/tests/test-models.py index 6d5393d..961ca30 100755 --- a/tests/test-models.py +++ b/tests/test-models.py @@ -368,9 +368,25 @@ def generate_cellml_models(): fname = path.stem + '.cellml' e.model(_cm1_root / fname, model, version='1.1') e.model(_cm2_root / fname, model, version='2.0') + add_cellml_meta_data(_cm1_root / fname, model) + add_cellml_meta_data(_cm2_root / fname, model) print('Done') +def add_cellml_meta_data(path, model): + """ + Copies meta data from the Myokit ``model`` into the file at ``path`` as an + XML comment (advanced methods are not widely supported). + """ + with open(path, 'r') as f: + text = f.read() + with open(path, 'w') as f: + i = text.index('\n') + f.write(text[i:]) + + if __name__ == '__main__': if '--generate-cellml' in sys.argv: print('Generating CellML models!')