Applying Barrier Potentials for Molecular Dynamics Simulations

Tutorial Created with Software Release: 2026-1
Topics: Consumer Packaged Goods, Organic Electronics, Pharmaceutical Formulations, Polymeric Materials
Methodology: All-Atom Molecular Dynamics
Products Used: Desmond, MS Maestro

Tutorial files

0.5 GB

This tutorial is written for use with a 3-button mouse with a scroll wheel.
Words found in the Glossary of Terms are shown like this: Workspacethe 3D display area in the center of the main window, where molecular structures are displayed

 

Tip: You can hover over a glossary term to display its definition. You can click on an image to expand it in the page.
Abstract:

 

In this tutorial, we will learn to apply barrier potentials to periodic systems for molecular dynamics simulations.

 

Tutorial Content
  1. Introduction to Barrier Potentials for Molecular Dynamics Simulations

  1. Creating Projects and Importing Structures

  1. Packing Solvents onto the Polypropylene Slab

  1. Applying an Impermeable Barrier Potential and Running MD

  1. Applying a Semi-permeable Barrier Potential and Running MD

  1. Conclusion and References

  1. Glossary of Terms

1. Introduction to Barrier Potentials for Molecular Dynamics Simulations

The Set Barrier Potential for MD panel allows for the application of impermeable and semi-permeable potentials to a periodic system. The application of a barrier potential and subsequent molecular dynamics (MD) simulation in Schrödinger’s Materials Science (MS) Maestro suite is a straightforward task summarized here:

Two implementations of a barrier potential (impermeable and semi-permeable) are possible, and which to use must be user-specified. For an impermeable barrier, a repulsive force is applied to all of the atoms (or particles if a coarse-grained system). The closer the atom is to the barrier, the stronger the repulsive force it feels. There is a cutoff distance for the potential barrier, meaning some atoms far from the barrier will feel no repulsive force at all. For a semi-permeable barrier, a repulsive potential is applied to the atoms (or particles) indicated as being non-permeable. Only the indicated atoms are subject to the repulsive potential while the other atoms feel no barrier force at all. For more details about the functional form of the barriers applied, please see the help documentation.

Applying barrier potentials is valuable for a variety of applications, including for example, limiting the adsorption of a small molecule on one side of a substrate, modeling the permeability of a membrane, and studying reactions on one side of a surface. These applications are relevant to the fields of polymeric materials, consumer packaged goods, and battery materials, respectively. 

In this tutorial, we will study the application of both impermeable and semi-permeable barrier potentials. In Section 3, we will build two disordered systems (1) water and a polypropylene slab and (2) acetone and a polypropylene slab. In Section 4, we will set impermeable barrier potentials for both disordered systems and run MD simulations. In Section 5, we will apply a semi-permeable barrier potential to a pre-generated POPC membrane structure.

2. Creating Projects and Importing Structures

At the start of the session, change the file path to your chosen Working Directorythe location where files are saved in MS Maestro to make file navigation easier. Each session in MS Maestro begins with a default Scratch Projecta temporary project in which work is not saved, closing a scratch project removes all current work and begins a new scratch project, which is not saved. A MS Maestro project stores all your data and has a .prj extension. A project may contain numerous entries corresponding to imported structures, as well as the output of modeling-related tasks. Once a project is saved, the project is automatically saved each time a change is made.

Structures can be built in MS Maestro or can be imported using File > Import Structures (or drag-and-dropped), and are added to the Entry Lista simplified view of the Project Table that allows you to perform basic operations such as selection and inclusion and Project Tabledisplays the contents of a project and is also an interface for performing operations on selected entries, viewing properties, and organizing structures and data. The Entry Lista simplified view of the Project Table that allows you to perform basic operations such as selection and inclusion is located to the left of the Workspacethe 3D display area in the center of the main window, where molecular structures are displayed. The Project Tabledisplays the contents of a project and is also an interface for performing operations on selected entries, viewing properties, and organizing structures and data can be accessed by Ctrl+T (Cmd+T) or Window > Project Table if you would like to see an expanded view of your project data.

  1. Double-click the Materials Science icon

