Two functional groups contribute significantly to aminosteroidal neuromuscular blocking potency, it is presumed to enable them to bind the receptor at two points. A bis-quaternary two point arrangement on A and D-ring (binding inter-site) or a D-ring acetylcholine moiety (binding at two points intra-site) are most likely to succeed. A third group can have variable effects. The quaternary and acetyl groups on the A and D ring of pipecuronium prevent it from binding intra-site (binding to two points at the same site). Instead, it must bind as bis-quaternary (inter-site). These structures are very dissimilar from acetylcholine and free pipecuronium from nicotinic or muscarinic side-effects linked to acetylcholine moiety. Also, they protect the molecule from hydrolysis by cholinesterases, which explain its nature of kidney excretion. The four methyl-groups on the quaternary N atoms make it less lipophilic than most aminosteroids. This also affects pipecuroniums metabolism by resisting hepatic uptake, metabolism, and biliary excretion. The length of the molecule (2.1 nm, close to ideal) and its rigidness make pipecuronium the most potent and clean one-bulk bis-quaternary. Even though the N-N distance (1.6 nm) is far away from what is considered ideal, its onium heads are well-exposed, and the quaternary groups help to bring together the onium heads to the anionic centers of the receptors without chirality issues.
Adding more than two onium heads in general does not add to potency. Though the third onium head in gallamine seems to help position the two outside heads near the optimum molecular length, it can interfere unfavorably and gallamine turns out to be a weak muscle relaxant, like all multi-quaternary compounds.
Considering acetylcholine a quaternizing group larger than methyl and an acyl group larger than acetyl would reduce the molecule's potency. The charged N and the carbonyl O atoms are distanced from structures they bind to on receptive sites and, thus, decrease potency. The carbonyl O in vecuronium for example is thrust outward to appose the H-bond donor of the receptive site. This also helps explain why gallamine, rocuronium, and rapacuronium are of relatively low potency.
In general, methyl quaternization is optimal for potency but, opposing this rule, the trimethyl derivatives of gallamine are of lower potency than gallamine. The reason for this is that gallamine has a suboptimal N-N distance. Substituting the ethyl groups with methyl groups would make the molecular length also shorter than optimal. Methoxylation of tetrahydroisoquinolinium agents seems to improve their potency. How methoxylation improves potency is still unclear. 
Histamine release is a common attribute of benzylisoquinolinium muscle relaxants. This problem generally decreases with increased potency and smaller doses. The need for larger doses increases the degree of this side-effect. Conformational or structural explanations for histamine release are not clear.