From: Ashar Malik (
Date: Sat Sep 01 2018 - 22:39:17 CDT

You can make use of "graphics" in VMD.

See details here:

You can make use of "line" and "cylinder" to do this.

You can represent each residue either by it alpha-carbon or by a centroid
calculated from all the atoms of residues.

Then determine all occurrences of a particular residue (alpha-carbon or
centroids) and make pairs using a nested for loop
and for each pair using their xyz coordinates and the line/cylinder command
you should be able to connect them.

Write back if you struggle with the code and one can be put together.

On Sun, Sep 2, 2018 at 2:10 AM Raag Saluja <> wrote:

> Hi!
> I want to connect all the residues of a particular amino acid (say, all
> Lys residues) with a line, in my protein.How may I do that, please?
> Thank you in advance!