Figure 2-1. Change Working Directory option.

  1. Go to File > Change Working Directory
  2. Find your directory, and click Choose
  3. Pre-generated files are included for running jobs or examining output. Download the zip file here: schrodinger.com/sites/default/files/s3/release/current/Tutorials/zip/md_potential_barrier.zip
  4. After downloading the zip file, unzip the contents in your Working Directorythe location where files are saved for ease of access throughout the tutorial

Figure 2-2. Save Project panel.

  1. Go to File > Save Project As
  2. Change the File name to barrier_potential_tutorial, click Save
    • The project is now named barrier_potential_tutorial.prj

Figure 2-3. Viewing the imported system components.

  1. Go to File > Import Structures
  2. Navigate to where you downloaded the tutorial files (presumably your working directory) and choose system_components.maegz from the provided files
  3. Click Open
    • A new entry group is added to the entry list containing three entries; a polypropylene slab, water, and acetone.

In the following two sections, we will study how the two different solvents ingress into the polypropylene slab. Feel free to visualize and stylize the imported structures.

3. Packing Solvents onto the Propylene Slab

In this section, we will use the Disordered System Builder to pack our molecules of interest, water and acetone, into amorphous cells with our polypropylene substrate. To learn more about building disordered systems with substrates, please refer to the Building a Polymer-Polymer Interface Model tutorial.

Figure 3-1. Selecting water and including the polypropylene slab.

  1. Select(1) the atoms are chosen in the Workspace. These atoms are referred to as "the selection" or "the atom selection". Workspace operations are performed on the selected atoms. (2) The entry is chosen in the Entry List (and Project Table) and the row for the entry is highlighted. Project operations are performed on all selected entries water and includethe entry is represented in the Workspace, the circle in the In column is blue polypropylene slab
    • Recall that select(1) the atoms are chosen in the Workspace. These atoms are referred to as "the selection" or "the atom selection". Workspace operations are performed on the selected atoms. (2) The entry is chosen in the Entry List (and Project Table) and the row for the entry is highlighted. Project operations are performed on all selected entries means to highlight from the entry list and includethe entry is represented in the Workspace, the circle in the In column is blue means to fill the blue circle to view the entry in the workspacethe 3D display area in the center of the main window, where molecular structures are displayed

Note: Please refer to the Glossary of Terms for the difference between includedthe entry is represented in the Workspace, the circle in the In column is blue and selected(1) the atoms are chosen in the Workspace. These atoms are referred to as "the selection" or "the atom selection". Workspace operations are performed on the selected atoms. (2) The entry is chosen in the Entry List (and Project Table) and the row for the entry is highlighted. Project operations are performed on all selected entries.

Figure 3-2. Opening the Disordered System Builder.

  1. Go to Tasks > Materials > Structure Builders > Disordered System
    • The Disordered System Builder panel opens
    • water should appear as the only component, otherwise, return to step 1 and ensure that water is selected(1) the atoms are chosen in the Workspace. These atoms are referred to as "the selection" or "the atom selection". Workspace operations are performed on the selected atoms. (2) The entry is chosen in the Entry List (and Project Table) and the row for the entry is highlighted. Project operations are performed on all selected entries

Figure 3-3. Setting parameters in the Components tab.

  1. Select Amorphous for the Initial state
  2. Change the Number of molecules to 2000
  3. Check Substrate
  4. Click Import
    • polypropylene_slab should appear next to the import button
    • If it does not import, ensure that the polypropylene_slab was includedthe entry is represented in the Workspace, the circle in the In column is blue in step 1 of this section

Figure 3-4. Defining the substrate interface.

  1. Change the Substrate type to Planar interface
  2. Click Define Interface
    • The Define Interface panel opens
    • A plane appears in the workspacethe 3D display area in the center of the main window, where molecular structures are displayed indicating where the build will occur. We want to build up in the c direction, as indicated
  3. In the Define Interface panel, ensure that c is chosen as the Crystal vector direction
  4. Set Buffer between surface and components to 2 Å
    • This will aid the build and will be reconciled in the later MD stages
  5. Set Buffer between components and surface mirror image in the periodic box to 10 Å
  6. Click OK

Note: The c (or z) direction is preferred for the crystal vector, particularly if subsequent steps will involve MD simulations as they do here.

Figure 3-5. Setting the PBC.

  1. For Periodic Boundary Conditions (PBC), select Use/expand substrate PBC from the drop-down
  2. Go to the Disorder tab

