GROMACS Wizard

Facebooktwittergoogle_plusredditpinterestlinkedinmailFacebooktwittergoogle_plusredditpinterestlinkedinmail

In this tutorial I will present you GROMACS Wizard, the all new SAMSON element for system preparation and simulation using the well-known GROMACS package. With this element the main GROMACS features are now integrated in SAMSON. For example, it will help you to easily run GROMACS simulations and get results as plots and simulation trajectories.

Moreover, you will not have to compile/install the GROMACS package itself as this module comes with the latest version (5.1) of this package already installed. In addition, this module along with its pre-installed GROMACS package is available on Windows, Linux and Mac.

Installing GROMACS Wizard

First, make sure you have the GROMACS Wizard that you can find on SAMSON Connect.

If you need help with installing new SAMSON Elements to your SAMSON installation, please visit this page. If you need help with installing SAMSON itself, please visit this page.

Note: you can check whether you have this SAMSON Element in at least three different ways:

  1. In the Apps menu of SAMSON
  2. In the Edit / Preferences / Installation / Updates list in SAMSON
  3. Under My SAMSON / My Elements when you are signed in at SAMSON Connect

Let’s start the presentation of the many functionalities that this SAMSON element will offer you. For information, the PDB code of the structure used during this tutorial is 1AKI.

Content

Prepare

In order to launch GROMACS simulations, you need first to prepare your system, i.e. create a GROMACS model and define a simulation box. Then, you have the possibility to add explicit water molecules and neutralize the system charge by adding positive or negative ions. This is optional since you can build a system which contains implicit water molecules. Also, it is possible to include several structures in your GROMACS system. To do so, these structures need to be imported in your SAMSON document. Then, you can either select the ones you want to include in your system or leave the selection empty. If the selection is left empty while several structures are present in the document, SAMSON will ask you to choose if you want or not to include all the structures in your GROMACS system.  

Generate model

This is the first step in the preparation of your GROMACS system. In the Model group box, you can select your force field from a list of available force fields. Each force field proposes water models which can be used to describe water molecules if you want to simulate your structure in explicit water. Also, each force field has positive and negative ions for the neutralization of your system. Concerning hydrogen atoms, we recommend you to ignore the ones already present in your structure, GROMACS will then add them using the selected force field naming convention (because not all the present force fields have the same H atoms naming convention).

The latest and most popular force fields (amber, charmm, gromos and oplsaa) can be found in this standard GROMACS version. You can also add custom GROMACS force fields by pressing on the add button . A browse window will be opened and you will have to navigate inside the force field folder then press the “choose” button to add it to the force fields list. To remove this added force field from the list you can press on the remove button .

Define box

GROMACS automatically centers your structure inside the box and computes the box dimensions based on structure-box edge minimum distance. This distance represents the distance between the “outer” atom of the structure in each axis and the box edge. In SAMSON, you have the possibility to refine the box dimensions of your system before launching the preparation based on the distance between the structure and the box. The length of the box can then be modified to increase or decrease the box size. To help you define the box dimensions, the structure (the largest distance between atoms) is displayed. You can also prepare your system without modifying your box size before hand. In this case, the box dimensions will be set automatically based on the distance between the structure and the box.

Note that, when using periodic boundary conditions, a box edge distance of 1.0 nm minimum is recommended to avoid the structure to see its periodic image during simulation. Specifying a solute-box distance of 1.0 nm will mean that there are at least 2.0 nm between any two periodic images of a protein. This distance will be sufficient for just about any cutoff scheme commonly used in simulations. For now, only cubic boxes can be defined in SAMSON but other GROMACS box shapes (like the rhombic dodecahedron) will be added in the future version of the element.

Add solvent and ions

In the Prepare tab, you have the possibility to add solvent to your system by checking the Add solvent checkbox to enable adding water molecules. Note that the model of water molecules that will be used (e.g. tip3p) is specified in the Model group box. If you choose “none” in the water model list, adding solvent and ions functionalities will be disabled.

