Skip to main content
Physics LibreTexts

Designing molecular models of membranes with VMD

  • Page ID
  • Introduction

    While modern experimental techniques are able to resolve membrane-bound protein function, structural determination is still a challenge. To provide insight into the behavior of membranes and the proteins residing within them, computational biologists utilize molecular dynamics (MD) simulations. Since the early 2000’s there has been a remarkable increase in the number of computational methods, software, and visualization aids reinforcing the need for MD [Ref. 1]. This tutorial is for users to become familiar with producing and visualizing atomistic membranes for MD simulations. This tutorial will use Visual Molecular Dynamics (VMD) to visualize the membrane in tandem with the CHARMM-GUI web interface to build membranes. Completion of this tutorial will allow the user to:

    1. Design, visualize and select certain lipid sections using the VMD command interface.

    2. Visualize homogenous POPE and POPC membranes using VMD’s Membrane Builder extension tool.

    3. Create heterogenous, solvated lipid membrane models using the CHARMM-GUI Membrane Builder extension.

    This tutorial uses a Linux 64 version of VMD 1.9.3 OpenGL. Other system downloads can be found here: [Ref 2]. Other versions may result in an inexact rendition of the tutorial, however, the concepts remain valid.

    The CHARMM-GUI Membrane Builder extension can be found here: [Ref 3-8].


    Note: text in italics indicates verbatim text/tools/commands that can be found/typed on your screen when going through the tutorials. User exercises are also indicated in italics. Figure references are highlighted in bold to indicate helpful visuals. 


    1. Basic VMD visualization of POPE

    The Protein Data Bank (PDB) is the largest online repository containing more than 150,000 three-dimensional biological structures to date [Ref. 9-11]. Computational biologists frequently use the PDB as a starting point for their biological models, either implementing existing PDB structures or remodeling their own from PDB template for MD. However, most PDB structures do not contain membrane embedded structure; computational biologists typically design their own membranes and insert protein structures within them. Thus, this section is an introduction for new users on how to navigate Visual Molecular Dynamics software before building membranes. This section will use the lipid, phosphatidylethanolamine (POPE) as the example structure.


    1.1. Contents of a PDB file and loading the POPE model

    POPE is a glycerophospholipid and one of the most abundant lipid types in bacteria. In the downloadable files section (bottom of page), you will find the file 1.1_single_POPE.pdb. A .pdb file is a Protein Data Bank file containing all of the experimental and three-dimensional structure information needed to visualize the biomolecule (Fig. 1.1). More information on .pdb files and their syntax can be found here: [Ref. 12-13].



    Figure 1.1: Example text from a .pdb file. The REMARK section is for user comments while the ATOM section

    contains coordinate and atom type information. 10 Different atoms are displayed.


    After launching VMD, you will see two windows: the VMD main and the VMD display. The VMD main window contains the executable commands and options to manipulate the molecule on the VMD display. Next, from the VMD main window, load the single_POPE.pdb file using File → New Molecule... A new window called the Molecule File Browser will appear. From here, click Browse and navigate to the folder containing single_POPE.pdb. After selecting, click Load in the Molecule File Browser window to load the POPE molecule to the VMD Display (Fig. 1.2).



    Figure 1.2: (Left) The VMD main window for commands and options.

    (Right) The VMD display with a single POPE molecule.


    1.2 Basic VMD visualization features: orientation, rotation, and representation

    You can navigate the VMD Display with two modes: rotate ( press r on keyboard) and translate (press t on keyboard)

    For rotate mode the following mouse commands are:

    • Left click and hold = free three-dimensional rotation

    • Right click hold = rotation parallel to computer screen

    • Mouse wheel = zoom in/out of center


    For translate mode the following mouse commands are:

    • Left click and hold = translate molecule parallel to computer screen

    • Right click and hold / mouse wheel = zoom in/out of center


    More mouse mode commands can be found here: [Ref. 14-15].


    You should see the line representation of a POPE molecule with the color scheme indicating elements by name. Thus,

    • cyan = carbon

    • white = hydrogen

    • red = oxygen

    • orange = phosphorous

    • blue = nitrogen


    Now you may be thinking that the line representation is helpful to visualize the entire molecule but is not very pleasing to the eye. Luckily, there are other representations we can use. From the VMD Main, go to Graphic → Representations… A new window called Graphical Representations will appear (Fig. 1.3). Here you will see a selected molecule tab that you can visualize different molecules. You will also see Draw style, Selections, Trajectory, and Periodic tabs that tweak the visual representation of each molecule.



    Figure 1.3: The Graphical Representations tab allows you to modify

    the visual representation of your model.


    First, let’s focus on the Draw style tab. In it, you can change the coloring method, the drawing method, the material shading, and the thickness of representation. Let’s change the thickness of the line schema from 1 to 5. It should be easier now to visualize the molecule. Reset the thickness to 1.

    In the Drawing method selection pane you will find different molecule visualization schema. Some common styles are Lines, VDW, CPK, and NewCartoon for models with secondary structure (Fig. 1.4), however, there are other styles available (Table 1.1).


    clipboard_ed2e9a5ba73e261114171c04d15ad8df3.png clipboard_e65d2a95441eaba8e2c3b569e0e58fc22.png clipboard_e4dcbcbe433093bc185746bfeee60c5df.png

    Figure 1.4: POPE visualization using (Left) lines, (Middle) Van Der Waals, and (Right) CPK draw styles.


    Table 1.1: Molecular draw styles from VMD User's Guide Version 1.9.3 [Ref. 15]


    In the Coloring Method selection pane you will find different coloring schemes depending on atom typing, molecule collection, residue ID, and some physical properties. The effectiveness of these schemes will be dependent on your .pdb file parameters. For now, the single_POPE.pdb file is only useful with the Name method. Feel free to play around, mix and match the various drawing/coloring methods. Afterwards, reset the molecule with Coloring Method: Name and Drawing Method: CPK.


    1.3. Identification of atom types

    To label specific atoms, go to the VMD Main window and select Mouse → Label → Atoms. Clicking on an atom will show the molecule name followed by the atom name. From the color scheme, label the phosporous atom. Now the nitrogen. To manage the labels, go to the VMD Main window and select Graphics → Labels… Here you can find a collection of the labels you have made. You can click on each, show, hide, or delete them, as well as reposition the labels. For example, select the POPE1:P (the phosphorous) atom label. Under the Picked Atom tab you will find the naming information (ResName, ResID, etc). In the Properties tab you can drag the crosshair in the Offset chart to reorient the label. In the Global Properties tab you can adjust your text size and thickness (Fig. 1.5).

    clipboard_e5c3c69fbbd1d670fb2b25b62da71fa04.png clipboard_e785eba3ef733b8348cf932b330048916.png

    Figure 1.5 (Left) The labels window where you can identify atom naming schema and adjust visual labels.

    (Right) A POPE molecule with a labeled phosphorous atom (green text).


    Exercise 1.1: Identify one atom of each element: Carbon, hydrogen, oxygen, nitrogen, and phosphorous. Rearrange each label so that they are all visible while clearly indicating the atom.


    Additionally, you can visualize bond lengths and angles. Again, from the VMD Main window, select Mouse → Label → Bonds. To visualize a bond length you must click on the two atoms you are interested in. Again, you can find the labeled bonds from Graphics → Label in the VMD Main window. Similarly, you can calculate angles by clicking on three atoms. You may be wondering “why can’t I see double bonds?” Unfortunately the .pdb file does not contain bond information and thus cannot visualize these bonds. Therefore, an intuitive understanding is sometime needed for the viewer to fully understand the model.


    Exercise 1.2: How many double bonds are there in POPE? Where would you expect double bonds?


    1.4. Advanced selection of specific regions

    As you create more complex models you’ll want to be able to specify a viewing region. This can be done by using the Graphical Representations window (Fig. 1.3). Again, from the VMD Main select Graphics → Representations… to open the Graphical Representations window. First, create a new representation of the selected molecule by clicking Create Rep. In the representation box you’ll now see two representations. By double-clicking you can hide the representation; hidden representations are in red text while visible representations in black text. Highlight the visible representation to enable it for editing.

    In the selected atoms box you can utilize certain keywords to enable or disable parts of your model. You can even use more complex strings as well as boolean or numeric values to specify your selection criteria. Back in the Labels window (Graphics → Label) you may have noticed certain labels having type information in the Picked Atom tab (Fig. 1.5). Keywords such as ResName, ResID, Name, Type, Chain, SegName, and Index can be used to specify a selection. For now, since there is only one POPE ligand labeled as ResName: POPE and specified as Chain: X, let’s sort through the atom types for practice. To visualize all carbon atoms we would use a regular expression such as (Fig. 1.6):

    • name “C.*”

    where the represents the canonical carbon atom naming convention and the .* indicates any carbon atoms in the model. In an expression, this example means we are looking for anything classified as a name that starts with C. Another way we can visualize carbon only atoms is by typing:

    • not name “O.*” and not name “P.*” and not name “H.*” and not name “N.*”

    Your representation should not have changed as you’ll only see carbon atom types. In more complex models, you can specify single ligand chains or even ligand types:

    • resname POPE
    • chain X

    In both of these cases you should see the entire POPE molecule. More selection expressions can be found in Chapter 6.3 of the VMD 1.9.3 User's Guide [Ref. 15] 



    Figure 1.6: Visual of carbon atoms from the single POPE model after specifying carbon only in Graphical Representations.


    Exercise 1.3. Visualize all atoms but carbon in the single_POPE.pdb file.

    Exercise 1.4. Using the index notation, visualize the polar head group. Hint: index notation for VMD starts at zero.


    1.5 Saving and loading your session

    From VMD Main, select File → Save Visualization State… Here you can specify which folder and what file name you would like using traditional file path syntax: user/home/my_folder/my_file_name.vmd Make sure you save as a .vmd or you will be unable to load the file! If you forget, rename your file so that you include the .vmd file type.

    To load your session, start VMD and from VMD Main select File → Load Visualization State… Note: File → New Molecule… is for importing new molecule file types only. It is better to use the Load Visualization State if you want to preserve your model representation settings.


    2. Homogenous membranes using VMD’s MembraneBuilder tool

    The purpose of VMD's MembraneBuilder tool is to generate a membrane model surrounded by water which we can then place a protein into. This complete lipid/protein/water model can then be used to run molecular dynamics simulations after generation of force field components and simulation parameters (not discussed here). For this tutorial, the MembraneBuilder tool extends our interpretation of individual POPE molecules to a homogenous POPE membrane. Unfortunately, the MembraneBuilder tool can 1) only generate homogenous POPE and POPC membranes and 2) generate water surrounding molecules. For homogenous or heterogenous membranes with the option of ion solvation, skip this section and proceed to Section 3 which discusses using the CHARMM-GUI interface to generate membranes.


    2.1 Generate a POPE membrane

    From VMD Main, select Extensions → Modeling → Membrane Builder to open the Membrane window. In this window, select POPE as the lipid, and generate a 50x50 Angstrom2 area. Change the output prefix to POPE_membrane. The topology provides two CHARMM force fields that can be used: CHARMM27 and CHARMM36. Generally, CHARMM27 is for nucleic acids and lipids while CHARMM36 is for proteins and lipids. However, CHARMM36 is noted to have superior lipid parameters and thus should be used for most membrane biology models. After selecting CHARMM36, click Generate Membrane. You should now see a POPE membrane that is 50x50 Angstrom2 with the leaflets surrounded by water. You will also not some patterns of randomness and discontinuity. Visualize the membrane using a CPK Drawing Method (Fig. 2.1).

    clipboard_e487fb12dab48290966abc9979d129932.png clipboard_e88553f18127c675eb0dfc52886a02054.png

    Figure 2.1: (Left) the MembraneBuilder window with tutorial selections. (Right) side view of the generated POPE membrane with surrounding water.


    Let’s verify the generated membrane x-y length. From the Graphical Representations window, remove the water by typing in the Selected Atoms text box:

    • not water

    Next, in the VMD Main, select Mouse → Label → bonds. Using the x-, y-, and z-planes, take 5 rough measurements and record the average. You’ll notice that the membrane area will be less than 50 Angstrom2 (around 45 Angstrom2 average). This is likely due to the close packing arrangement performed after initial generation of the model. You can save these models as we did in Section 1.5 or save the membrane as a PDB coordinate file. From the VMD Main, File → Save Coordinates… will open a Save Trajectory window where you can select the molecule, atoms, and file format you wish to save as. For more information on how MembraneBuilder executes its algorithm, visit here: [Ref. 16].


    Exercise 2.1. Take an average of 5 measurements to determine the thickness of the membrane bilayer. Does this match experimental values?

    Exercise 2.2. Take an average of 5 measurement to determine the water thickness. Why do we need this value of thickness? Should we go lower? Should we go higher?


    3. Heterogeneous membrane building using CHARMM-GUI Membrane Builder

    The CHARRM (Chemistry at HARvard Macromolecular Mechanics) force field was initially developed for proteins and nucleic acids but has since been extended to feature a robust set of lipid types [Ref 17-18]. The most recent force field, CHARMM36, supports proteins, nucleic acids, carbohydrates, lipids, and small molecules [Ref 19].

    CHARMM-GUI is an online graphical user interface that allows the generation of multiple MD models and preliminary input files for the start of simulation [Ref. 4-8]. This section will cover the Membrane Builder tool that allows users to develop membrane models with the option of including protein complexes. For this tutorial, we will cover only the bilayer builder section, without protein insertion, and without preliminary simulation building. Note: should you want to try protein-membrane model building in the future, make sure your protein PDB has the correct orientation relative to the membrane or you will improperly insert your protein.

    The CHARMM-GUI Membrane Builder tool can be found here: [Ref. 3].


    3.1. Determine lipid components, size, and solvation

    After clicking on the link, you will be redirected to the Membrane Builder Bilayer Builder page. Scroll down and you will notice a brief explanation of the workflow, an option to include a protein PDB file, and an option to generate a membrane only system. Click the Membrane Only System and you will be redirected to the System Size Determination Options page (Fig. 3.1).



    Figure 3.1: The start of the CHARMM-GUI Membrane Builder webpage.

    For this tutorial, select "Membrane Only System."


    For this tutorial, the user will replicate a model that has been used to study the effects of lipid tail saturation [Ref. 6]. The model is the CPRΔ1 model, a yeast-like model that contains a relatively high concentration of unsaturated lipids. Make sure you have clicked the Heterogenous Lipid, the Water thickness, and Ratios of lipid components options (Fig. 3.2). Next, input 20 Angstroms as the water thickness, input 80 Angstroms as the initial X-Y guess, and fill in the lipid ratios as indicated (Fig. 3.3; Table 3.1). When finished, click the Show the System Info button and look at the generated dimensions. Ideally, both leaflets should have close to the same surface area; uneven areas can induce membrane bending artifacts during simulations. Once the system dimensions are reasonable, click Next Step: Determine the System Size located in the lower right. This step may take some time. Do not close or refresh the web page.



    Figure 3.2: System size determination options for use in the tutorial. Options outside this

    tutorial will vary depending system size, desired processing speed, and MD software used.



    Figure 3.3: Lipid components options in CHARMM-GUI Membrane Builder

    Make sure you click "Show the system info" after you input your desired lipids!



    Table 3.1: Representative model components from supplemental Table 2 in So S. et al, 2009 [Ref. 6].



    In the next web page, you will have a system output box showing you the various CHARMM parameter files generated from the previous step (Fig. 3.3). You can download the system parameter files at any step during the tutorial by clicking download.tgz in the top right. You can view the Generated Packed System by clicking view structure; this will open an additional window that can be manipulated similar to VMD. Below the system output box you will see the Determined System Size section with size parameters for building the system. Further down you will see the System Building Options section. A key component of system building is deciding if the insertion or replacement method of adding model components should be used. Broadly, insertion methods are meant for protein insertions into bilayers while membrane-only models should use the replacement method. Additionally, enable the Check lipid ring penetration box to verify that lipid replacement does not produce artifacts. Next, in the Component Building Options section, ions are included in the system to generate a charge neutral model mimicking physiological conditions. For this case, we want to mimic the number of ions listed in Table 3.1. Adjust the ion concentration until you have exactly the correct number of ions. For this tutorial, use the Monte Carlo ion placement method (Fig. 3.4).


    Figure 3.3: The CHARMM parameter files that can be

    downloaded at each step.



    Figure 3.4: System and Component build options for this tutorial.


    Once finished, click Next Step: Build Components located in the lower right. This step may take some time. Do not close or refresh the web page.


    3.2. Final assembly, export, and visualization

    Step 4 of the CHARMM-GUI Membrane Builder provides a self-check for lipid ring penetration as well as ion/water box building. In the system output box at the top of the page you can find the lipid.pdb structure (Fig. 3.5). Click Next Step: Assemble Components.


    Figure 3.5: Side perspective of lipid membrane from tutorial after Step 3: Determine the System Size


    Step 5 of the CHARMM-GUI Membrane Builder provides force field options, input generation options, and equilibration options for generating M.D. simulation parameters. Input options can be generated for various M.D. packages such as NAMD, GROMACS, AMBER, and CHARMM, among others. The use of a certain package will largely be dependent upon your question of interest and your lab's expertise.

    At the top of the system output box you will see the assembled PDB labeled as step5_assembly.pdb. You can download this PDB only or the entire CHARMM-GUI process by downloading the .tgz folder. After downloading, the assembly can be visualized using VMD as described in Section 1 (Fig. 3.6).


    clipboard_ebfe32dd7de1c5e74dca4ecedd0e0cf1d.png clipboard_ec45e62b885a15082e90ad1915cb39901.png

    Figure 3.6: (Left) top view of generated membrane model from tutorial

    (Right) side view of generated membrane model from tutorial.


    Exercise 3.1. From Fig. 3.6, isolate each class of lipid, ion, and water atoms as their own representation. Hint: you may need to look at the PDB as a text file or labels feature in VMD to find common naming schemes.

    Exercise 3.2. Generate the other two models from Jo, S. et al 2009 (Table 3.1) [Ref. 6]. What do you expect will be different compared to the CPRΔ1 model?

    Exercise 3.3. Find another biomembrane of interest and generate the model. What parameters must you know to ensure that it is physiologically relevant?

    Exercise 3.4. Temperature can be a critical factor during M.D. equilibration. As seen in CHARMM-GUI Membrane Builder step 5, there is an option to adjust the temperature. What are reasonable/unreasonable temperatures? What is a good rule of thumb? Hint: Membrane fluidity.



    Some images were made with VMD/NAMD/BioCoRE/JMV/other software support. VMD/NAMD/BioCoRE/JMV/ is developed with NIH support by the Theoretical and Computational Biophysics group at the Beckman Institute, University of Illinois at Urbana-Champaign.

    Some images were made with the online CHARMM-GUI visualization tool during Section 3: Heterogeneous membrane building using CHARMM-GUI Membrane Builder



    [1] Hospital, A., Goñi, J. R., Orozco, M., Gelpí, J. L. (2015). Molecular dynamics simulations: advances and applications. Adv Appl Bioinform Chem. 8(1): 37-47. doi: 10.2147/AABC.S70333

    [2] Software downloads download VMD.  Available at

    [3] CHARMM-GUI Membrane Builder. Available at

    [4] Jo, S., Kim, T., Iyer, V. G., Im, W. (2008). CHARMM-GUI: a web-based graphical user interface for CHARMM. J Comput Chem. 29(11): 1859-1865. doi: 10.1002/jcc.20945

    [5] Wu, E. L., Cheng, X., Jo, S., Rui, H., Song, K. C., Dávila-Contreras, E. M., Qi, Y., Lee, J., Monje-Galvan, V., Venable, R. M., Klauda, J. B., Im, W. (2014). CHARMM-GUI Membrane Builder toward realistic biological membrane simulations. J Comput Chem. 35(27): 1997-2004. doi: 10.1002/jcc.23702

    [6] Jo, S., Lim, J. B., Klauda, J. B., Im, W. (2009). CHARMM-GUI Membrane Builder for mixed bilayers and its application to yeast membranes. Biophys J. 97(1): 50-58. doi:10.1016/j.bpj.2009.04.013

    [7] Jo, S., Kim, T., Im, W. (2007) Automated builder and database of protein/membrane complexes for molecular dynamics simulations. PLoS One 2(9): e880. doi: 10.1371/journal.pone.0000880

    [8] Lee, J., Patel, D. S., Ståhle, J., Park, S. J., Kern, N. R., Kim, S., Lee, J., Cheng, X., Valvano, M. A., Holst, O., Knirel, Y. A., Qi, Y., Jo, S., Klauda, J. B., Widmalm, G., Im, W. (2019). CHARMM-GUI Membrane Builder for complex biological membrane simulations with glycolipids and lipoglycans. J Chem Theory Comput. 15(1): 775-786. doi: 10.1021/acs.jctc.8b01066

    [9] PDB statistics: overall growth of released structures per year. (2019). Available at:        

    [10] Berman, H. M., Westbrook, J., Feng, Z., Gilliland, G., Bhat, T. N., Weissig, H., Shindyalov, I. N., Bourne, P. E. (2000). The Protein Data Bank. Nucleic Acids Res. 28(1): 235-242. doi: 10.1093/nar/28.1.235

    [11] Burley, S. K., Berman, H. M., Bhikadiya, C., Bi, C., Chen, L., Di Costanzo, L., Christie, C.,  Dalenberg, K., Duarte, J. M., Dutta, S., Feng, Z., Ghosh, S., Goodsell, D. S., Green, R. K., Guranovic, V., Guzenko, D., Hudson, B. P., Kalro, T., Liang, Y., Lowe, R., Namkoong, H., Peisach, E., Periskova, I., Prlic, A., Randle, C., Rose, A., Rose, P., Sala, R., Sekharan, M., Shao, C., Tan, L., Tao, Y. P., Valasatava, Y., Voigt, M., Westbrook, J., Woo, J., Yang, H., Young, J., Zhuravleva, M., Zardecki, C. (2019). RCSB Protein Data Bank: biological macromolecular structures enabling research and education in fundamental biology, biomedicine, biotechnology and energy. Nucleic Acids Res. 47(D1): D464-D474. doi: 10.1093/nar/gky1004

    [12] PDB file format documentation. Available at:

    [13] Berman, H., Henrick, K., Nakamura, H. (2003). Announcing the worldwide Protein Data Bank. Nat Struct Biol. 10(12): 980. doi: 10.1038/nsb1203-980

    [14] Mouse modes. (2019). Available at:

    [15] VMD user's guide version 1.9.3. (2016). Available at

    [16] Balabin, I. Membrane plugin, version 1.1. Available at

    [17] Brooks, B. R., Bruccoleri, R. E., Olafson, B. D., States, D. J., Swaminathan, S., Karplus, M., (1983). CHARMM: A program for macromolecular energy, minimization, and dynamics calculations. J Comput Chem. 4(2) 187-217. doi: 10.1002/jcc.540040211

    [18] Brooks, B. R., Brooks III, C. L., MacKerell Jr., A. D., Nilsson, L., Petrella, R. J., Roux, B., Won, Y., Archontis, G., Bartels, C., Boresch, S., Caflisch, A., Caves, L., Cui, Q., Dinner, A. R., Feig, M., Fischer, S., Gao, J., Hodoscek, M., Im, W., Kuczera, K., Lazaridis, T., Ma, J., Ovchinnikov, V., Paci, E., Pastor, R. W., Post, C. B., Pu, J. Z., Schaefer, M., Tidor, B., Venable, R. M., Woodcock, H. L., Wu, X., Yang, W., York, D. M., Karplus, M. (2010). CHARMM: the biomolecular simulation program. J Comput Chem. 30(10): 1545-1614. doi: 10.1002/jcc.21287

    [19] Kessel, A. and Ben-Tal, N. (2018) Introduction to proteins structure, function, and motion second edition. Boca Raton, FL: CRC Press, Taylor & Francis Group.