My Christmas list:
Author Archives: Dan
Wow, it’s been a while since I updated anything here. I guess I’ve been busy, with, uh, research. And my math class of doom. I almost dropped the class because they assigned a ridiculous homework assignment over Thanksgiving, but I didn’t, and ended up killing myself getting the stupid assignment done. Anyway, at least this class doesn’t have exams…
Here’s a TCL script written for use with VMD to automatically generate a bunch of contours from grid files in a specific directory. The script saves the viewing angle and other rendering aspects.
#Set the directory for looking for files here
set dir "/home/cogswell/Downloads/dx/30-blend-95"
set currentDir [pwd]
cd $dir
#set height and width
#set h 500
#set w 500
set h ["%h"]
set w ["%w"]
#Set global defaults and preferences
axes location off
display antialias on
display depthcue on
# save the current display state and representation style
set viewpt [molinfo top get {center_matrix rotate_matrix scale_matrix global_matrix}]
set myrep [molinfo top get {rep}]
mol default style $myrep
foreach f [glob "p*.dx"] {
set file [exec basename $f ".dx"]
mol off top
mol new "$f"
#mol addrep top
molinfo top set {center_matrix rotate_matrix scale_matrix global_matrix} $viewpt
render POV3 "$file.pov" povray +H%h +W%w -I%s -O"$file.png" -D +X +A
mol delete top
}
#return to the original molecule and directory
molinfo top set {center_matrix rotate_matrix scale_matrix global_matrix} $viewpt
mol on top