Advanced Options
Protein Structure
One of the main features MartiniGlass is intended for is to facilitate the visualisation of the bonded networks that Martini imposes to retain secondary and tertiary structure in coarse grained models.
MartiniGlass handles two sorts of networks: elastic networks, and Go models. When MartiniGlass is called using the associated flags, two sets of files will be written for each molecule in the system read in. First, the ‘direct’ bonded network of each molecule (I.E. between consecutive backbone beads) is written in the usual visualisation topology files. Second, files for any protein structure networks are written with an appropriate suffix.
Further fully worked tutorials for protein structure are available in the tutorials section.
Elastic Networks
Elastic networks are sets of harmonic bonds between protein backbone beads imposed to keep
beads at fixed distances. Elastic networks are generated by Martinize2 when the -elastic
flag is used. To treat elastic networks in MartiniGlass, simply use the -el flag. For example:
$ martiniglass -p topol.top -el
will process the system described in topol.top. For any protein topologies in the system,
any bonds between non contiguous residues will be identified as the elastic network and written
into the second set of topology files.
Note that elastic networks may cause additional challenges for visualisation associated with the maximum number of bonds per atom that VMD is able to draw. These are discussed further in the tutorial for elastic networks.
Go models
Go models are sets of additional site-specific non-bonded parameters that retain protein backbone
beads around their initial positions during a simulation. Go models are generated in martinize2 using
a contact map and the -go flag. Martinize2 subsequently generates an additional nonbonded
parameter file, usually called go_nbparams.itp to be read as an input during simulation.
MartiniGlass takes the additional nonbonded files and converts them to a bonded network that may be visualised in VMD. Two arguments are required:
-gotell MartiniGlass that there are proteins with Go models in the system-gfspecifies the path to the nonbonded parameter file that was used to simulate the protein
For example:
$ martiniglass -p topol.top -go -gf go_nbparams.itp
will process the system in topol.top as usual. In addition, for any proteins with go models
in the system will have their bonded networks written in the second set of files if their go
networks are described in go_nbparams.itp. This may cause issues when there are multiple
proteins with Go models in the system. This problem is discussed further in the
tutorial for multiple go models.
Virtual sites
In Gromacs, virtual sites are massless interaction sites constructed from the positions of other atoms. Virtual sites have found increasing use in Martini models of many biomolecules, such as carbohydrates, sterols, and molecular motors.
As virtual sites are constructed geometrically from their base atoms, they are not bonded to any other atoms in the traditional sense. However for the purposes of visualisation, it may be helpful to show connections between virtual sites and their constructing atoms.
MartiniGlass will write topology bonds by default to show virtual sites connected. This behaviour is
controlled with the -vs input flag. When the flag is specified, the bond is not created,
and so virtual sites will appear to float as usual. For example:
$ martiniglass -p topol.top
will draw bonds between any virtual sites in the system and their constructing atoms, while:
$ martiniglass -p topol.top -vs
will leave the virtual sites disconnected.
Waterless trajectories
Often it is not desirable to have water in trajectories loaded into VMD. Loading every water bead in a system into VMD is both memory intensive and, at a coarse grained resolution, likely not the primary topic of interest.
To assist in visualising your system without water, MartiniGlass can write a gromacs index file
that contains a single index group for all the non-water components of your system. This is simply
achieved by providing the structure (.gro) file you wish to process to MartiniGlass using the
-f option, for example:
$ martiniglass -p topol.top -f frame.gro
will write an index file, index.ndx for frame.gro that has a single index group without
the indices of water beads, in addition to the usual processed topology output of MartiniGlass.
Note that the argument strictly requires a coordinate file in the .gro format, so any pdb
files must be converted (e.g. using gmx editconf in Gromacs) before use.
Writing VMD state input files
Basic file output
The core functionality of MartiniGlass ensures that your system’s topology files are readable by VMD. To finish loading a system into VMD - as described in introduction - several further scripts are required. These scripts are distributed as part of MartiniGlass, and stored in the data folder of the repository.
For convenience, they can also be written into a folder when MartiniGlass is called with the
-vf (Visualisation Files) flag. For example:
$ martiniglass -p topol.top -vf
will write the three files locally, in addition to performing the usual processing. The three files are:
cg_bonds-v6.tcl: A tcl script containing commands for vmd to write bonds between atoms in a systemeigen.py: An auxiliary script to helpcg_bonds-v6.tclvisualise secondary structurevis.vmd: A VMD visualiation state file
NB, longer term users of the Martini force field may be familiar with previous iterations of the
cg_bonds-vX.tcl script. The latest version has been optimised in its functionality to work best in
conjunction with MartiniGlass.
As described in the introduction, the principal script required by VMD to draw
bonds is cg_bonds-v6.tcl. The cg_bonds program, once sourced in vmd (see Visualising your system),
contains a number of additional functions to actually draw bonds between atoms. For the purposes of MartiniGlass,
the one function that is required is simply -top:
% cg_bonds -top vis.top
Calling the cg_bonds -top program will read your topology complete with the visualisable topology
files, and draw the bonds described in your system.
The Python script eigen.py is only required for illustrating secondary structure. For more information,
see the tutorial on drawing secondary structure.
As a shortcut to the routine described, the visualisation state script, vis.vmd automatically loads both
the cg_bonds program into VMD, and reads in the visualisation topology using the above command. It further
contains a number of default representations for a wide range of common components of Martini systems, such as
proteins, lipids, and nucleic acids. To take advantage of the provided readily visualisable state, VMD can
be opened from the command line using the following:
$ vmd frame.gro -e vis.vmd
Additional code for vis.vmd
If the -vf argument is given in conjunction with:
an argument for protein structure, I.E.
-goor-el
and
a structure file with
-fand optionally, a trajectory file with-traj
For example:
$ martiniglass -p topol.top -f frame.gro -traj trajectory.xtc -vf -el
then several extra lines of code will be appended to the vis.vmd file written out by MartiniGlass.
The additional lines are designed to facilitate a more streamlined approach towards visualising
protein secondary structure. In short, when the system is subsequently loaded into VMD with, for example:
$ vmd frame.gro trajectory.xtc -e vis.vmd
The system is in fact loaded twice, with the standard visualisation topologies applied to the first system, and the protein structure topologies applied to the second system. The separation of the topologies in this way allows for fine tuning of the visualisation of each component.
This option is also explained in the tutorials for both the Go model and elastic networks.
Viewing with other visualisation packages
MartiniGlass is primarily intended to enable the subsequent viewing of Martini systems using the VMD
software. This may not be the universal visualisation software of choice, but other packages may
face similar challenges in clearly showing the bonded networks of coarse grained molecules. To help
support making a start on visualising molecules with other softwares such as Pymol or nglviewer,
MartiniGlass can be used to write out the bonded networks of molecules using the -ext (external)
flag. For example:
$ martiniglass -p topol.top -ext
In addition to the standard visualisation topology files intended for VMD, the above command will also write a series of text files. The contents of each file is then simply a list of zero-indexed pairs indicating the pairs of atoms in the molecule which have a bond between them. For example:
0 2
2 4
4 6
6 10
10 12
12 15
15 17
17 19
19 21
21 22
...
Note
The zero indexing in the external bonds file differs from the Gromacs format describing bonds, which is 1-indexed. It is anticipated that users who wish to use such a list in alternative visualisation software will benefit from the zero indexing.