htmd.membranebuilder.ringpenetration module#
- htmd.membranebuilder.ringpenetration.least_square_fit_plane(coords)#
- htmd.membranebuilder.ringpenetration.moveLipidToPos(mol, lip)#
- htmd.membranebuilder.ringpenetration.resolveRingPenetrations(lipids, box, max_iterations=50)#
Iteratively resolve ring penetrations between neighboring lipids.
Detects pairs of lipids where one lipid’s chain atoms thread through another’s aromatic or aliphatic ring (e.g. cholesterol). When a penetration is found, the offending lipid is rotated by 10 degrees around the Z-axis and the check is repeated. If all penetrations are resolved before
max_iterations, the function returns normally; otherwise a warning is logged.- Parameters:
lipids (
list) – List of_Lipidobjects withmol,xyz,rot,headname,rings, andneighboursattributes.box (
list|ndarray) – Periodic box dimensions (XY) used for minimum-image wrapping when checking neighbor distances.max_iterations (
int) – Maximum number of rotation-and-recheck cycles before giving up.