From: Bill McIntyre (bill_mcintyre378_at_outlook.com)
Date: Mon Oct 30 2023 - 10:58:32 CDT

Thank you very much Josh.

Now I went ahead and tried implementing the script with the correct topology file but although stepping through each command one-by-one in TKCon works perfectly giving me the expected results, saving all the commands in a .tcl script file and trying to execute the script file in TKCon (i.e. source myScript.tcl) or in the VMD console window does not work in outputting the expected psf and pdb files. I noticed that for the command set sel [atomselect top {name CA}] the curly braces need to replace the double quotes in the original version as well as the indeces in the definition of the variables firstresid and lastresid must also be encased in curly braces each in order for those lines to give the expected outputs when using the script file instead of line-by-line manual execution. I may be wrong, but I feel something else like this might be lacking in some other line of code in order for the whole script file to execute properly.

Could it be that there are other lines in the script that must also have curly braces or some other delimiters in order to work ias a script file? Below is my current script with the above curly braces:

resetpsf
package require psfgen
topology top_all36_prot.rtf

#My 20231029 addition to handle renaming things
pdbalias residue HIS HSD
pdbalias atom ILE CD1 CD

segment C {
pdb file.pdb
first none
last none
}

#I need to know the first and last residue numbers
mol new file.pdb
set sel [atomselect top {name CA}]
set firstresid [lindex [$sel get resid] {0}]
set lastresid [lindex [$sel get resid] {end}]

#Apply the patch
patch LINK C:$lastresid C:$firstresid C:1 C:2

#Add coordinates and do the rest of the psf building.
coordpdb file.pdb C
regenerate angles dihedrals
guesscoord

writepsf out.psf
writepdb out.pdb

________________________________
From: Vermaas, Josh <vermaasj_at_msu.edu>
Sent: Monday, October 30, 2023 7:39 AM
To: Bill McIntyre <bill_mcintyre378_at_outlook.com>; vmd-l_at_ks.uiuc.edu <vmd-l_at_ks.uiuc.edu>
Subject: Re: vmd-l: Script to Build Cyclic Peptides

You’d want toppar_c36_jul22.tgz<https://urldefense.com/v3/__http://mackerell.umaryland.edu/download.php?filename=CHARMM_ff_params_files*toppar_c36_jul22.tgz__;Lw!!DZ3fjg!4HDcMsrHMP3g-zv6udrLrRm2ky4LdX6jXpwTfGT68lC0m_B49K0H0kuLRu5GYejI3RBIppwKSL0rlz5fjJVzcGddmRZD-w$ >

-Josh

From: Bill McIntyre <bill_mcintyre378_at_outlook.com>
Date: Saturday, October 28, 2023 at 7:13 PM
To: "Vermaas, Josh" <vermaasj_at_msu.edu>, "vmd-l_at_ks.uiuc.edu" <vmd-l_at_ks.uiuc.edu>
Subject: Re: vmd-l: Script to Build Cyclic Peptides

Hi Josh,

Thanks for the link. Now as I've never downloaded these files from the developer directly, I'd like to make sure I download the correct tar ball. Would you please tell me if this is the correct one to download: toppar_c36_jul17.tgz?

I unzipped it and inside was the file "top_all36_prot.rtf" but there was nothing with the name "top_all36m_prot.rtf." Thanks.

Best regards,

Bill

________________________________

From: Josh <vermaasj_at_msu.edu>
Sent: Thursday, October 26, 2023 1:53 PM
To: Bill McIntyre <bill_mcintyre378_at_outlook.com>; vmd-l_at_ks.uiuc.edu <vmd-l_at_ks.uiuc.edu>
Subject: Re: vmd-l: Script to Build Cyclic Peptides

Hi Bill,

LINK is the patch for a donut peptide, which is what you want. Its in the default top_all36m_prot.rtf that the MacKerell group distributes https://urldefense.com/v3/__http://mackerell.umaryland.edu/charmm_ff.shtml__;!!DZ3fjg!4HDcMsrHMP3g-zv6udrLrRm2ky4LdX6jXpwTfGT68lC0m_B49K0H0kuLRu5GYejI3RBIppwKSL0rlz5fjJVzcGckxg0rDw$ <https://urldefense.com/v3/__http:/mackerell.umaryland.edu/charmm_ff.shtml__;!!HXCxUKc!2JiqXBovoEnIzHQ3BEUwoNmccY34WLtsAr_iv4W_Bm1ew2s0Xw5MSA3snlovOIBo_Ow3O15NjkPJ1_pZB-KckJyxaIhn$>

-Josh

On 10/26/23 1:34 PM, Bill McIntyre wrote:

Hi Josh,

Thanks for bringing up the structure prediction approach, I checked out the website and it does look much more straightforward.

Now, since I want to make a simple N-terminus to C-terminus connection for my cyclic peptides (i.e. no braided torus structure), which patch should I use, LINK or LIG1?

