VMD-L Mailing List
From: Gianluca Interlandi (gianluca_at_u.washington.edu)
Date: Wed Jun 26 2024 - 16:10:05 CDT
- Next message: Diego Gomes: "Re: loading multiple pdbs as frames and the filenames"
- Previous message: Ryan Woltz: "loading multiple pdbs as frames and the filenames"
- In reply to: Ryan Woltz: "loading multiple pdbs as frames and the filenames"
- Next in thread: Ryan Woltz: "Re: loading multiple pdbs as frames and the filenames"
- Reply: Ryan Woltz: "Re: loading multiple pdbs as frames and the filenames"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
> vmd models-*.pdb -e modify.tcl
I believe that the "*" on the command line acts the same as globbing. You
can type
ls models-*.pdb
and this should give you the sequence how the "*" is replaced. If for
example your models are numbered: models-1.pdb, models-2.pdb, ...,
models-10.pdb, ..., models-100.pdb, ..., models-1000.pdb, and you want
them to be read in increasing sequence, you may need to use:
vmd models-?.pdb models-??.pdb models-???.pdb models-????.pdb -e
modify.tcl
But if you named them models-0001.pdb ... models-1000.pdb, then you
shoudn't have to.
Gianluca
On Wed, 26 Jun 2024, Ryan Woltz wrote:
> Dear community,
> I think I can do this task with UCSF chimera and maybe it is better suited but I have all the
> scripts already written for vmd and I like the results. I have 1000 models I need to import into vmd
> then save residues 190-350 and save each one with the same name. The name of the pdb is important to
> preserve because I have a table with associated values to help rank the pdbs. I have scripts to
> import and modify and save, however, I'm seeking advice on the safest method to preserve the name. I
> can either
>
> A) develop a bash script loop to open vmd with a single pdb modify then save. i.e. for i - 1 to 1000
> - do vmd model-$i.pdb -e modify.tcl done (where i is the model number and modify.tcl selects and
> saves the desired region). The problem with this is that it'll be very heavy and time consuming
> opening vmd that many times for a bigger batch of models. Also I don't know how to import the
> model-$i.pdb name into the tcl so that it saves with the same name.
>
> B) (preferred since all my scripts currently use this) open vmd with all the models as frames. i.e.
> vmd models-*.pdb -e modify.tcl. this is what I normally do to analyze my pdbs and have many scripts
> either measuring bond distances, rmsd, or saving sections but the pdb names are associated with the
> frame number. I can create a separate array that collects the file names (glob function) then moves
> through the array at the same rate of the frames. My concern with this is "vmd model-*.jpdb" and the
> tcl function "glob" might have a different sorting order. My model names are actually quite long and
> complex with main deviations happening at a "." "r" or "0-9". My question for this one is does "*" in
> the vmd loading protocol prioritize letters/numbers/special characters the same as "glob"? I've run
> into this filename sorting issue a long time ago with a different program so I'm quite paranoid about
> this now.
>
> Thanks for suggestions,
>
> Ryan
>
>
-----------------------------------------------------
Gianluca Interlandi, PhD gianluca_at_u.washington.edu
+1 (206) 685 4435
https://urldefense.com/v3/__http://gianluca.today/research/__;!!DZ3fjg!52oDfGR_GdSc0FQsesPmmnNjzrB1jPK4FymseRYJDjppwONoceqO1t7nrOGsC7G9eouRcTAu8-YpIIJo9z4Uhi1RrCg$
Department of Bioengineering
University of Washington, Seattle WA U.S.A.
-----------------------------------------------------
- Next message: Diego Gomes: "Re: loading multiple pdbs as frames and the filenames"
- Previous message: Ryan Woltz: "loading multiple pdbs as frames and the filenames"
- In reply to: Ryan Woltz: "loading multiple pdbs as frames and the filenames"
- Next in thread: Ryan Woltz: "Re: loading multiple pdbs as frames and the filenames"
- Reply: Ryan Woltz: "Re: loading multiple pdbs as frames and the filenames"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]