Skip to content

Analyzing membrane simulations

Grossfield Lab edited this page Mar 5, 2024 · 2 revisions

Before reading this, you'll want to read the suggestions for your package of choice (e.g NAMD).

The main additional piece of advice for preparing to analyze membrane simulations involves some choices for doing data curation in advance of the actual analysis. We assume that your basic workflow is to run simulations on dedicated hardware, then periodically merge the new data with existing data, then run analysis. The best way to do this is using the tool merge-traj, which as you'd expect is useful for merging trajectories, but can also do some other operations, including downsampling the trajectory and centering it.

First off, it's worth noting that merge-traj works best if the file used to specify the system has connectivity information (e.g. a PSF). If you're working with NAMD, that's easy, and if you're working with GROMACS, we recommend running

gmx dump -s foo.tpr | gmxdump2pdb.pl prefix

where foo.tpr is your trp file, and prefix is the name you want given to the resulting PDB and PSF files. This tool will generate a "fake" PSF file containing atom and bond information, which you can then use for analysis purposes (you can also use the PSF as input to VMD to get it to correctly draw the bonds for a coarse-grained simulation, while the PDB will work in PYMOL if you also run set connect mode, 1).

For soluble proteins, one would usually run merge-traj with the --centering-selection option, specifying a selection string that would put the protein at the origin at every frame. However, merge-traj has additional support for membrane systems, letting you specify 2 selections, one for the plane of the membrane (--xy-centering-selection) and one along the normal (--z-centering-selection). The logic is that for a membrane protein system you can center the protein in the xy plane, and center the membrane at z=0. It may also be necessary to specify --postcenter-xy and --postcenter-z; if your centering selection is made of multiple molecules (like a membrane), centering the molecule will require reimaging some molecules, which will then shift the center a little, requiring this final correction.

In addition, it may be necessary to specify --selection-is-split, for the case where the selection you're centering on is or might be split across the periodic boundary; for example, OpenMM sometimes translates the system at start time, so you could end up with the membrane centered at the z-periodic boundary (upper leaflet at the bottom of the simulation cell, lower leaflet at the top). In this case, naively calculating the centroid of the membrane will give you the center of the box; --selection-is-split will fix this by performing an initialization step where it translates the first atom of the selection to the origin and reimages everything, then performing the centering as usual.

It is important to perform these steps (and visually verify them), because most membrane analysis tools in LOOS assume the membrane is centered at z=0. Failure to do so will render output from tools like density-dist hard to interpret, and will invalidate the assumptions about which leaflet lipids are in in tools like xy_rdf.