Also, from where do I get/obtain the needed patch?

Thanks!

Bill

________________________________

From: Josh <vermaasj_at_msu.edu><mailto:vermaasj_at_msu.edu>
Sent: Wednesday, October 25, 2023 9:01 AM
To: Bill McIntyre <bill_mcintyre378_at_outlook.com><mailto:bill_mcintyre378_at_outlook.com>; vmd-l_at_ks.uiuc.edu<mailto:vmd-l_at_ks.uiuc.edu> <vmd-l_at_ks.uiuc.edu><mailto:vmd-l_at_ks.uiuc.edu>
Subject: Re: vmd-l: Script to Build Cyclic Peptides

Hi Bill,

Yeah, something like that should be possible, depending on your text file format. I'm used to operating under the assumption that you have a pdb structure, either from experimental determination or structure prediction methods. If you have a set of sequences already in mind, I think passing those sequences to AlphaFold or ESMFold will probably be your fastest way forward. https://urldefense.com/v3/__https://esmatlas.com/resources?action=fold__;!!DZ3fjg!4HDcMsrHMP3g-zv6udrLrRm2ky4LdX6jXpwTfGT68lC0m_B49K0H0kuLRu5GYejI3RBIppwKSL0rlz5fjJVzcGddFxzNWg$ <https://urldefense.com/v3/__https:/esmatlas.com/resources?action=fold__;!!HXCxUKc!yZsZv5cJqaK_GuUPBu8rit2jKuaFDf3KfhOZzCi98X6g-no4YMz6UVVhXqjXkJtPI1a8bVW6FkbeqaRLjn8ySPiJ_9Gg$> has returned basically instantly for every sequence I've thrown at it so far.

The reason I think structure prediction methods are the way forward for you is that the "let psfgen guess the coordinates" method for the backbone will make a perfectly linear structure, with one REALLY long bond connecting the ends. So while its technically possible to make a linear polypeptide by just specifying all the residues one at a time:

segment C {

residue 1 MET

residue 2 ALA

..

residue 100 GLU

first none

last none

}

This will be more work I think.

-Josh

On 10/25/23 7:20 AM, Bill McIntyre wrote:

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.

Bill

________________________________

From: Vermaas, Josh <vermaasj_at_msu.edu><mailto:vermaasj_at_msu.edu>
Sent: Tuesday, October 24, 2023 8:29 AM
To: Bill McIntyre <bill_mcintyre378_at_outlook.com><mailto:bill_mcintyre378_at_outlook.com>; vmd-l_at_ks.uiuc.edu<mailto:vmd-l_at_ks.uiuc.edu> <vmd-l_at_ks.uiuc.edu><mailto:vmd-l_at_ks.uiuc.edu>
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

guesscoord

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, https://www.ks.uiuc.edu/Research/vmd/plugins/chirality/$> but I’m not positive.

-Josh

From: Bill McIntyre <bill_mcintyre378_at_outlook.com><mailto:bill_mcintyre378_at_outlook.com>
Date: Tuesday, October 24, 2023 at 1:52 AM
To: "Vermaas, Josh" <vermaasj_at_msu.edu><mailto:vermaasj_at_msu.edu>, "vmd-l_at_ks.uiuc.edu"<mailto:vmd-l_at_ks.uiuc.edu> <vmd-l_at_ks.uiuc.edu><mailto:vmd-l_at_ks.uiuc.edu>
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.

Bill

________________________________

From: Josh <vermaasj_at_msu.edu><mailto:vermaasj_at_msu.edu>
Sent: Monday, October 23, 2023 7:57 AM
To: Bill McIntyre <bill_mcintyre378_at_outlook.com><mailto:bill_mcintyre378_at_outlook.com>; vmd-l_at_ks.uiuc.edu<mailto:vmd-l_at_ks.uiuc.edu> <vmd-l_at_ks.uiuc.edu><mailto:vmd-l_at_ks.uiuc.edu>
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.

-Josh

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 (https://www.ks.uiuc.edu/Research/namd/mailing_list/namd-l.2015-2016/0961.html0xPOCp97QICEK0SHqB1WIoWC$>) but I didn't see any follow up that could guide me in doing this task. Thanks.

Bill McIntyre

--
Josh Vermaas
vermaasj_at_msu.edu<mailto:vermaasj_at_msu.edu>
Assistant Professor, Plant Research Laboratory and Biochemistry and Molecular Biology
Michigan State University
vermaaslab.github.io
--
Josh Vermaas
vermaasj_at_msu.edu<mailto:vermaasj_at_msu.edu>
Assistant Professor, Plant Research Laboratory and Biochemistry and Molecular Biology
Michigan State University
vermaaslab.github.io
--
Josh Vermaas
vermaasj_at_msu.edu<mailto:vermaasj_at_msu.edu>
Assistant Professor, Plant Research Laboratory and Biochemistry and Molecular Biology
Michigan State University
vermaaslab.github.io