# How to visualize protein-ligand complex MD run using VMD

**URL:** <https://gromacs.bioexcel.eu/t/how-to-visualize-protein-ligand-complex-md-run-using-vmd/3331>\
**Category:** User discussions\
**Tags:** mdrun, analysis-tools\
**Created:** [December 20, 2021, 6:57am UTC](https://gromacs.bioexcel.eu/t/how-to-visualize-protein-ligand-complex-md-run-using-vmd/3331 "2021-12-20T06:57:30Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![scamander](https://avatars.discourse-cdn.com/v4/letter/s/db5fbb/32.png) [@scamander](https://gromacs.bioexcel.eu/u/scamander)\
**Post date:** [December 20, 2021, 6:57am UTC](https://gromacs.bioexcel.eu/t/how-to-visualize-protein-ligand-complex-md-run-using-vmd/3331/1 "2021-12-20T06:57:30Z")

</div>

GROMACS version: gmx, version 2021.4  
GROMACS modification: No

I’m following the [Protein-Ligand Complex tutorial](http://www.mdtutorials.com/gmx/complex/index.html).  
I’d like to visualize the binding using [VMD](https://www.ks.uiuc.edu/Research/vmd/).

I use the output from [these commands](http://www.mdtutorials.com/gmx/complex/08_MD.html):

```auto
gmx grompp -f md.mdp -c npt.gro -t npt.cpt -p topol.top -n index.ndx -o md_0_10.tpr

gmx mdrun -deffnm md_0_10

```

Especially these two files:

```auto
md_0_10.gro
md_0_10.xtc

```

And with this VMD setting:

 ![Screen Shot 2021-12-20 at 15.54.18](https://europe1.discourse-cdn.com/flex017/uploads/bioexcel1/original/2X/4/4ac09a103d62cb4261add5a0e6e3ae9c98e11798.jpeg)

At best I can get is only the receptor (protein) but not the ligand bound to it.  
This is done by assigning “protein” to Selected Atoms form in Graphical Representation dialog box.  
I can’t see anything where I can include ligand.

 ![Screen Shot 2021-12-20 at 15.45.59](https://europe1.discourse-cdn.com/flex017/uploads/bioexcel1/original/2X/0/02d1beb1d97d2924c92ca6c33a05b88966278710.png)

How can I also show ligand in the binding?

-Sca

---

<div class="post-metadata">

**Author:** ![jalemkul](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/jalemkul/32/18_2.png) [@jalemkul](https://gromacs.bioexcel.eu/u/jalemkul)\
**Post date:** [December 20, 2021, 3:49pm UTC](https://gromacs.bioexcel.eu/t/how-to-visualize-protein-ligand-complex-md-run-using-vmd/3331/2 "2021-12-20T15:49:48Z")

</div>

Specify its residue name (resname). This is a VMD question and is better suited to their mailing list.

---

<div class="post-metadata">

**Author:** ![rpsingh](https://avatars.discourse-cdn.com/v4/letter/r/c57346/32.png) [@rpsingh](https://gromacs.bioexcel.eu/u/rpsingh)\
**Post date:** [December 25, 2021, 12:27pm UTC](https://gromacs.bioexcel.eu/t/how-to-visualize-protein-ligand-complex-md-run-using-vmd/3331/3 "2021-12-25T12:27:35Z")

</div>

Create Rep in VMD. Enter “resname XYZ” (do not include the quotes; replace XYZ with your ligand residue name). You can also play around with other options like “not protein not water”, resid, etc. See the VMD manual for more instructions.

---

<div class="post-metadata">

**Author:** ![scamander](https://avatars.discourse-cdn.com/v4/letter/s/db5fbb/32.png) [@scamander](https://gromacs.bioexcel.eu/u/scamander)\
**Post date:** [December 25, 2021, 1:35pm UTC](https://gromacs.bioexcel.eu/t/how-to-visualize-protein-ligand-complex-md-run-using-vmd/3331/4 "2021-12-25T13:35:53Z")

</div>

Thank you. That answered my question.

---

<div class="post-metadata">

**Author:** ![alanwilter](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/alanwilter/32/627_2.png) [@alanwilter](https://gromacs.bioexcel.eu/u/alanwilter)\
**Post date:** [December 26, 2021, 7:39am UTC](https://gromacs.bioexcel.eu/t/how-to-visualize-protein-ligand-complex-md-run-using-vmd/3331/5 "2021-12-26T07:39:59Z")

</div>

This is from a quick and dirt [tutorial](https://github.com/alanwilter/acpype/wiki/Tutorial-Using-ACPYPE-for-GROMACS)

```auto
# Create vmd.tcl file
cat << EOF >| vmd.tcl
display projection Orthographic
display rendermode GLSL
mol modselect 0 0 protein
mol modstyle 0 0 NewCartoon 0.300000 10.000000 4.100000 0
mol modcolor 0 0 Structure
mol addrep 0
mol modselect 1 0 noh and resname DMP
mol modstyle 1 0 Licorice 0.300000 12.000000 12.000000
mol modcolor 1 0 Type
color Type C white
mol addrep 0
mol modselect 2 0 noh same resid as within 8 of resname DMP
mol modstyle 2 0 Licorice 0.200000 12.000000 12.000000
mol addrep 0
mol modselect 3 0 noh same resid as within 8 of resname DMP
mol representation Licorice 0.200000 12.000000 12.000000
mol modstyle 3 0 HBonds 3.000000 20.000000 1.000000
mol modcolor 3 0 ColorID 0
mol modstyle 3 0 HBonds 3.000000 20.000000 6.000000
mol modcolor 3 0 ColorID 4
mol smoothrep 0 0 5
mol smoothrep 0 1 5
mol smoothrep 0 2 5
mol smoothrep 0 3 5
EOF

# Visualise with VMD
vmd md.gro md.xtc -e vmd.tcl

```

You need to adapt the ligand name obviously and, likely, other features. It’s worth investing time in VMD tcl commands IMO.
