How are the helices of MscL gating "attached"?
It is the combination of intra- and inter-molecular interactions that determines the conformation of the protein.

There are two types of interactions: bonded and non-bonded. There are two types of non-bonded interactions: electrostatic and non-electrostatic. Electrostatic (also known as 'polar') interactions are usually modeled using Coulombic potential energy equation; non-electrostatic (also known as 'non-polar' or 'van der Waals') interactions are usually modeled using Lennard-Jones potential energy equation.