Is it possible to define a custom force as the minimum distance between one atom and a group of atoms, or alternatively a molecule COM and a group of atoms? The purpose is to use minimum distance to lipid headgroups as a collective variable for ligand diffusion across the bilayer, for example.
The starting point I came up with is a CustomCompoundBondForce, made up of many bonds between a ligand and an atom from each of the lipid headgroups. Then the energy expression might be
Code: Select all
"min(distance(p1, p2), distance(p1,p3), .... ) "
Thanks,
Lewis