From: Josh Vermaas (vermaas2_at_illinois.edu)
Date: Fri Jan 03 2014 - 16:13:15 CST

Hi Tyler,

The reason the colors are different is somewhat complicated. Based on
your atomselections (mass >=0, mass < 0.2), particles with masses in the
range of (0, 0.2) have two spheres drawn for them. In snapshot, only the
top representation is drawn (the red sphere), but with better renderers,
both are drawn, combining the yellow and red spheres together to make a
different color (orange?). If your atomselections were truly disjoint, I
think the two renders would give you consistent output.

I also have an idea to reduce the number of molecules you need to load.
PDB files have two extra columns (beta and occupancy) that you could use
instead of the mass field of a psf. Now VMD can only store one set of
betas/occupancies at a time, however you can copy these over to a user
field with very little problem, and then do the coloration based on the
user field (trajectory->user in the graphical representation window)
instead of mass. The loop to copy over the pdbs sequentially would go
something like this:

mol new structure001.psf
set sel [atomselect top "all"]
for { set i 1 } { $i < 102 } { incr i } {
  set pdbfile [format "structure%03d.pdb" $i]
#Add a new file. This will load the new beta values.
    mol addfile $pdbfile
#Save the new beta values to the user field.
    $sel set user [$sel get beta]
}
#The rest of your commands can go outside the loop now (until you render).
mol modselect 0 top user >= 0.2
mol modcolor 0 top ColorID 4
#Update the selection when you change frame!
mol selupdate 0 top on
#More stuff goes here...

#Rendering loop
for { set frame 0 } { $frame < [molinfo top get numframes] } { incr
frame } {
    animate goto $frame
    render snapshot [format "structure3_%03d.bmp" [expr {$frame + 1}]]
    render tachyonInternal [format "structuretachyon3_%03d.bmp" [expr
{$frame + 1}]]
}

Good luck!
-Josh Vermaas

On 01/03/2014 02:19 PM, Tyler Smith wrote:
> Hi All,
> I'm attempting to create a movie in vmd that shows how the local
> crystallization of a system of polymers evolves with time during
> quenching. A metric for local crystallization called the CCE norm was
> used to assign every monomer in the system a crystalline structure (
> HCP, FCC, fivefold, unordered). Psf files were used to convey
> information about the crystalline structure using dummy variables; for
> example, all monomers with mass < .2 correspond to monomers with FCC
> ordering and are colored red. Every psf file gives local crystalline
> structure for one timestep in the quench, so in order to create a
> movie of evolving crystalline structure a new pair of psf and pdb
> files needs to be loaded in for every frame. As far as i know vmd
> can't internally create movies with multiple psf files, so I decided
> to render a series of bitmap images using vmd and then string them
> together using another program.
>
> A c++ program was used to create a long .tcl script that loads in
> the pdb and modified psf, colors the monomers accordingly, renders an
> image and then repeats for the next pair of files. This process
> worked well using the snapshot renderer, but I would prefer to
> generate higher quality images using Tachyon Internal. When the
> Tachyon Internal renderer is employed images are rendered but they are
> not colored correctly.
>
> Does anyone have any ideas as to why snapshot works and
> TachyonInternal doesn't? I'll attach the c++ scripts used to generate
> the .tcl scripts
>
> Also if there is an easier way to create movies with multiple psf
> files and custom coloring please let me know.
>
> Thanks,
>
> Tyler
>