MeTrEx (Membrane Trajectory Explorer) is a Python program for visualising molecular simulation data from membranes interacting with small molecules (ligands).
Its main feature is to show an overview of the molecules' course throughout the simulation with an abstract visualisation of the membrane. This overview of the data is shown on the 'main view', shown as soon as the data is loaded. Different analyses can be mapped onto the main view. These analyses can also be shown in plots below the main view in 'BottomViews'. Additionally, you can load other data files in 'SubView', shown in 'sub plots'. Sliders and information panels give information about the currently shown frame. Exporting data is provided for image, CSV and XPDB files.
- You need Python version 3.8 or higher
- You need conda package manager installed on your system.
- Clone the GitHub repository:
git clone https://github.com/sa-ja/MeTrEx
- Build the environment:
cd MeTrEx && conda env create
(for MacOS and Windows)
or
cd MeTrEx && conda env create --file=metrex_linux.yml
(for Linux) - Activate the environment:
conda activate MeTrEx
- Start MeTrEx from the console:
python MeTrEx/main.py
The application window of MeTrEx is made up of three parts (see figure below)
- The MainView
- The information and interaction panel
- The BottomView(s)
First, you must load two files to visualise and analyse MD data with MeTrEx.
To do so, you can either navigate to File > Open in the menu bar or use the ctrl+O shortcut (See picture).
Then, you need to specify a topology file and a file containing simulation data (See picture).
Afterwards, another dialogue opens, allowing a data reduction by skipping every k-th frame or n frame at the beginning of the data (See picture).
k = Select every k-th frame to be shown
n = number of frames to skip at the beginning of the data
You also need to specify the type of molecules represented by its trajectory line in the line representation. The displayed names are the abbreviations for the molecule types used in the data file. Additionally, you can choose to manually select a proxy atom, which is used for the line representation. Otherwise, or in case of an error, C
or CA
are always used.
Once the molecules are chosen and, if applicable, the proxy atom is selected, the view is generated. This can take some time. A rough estimate will be displayed.
There are multiple ways one can interact with the main graph and navigate with it.
By clicking and holding the graph, you can rotate it freely.
On the top left of the MainView you can find the control panel with six button options. See picture.
- The house button 🏠 is used to reset the main graph to its initial view
- The two arrow buttons ⬅️ ➡️ can be used to go back or forward to a previous view setting
- Once clicked, the cross-arrow button changes the function of clicking and holding the graph from rotating it to moving and positioning it along the x-, y— and z-axis. This is again deactivated when the cross-arrow button is clicked again, or the magnification glass button is selected.
- The magnification glass button 🔎 allows you, once selected, to zoom into the graph.
- The save button 💾 creates a .png file of the current view
Below the MainView graph are two sliders, which can be linked by the checkbox link sliders. These sliders allow you to change the graph to a different frame of your simulation data.
The top slider changes the frame of the line representation molecules. The bottom slider changes the frame of the membrane representation.
Pressing the play button
The 'jump to frame number' selector can be used to switch to a chosen frame.
The interaction panel consists of 3 panels: General Information, Settings and the molecule representation panel (Disable/Enable Visibility). See picture.
Inside the General Information panel you find information for the position and exact simulation time of the current slider position/frame shown in the MainView. Additional information about the simulation and representation is also displayed here.
The Settings panel offers a variety of options:
Colormap
allows you to change the colourmap used for the representation of all line representation moleculesColor
lets you pick a specific colour for each line representation molecule individuallyMembrane original
lets you switch between a membrane abstraction and the original membrane representationPolynomial
andExpansion
let you choose the lipid surface regression values and recalculate the membrane abstraction. The polynomial can be modified in the range from 3 to 15, with membrane expansion from 5% to 30%. Once you set your values, pressApply
to recalculate. Depending on the data and values, this can take some time to compute.
The molecule representation panel (Disable/Enable Visibility) depicts the individual molecules which were chosen for representation in Load Data, See picture.
If one of the three mapping methods of Change View is chosen, the respective minimum and maximum are displayed next, together with the associated frame number.
By clicking the molecule name you can disable or enable individual molecule representations.
The buttons upper leaflet
and lower leaflet
disable or enable the corresponding membrane representation.
Multiple options are available to modify and further analyse the data, such as changing the view and providing further graphs. All these options are in the menu bar under View
.
The following methods provide an overview of different mapping functions inside the MainView.
To select a specific range of frames go to View > Select frames and select a range of frames you want the data to be reduced to. If you want to return to the original MainView with all frames use View > Reset.
If you want to see the chronological sequence of the trajectories indicated by a colour gradient, use View > Map Position. To reset the MainView to its original state, use View > Reset.
To visualise the changes in the intramolecular distance [Å] between exactly two different atoms of the representative molecules over time as a colour gradient, use View > Map intramolecular distance. A dialog will appear, and you will have to select a pair of atoms for each representative molecule. Add the selection to the final selection by pressing +
or remove an incorrect selection by pressing -
to fix the incorrect entry.
The molecule representation panel in the interaction panel will show the minimal and maximal intermolecular distance value as well as the corresponding frame number.
To reset the MainView to its original state use View > Reset.
To visualise the progression of the speed [nm/ns] of the representative molecules go to View > Map Speed. The speed progression is displayed as a colour gradient. The molecule representation panel in the interaction panel will show the minimal and maximal molecular speed value as well as the corresponding frame number. To reset the MainView to its original state use View > Reset.
To reset the MainView to its original state use View > Reset.
The BottomView provides a more in-depth analysis and visualisation of the mapping methods described in Modify MainView.
Each BottomView panel has three areas, the graphical display, the statistical display and a control panel; see picture (3)
The control panel has the option to select a specific frame for this BottomView. To save the graph of the BottomView use the save
button. When the check box in the statistical display is activated, a CSV file of the data shown in the overview is saved, too. Use the -
button to remove this instance of the BottomView.
Additionally, in a single instance view, you can press s/h
to show or hide minimum and maximum labels.
To show the progression of the speed [nm/ns] of the representative molecules or their single atoms in the BottomView you can go to View > Show below > Speed to display one instance in a single graph or View > Show below > Multiple Speed to display multiple instances in one graph.
To show the changes in the intramolecular distance [Å] between exactly two different atoms of the representative molecules or all other molecules of the simulation in the BottomView, you can go to View > Show below > Distance to display one instance in a single graph or View > Show below > Multiple Distance to display multiple instances in one graph.
To switch to full screen mode go to View > Enter Full Screen or use the shortcut ctrl
+F
.
To display data from an XVG file, go to Analysis > Show XY-XVG file (see picture). You need to provide a file and then select at least one representative molecule (see picture).
An additional window will open (see picture). You can use the slider to show the changes over the time scale or the jump to frame number
to highlight a specific frame. Pressing the play button
The sidebar options provide the option to change the colours of the graph, modify the legend, and hide the sphere, which indicates the currently selected frame. The save
button will save the graph as a .png file.
There are different options to save your analysis or visualisations.
In the menubar, you can use File > Save to XPDB to save interesting structures as a PDB file. Use File > Save selection to XPDB to save only selected molecules in a PDB file.
If you want to save the view and all legends use the save button 💾 on top of the MainView as described in Navigate in MainView.
To save only the legend of the MainView use File > Save Figure Legend (see picture).
To save the BottomView graph, use the save
button on the right side of the graph. When the check box in the analysis-overview box is activated, a CSV file of the data shown in the overview is also saved.
When working in a separate analysis window, you can save the corresponding graphic with the save
button on the right side of the additional window.
MeTrEx is licensed under the GPL3.
MeTrEx is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY, without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
Created by Christiane Rohse, Sabrina Jaeger-Honz and Beat Ehrmann @AG Schreiber at University of Konstanz
When using MeTrEx, please cite:
xxx