Figure 3-6. Setting the disorder options and running the job.

  1. Set the Initial density to 0.9
    • We will pack water in at a relatively high density
  2. Ensure Density is chosen as the parameter for Keep constant
  3. Change the Job name to disordered_system_polypropylene_water
  4. Adjust the job settings () as needed
    • This job requires a CPU host. The job can be completed in 5 minutes on a CPU host
  5. If you would like to run the job yourself, click Run. Otherwise, go to File > Import Structures, navigate to the provided tutorial files and Open Section_03 disordered_system_polypropylene_water > disordered_system_polypropylene_water_system-out.cms
  6. Close the Disordered System Builder panel
    • In general, always close the Disordered System Builder panel after use. This panel is interactive with the workspace and leaving it open can cause slowdowns

Figure 3-7. Viewing the output of the water polypropylene system.

  1. When the job is finished or imported select(1) the atoms are chosen in the Workspace. These atoms are referred to as "the selection" or "the atom selection". Workspace operations are performed on the selected atoms. (2) The entry is chosen in the Entry List (and Project Table) and the row for the entry is highlighted. Project operations are performed on all selected entries and includethe entry is represented in the Workspace, the circle in the In column is blue the output disordered_system_polypropylene_water_all_components_amorphous in the entry list.
    • The gap between the polypropylene slab and water molecules was defined when the interface parameters were set
    • Feel free to stylize and visualize the output system in the workspacethe 3D display area in the center of the main window, where molecular structures are displayed

Figure 3-8. Running the Disordered System Builder.

Repeat the steps in this section to build a disordered system with acetone packed onto the polypropylene slab. Ensure you make the following changes in your procedure:

  • Change the Number of molecules to 480
  • Set the Initial density to 0.8
  • Change the Job name to disordered_system_polypropylene_acetone
  • Adjust the job settings () as needed. This job requires a CPU host. The job can be completed in 10 minutes on a CPU host
  • If you would like to run the job yourself, click Run. Otherwise, go to File > Import Structures, navigate to the provided tutorial files and Open Section_03 disordered_system_polypropylene_acetone > disordered_system_polypropylene_acetone_system-out.cms

Figure 3-9. Viewing the output of the acetone polypropylene system. .

  1. When the job is finished or imported select(1) the atoms are chosen in the Workspace. These atoms are referred to as "the selection" or "the atom selection". Workspace operations are performed on the selected atoms. (2) The entry is chosen in the Entry List (and Project Table) and the row for the entry is highlighted. Project operations are performed on all selected entries and includethe entry is represented in the Workspace, the circle in the In column is blue the output disordered_system_polypropylene_acetone_all_components_amorphous in the entry list.
    • Feel free to stylize and visualize the output system in the workspacethe 3D display area in the center of the main window, where molecular structures are displayed

4. Applying an Impermeable Barrier Potential and Running MD

In this section, we will study if water and acetone ingress into the polypropylene slab at one of the interfaces using molecular dynamics. First, we will apply an impermeable barrier potential to the systems built in Section 3 using the Set Barrier Potential for MD panel. Then, we will run MD simulations on the structures with set barriers using the MD Multistage Workflow panel. If you are interested in learning more about the basics of running MD simulations, please visit the Disordered System Building and Molecular Dynamics Multistage Workflows tutorial. 

Figure 4-1. Opening the Set Barrier Potential for MD panel.

  1. Ensure that disordered_system_polypropylene_water_all_components_amorphous is selected(1) the atoms are chosen in the Workspace. These atoms are referred to as "the selection" or "the atom selection". Workspace operations are performed on the selected atoms. (2) The entry is chosen in the Entry List (and Project Table) and the row for the entry is highlighted. Project operations are performed on all selected entries and includedthe entry is represented in the Workspace, the circle in the In column is blue in the entry lista simplified view of the Project Table that allows you to perform basic operations such as selection and inclusion
  2. Go to Tasks > Materials > Classical Mechanics > MD Simulations > Setup Barrier Potential for MD

Figure 4-2. Viewing the plane.

  1. Click Add Barrier
    • An orange plane is shown where the barrier will be applied
  2. Set the Offset to 5.0
    • If you get an error message saying Atom xxx is too close to the barrier, then try decreasing the Offset to 4.0. This is the initial space between the barrier and the atoms or particles.

