Elastic Networks
Example from step by step tutorial: Martini model of protein 1UBQ in blue with the harmonic bonds of the elastic network between backbone beads illustrated in black.
VMD problems
Occasionally when Martinize2 generates elastic networks, some atoms require a large number of elastic bonds to keep them in the place of their initial structure. However, when such a structure is loaded into vmd, an error message along these lines will be raised:
atomsel: setbonds: too many bonds in bondlist: 2 6 27 29 31 33 35 133 135 138 140 142 144 5
Maximum of 12 bonds
This error arises because VMD has a limit of showing 12 bonds on a single atom. MartiniGlass helps overcome this issue by ensuring that when the user indicates there are proteins with elastic networks in their system, the topology files written out will not have more than 12 bonds, and bonds which are removed to achieve this are written out to a separate file. This may be useful if the user wishes to view the elastic network dynamically changing in a trajectory. This is described more in the Dynamic Elastic Networks section.
Alternatively if visualisation of the precise elastic network is important, MartiniGlass can process
static structures and topologies together to draw an apparent bonded network with a set of cylinders
instead. This is indicated by the -cyl flag when running MartiniGlass, explained further in the
Static elastic network section.
Dynamic Elastic Networks
Quickstart
To process a system containing proteins with elastic networks and visualise it, the following command can be used:
$ martiniglass -p topol.top -f frame.gro -vf -el
Where frame.gro should have the name of your desired input structure file.
Subsequently the system can be loaded into VMD as usual:
$ vmd frame.gro -e vis.vmd
This command will load the given structure file twice, and apply the two
visualisation topologies (vis.top and en.top respectively) to the two systems in VMD.
If a trajectory file is to be visualised along with the static structure, the following commands can be used:
$ martiniglass -p topol.top -f frame.gro -vf -el -traj trajectory.xtc
$ vmd frame.gro trajectory.xtc -e vis.vmd
which will enable dynamic visualisation of elastic network bonds through the course of the simulation.
Step by step tutorial
The files (input and expected output) for this tutorial is available from the MartiniGlass examples folder.
The expected output can be generated in one go using the generate_expected_files.sh script run inside
the input folder.
Step 1: Martinize your protein
Create a martini model of a protein following the standard martinize2 protocol:
$ wget https://files.rcsb.org/download/1ubq.pdb
$ grep "^ATOM" 1ubq.pdb > 1UBQ_clean.pdb
$ martinize2 -f 1UBQ_clean.pdb -o topol.top -x 1UBQ_cg.pdb -elastic -ef 700
- These commands:
Download a 1ubq.pdb from the protein database
Prepare it to be martinized
Create a coarse grained model of the protein
From this, you should expect the following files:
1UBQ_cg.pdb: a pdb file with the coordinates of the coarse grained beadstopol.top: a gromacs topology file describing your system.molecule.itp: the coarse grained topology of the 1ubq protein
Without any further additions, topol.top only contains a single copy of your protein.
Step 2: Run MartiniGlass
The system is now ready to be processed by MartiniGlass. In this case, we have a protein with an elastic network. Therefore, the command we need to process with MartiniGlass is:
$ martiniglass -p topol.top -el -vf
This will generate the following files describing your system:
molecule_0_surplus_en.txt: bonds which VMD will not be able to visualisemolecule_0_en.itp: the elastic network of the proteinmolecule_0_vis.itp: the direct bonded topology of the proteinen.top: a topology file for the elastic networks of the systemvis.top: a topology file for the direct bonded networks of the system
Regarding the contents of molecule_0_surplus_en.txt, VMD is not able to draw > 12 bonds between
atoms in a system. Because of the way elastic networks are generated by Martinize2, such features are a
relatively common occurance. Therefore, when MartiniGlass discovers beads with > 12 bonds attached to them,
they are edited such that some are removed so dynamic visualisation is possible.
This problem is discussed further in cylinders.
Alongside these file, several files have been written to enable the topology to be loaded into VMD through
the use of the -vf (Visualisation Files) flag:
vis.vmd: VMD visualisation state filecg_bonds-v6.tcl: vmd commands to draw bonds between atomseigen.py: auxiliary python script required bycg_bonds-v6.tcl
Step 3: Loading your system in VMD
Step 3a: Loading the initial system
To fully view an elastic network in VMD using the files provided, the system needs to be loaded twice in VMD.
Load the system in VMD from the command line using the visualisation state file provided:
$ vmd 1UBQ_cg.pdb -e vis.vmd
This will load your system into VMD using the suggested visualisation mode.
vis.vmd includes commands that will:
Load the commands described in
cg_bonds-v6.tclRead in the visualisation topology described in
vis.topfor your system.
The image in VMD you now see should look something like this
where the backbone of the protein has been rendered as a continuous object.
Step 3b: Loading the elastic network
Next, the system must be loaded a second time. Open the Molecule File Browser from the VMD menu (File -> New Molecule…) and load the same input structure file, into a New Molecule:
The system should now appear twice in the VMD main menu. With the system loaded a second time, the
elastic network topology can be loaded onto it. Open the Tk console from the VMD menu
(Extensions -> Tk Console), and load the topology using the cg_bonds programe:
% cg_bonds -top en.top
This will load the topology information into the second system loaded. The bonds are then best visible by changing the graphics of the second molecule. Load the Graphical Representations menu from the VMD main menu (Graphics -> Representations…). Making sure you have the second molecule selected, change the Drawing Method to bonds, and pick a colour of your choice. Make sure as well that the atoms selected are only the backbone atom beads.
Applying these will ensure that the elastic network is now visible:
Static elastic network
Quickstart
If you have a system already martinized and with a structure file in the .gro format,
then the following commands can be used to generate an entire static elastic network and
load into VMD:
$ martiniglass -p topol.top -f frame.gro -el -cyl -vf
$ vmd frame.gro -e vis.vmd
Step by step
Step 1: Running MartiniGlass
For this tutorial we will use the same 1UBQ_cg.pdb input file and topology as in the
dynamic tutorial. Firstly the system is converted to a coarse grained representation
as before:
$ wget https://files.rcsb.org/download/1ubq.pdb
$ grep "^ATOM" 1ubq.pdb > 1UBQ_clean.pdb
$ martinize2 -f 1UBQ_clean.pdb -o topol.top -x 1UBQ_cg.pdb -elastic
Secondly, the pdb file needs to be converted to the
.gro format (for example using gmx editconf):
$ gmx editconf -f 1UBQ_cg.pdb -c -d 2 -o frame.gro
In the .gro format, it is ready to be read by MartiniGlass, along with the options for elastic
network analysis and cylinder generation file:
$ martiniglass -p topol.top -f frame.gro -el -cyl -vf
Alongside the usual files written as before in the Dynamic Elastic Networks,
one further file is written, network_cylinders.tcl.
Step 2: Loading the system into VMD
As usual, the system can now be loaded into VMD:
$ vmd frame.gro -e vis.vmd
Step 3: Load the static network
With the system loaded in VMD, the static network of drawn cylinders can be simply loaded in through the vmd Tk Console:
% source network_cylinders.tcl
Which will immediately result in the following image displayed:
Although this looks almost identical to the image we saw of the elastic network previously, the system now differs in two ways:
The entire elastic network is drawn, so even atoms with > 12 bonds attached now have all elastic bonds drawn.
The network is static. If a simulation trajectory was also loaded into the system, the static cylindrical network will stay in the positions it was drawn.