Automated Martini Fitting for Coarse-Grained Simulations

Tutorial Created with Software Release: 2026-1
Topics: Consumer Packaged Goods, Pharmaceutical Formulations
Methodology: Coarse-Grained Modeling
Products Used: MS Maestro

Tutorial files

0.5GB

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 use the Coarse-Grained Force Field Builder to automatically fit parameters for the Martini coarse-grained force field, utilizing all-atom systems as the reference for various systems.

 

Tutorial Content
  1. Introduction 

  1. Creating Projects and Importing Structures

  1. Partition of Butanol in Hexadacane/Water Mixture

  1. Analysis of the Automated Martini CG Results

  1. Formation of C12E6 Micelle in Water

  1. Automated Fitting of Polypropylene

  1. Conclusion and References

  1. Glossary of Terms

1. Introduction

The Martini force field is a widely used coarse-grained (CG) molecular dynamics (MD) model used in simulations of complex biological and chemical systems. By representing groups of atoms as single particles, CG models such as Martini reduce the computational cost while maintaining a balance between accuracy and efficiency. Originally developed to study lipid membranes, the force field has since been extended to a wide range of biomolecular systems, including proteins, nucleic acids, and carbohydrates, as well as non-biological materials like polymers and small molecules (see References).

CG force field parameters are derived by simplifying molecular models and parameterizing interactions to reproduce key properties of the system. This can involve mapping detailed atomistic models to simplified representations while preserving essential physics. Atoms are grouped into CG particles, with each particle representing a functional group, molecule, or other structural unit (e.g., a CH3 group, a water molecule, or an aromatic ring). The degree of coarse-graining—how many atoms are grouped per particle—depends on the system's complexity and the scale of interest. In Martini, the standard mapping scheme is 4 heavy atoms per particle. However, depending on the molecule's topology, some particles may be mapped to 2 or 3 heavy atoms instead. Martini’s parametrization is based on experimental data and atomistic simulations, making it a versatile tool for exploring large-scale molecular interactions and processes over extended timescales (see References).

In general, CG force field parameters are derived using either top-down fitting, which targets bulk properties, or bottom-up fitting, which focuses on average structural properties. Schrödinger's automated CG fitting technology employs a bottom-up fitting approach. In the automated CG fitting, an atomistic simulation is used as reference providing bonds, angles, and dihedrals distributions, as well as radial distribution functions used respectively for fitting CG bonded and non-bonded parameters. This approach ensures that the CG model captures the relevant structural properties of the system.

The automated CG mapping utility in the Coarse-Grained Force Field Builder lets us build a CG model from an all-atom system with a Martini 2 force field for specialty chemicals and polymers. The atoms from the all-atom representation are automatically mapped to a CG representation using a SMARTS pattern. This tool allows us to parametrize the CG force-field with system specific details following an iterative procedure to optimize bonded and non bonded interactions. The general workflow of the fitting procedure is as shown below:

In this tutorial, we will look at a few examples of using this tool for common applications. For proteins, please see the Creating a Coarse-Grained Model for Protein Formulations tutorial. In addition to the panel help documentation, please visit the Coarse-Grained Modeling in the Materials Science Suite page for an overview. For this tutorial, it is recommended to read Potentials and Simulation Types for Coarse-Grained Modeling, Coarse-Grained Modeling with the Martini Force Field, Selecting Martini Parameters and Site Types for Martini.

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/automartini.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 auto_martini_tutorial, click Save
    • The project is now named auto_martini_tutorial.prj

Figure 2-3. Importing the input structures

  1. Go to File > Import Structures
  2. Navigate to where you downloaded the provided tutorial files (presumably in your working directory), choose input_structures.maegz
  3. Click Open
    • A new entry group is added to the entry lista simplified view of the Project Table that allows you to perform basic operations such as selection and inclusion containing 5 entries

3. Partition of Butanol in Hexadacane/Water Mixture

In this section, we will use the Coarse-Grained Force Field Builder to generate Martini CG parameters for a system of butanol in hexadecane/water mixture.