We now need to make sure the system is neutral, by adding positive or negative ions. To run the neutralization step, you need to tick the Neutralize system group box and choose the positive and negative ions which will be used by GROMACS to reach a neutral total charge of your system. Each force field has a set of ions which can be used for the neutralization. Note that only one type of ions (positive or negative) or none of them will be added by GROMACS based on the total charge of your system which can be positive, negative or neutral. If you want to know the total charge of your system before running the preparation, you can compute it by pressing the update button . For example, if your system’s total charge is 8, GROMACS will add 8 negative ions to neutralize the system.

You can also ask GROMACS to increase the ions concentration in your system by adding more ions. If you check the Add additional ions group box you can specify the number of additional positive/negative ions to add. For example, if your system’s total charge is 8, you can ask GROMACS to add 12 additional positive ions thus bearing the total charge of the system to 20. Since GROMACS needs to neutralize the system it will add 20 negative ions during preparation. Therefore, the ions which would be added in your system to neutralize its total charge goes from 8 negative ions to 20 negative ions and 12 positive ions. Finally, note that all these ions will be added to your system as a replacement of water molecules.

Preparation result

After setting your model, box, solvent and ions preferences you can run the preparation by pressing on the Prepare button. A few seconds later a new structural model presenting the prepared GROMACS system will be created and imported in the SAMSON viewport. Note that you can choose to remove the initial structure by checking the Remove initial structure checkbox before pressing on the Prepare button. In this example, you can see that GROMACS added 20 negative ions and 12 positive ions to neutralize the system as we asked. In case you didn’t define your simulation box before pressing on Prepare, like in this example, GROMACS set the box dimensions using the provided distance to box edge.

Run simulations

This SAMSON Element also allows you to easily launch GROMACS simulations without having to learn the GROMACS syntax and procedures. In this section, I will show you how to perform simulations such as minimization, equilibration and unrestrained dynamics known as molecular dynamics (MD). When launching minimization, equilibration or simulation of your system, the model and box generations are performed again before starting these simulations. This workflow allows you to always start from the structure which is displayed in the SAMSON viewport. This way, you can freely modify your system in SAMSON between two steps (e.g. after preparation and before energy minimization). 

Minimize

Once you have prepared your system, energy minimization can be performed in one click to remove steric clashes or incorrect geometries from your system. Most of the GROMACS molecular dynamics parameters are presented in Parameters section of the Minimize, Equilibrate and Simulate tabs. By default, these parameters are populated with standard values that are suitable for many energy minimizations. Obviously, you can modify these parameters as you wish. In the Parameters group box, you will find the parameters that are likely to be changed often, like the energy minimization tolerance. The other GROMACS molecular dynamics parameters can be accessed by clicking on the button All… To know more about these parameters, please check the “apply custom parameters section of this tutorial.

Thanks to SAMSON, you can import the GROMACS simulation trajectories like the minimization. For that you need to choose Trajectory in the Import result as section. To learn more about the simulation trajectories of GROMACS and the post-treatment which can be applied to them, please check the “trajectory” section of this tutorial. If you do not want to import the energy minimization trajectory of your system, choose the Last frame option. In that case, the final step of your minimization will be imported instead of the whole trajectory. In the animation below, the energy minimization computation time (less than 3 min for 33 828 atoms) was skipped. Please note that during this calculation you can still use SAMSON thanks to the job manager of the GROMACS Wizard element. To know more about this job manager, please go the “Manage jobs” section of this tutorial.

Also, once energy minimization has converged, a plot describing the evolution of the system’s potential energy at each minimization step is imported and displayed in the Plots section. In this example, this plot demonstrates the nice, steady convergence of the potential energy. To know all the plotting functionalities of this SAMSON Element please refer to the “plots” section of this tutorial. 

Equilibrate

After energy minimization you will probably obtain a system without steric clashes or incorrect geometries. But to start a molecular dynamics simulation, you will have to equilibrate your system by bringing and stabilizing the temperature to the value we will set in the equilibration parameters.

