From: Bassam Haddad (bhaddad_at_pdx.edu)
Date: Mon Jul 20 2020 - 13:31:24 CDT

Hi William,

Just wanted to bring this back to the VMD thread in case others had the
same thoughts you did.

I understand this isn't exactly what you are looking for, I just
copy-pasted a script I have for rmsd calculations, but this is a
generalizable method.

I recommend going over the Tcl scripting tutorial from www.ks.uiuc.edu
<https://www.ks.uiuc.edu/Training/Tutorials/> to get a basic foundation to
work with, and then revisit the script I have provided. You need to
automate the loading of your .pdb files (done in my script), and perform
atom-selections, which should be a simple addition.

~ Bassam

On Mon, Jul 20, 2020 at 11:23 AM William Howe <howew_at_mail.gvsu.edu> wrote:

> Not exactly what I want, Instead of RMSD calculations I just want to
> automate the Selected Atoms command "protein and within 4 of resname
> LIG". Or this could be close enough to what I'm looking for, but again
> I'm new to TCL so I'm not sure what I'm looking for looks like.
> Thanks!
>
> On Mon, Jul 20, 2020 at 1:58 PM Bassam Haddad <bhaddad_at_pdx.edu> wrote:
> >
> > Hi William,
> >
> > While there is probably a better way to grep/glob the filenames from the
> TK-Console, I have found input files containing a list of file names and
> parameters helpful for this.
> >
> > Below is a script I have for automating RMSD calculations of multiple
> systems...
> >
> > proc autormsd {in} {
> >
> > set infile [open $in r]
> >
> > set inread [read -nonewline $infile]
> >
> > set inputs [split $inread "\n"]
> >
> > close $infile
> >
> > ## The input file will contain the: CryoEM .psf/.pdb,
> .psf/.dcd, OUT
> > ## The input file indeces: 0
> 1 2
> > set m 0
> >
> > foreach line $inputs {
> >
> > mol new [lindex $line 0].psf
> >
> > mol addfile [lindex $line 0].pdb
> >
> > mol new [lindex $line 1].psf
> >
> > mol addfile [lindex $line 1].dcd waitfor all
> >
> > align $m [expr $m + 1]
> >
> > run [lindex $line 2]
> >
> > animate delete all
> >
> > set m [expr $m + 2]
> > }
> > }
> >
> > Where the input file is just a text file with the lines containing the
> information denoted in the script. You could generate an input file with
> `ls *files* > input.txt` and modify the above script to just load the
> pdb's, or what have you.
> >
> > Hopefully, this is helpful!
> >
> > Bassam
> >
> > On Mon, Jul 20, 2020 at 10:49 AM William Howe <howew_at_mail.gvsu.edu>
> wrote:
> >>
> >> Hi, I'm new to TCL language, but have some experience with Python. I
> >> am wondering what would the TCL script be to iterate over a directory
> >> containing PDB files and create a binding pocket for each file
> >> iterated over.
> >>
> >> I know in VMD Graphical Representation I could use the atomselect
> >> command 'protein and within 4 of resname LIG', and then save
> >> coordinates to create a pdb file of the pocket but I would like to
> >> automate this process for several dozen pdb files I am working with.
> >>
> >> Say I have a Folder of PDB Files, here is the input and the desired
> >> output(output name should be in the same format):
> >> Receptor1.pdb --> Receptor1 Partial Pocket.pdb
> >> Receptor2.pdb --> Receptor2 Partial Pocket.pdb
> >> Receptor3.pdb --> Receptor3 Partial Pocket.pdb
> >>
> >> Heres the directory I'm Working From:
> >> C:\Users\Will\Desktop\School Junk\GABA Project\GABA Structures
> >>
> >> Within this folder are several subfolders and each subfolder has
> >> several other subfolders.
> >>
> >>
> >> Sorry for the long post, this is my first one, any help is greatly
> appreciated.
> >>
>