Figure 3-1. Opening the Coarse-Grained Force Field Builder panel.

  1. In the entry lista simplified view of the Project Table that allows you to perform basic operations such as selection and inclusion, 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 water, hexadecane and butanol entries.
  2. Go to Tasks > Materials > Classical Mechanics> Coarse Grain Models > Coarse-Grained Force Field Builder

Before moving forward, let's understand the Coarse-Grained Force Field Builder panel in more detail. This panel lets us automate the process of building a CG force field model from an all-atom system, by fitting parameters for CG simulations to reproduce all-atom simulations. It supports generating force fields for Dissipative Particle Dynamics (DPD) and Martini CG modeling. The input to the panel is the all atom structures for each molecule present in the system with the desired composition. This is then used to build a disordered system which will be further equilibrated. The equilibrated MD trajectory is the reference structure based on which the CG parameters are optimized iteratively. Alternatively, a pre-built disordered system or an equilibrated structure can also be used as a starting point. As stated above, pairwise radial distribution functions, their integrals as well as bond length and bond angle distributions issuing from the atomistic trajectory are used as reference. The force field parameters for the valence and non-bonded interactions of the CG system are adjusted iteratively until the convergence criteria are attained. For more information, refer to the help documentation.

Figure 3-2. Setting up the all-atom reference system.

  1. Click Load Selected Entries
  2. Choose Martini as the Coarse-graining type
  3. Choose Create atomistic system
    • This option is to create an all-atom system with desired composition. This will act as the reference system for the CG mapping procedure.
  4. Change the Number of molecules to 2000
  5. For Molecules for each Component, input the following (as shown in the Figure)
    • water = 1765
    • hexadecane = 140
    • butanol = 95

The system is constructed as a disordered system (see the Disordered System Builder Panel for more information)

Figure 3-3. Automatic mapping of CG particles

  1. Go to the Map Atoms tab
  2. Check Use automated CG mapping
  3. Click Initial Auto Map
    • The panel is filled with details of the auto-mapped particle details with corresponding SMARTS pattern.
  4. Check Add antifreeze water molecules
    • This will replace 10% of the total CG water particles with antifreeze particles (see References).

 

Figure 3-4. Setting up to show the mapped molecules

  1. Click Show Mapped Molecules
  2. Choose Mapping on all-atom system

 

Figure 3-5. Viewing the CG mapping scheme in the workspace.

A new entry appears in the workspacethe 3D display area in the center of the main window, where molecular structures are displayed with the CG mapping along with the all-atom representation of the molecules. You can visually verify if the mapping is satisfactory.

  1. Close the window and the structure will disappear from the workspacethe 3D display area in the center of the main window, where molecular structures are displayed  

Figure 3-6. Populating the CG particle types.

  1. Go to the FF Parameters tab
  2. Click Populate using structures
    • The Particle subtab contains the list of CG bead names and the Martini bead type

Figure 3-7. Bond subtab.

  1. Go to the Bond subtab

 

Figure 3-8. Setting up the Nonbonded subtab.

  1. Go to the Nonbonded subtab
    • The non-bonded interaction pairs are listed in the table
    • The interaction strength (ε) is a fitting parameter while the particle size will be kept constant by default.
  2. Change the W,W interaction to Fixed from the dropdown option
    • We will use the standard ε = 1.195 Kcal/mol for water-water interaction as described in the Martini force field (Marrink et al.). We will fit other interactions.

Figure 3-9. Setting up the CG simulation parameters.

  1. Go to the CG Simulation tab
    • For each iteration a 20 ns MD simulation will be performed for the fitting procedure. We will keep the default settings.

Figure 3-10. Setting and running the job.

  1. Go to the Fitting tab
    • For each iteration the last 20% of the trajectory will be used for the fitting procedure. By default the optimization will be performed over 40 iterations. We will use the default settings.
  2. Change the Job name to cgff_builder_water_hexadecane_butanol
  3. Adjust the job settings as needed. This job requires a GPU host. The job can be completed in about 6 hours.
  4. If you would like to run the job yourself, click Run. Otherwise, go to File > Import Structures, navigate to the provided tutorial files and OpenSection_03 > cgff_builder_water_hexadecane_butanol > cgff_builder_water_hexadecane_butanol-out.cms
  5. Close the Coarse-Grained Force Field Builder panel