In many cases, equilibration is performed in two phases. The first one consists in stabilizing the system’s temperature by performing a simulation in the NVT ensemble (constant Number of particles, Volume, and Temperature) also referred as “isothermal-isochoric” or “canonical” ensemble. The timeframe needed to reach the desired temperature will depend on the size of your system. In case your system’s temperature did not stabilize, you may run another NVT equilibration. Usually, 50-100 ps should be enough, and here the NVT equilibration parameters were set to conduct a 100 ps equilibration. Depending on your machine and on the number of atoms in your system, this may take a while (about an hour for a system containing around 34 000 atoms and run on a machine having 8 cores).

Once the system’s temperature has been stabilized at the desired value, you will need to apply pressure to the system until it reaches the correct density. This second equilibration phase aims at stabilizing the system’s pressure and density. It is conducted under the NPT ensemble also known as “isothermal-isobaric” ensemble because the number of particles, the pressure, and the temperature are kept constant. NPT equilibration will take approximately the same time as NVT equilibration depending on your machine and on your system’s size.

In SAMSON, running NVT or NPT equilibration is possible in one click. First, select the starting state for your system. For example, if you imported the energy minimization trajectory of your system, make sure to display the last frame of this trajectory using the inspector before running your equilibration (select the Path node in the document view, then change the frame number to reach the end of the path). If your SAMSON document contains several structures, make sure to select the one you want to use as a starting structure in your equilibration step.

Then, you will have to choose in which ensemble to run your equilibration, the canonical (NVT) or the isothermal-isobaric (NPT) ensemble by selecting the corresponding radio button. Note that the two ensembles have their own simulation parameters and plots list. As for energy minimization, you can see that the most common parameters have been already populated with default values, which allows you to directly launch an NVT equilibration. Nevertheless, you can modify these parameters as you which by clicking on parameters then on All… if you want to display all the available equilibration parameters. Then, you can choose between importing the equilibration trajectory or the last frame and the way you treat their periodic boundary conditions.

When NVT or NPT equilibration is finished, a plot describing the evolution of the system’s temperature will be displayed in the Plots section when the canonical ensemble (NVT) is selected in the Equilibrate tab. While system’s pressure and density evolution during time are displayed in the Plots when the Isothermal-isobaric ensemble (NPT) is selected.

You can learn more about GROMACS plots in the plots” section of this tutorial.

Simulate

Once the two equilibration phases have been finished, your system should have the temperature, pressure and density stabilized at the desired values, you can start the simulation of your system. In the Simulate tab of the GROMACS element, the simulation parameters are populated with standard values usually used in explicit water simulations. As for energy minimization and equilibrations, you can modify all the production simulation parameters by clicking on the button All… in the Parameters section.

Once your molecular dynamics has finished, two plots will be imported to help you analyse your production simulation. The first one is the RMSD of your structure backbone relative to the structure backbone present in the minimized, equilibrated system. Also the simulation trajectory is imported, if you choose to import it, or the final step if not.

Manage simulation results

Plots

All the GROMACS simulations generate plots that helps you analyse these simulations. To be able to read and modify these plots you need to have Gnuplot installed on your system. Gnuplot is completely free and available on the three platforms: Windows, Linux and Mac. You can check the “Manage settings and output” section of this tutorial to learn how to set the Gnuplot version that will be used by this SAMSON element. 

When your GROMACS simulation in SAMSON is finished the corresponding plot is automatically added in a plots list that you can find in the Plots section of the minimization, equilibration and simulation tabs. For example, for energy minimization, the evolution of the potential energy of your system is plotted to help you decide if you need to minimize your system again or not. You can interact with these plots in two different ways. First, you can right click on the plot to display the possible actions that you can apply. You can open, save (in svg and in png formats), open the plot settings or remove this plot from the plots list. Second, you can double click on the plot (or right click and choose Open) to open a window containing a large format of the targeted plot as well as the actions found in the right click context menu and buttons to navigate through the plots present in the plot list.

If you open the plot setting you can change several aspect of the plot like the plot type or the plot color.

Trajectories

