MEDYAN.make_memb_sphere!

Tuple{MEDYAN.Context}

make_memb_sphere!(c::Context; radius, center=SA[0.0,0.0,0.0], subdivisions=3, divisions=2^(subdivisions-1))::MembId

Create a new spherical membrane in the simulation context and return its membrane identifier.

This function generates a geodesic icosphere mesh by dividing each edge of a regular icosahedron into divisions segments, and splitting each face into a triangular grid of divisions^2 triangles. The vertices are placed on the sphere so that the triangles are nearly uniform in size. The resulting mesh has 20divisions^2 triangles and 10divisions^2 + 2 vertices. The mesh is then scaled by radius, rotated by rotation, and translated to center.

Keyword Arguments

  • radius::Float64: Radius of the sphere (nm)
  • center::SVector{3,Float64}=SA[0.0,0.0,0.0]: Center of the sphere (nm)
  • subdivisions::Int=3: Number of subdivisions (1 = icosahedron, each increment quadruples the number of triangles)
  • divisions::Int=2^(subdivisions-1): Number of segments each icosahedron edge is divided into (1 = icosahedron). Overrides subdivisions, and allows triangle sizes between those of successive subdivisions.
  • rotation=I: 3x3 matrix to rotate the sphere around its center
  • mech_params::MembraneMechParams = MembraneMechParams(): Mechanical parameters for membrane mechanics
  • area0::Union{Float64, Nothing} = nothing: Reference area (if nothing, computed from initial mesh) (nm^2)
  • volume0::Union{Float64, Nothing} = nothing: Reference volume (if nothing, computed from initial mesh) (nm^3)
  • offset_volume::Float64=0.0: Actual volume is cone volume with the origin plus the offset (nm^3)
  • type::Int=1: Membrane type index
  • chem_boundary::Bool = false: If true, the membrane acts as a boundary for 3D diffusing species.
  • chem_boundary_exterior::Bool = false: If true, the confined chemical domain is the exterior; otherwise the confined domain is the interior.
  • fixed::Bool = false: If true, the membrane is fixed: it does not move during energy minimization and its mesh is not adapted. Useful for static boundary surfaces.

References

  • Geodesic polyhedron: https://en.wikipedia.org/wiki/Geodesic_polyhedron