Dynamic Geometry


Dynamic geometry allows manipulation with individual mesh geometry vertices during simulation. This section provides an overview of related methods.

NOTE: this documentation is not generated automatically and may get out of date. Check the generated API reference when needed.

Vertex Representation

In MCell, vertices are represented with class Vec3. It has attributes: x, y, z, and a method .tolist() that returns the coordinates as a Python list with three elements. Class Vec3 also provides usual operators such as +, -, *, /, ==.

Geometry Introspection

This subsection lists several methods used for introspecting geometry state:

Geometry Modifications

  • Model.add_vertex_move - Adds a displacement for a given object’s vertex, only stored until apply_vertex_moves is called.

  • Model.apply_vertex_moves - Applies all the vertex moves specified with add_vertex_move call. See API documentation for more details.

Special Attributes and Methods

  • Wall.is_movable - The attribute says whether the wall can be moved through calls to Model.apply_vertex_moves. If False, all changes to vertices are ignored.

  • Model.pair_molecules - Allows to pair surface molecules on different objects. When a wall of one molecule is moved, wall of the second paired molecule is also moved. See Model.apply_vertex_moves for more details.