In this tutorial I will present you GROMACS Wizard Element, a new SAMSON element for system preparation and simulation using the well-known GROMACS package. With GROMACS Wizard Element, the main GROMACS features are now integrated into 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 GROMACS version 5.1 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 in SAMSON Elements. Once you’re signed in, you should be able to add a SAMSON Element in one click (see User guide: installing SAMSON Elements if you need help with installing a new SAMSON Element). If you need help with installing SAMSON itself, please visit User guide: installing SAMSON.

Note: you can check whether you have this SAMSON Element in at least in 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 the GROMACS Wizard SAMSON element offers you.

For information, the PDB code of the structure used during this tutorial is 1AKI.



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

Defining a GROMACS box in SAMSON has been as simple as possible. Click on Compute fitted box to generate a cubic box that fits tightly to your system. All the atoms of your system will be included in the box because the box length is determined using the largest length of your system (in x, y, z). Once you have generated your box, you can easily increase/decrease its size using the Box length parameter. You can also show or hide the box in SAMSON. Note that your system will remain in the center of the box. Note that you have to compute a box before proceeding with preparation, minimization, equilibration or simulation.

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 the simulation. To do that you can increase the Box length by 2 nm (1 nm on each axis side). This distance will be sufficient for just about any cutoff scheme commonly used in simulations.

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


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.


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 the system’s pressure and density evolution over 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.


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 analyze 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


All the GROMACS simulations generate plots that help you analyze 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 aspects of the plot like the plot type or the plot color.


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

If you need help with installation of SAMSON, please visit: User guide: installing SAMSON.

You can get the GROMACS Wizard Element in SAMSON Elements, visit the User guide: installing SAMSON Elements if you need any help.

If you have any questions or feedback, please use the SAMSON forum.



  1. Pingback: GROMACS Wizard Light

  2. Can we perform GPU acceleration using the GROMACS Wizard

    • Hello Raman,

      Thank you for your interest in SAMSON and the GROMACS Wizard Element.
      In the settings of the GROMACS Wizard Element, you can choose to use a different and better optimized (with a GPU acceleration) version of GROMACS instead of the one that is shipped with the Element.

      I hope to have answered your question. Happy modeling with SAMSON.

      • Hi Yassine,
        Just saw your reply. Thanks very much. I am really interested in using this feature and will definitely use this. This wizard greatly reduces the learning curve and one can focus on doing and understanding the simulation. Couple of queries
        1) Do you have benchmark and reference for this GPU acceleration code?
        2) Does the code run on single precision or double precision mode?
        3) Compatibility of graphics card?

        Hoping to heear from you.


        • Hi Raman,

          Thank you for your reply. You just pointed out to one of the main advantages of having tools (like GROMACS) integrated in SAMSON: the easy of use. As you said, it allows you to focus on your expertises, which are here launching realistic simulations and interpreting them.

          About your questions, sorry I wasn’t clear enough in my previous answer. In the settings of the GROMACS Wizard Element you can specify your own and local version of the GROMACS program. The GROMACS Wizard Element will then call the GROMACS program you specified to perform all the tasks (preparation, minimization, equilibration and production MD). Therefore, the performances of your locally compiled version of GROMACS will depend on the characteristics of your machine (GPUs, precision…etc.). For the benchmarks of GROMACS GPU acceleration you can check this link:

          Hoping to have answered your questions.

  3. Youssef EL RHAYAM

    Comment télécharger le logiciel GROMACS, sachant que le logiciel SAMSON est déjà télécharger mais j’ai trouvé une difficulté pour installer donne un message cette version n’est pas compatible à votre ordinateur ( windows 32 bit)

    • Dear Youssef EL RHAYAM,

      Sorry for the long reply. SAMSON does not support Windows 32 bit systems. If you want to use SAMSON you will need to install a 64 bit system.

Comments are closed