From: Axel Kohlmeyer (
Date: Sat Mar 11 2023 - 23:23:27 CST

On Sat, Mar 11, 2023 at 6:34 PM Strahs, Dr. Daniel Bernard <>

> Hi all:
> Two questions, which I can't identify in the manual or various tcl scripts:
> 1. VMD Molecule IDs are assigned at loading. I know the top molecule
> can be assigned. Can the numerical molecule IDs be reassigned by command?
No. Those are designed to be unique. There is a counter that gets
incremented whenever a new molecule is created.
This is similar to how atom selections get a new (function) name for each
new selection.

So to write "portable" scripts, you have to capture the molecule id on
creation as the return value of the "mol" command (set mol [mol new
somefile.psf]; mol addfile somefile.pdb $mol) same as with the more
commonly seen "set sel [atomselect top all]".

> 1. You can delete the loaded frames for a given molecule using the
> pulldown menus. Is there a corresponding command to do the same?
> You can use the "animate" command for that. "animate delete beg 5 end 10
mol $mol"

> Thanks!
> Dan Strahs
> Biology Dept
> Pace University

Dr. Axel Kohlmeyer;!!DZ3fjg!8W7SalO1wsgSJFcMOMcAU3uLb5Vo1o3ypsjLsEXxc-YLLVVgIDIxpROjfGu-CPRLCFH7YAsVTe6pcouUFg$ 
College of Science & Technology, Temple University, Philadelphia PA, USA
International Centre for Theoretical Physics, Trieste. Italy.