Let’s understand the settings and capabilities of the Set Barrier Potential for MD panel a bit more:

  • Barrier potentials are typically applied to periodic systems in preparation for subsequent MD simulations. The Set Barrier Potential for MD panel allows users to add one or more barrier potentials to a system.
  • Impermeable barriers allow a purely repulsive potential to be applied to all atoms in the system. None of the atoms will be able to pass through the barrier, rendering the system essentially non-periodic.
  • Semi-permeable barriers apply the same repulsive potential only to selected atoms. Only these selected atoms will be unable to pass through the barrier.
  • After choosing the barrier type, parameters can be set for the functional form of the applied barrier
  • The barrier(s) can be visualized using the Show/Hide plane check box.

 

Visit the help documentation for a complete summary of the parameters

Figure 4-3. Saving the new Desmond model.

  1. Click Apply
    • The Save Desmond Model to File dialogue opens
  2. For File name, enter polypropylene_water.cms
  3. Click Save
    • A file, polypropylene_water.cms, will be saved to the working directory, and an entry will be imported into the entry list

Figure 4-4. Viewing the output of the Set Barrier Potential for MD panel.

  1. Once the new Desmond model is saved and imported, select(1) the atoms are chosen in the Workspace. These atoms are referred to as "the selection" or "the atom selection". Workspace operations are performed on the selected atoms. (2) The entry is chosen in the Entry List (and Project Table) and the row for the entry is highlighted. Project operations are performed on all selected entries and includethe entry is represented in the Workspace, the circle in the In column is blue the new disordered_system_polypropylene_water_all_components_amorphous entry
    • The output looks exactly the same as the output of the disordered system build but now has the impermeable barrier potential set
    • Feel free to stylize and visualize the output system in the workspacethe 3D display area in the center of the main window, where molecular structures are displayed

Figure 4-5. Setting a barrier potential for the polypropylene + acetone system.

Repeat the above steps for disordered_system_polypropylene_acetone_all_components_amorphous and name the new Desmond model polypropylene_acetone.cms. Note that the Offset may need to be decreased to 4.0.

Figure 4-6. Opening the MD Multistage Workflow panel.

Now, let’s run MD simulations to study how water and acetone ingress into polypropylene. The impermeable barrier set atop the cell will restrict all molecules from passing through the ab-plane.

This approach will allow us to reduce simulation time needed to observe substantial ingression, as water and acetone will only be allowed to interact with the polypropylene slab on one side.

  1. Select(1) the atoms are chosen in the Workspace. These atoms are referred to as "the selection" or "the atom selection". Workspace operations are performed on the selected atoms. (2) The entry is chosen in the Entry List (and Project Table) and the row for the entry is highlighted. Project operations are performed on all selected entries the two newly generated Desmond models
  2. Go to Tasks > Materials > Classical Mechanics > MD Simulations > MD Multistage Workflow

Figure 4-7. Setting the parameters for Stage 1 and 2.

  1. Ensure Apply barrier potential is checked when the panel opens
    • The panel should recognize the selected structures as those with set barrier potentials and will apply them to all stages of the MD simulation
    • If the Apply barrier potential option is grayed out, please ensure you are selecting the Desmond models created with barrier information
  2. Maintain Stage 1 as is (Brownian Minimization)
  3. Click Append Stage
  4. Change the new stage (Stage 2) to Molecular Dynamics
  5. Set the Simulation time (ns) to 0.2
    • We will run a very short simulation to collapse the artificial vacuum layer between water/acetone and the polypropylene slab
  6. Set the Trajectory Recording interval (ps) to 10
    • This will generate 10 frames in the trajectory
  7. Change the Ensemble class to NVT
    • We will hold cell volume constant in this simulation
  8. Set the Temperature (K) to 10
  9. Set the Time step (fs) to 1
  10. Click Append Stage

