From: Bennion, Brian (bennion1_at_llnl.gov)
Date: Mon Jul 29 2024 - 13:49:39 CDT

thank you for the idea Josh.
I found that firing up vmd with 3300 pdb files all at once or separately was much slower than using grep

grep "HET " multipleLigand.pdb | head -n1 | awk '{print $3}' | grep -f - pdbfile.pdb > oneLigand.pdb
gives me the 3 entry on the first HET line which contains the chainID and ligandID and then just grep it out of the first file
The assumption is that a proper HET record exists....

best
brian

________________________________

From: Josh Vermaas <vermaasj_at_msu.edu>
Sent: Monday, July 29, 2024 7:42 AM
To: Bennion, Brian <bennion1_at_llnl.gov>; vmd-l_at_ks.uiuc.edu <vmd-l_at_ks.uiuc.edu>
Subject: Re: vmd-l: selecting first instance of a ligand from several in pdb file

Hi Brian,

My first inclination is to select all of them, lsort by residue to get a list of residues, and then take the first from that list. If I were to do it based on name SZ, the following would be even simpler:

set szsel [atomselect top "name SZ"]
set sel [atomselect top "same residue as index [lindex [$szsel get index] 0]"]

Or you could first generate a tag and select on beta or something if you don't always want the first one:

set szsel [atomselect top "same residue as name SZ"]
set szres [$szsel get residue]
set betalist [list ]
set prev -1
set beta 0
foreach res $szres {
  if { $res != $prev } {
        incr beta
        set prev $res
  }
   lappend betalist $beta
}
$szres set beta $beta

>From there you could pick out individual residues with beta == 1, beta == 2, etc.

-Josh

On 7/27/24 7:10 PM, Bennion, Brian wrote:
Hello,
Just curious if anyone has done this type of selection before where only first one of several identical ligands in a pdb file are selected?

I have pdb files from which I have extracted the hetatm records and I only want to keep the first if two or more instances of a ligand are present.

My first pass is to read the pdb record and grep for the first instances of HET 1SZ I1625 and use that as an atomselection. I am just not sure how to do that all within vmd...

any thoughts
brian

[cid:part1.1dF4OOks.3eFRDksL_at_msu.edu][cid:part2.00TgP0AT.0c337b2I_at_msu.edu][cid:part3.cgiNZFF7.B1Lh5S2m_at_msu.edu]Biosciences and Biotechnology Division|PLS|Lawrence Livermore National Laboratory|925-422-5722

Friendly Email Disclaimer: I’m writing or responding to this email at a time that is convenient for my work schedule. Please do the same, and don’t feel obligated to respond outside of your standard work hours.

--
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



Outlook-lazecs3y.png
Outlook-juvfvzfw.png
Outlook-mjelfgsq.png