Figure 3-11. Output structure.

Once the job is completed or after importing, 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 from the previous step cgff_builder_water_hexadecane_butanol-out

 

Note: Recall that the simulation employs periodic boundary conditions (PBCs). In this case, at a first glance, the interface may look separate, but actually the components form a well defined interface.

4. Analysis of the Automated Martini CG Results

In this section, we will analyse the output and the fitting quality of the results of the automated fitting procedure from the previous step.

Figure 4-1. Using the WAM button to open the results 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 cgff_builder_water_hexadecane_butanol-out entry in the entry lista simplified view of the Project Table that allows you to perform basic operations such as selection and inclusion
  2. Use the Workflow Action Menu (WAM) button () to open the Coarse-Grained Force Field Results panel

 

Figure 4-2. Summary of the particle types.

In the Builder Data tab is a summary of input parameters set in the parameters from the simulation. Specifically, the Particle name, SMARTS string for each bead type, Charge and Mass of the CG particles. Note that the WF type particle appears as one of the CG particle types in the system.

  1. Go to the Convergence tab

Figure 4-3. Convergence of Nonbonded forcefield parameters.

This plot shows the force field parameters fitted using the Coarse-Grained Force Field Builder Panel, plotted against the number of fitting iterations to illustrate how they evolve during the fitting process. By default, the non-bonded interactions are displayed. It is clear that these interactions are adjusted up to approximately 25 iterations, after which they stabilize at a constant value.


Since the particle size was not used as a fitting parameter, all values remain constant at 4.7Å, which corresponds to the initial input value.

 

 

Figure 4-4. Convergence of the bond parameters.

  1. Change the Forcefield type to Bonds
    • You can change the bond type selected to view each individual bond.

Figure 4-5. Convergence of bond angle parameters.

  1. Change the Forcefield type to Angles
    • The angle parameters between the beads stabilize at a constant value.
  2. Go to the Fit Quality tab

Figure 4-6. Fitting score for the automated CG mapping.

The R-squared value for the fitting parameters are displayed compared to the all-atom reference at specific fitting iterations. You can explore the fitting score for other interaction types from the dropdown options.

  1. Go to the Plot subtab

 

Note: R-squared parameters serve as a guide for users to determine whether further inspection of the plots is warranted. While high R-squared values generally indicate good fits, low R-squared values can also represent acceptable fits in some cases. Additionally, small molecules grouped together to form a particle are often difficult to fit accurately, making it preferable to use a fixed standard value in such instances.

Figure 4-7. Comparing the integral of g(r) with the reference system.

This tab visualizes how the fitting parameters in the CG model compare against the all-atom reference. By default, the integral of the radial distribution function g(r) is shown as compared to the all-atom reference simulations at specific iterations. In this case the integral of the g(r) for ALK2{3}_ALK3,ALK2{4} bead interactions are shown. Other interaction pairs can be viewed from the dropdown options.

Figure 4-8. Comparing the g(r) with the reference system.

  1. Choose g(r) for the plot option
    • The radial distribution function is plotted for the reference and the CG simulations. We can see that there is a good agreement between the reference and the CG structure. Similarly, other interaction pairs can be viewed from the dropdown options.

Figure 4-9. Comparing the bond length distribution with the reference system.

  1. Change the Forcefield type to Bonds
    • The distribution of the bond length for the reference and the CG simulations are plotted. The bond length distribution of the CG simulations closely match the reference simulation.
  2. Select ALK2{4},ALK2{4} as the Type

 

 

Figure 4-10. Comparing the bond angle distribution with the reference system.

  1. Change the Forcefield type to Angles
    • The distribution of the bond angles for the reference and the CG simulations are plotted.

 

Feel free to explore other options in the panel for further analysis. You can save the CG forcefield data to the Schrodinger directory. This can then be used to run further simulations with different compositions and system sizes of the same components.

Figure 4-11. Viewing the Martini particle types in the output files.

Further, the type of Martini particle can be accessed from the .json file in the output files. For example, open the cgff_builder_water_hexadecane_butanol-out_cgff.json file to get the forcefield parameters as well as the Martini particle types.