Figure 4-8. Setting the parameters for Stage 3 and running the job.

  1. Change the new stage (Stage 3) to Molecular Dynamics
  2. Set the Simulation time (ns) to 10
  3. Set the Trajectory Recording interval (ps) to 100
    • This will generate 100 frames in the trajectory
  4. Change the Ensemble class to NPT
  5. Change the Job name to multistage_simulation_all
  6. Adjust the job settings () as needed
    • This job requires a GPU host. The job can be completed in about 2 hours on a GPU host
  7. If you would like to run the job yourself, click Run. Otherwise, import the pre-generated Section_04 > multistage_simulation_all > multistage_simulation_all_00n > multistage_simulation_all_00n-out.cms files from the provided tutorial files (where n=1, 2) via File > Import Structures
  8. Close the MD Multistage Workflow panel

Figure 4-10. Visualizing the output.

When the job finishes, or after importing, feel free to visualize the output structures. In the figure, the water molecules have been changed to CPK representation for ease of visualization.

Let’s take a closer look at the trajectories of both systems:

polypropylene + water

polypropylene + acetone

In the images above we can see that water does not significantly ingress into the polypropylene slab while acetone does. This is expected given the similar polarities of polypropylene and acetone compared to that of water.

The barrier potential restricts the ingression study to only one side of the polypropylene slab. If we were to run the simulation without the barrier in place, the simulation time would need to be longer to allow the solvent to interact with both sides of the slab. Use of a barrier potential is clearly beneficial here. It is similarly useful when investigating large systems where non-periodicity is desired, for example, electrolyte-electrode interfaces in batteries.

5. Applying a Semi-permeable Barrier Potential and Running MD

In this section, we will study how ethanol molecules interact with a POPC (1-palmitoyl-2-oleoyl-sn-glycero-3-phosphocholine) membrane using molecular dynamics simulations. First, we will apply a semi-permeable barrier potential to our system of interest using the Set Barrier Potential for MD panel. We will only restrict the ethanol atoms in this simulation and allow all others to move freely. Then, we will then run MD simulations on the structures with set barriers using the MD Multistage Workflow panel.

Figure 5-1. Viewing the imported system.

  1. Go to File > Import Structures
  2. Navigate to where you downloaded the tutorial files (presumably your working directory) and choose Section_05 > multistage_simulation_quick_0.2ns > multistage_simulation_quick_0.2ns-out.cms from the provided files
  3. Click Open

We will study how the ethanol molecules interact with one side of the POPC membrane by imposing a semi-impermeable barrier at the bottom of the periodic cell.

Figure 5-2. Opening the Set Barrier Potential for MD panel.

  1. Select(1) the atoms are chosen in the Workspace. These atoms are referred to as "the selection" or "the atom selection". Workspace operations are performed on the selected atoms. (2) The entry is chosen in the Entry List (and Project Table) and the row for the entry is highlighted. Project operations are performed on all selected entries and includethe entry is represented in the Workspace, the circle in the In column is blue the new disordered_system_step_3_all_components_amorphous entry
  2. Go to Tasks > Materials > Classical Mechanics > MD Simulations > Setup Barrier Potential for MD

Figure 5-3. Setting the parameters for the semi-permeable barrier.

  1. Click Add Barrier
  2. Select the radio-button for the Semi-permeable barrier
  3. To define the Non-permeable atoms ASL click the plus sign and click Select
    • The Atom Selection Dialogue opens

Figure 5-4. Selecting the ethanol atoms.

  1. Click Clear
    • We will remove all of the atoms currently selected
  2. Go to the Molecule tab
  3. Select M4
    • M4 corresponds to the 20 ethanol molecules in the system (we can use the Status Bar to confirm molecule types)
  4. Click Add
  5. Click OK
    • A repulsive potential will be applied exclusively to the 20 ethanol molecules, not allowing them to pass the barrier

Figure 5-5. Visualizing the plane.

  1. Change the Relative position of the barrier potential to Below

Figure 5-6. Saving the new Desmond model. 

  1. Click Apply
    • The Save Desmond Model to File dialogue opens
  2. For File name, enter POPC_ethanol_semi-permeable.cms
  3. Click Save

