Minimum distance to a group of atoms as a collective variable

The functionality of OpenMM will (eventually) include everything that one would need to run modern molecular simulation.
POST REPLY
User avatar
lewis martin
Posts: 63
Joined: Tue Mar 06, 2018 8:56 pm

Minimum distance to a group of atoms as a collective variable

Post by lewis martin » Mon Jul 27, 2020 9:55 pm

Hi all,
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), .... ) "
and so on, where p1 is the ligand atom, and p's 2 through 50 are lipids.. Is that the best way?

Thanks,
Lewis

User avatar
Peter Eastman
Posts: 2543
Joined: Thu Aug 09, 2007 1:25 pm

Re: Minimum distance to a group of atoms as a collective variable

Post by Peter Eastman » Tue Jul 28, 2020 4:48 pm

I don't really have a better solution. This will be very inefficient for large numbers of groups, but perhaps with 50 it won't be too terrible. If you want to use the molecule COM rather than a single atom you could do the same thing with CustomCentroidBondForce.

User avatar
lewis martin
Posts: 63
Joined: Tue Mar 06, 2018 8:56 pm

Re: Minimum distance to a group of atoms as a collective variable

Post by lewis martin » Tue Jul 28, 2020 5:25 pm

Thanks Peter.
I think to get a reasonably sized membrane I would need around 64 lipids per leaflet, so one restraint per headgroup, and then two leaflets, is 128 bonds. Surely that would be less extra distance calculation than adding even a single extra lipid.

Anyways Ill drop a gist here later with some example code if I figure it out.

User avatar
lewis martin
Posts: 63
Joined: Tue Mar 06, 2018 8:56 pm

Re: Minimum distance to a group of atoms as a collective variable

Post by lewis martin » Wed Jul 29, 2020 4:27 pm

OK I tested it out by adding forces that calculate minimum distance of a sodium ion to both the upper and lower leaflets of a CHARMMGUI lipid bilayer.

If anyone's interested, see a notebook here:
https://github.com/ljmartin/lipid_diffu ... mple.ipynb
and other files are here:
https://github.com/ljmartin/lipid_diffu ... ar_example

The addition of the two forces (one for each bilayer leaflet) reduces simulation speed to 80% of the same system without the forces, so I guess about 10% per force. More than I thought but certainly not a deal breaker.

Anyways, the goal was to reproduce the free energy surface seen in https://pubs.acs.org/doi/10.1021/acs.jctc.8b00882 , and this code + metadynamics should be enough to do that.
cheers
lewis

POST REPLY