5. Formation of C12E6 Micelle in Water

In this section we will observe the formation of a C12E6 nonionic surfactant in water using the Coarse-Grained Force Field Builder.

Figure 5-1. Opening the Coarse Grained Force Field Builder 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 the C12E6 and water entries 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> Coarse Grain Models > Coarse-Grained Force Field Builder

Figure 5-2. Setting up the reference system.

 

  1. Click Load Selected Entries
  2. Choose Martini as the Coarse-graining type
  3. Choose Create atomistic system
  4. Change the Number of molecules to 5000
  5. For Molecules for each Component, input the following (as shown in the Figure)
    • water = 4950
    • C12E6 = 50
    • This corresponds to 20 weight% of C12E6 in the solution.

Figure 5-3. Automatic mapping of CG particles.

  1. Go to the Map Atoms tab
  2. Check Use automated CG mapping
  3. Click Initial Auto Map
    • The panel is filled with details of the auto-mapped particle details with corresponding SMARTS pattern.
  4. Check Add antifreeze water molecules

Feel free to visualize the CG mapping in the workspace as shown in Section 3

Figure 5-4. Populating the CG particle types.

  1. Go to the FF Parameters tab
  2. Click Populate using structures
    • The table is populated with information about the initial mapping scheme.

Figure 5-5. Setting up the Nonbonded subtab.

  1. Go to the Nonbonded subtab
  2. Change the W,W interaction to Fixed from the dropdown options

Figure 5-6. Setting and running the job.

  1. Change the Job name to cgff_builder_water_C12E6
  2. Adjust the job settings as needed. This job requires a GPU host. The job can be completed in about 9 hours.
  3. If you would like to run the job yourself, click Run. Otherwise, go to File > Import Structures, navigate to the provided tutorial files and OpenSection_05 > cgff_builder_water_C12E6 > cgff_builder_water_C12E6-out.cms
  4. Close the Coarse-Grained Force Field Builder panel

Figure 5-7. Output structure.

Once the job is completed or after importing, 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 from the previous step cgff_builder_water_C12E6-out

 

We can observe that a micelle of C12E6 surfactant is formed in the simulation box. Because of the PBC, the micelle may appear broken, but that can be improved by manipulating the visualization.

Figure 5-8. Viewing the results.

  1. Repeat steps 3-10 from Section 4 to analyse the results of the automated fitting procedure.

6. Automated Fitting of Polypropylene

In this section we will use the Coarse Grained Force Field Builder to get the CG Martini parameters for polypropylene polymer.

Figure 6-1. Opening the Coarse Grained Force Field Builder 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 poly(propylene) entry 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> Coarse Grain Models > Coarse-Grained Force Field Builder

Figure 6-2. Setting up the reference system.

  1. Click Load Selected Entries
  2. Choose Martini as the Coarse-graining type
  3. Choose Create atomistic system
  4. Change the Number of molecules to 30
    • The polymer is made up of 20 monomers. We will build a disordered system of 30 polymers to be used as the reference all-atom system.

 

For more information on building polymers, see the Building, Equilibrating and Analyzing Amorphous Polymers tutorial.

Figure 6-3. Setting and running the job.

  1. Repeat steps 8-13 from Section 5
  2. Change the Job name to cgff_builder_polypropylene
  3. Adjust the job settings as needed. This job requires a GPU host. The job can be completed in about 7 hours.
  4. If you would like to run the job yourself, click Run. Otherwise, go to File > Import Structures, navigate to the provided tutorial files and OpenSection_06 > cgff_builder_polypropylene > cgff_builder_polypropylene-out.cms
  5. Close the Coarse-Grained Force Field Builder panel

Figure 6-4. Output structure.

Once the job is completed or after importing, 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 from the previous step cgff_builder_polypropylene-out

 

Proceed to analyse the results of the fitting procedure as explained in Section 4.

7. Conclusion and References

We explored using the Coarse-Grained Force Field Builder panel to automate force field fitting for Martini CG parameters, demonstrated through three examples: butanol partitioning at a water-hexadecane interface, the formation of a worm-like micelle with C12E6 surfactant in water, and an amorphous polypropylene system.

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 70+ 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:

8. 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