This is an old question, but I found the solution and hope it helps someone else.
The problem: VMD doesn't (blocking) load all frames by default
When not all frames are loaded, I have encountered your problem of VMD only appearing to have a few frames. From the VMD focumentation, emphasis mine:
mol addfile waitfor:
...
how many frames to load before returning; the default is 1 ... [additional] frames will be loaded in the background ... If frames is -1 or all, then all frames in all files still in progress will be loaded at once before the command returns ...
So, by default, we would only expect to load one frame, unless we specify waitfor . If there are more frames (e.g. 3/75 loaded), it is because VMD has loaded more in the background.
The solution: use waitfor when loading
In particular, when loading, I recommend doing the following:
set id [mol new "example.psf"]
mol addfile "example.dcd" waitfor all molid $id;
set n_frames [molinfo $id get numframes]
puts "There are $n_frames frames"
The critical part is the following line:
mol addfile "example.dcd" waitfor all molid $id;
where the 'waitfor' flag is used, as described above.
molinfo
? It's not a generic Tcl command. (I want to tag the question correctly. :)) – Donal Fellowsmolinfo
directly from the associated website; more infos.. The definition: "The molinfo command is used to get information about a molecule (or loaded file) including the number of loaded atoms, the filename, the graphics selections, and the viewing matrices. It can also be used to return information about the list of loaded molecules." – user2804070vmd
tag for you. (No idea what the answer is.) – Donal Fellows