If you enabled periodic boundary conditions (PBC) during your simulation, the resulted trajectory might show non-realistic residue bonds for residues located near the box edges which can therefor move to the other side of the box. Below if the example presenting an energy minimization trajectory imported with no post-treatment (none). If you chose to import the last frame with also no pbc treatment, it will also display non-realistic residue bonds due to the pbc conditions.

Using GROMACS it is possible to treat these trajectories with one of the post-treatments listed in the PBC post-treatment dropdown list. This post-treatment allows you to generate more realistic trajectories.

Advanced features

Apply custom parameters

The most used GROMACS simulation parameters have been directly populated in the Parameters section of the minimize, equilibrate and simulate tabulations. However, you can access and modify all the GROMACS simulation parameters by clicking on the button (All.. button) present in each tabulation.

A new window will be opened with a list of parameters groups, you can click on each group to display the parameters which they contain. Special care has been made to describe all the parameters in the most understandable way possible. In these advanced parameters you can set all the parameters from a GROMACS molecular dynamics parameter file (with the .mdp extension). Even if almost all the parameters are present in the advanced parameters window, your .mdp file might contain some parameters which are not presented here. In this case, they will be automatically added in the Additional parameters section such you can modify them, if you want. You can also copy paste all the parameters present in your .mdp file in the Additional parameters section, they will overwrite those presented in the advanced parameters window groups. To apply your modifications of the parameters you have to click on the button Ok while the Cancel button discards all the modifications that you have done in the advanced parameters window except the resetting to the default parameters. Finally, you can reset the parameters to default values at any time by clicking on the Reset button.

In addition to the comments provided, more explanations of the parameters used can be found in the GROMACS simulation parameters documentation.

Manage jobs

This element allows you to, for example, run several simulations types (e.g. in explicit or implicit water) one after the other thanks to its queuing system. All you need is to launch your simulations normally and they will added to the queue list. To manage the elements of the queue list, open the Job manager by pressing on the button . Submitted simulations (called here jobs) are listed in the GROMACS jobs manager window list. Jobs display some information like the name, status (running, queued, finished, canceled or stopped), the order number (will be used to define the launching order) and other useful information.

Many actions can be applied to these jobs. You can rename the job by double clicking on the job’s name cell. You can simply stop it (or totally remove it from the list) by right-clicking on the job and pressing on Stop (or Remove if you want to remove it). Note that in these two cases, the following job in the queue list will be automatically launched.

Other actions can be applied to these jobs like changing the order of the launching by moving jobs upper or lower in the list.

Also, before the job finishes, you can change its trajectory or last frame post-treatment option. Finally, you can stop all the jobs using the Stop all button or you can stop and clear using the Clear button.

Manage settings and output

You can display the settings of this element by pressing on the button . There you can see that the shipped GROMACS package is a version 5.1. If you have another version of GROMACS installed, you can select it by checking the Use a different GROMACS version checkbox. You will have to provide path to the executable gmx.exe (or gmx for Linux and Mac) by clicking on the button . Note that the version of the added GROMACS package will also be displayed (if the executable was not recognized “invalid” will be displayed instead). Also, you will have to provide the path to the force fields folder where all the forcefield.ff folders are present (e.g. /share/top/).

In the same window and in the same manner you can provide the path to the Gnuplot program if you want to display and manage GROMACS plots.

During preparation or simulation of your GROMACS systems, the GROMACS package output some useful informations. You can find this output in the GROMACS output window by pressing on the button . There you will be able to save the GROMACS output in a .txt file by pressing on the Save button or to clear it by pressing on the Clear button.

You may get this new SAMSON module here.

For remarks or suggestions, please let us know in the comments below or in the forum.

If you need help with installation, please visit: installing SAMSON, installing SAMSON Elements to your SAMSON installation.

Facebooktwittergoogle_plusredditpinterestlinkedinmailFacebooktwittergoogle_plusredditpinterestlinkedinmail

One Comment

  1. Pingback: GROMACS Wizard Light

Leave a Reply

Your email address will not be published. Required fields are marked *