Myokit

Latest version: v1.37.3

Safety actively analyzes 723400 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 4 of 36

1.33.3

- Changed
- [860](https://github.com/myokit/myokit/pull/860) Made `myokit.tests` into a module. Made tests runnable via `setup.py`. Added more meta data to `setup.py`.

1.33.2

- Changed
- [843](https://github.com/myokit/myokit/pull/843) Myokit is no longer tested on Python 3.5.
- [844](https://github.com/myokit/myokit/pull/844) Tweaked the CellML export's `initial_value` attribute to strip `e+00` if present.
- [845](https://github.com/myokit/myokit/pull/845) Improved syntax highlighting and automatic detection of "dark mode" themes.
- [849](https://github.com/myokit/myokit/pull/849) Trying to pickle a `myokit.Expression` now raises a more helpful error message.
- [849](https://github.com/myokit/myokit/pull/849) The method `myokit.parse_expression()` now accepts a `Model` as a context.
- [849](https://github.com/myokit/myokit/pull/849) Model comparison with `==` now only returns ``True`` if both operands are the same object. Comparison based on code can be performed with `Model.is_similar()`.
- [852](https://github.com/myokit/myokit/pull/852) Myokit is no longer tested on Python 3.6 for Windows (please use 3.7 and up).
- Fixed
- [841](https://github.com/myokit/myokit/pull/841) The MathMLExpressionWriter now uses `type="e-notation"` where necessary, instead of writing e.g. `1e-6`.
- [849](https://github.com/myokit/myokit/pull/849) If `Model.get()` and `Component.get()` now raise a `ValueError` if a component or variable from a different model is passed in.
- [849](https://github.com/myokit/myokit/pull/849) `Equation` objects are now immutable, and their `hash` is consistent during the object's lifetime.
- [849](https://github.com/myokit/myokit/pull/849) The `hash` of a `Quantity` object is now consistent during its lifetime, regardless of unit representations.
- [857](https://github.com/myokit/myokit/pull/857) Fixed a memory leak in Simulation.run().
- [858](https://github.com/myokit/myokit/pull/858) `OpenCL.info` no longer raises `CL_PLATFORM_NOT_FOUND_KHR` if drivers but no devices are found.

1.33.1

- Added
- [799](https://github.com/myokit/myokit/pull/799) Added pL, MOhm, and GOhm as standard units.
- [811](https://github.com/myokit/myokit/pull/811) DatalogViewer now accepts `.zip` for binary data logs.
- [817](https://github.com/myokit/myokit/pull/816) Added support for Python 3.10.
- [821](https://github.com/myokit/myokit/pull/821) Sundials-based simulations now auto-detect the version number. The version indicated in myokit.ini is no longer used.
- [823](https://github.com/myokit/myokit/pull/823) Sundials 6.0.0 is now supported.
- [826](https://github.com/myokit/myokit/pull/826) Added a method `myokit.tools.Benchmarker.print` that prints elapsed time alongside a profiling message.
- Changed
- Examples will be located in a separate repository, at https://github.com/myokit/myokit-examples
- [815](https://github.com/myokit/myokit/pull/815) Myokit will now warn when run on Python 2.7, as testing for 2.7 is being phased out.
- [816](https://github.com/myokit/myokit/pull/816) The method `myokit.tools.Benchmarker.format` can now be called without any arguments.
- [817](https://github.com/myokit/myokit/pull/816) The internal templating engine now uses `ast` instead of the deprecated (and removed in 3.10) `parser` module.
- [825](https://github.com/myokit/myokit/pull/825) The context manager `myokit.tools.capture` now takes an extra argument ``enabled`` which can be used to disabled output capturing.
- [825](https://github.com/myokit/myokit/pull/825), [#826](https://github.com/myokit/myokit/pull/826) The debugging arguments to ``myokit run`` have been split into five parts, see ``myokit run --help`` for details.
- [834](https://github.com/myokit/myokit/pull/834) The find/replace dialog in the IDE has been replaced with a toolbar.
- [836](https://github.com/myokit/myokit/pull/836) Colours in the IDE have been adapted to be clearer in "dark mode".
- Removed
- [796](https://github.com/myokit/myokit/pull/796) The Graph Data Extractor tool is now a separate project, hosted at https://github.com/myokit/gde.
- [804](https://github.com/myokit/myokit/pull/804) The command line utility `system` no longer reports on the `cma` module.
- [821](https://github.com/myokit/myokit/pull/821) Removed the method `myokit.Sundials.version_int`.
- Fixed
- [805](https://github.com/myokit/myokit/pull/805) Added missing command line utilities to the documentation, and re-organised the command-line tool docs.
- [831](https://github.com/myokit/myokit/pull/831) DavAug Fixed bug in SBML parser that caused it to ignore terms in differential equations for products of reactions.

1.33.0

- Added
- [581](https://github.com/myokit/myokit/pull/581) Myokit's expression system now includes a `PartialDerivative` and an `InitialValue` class. Both are for use in sensitivity calculations and may not appear in models.
- [581](https://github.com/myokit/myokit/pull/581) Expressions now have a method `diff(lhs)` that returns the (partial) derivative of an expression with respect to the given `LhsExpression`.
- [581](https://github.com/myokit/myokit/pull/581) Expressions now have methods `is_derivative`, `is_name`, and `is_number`.
- [581](https://github.com/myokit/myokit/pull/581) Added a method `Number.value()`.
- [581](https://github.com/myokit/myokit/pull/581) The method `Expression.depends_on` now has an argument `deep` that can be set to `True` to perform a recursive dependency check.
- [595](https://github.com/myokit/myokit/pull/595) A class `myokit.CModel` was added that can generate multi-purpose C code for use in simulations. This is mainly for internal use.
- [682](https://github.com/myokit/myokit/pull/682) OpenCL code now recognises error code -1001.
- [683](https://github.com/myokit/myokit/pull/683) Now testing OpenCL code in CI.
- [704](https://github.com/myokit/myokit/pull/704) Added first example notebook to the github repository.
- [728](https://github.com/myokit/myokit/pull/728) Added a context manager `myokit.tools.capture` that can redirect and capture output from Python `stdout` and `stderr` via a Python-only method or file-descriptor redirection and should be thread-safe.
- [735](https://github.com/myokit/myokit/pull/735) The new module `myokit.float` contains several functions related to floating point numbers that were previously in the main `myokit` namespace or not part of the public API.
- [735](https://github.com/myokit/myokit/pull/735) The new module `myokit.tools` contains several stand-alone tools that are used by Myokit and were previously in the main `myokit` namespace or not part of the public API.
- [735](https://github.com/myokit/myokit/pull/735) The method `pid_hash`, which is used by compiled code to generate (hopefully) unique ids is now part of the public API.
- [744](https://github.com/myokit/myokit/pull/744) Added a method `myokit.OpenCL.available` to check if OpenCL is supported and at least one OpenCL device is detected.
- [754](https://github.com/myokit/myokit/pull/754) Added a method `myokit.OpenCL.current_info(x)` that returns information about the currently selected platform and device; support of OpenCL extensions can then be checked with `OpenCLPlatformInfo.has_extension`.
- [754](https://github.com/myokit/myokit/pull/754) Improved error message when an `OpenCLSimulation` with double precision is run on a device that does not support it.
- [763](https://github.com/myokit/myokit/pull/763) Added a method `OpenCLSimulation.set_conductance_field` to apply heterogeneous conductance on a rectangular grid.
- [769](https://github.com/myokit/myokit/pull/769) Rebecca-Rumney Added a method `myokit.Model.import_component` to import a component from one model to another.
- [769](https://github.com/myokit/myokit/pull/769) Rebecca-Rumney Added an exception type `VariableMappingError` to be raised when there is an error in a variable mapping.
- [776](https://github.com/myokit/myokit/pull/776) Added a method `OpenCLSimulation.monodomain_conductance` to replace the deprecated method `calculate_conductance`.
- [780](https://github.com/myokit/myokit/pull/780) Alt-up and alt-down can now be used in the text editor to move selected lines up or down.
- [782](https://github.com/myokit/myokit/pull/782) The IDE can now import CellML files on opening, e.g. by typing `myokit ide example.cellml`.
- [786](https://github.com/myokit/myokit/pull/786) Added a method `myokit.Variable.clamp()` to fix any variable to a constant value.
- [786](https://github.com/myokit/myokit/pull/786) Added a method `myokit.Variable.remove_child_variables()` to remove all child (nested) variables from a given variable.
- [788](https://github.com/myokit/myokit/pull/788) The IDE will now suggest filenames for model exports.
- [792](https://github.com/myokit/myokit/pull/792) DavAug SBML import now handles equations that explicitly use time.
- Changed
- [581](https://github.com/myokit/myokit/pull/581) Powers are now rendered without spaces in mmt code, e.g. `x^2` instead of `x ^ 2`.
- [595](https://github.com/myokit/myokit/pull/595) The `Simulation` class now uses CVODES instead of CVODE as backend, which may require changes to your installation.
- [595](https://github.com/myokit/myokit/pull/595) The `Simulation` can now calculate sensitivities of variables with respect to parameters and/or initial conditions (see docs for details).
- [595](https://github.com/myokit/myokit/pull/595) The `Simulation` class no longer has `apd_var` as a constructor argument. Instead, you can pass an argument `apd_variable` to its `run()` method.
- [595](https://github.com/myokit/myokit/pull/595) The `Simulation` class no longer suppresses CVODES warnings but passes them on to the `warnings` module.
- [595](https://github.com/myokit/myokit/pull/595) Fix to `Simulation` for Sundials 4.1.0.
- [687](https://github.com/myokit/myokit/pull/687) `Variable.set_rhs(None)` now removes an RHS, instead of setting it to `Number(0)`.
- [687](https://github.com/myokit/myokit/pull/687) Calling `SimulationOpenCL.set_conductance` will now override any conductances previously set with `set_connections`.
- [687](https://github.com/myokit/myokit/pull/687) `SimulationOpenCL.set_connections` no longer accepts `None` as a valid argument.
- [687](https://github.com/myokit/myokit/pull/687) The `SimulationOpenCL` methods `set_conductance`, `conductance`, `set_connections`, `neighbours`, `set_paced_cells`, `set_paced_cell_list`, and `is_paced`, will now raise a `RuntimeError` if diffusion was disabled at construction.
- [687](https://github.com/myokit/myokit/pull/687) The method `SimulationOpenCL.remove_field` now raises a `KeyError` if no field is set for the given variable.
- [689](https://github.com/myokit/myokit/pull/689) In Python 2, an `ImportError` is now raised if `myokit.ini` contains the sequence " ;" in any of its value (as this cannot be processed by Python 2's `ConfigParser`).
- [728](https://github.com/myokit/myokit/pull/728) The `LegacySimulation` class no longer suppresses CVODE warnings but passes them on to the `warnings` module (backported from new `Simulation` class).
- [789](https://github.com/myokit/myokit/pull/789) The method `myokit.DataLog.save_csv()` now stores the keys using natural sort order (time is still the first field, if present).
- Deprecated
- [595](https://github.com/myokit/myokit/pull/595) The classes `myokit.PSimulation` and `myokit.ICSimulation` have been deprecated in favor of the new `Simulation` class.
- [735](https://github.com/myokit/myokit/pull/735) The class `myokit.Benchmarker` is deprecated in favor of `myokit.tools.Benchmarker`.
- [735](https://github.com/myokit/myokit/pull/735) The method `myokit.format_float_dict` is deprecated and will be removed in future versions.
- [735](https://github.com/myokit/myokit/pull/735) The method `myokit.format_path` is deprecated in favor of `myokit.tools.format_path`.
- [735](https://github.com/myokit/myokit/pull/735) The method `myokit.strfloat` is deprecated in favor of `myokit.float.str`.
- [758](https://github.com/myokit/myokit/pull/758) The class `myokit.FiberTissueSimulation` is deprecated and will be removed in future versions.
- [776](https://github.com/myokit/myokit/pull/776) The method `OpenCLSimulation.calculate_conductance` is deprecated in favor of the new method `calculate_conductance`, which takes slightly different parameters.
- [787](https://github.com/myokit/myokit/pull/787) The method `myokit.Model.eval_state_derivatives` is deprecated in favor of `myokit.Model.evaluate_derivatives`.
- Removed
- [683](https://github.com/myokit/myokit/pull/683) No longer testing on Python 2.7.6 on linux (still testing latest 2.7). No longer testing any Python 2.7 on Windows.
- [728](https://github.com/myokit/myokit/pull/728) The classes `myokit.PyCapture` and `myokit.SubCapture` have been replaced by a single context manager `myokit.tools.capture`.
- [730](https://github.com/myokit/myokit/pull/730) Removed the method `myokit.pack_snapshot`.
- [737](https://github.com/myokit/myokit/pull/737) The method `Model.merge_interdependent_components` was removed. This method was deprecated since 2018-05-30.
- [737](https://github.com/myokit/myokit/pull/737) The method `Model.show_line` was removed. This method was deprecated since 2018-05-30.
- [737](https://github.com/myokit/myokit/pull/737) The method `Protocol.guess_duration` was removed. This method was deprecated since 2016-02-06.
- Fixed
- [684](https://github.com/myokit/myokit/pull/684) DavAug Fixed OpenCL loading issue on MacOS (with special thanks to Martin Aguilar).
- [686](https://github.com/myokit/myokit/pull/686) Fixed a (windows only) bug in `myokit.tools.format_path()`.
- [687](https://github.com/myokit/myokit/pull/687) `Simulation1d` now logs pacing as a global variable, and can log diffusion currents.
- [689](https://github.com/myokit/myokit/pull/689) Path lists read from `myokit.ini` are now filtered for empty entries and closing semicolons.
- [744](https://github.com/myokit/myokit/pull/744) Fixed a bug in `OpenCLSimulation.find_nan()`, that occurred for very small simulations (e.g. 2 cells).
- [744](https://github.com/myokit/myokit/pull/744) Fixed a bug in `OpenCLSimulation` that made it impossible to use `set_connections()` with double precision.
- [744](https://github.com/myokit/myokit/pull/744) Fixed a bug in `OpenCLSimulation` that made it impossible to use `set_connections()` on Python 2.
- [754](https://github.com/myokit/myokit/pull/754) Improved error message when an `OpenCLSimulation` with double precision is run on a device that does not support it.
- [766](https://github.com/myokit/myokit/pull/766) Improved error message when an empty MathML `<cn>` element is encountered.

1.32.0

- Added
- [672](https://github.com/myokit/myokit/pull/672) Added more detailed error output to several CVODE errors related to RHS-related numerical issues.
- [672](https://github.com/myokit/myokit/pull/672) Now tested on Sundials 5 (locally).
- [672](https://github.com/myokit/myokit/pull/672) Now testing on Python 3.9 (Linux).
- [672](https://github.com/myokit/myokit/pull/672) `Simulation.run` documentation is now more clear on what happens for very short simulation durations (or zero).
- [674](https://github.com/myokit/myokit/pull/674) Added a method `Model.has_parse_info` that checks if the model contains information from parsing (i.e. line numbers).
- [674](https://github.com/myokit/myokit/pull/674) Added a parameter `raw` to `Model.show_line_of` that returns the line number as an integer
- [674](https://github.com/myokit/myokit/pull/674) Added a method to the IDE that lets you jump to the definition of a selected variable.
- [680](https://github.com/myokit/myokit/pull/680) Now testing on Python 3.9 and Miniconda 3.8 (Windows).
- Removed
- [681](https://github.com/myokit/myokit/pull/681) Removed the deprecated library `myokit.lib.fit`. For fitting see e.g. [PINTS](https://github.com/pints-team/pints) and this [tutorial on fitting ion channel data with Myokit & PINTS](https://github.com/CardiacModelling/fitting-notebooks).
- Fixed
- [672](https://github.com/myokit/myokit/pull/672) Fixed bug in `Variable.convert_unit()` that caused unexpected (and quite arbitrary) results.
- [672](https://github.com/myokit/myokit/pull/672) Fixed bug where calling `Simulation.run()` with a very short runtime caused a zero state to be returned.
- [676](https://github.com/myokit/myokit/pull/676) Fixed a bug in CellML (1 and 2) export when inferring units for a state variable.
- [679](https://github.com/myokit/myokit/pull/679) Fixed "DLL load failed while importing myokit" issue on Windows 10 with Python 3.8 (via miniconda).

1.31.1

- Added
- [623](https://github.com/myokit/myokit/pull/623) The changes made with each release are now stored in CHANGELOG.md.
- [622](https://github.com/myokit/myokit/pull/622) `SimulationOpenCL` now includes a method `is_paced` and `neighbours` that provide information about the simulated cells.
- [622](https://github.com/myokit/myokit/pull/622) `SimulationOpenCL.find_nan` now has an option to return a `DataLog` with the final logged variables before the error occurred.
- [632](https://github.com/myokit/myokit/pull/632) Added methods `DataBlock1d.to_log` and `DataBlock2d.to_log`.
- [633](https://github.com/myokit/myokit/pull/633) DataBlockViewer now shows mouse coordinates in status bar for video and graph view.
- [652](https://github.com/myokit/myokit/pull/652) Added methods to remove 1d and 2d traces from `DataBlock1d` and `DataBlock2d`.
- Changed
- [610](https://github.com/myokit/myokit/pull/610) If numerical errors occur when evaluating an expression, the IDE now shows these in the console instead of in a pop-up.
- [622](https://github.com/myokit/myokit/pull/622) `myokit.strfloat` now takes a `precision` argument.
- [622](https://github.com/myokit/myokit/pull/622) `Model.format_state` and `Model.format_state_derivatives` now take a `precision` argument.
- [622](https://github.com/myokit/myokit/pull/622) If errors occur, the `SimulationOpenCL` now displays improved (and hopefully more informative) output.
- [623](https://github.com/myokit/myokit/pull/623) Updated licensing info.
- [653](https://github.com/myokit/myokit/pull/653) `Model.pyfunc()` now validates the model before running (and fails if the model does not validate).
- [661](https://github.com/myokit/myokit/pull/661) When importing MathML, the inverse hyperbolic trig functions are now rendered using slightly simpler equations.
- [664](https://github.com/myokit/myokit/pull/664) EasyML export now adds meta data, a group of CVODE-solved variables, a group of variables to trace, and a group of parameters (based on code contributed by Ed Vigmond).
- [664](https://github.com/myokit/myokit/pull/664) EasyML export now converts voltage, current, and time variables to the preferred units.
- [664](https://github.com/myokit/myokit/pull/664) EasyML export now has consistently ordered output when re-run.
- [664](https://github.com/myokit/myokit/pull/664) EasyML expression writer now uses `expm1` where possible.
- Deprecated
- [622](https://github.com/myokit/myokit/pull/622) `SimulationOpenCL.is2d()` was deprecated in favor of `SimulationOpenCL.is_2d()`.
- [632](https://github.com/myokit/myokit/pull/632) `DataBlock1d.from_DataLog` and `DataBlock2d.from_DataLog` have both been deprecated, in favor of new `from_log` methods.
- Fixed
- [650](https://github.com/myokit/myokit/pull/650) Fix to `myokit.lib.plots.cumulative_current` for normalisation in areas with zero current.
- [603](https://github.com/myokit/myokit/pull/603) Improved handling of types (ints resulting from logical operators) in `OpenCLSimulation`.
- [613](https://github.com/myokit/myokit/pull/613) `Model.map_component_io` now respects the `omit_constants` argument for Rush-Larsen variables.
- [622](https://github.com/myokit/myokit/pull/622) If `Model.format_state_derivatives` needs to evaluate the derivatives, it will now use the given `state` instead of the model state.
- [628](https://github.com/myokit/myokit/pull/628) The DataBlockViewer now shows a working colour bar for 1d simulations.
- [638](https://github.com/myokit/myokit/pull/638) The DataBlockViewer now handles blocks with `t[0] > 0` correctly.
- [655](https://github.com/myokit/myokit/pull/655) Fixed bug where wrong initial state was shown by `myokit.step()`.
- [663](https://github.com/myokit/myokit/pull/663) Fixed deprecation warning in `save_state_bin()`.

Page 4 of 36

Links

Releases

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.