From: Ryan Woltz (rlwoltz_at_ucdavis.edu)
Date: Wed Jun 26 2024 - 13:03:11 CDT

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