PointClass Documentation#
The PointClass module provides the Point class for membrane manipulation.
- class PointClass.point.Point(path: str | Path)[source]#
Bases:
object
A class representing a membrane structure with inclusions and exclusions. Can be initialized from a point folder or built from scratch.
- Examples:
# Create bilayer >>> membrane = Point.create_empty() >>> membrane.add_membrane_points(coordinates, normals)
# Create monolayer >>> monolayer = Point.create_empty(monolayer=True) >>> monolayer.add_membrane_points(coordinates, normals)
- class Exclusion(data: ndarray | None = None)[source]#
Bases:
object
Manages lipid exclusions in the membrane.
- add_pore(point_id: int, radius: float = 1.0)[source]#
Add a pore in the lipid membrane.
- Args:
point_id: Point ID where lipids should be excluded radius: Radius of exclusion zone
- property count: int#
Number of exclusion points.
- class Inclusion(data: ndarray | None = None)[source]#
Bases:
object
Manages protein inclusions in the membrane.
- add_protein(type_id: int, point_id: int, orientation: ndarray | None = array([1, 0, 0]))[source]#
Add a protein inclusion.
- Args:
type_id: Type identifier for the protein point_id: Point ID where protein should be placed orientation: Vector specifying protein orientation
- property count: int#
Number of protein inclusions.
- class Membrane(data: ndarray)[source]#
Bases:
object
Represents a membrane layer with associated properties.
- add_points(coordinates: ndarray, normals: ndarray | None = None, domain_ids: ndarray | None = None, areas: ndarray | None = None)[source]#
Add points to the membrane layer.
- Args:
- coordinates: Nx3 array of point coordinates
normals: Nx3 array of normal vectors (optional) domain_ids: Array of domain IDs (optional) areas: Array of point areas (optional)
- get_points_by_domain(domain_id: int) ndarray [source]#
Get coordinates of all points in a specific domain.
- property mean_curvature: ndarray#
Calculate mean curvature for all points.
- add_lipids(coordinates: ndarray, normals: ndarray, domain_ids: ndarray | None = None, areas: ndarray | None = None, bilayer_spacing: float = 4.0)[source]#
convenience method to add lipids to the membrane. adds points to both leaflets offset by bilayer_spacing along the normal vectors.
- args:
coordinates: nx3 array of midplane lipid positions domain_ids: array of domain ids (optional) layer: which layer to add lipids to (“both”, “inner”, or “outer”) bilayer_spacing: distance between inner and outer leaflets in nm (default=4.0)
- add_membrane_points(coordinates: ndarray, normals: ndarray | None = None, domain_ids: ndarray | None = None, areas: ndarray | None = None, bilayer_spacing: float = 4.0)[source]#
Add points to membrane layer(s) with proper bilayer spacing.
- Args:
coordinates: Nx3 array of point coordinates (midplane coordinates) normals: Nx3 array of normal vectors (optional) domain_ids: Array of domain IDs (optional) areas: Array of point areas (optional) bilayer_spacing: Distance between leaflets in nm (default=4.0, only used for bilayers)
- classmethod create_empty(box, monolayer=False)[source]#
Create an empty Point instance.
- Args:
box: Tuple of (x, y, z) box dimensions monolayer: If True, only creates outer membrane layer