From: Bill McIntyre (
Date: Wed Oct 25 2023 - 06:20:02 CDT

Hi Josh,

Thanks for the script. So it sounds like in order to make a cyclic peptide I must have a pre-existing linear pdb file version of the peptide already made.

If this is the case, is it possible then to make the linear version of the peptide first by using tkl/tkCon scripting by supplying the tkl script a simple text file listing my sequences and have each sequence made programmatically and the resulting pdb files saved to a folder?

I'm thinking I can probably have my workflow first read the text file to make a linear peptide then have your provided script make the cyclic version. Thanks for all your help.

From: Vermaas, Josh <>
Sent: Tuesday, October 24, 2023 8:29 AM
To: Bill McIntyre <>; <>
Subject: Re: vmd-l: Script to Build Cyclic Peptides

Hi Bill,

The basic script is basically what the previous poster showed. Assuming a pdb with the sequence already there (it just isn’t connected), called file.pdb with segname C, I’d do something like this:

package require psfgen

topology top_all36_prot.rtf

segment C {

pdb file.pdb

first none

last none


#I need to know the last residue number

mol new file.pdb

set sel [atomselect top “name CA”]

set lastresid [lindex [$sel get resid] end]

#Apply the patch

patch LINK C:[expr {$lastresid – 1}] C:$lastresid C:1 C:2

#Add coordinates and do the rest of the psf building.

coordpdb file.pdb C

regenerate angles dihedrals


writepsf out.psf

writepdb out.pdb

The coordinates are going to look all kinds of goofy, since psfgen won’t change them, and you may need to run some short minimization or equilibration simulations so that the long bond connecting the two ends of the protein doesn’t look ridiculous. You’ll probably also need to check if you get the appropriate chirality you expect between the N- and C- terminal linkage after minimization. I *think* the Chirality plugin can handle this, but I’m not positive.


From: Bill McIntyre <>
Date: Tuesday, October 24, 2023 at 1:52 AM
To: "Vermaas, Josh" <>, "" <>
Subject: Re: vmd-l: Script to Build Cyclic Peptides

Hi Josh,

Thank you for clarifying that. Now the situation is that besides using the GUI for Molefacture to build a simple linear peptide, I have never built cyclic peptides (N to C connection) using VMD nor have I ever scripted building a peptide in VMD either.

Would you please advise me or direct me to where/who I can go to for building my cyclic (N to C connection) peptides? I have many of these to build so would you please point me to how I can build such cyclic peptides with a TKL script perhaps? I do not need to make psf files for them, just a series of simple pdb files for each sequence. Thanks.



From: Josh <>
Sent: Monday, October 23, 2023 7:57 AM
To: Bill McIntyre <>; <>
Subject: Re: vmd-l: Script to Build Cyclic Peptides

Hi Bill,

That previous post has most of it. The initial poster just couldn't have the automatic first and last patches applied and still have it work. Basically, a cyclic peptide is like any other, but at some point you end up forcing a coupling that isn't what you'd expect for a linear polymer. In CHARMM36, this weird topology can be described by the LINK patch if you want to make a torus, or LIG1 if the loop is internal somewhere.


On 10/22/23 6:38 PM, Bill McIntyre wrote:

Hello everyone,

Would someone please kindly provide me with some direction on how to make a script to build cyclic peptides in VMD from a provided list of sequences? An output of PDB files for the sequences is sufficient (one separate PDB file per sequence).

I saw there was a discussion in a previous mail posting that touched on this subject ($>) but I didn't see any follow up that could guide me in doing this task. Thanks.

Bill McIntyre

Josh Vermaas<>
Assistant Professor, Plant Research Laboratory and Biochemistry and Molecular Biology
Michigan State University