Figure 5-7. Viewing the output of the Set Barrier Potential for MD panel.

  1. Once the new Desmond model is saved and imported, select(1) the atoms are chosen in the Workspace. These atoms are referred to as "the selection" or "the atom selection". Workspace operations are performed on the selected atoms. (2) The entry is chosen in the Entry List (and Project Table) and the row for the entry is highlighted. Project operations are performed on all selected entries and includethe entry is represented in the Workspace, the circle in the In column is blue the new disordered_system_step_3_all_components_amorphous entry
    • The output looks exactly the same as the output of the disordered system build but has the semi-permeable barrier potential set
    • Feel free to stylize and visualize the output system in the workspacethe 3D display area in the center of the main window, where molecular structures are displayed

Figure 5-8. Opening the MD Multistage Workflow panel.

Now, let’s run an MD simulation to study if ethanol permeates into the POPC membrane:

  1. Select(1) the atoms are chosen in the Workspace. These atoms are referred to as "the selection" or "the atom selection". Workspace operations are performed on the selected atoms. (2) The entry is chosen in the Entry List (and Project Table) and the row for the entry is highlighted. Project operations are performed on all selected entries the newly generated Desmond models
  2. Go to Tasks > Materials > Classical Mechanics > MD Simulations > MD Multistage Workflow

Figure 5-9. Setting the MD Multistage parameters.

  1. Ensure Apply barrier potential is checked when the panel opens
    • The panel should recognize the selected structure as one with set barrier potentials
    • If the Apply barrier potential option is grayed out, please ensure you are selecting the Desmond models created with barrier information
  2. Check Remove center of mass motion
    • This option removes the center of mass velocity for the system for all stages of the calculation
  3. Change the existing stage (Stage 1) to Molecular Dynamics
  4. Set the Simulation time (ns) to 10
  5. Set the Trajectory Recording interval (ps) to 10
    • This will generate 1000 frames in the trajectory
  6. Change the Ensemble class to NPT

Figure 5-10. Running the MD simulation.

  1. Change the Job name to multistage_simulation_POPC_ethanol_wall
  2. Adjust the job settings () as needed
    • This job requires a GPU host. The job can be completed in about 1 hour on a GPU host
  3. If you would like to run the job yourself, click Run. Otherwise, import the pre-generated Section_05 > multistage_simulation_POPC_ethanol_wall > multistage_simulation_POPC_ethanol_wall-out.cms files from the provided tutorial files via File > Import Structures
  4. Close the MD Multistage Workflow panel

Figure 5-11. Visualizing the output.

When the job finishes, or after importing, feel free to visualize the output structure. In the figure, the water molecules have been hidden and the ethanol molecules have been changed to CPK representation for ease of visualization.

In the visual above we can see that ethanol permeates into the POPC membrane on one side. The ethanol molecules cannot pass over the applied barrier and therefore can only interact with one side of the membrane bilayer. The water molecules (not shown) and ions in the system are able to freely pass through the applied barrier. The use of the barrier once again reduces simulation time and complexity.

6. Conclusion and References

In this tutorial, we learned how to apply impermeable and semi-permeable barrier potentials for MD simulations. 

For further learning:

For introductory content, focused on navigating the Schrödinger Materials Science interface, an Introduction to Materials Science Maestro tutorial is available. Please visit the materials science training website for access to 100+ tutorials. For scientific inquiries or technical troubleshooting, submit a ticket to our Technical Support Scientists at help@schrodinger.com.

For self-paced, asynchronous, online courses in Materials Science modeling, including access to Schrödinger software, please visit the Schrödinger Online Learning portal on our website.

For some related practice, proceed to explore other relevant tutorials:

For further reading:

7. Glossary of Terms

Entry List - a simplified view of the Project Table that allows you to perform basic operations such as selection and inclusion

Included - the entry is represented in the Workspace, the circle in the In column is blue

Project Table - displays the contents of a project and is also an interface for performing operations on selected entries, viewing properties, and organizing structures and data

Recent actions - This is a list of your recent actions, which you can use to reopen a panel, displayed below the Browse row. (Right-click to delete.)

Scratch Project - a temporary project in which work is not saved, closing a scratch project removes all current work and begins a new scratch project

Selected - (1) the atoms are chosen in the Workspace. These atoms are referred to as "the selection" or "the atom selection". Workspace operations are performed on the selected atoms. (2) The entry is chosen in the Entry List (and Project Table) and the row for the entry is highlighted. Project operations are performed on all selected entries

Working Directory - the location where files are saved

Workspace - the 3D display area in the center of the main window, where molecular structures are displayed