VMD-L Mailing List
From: XY (windyvalley_at_gmail.com)
Date: Mon Jun 18 2012 - 00:29:56 CDT
- Next message: Ajasja Ljubetič: "Getting the internal coordinates table"
- Previous message: Axel Kohlmeyer: "Re: Changing the color of atoms of a particular name"
- Next in thread: Axel Kohlmeyer: "Re: fix the viewing angles"
- Reply: Axel Kohlmeyer: "Re: fix the viewing angles"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Hello,
I am trying to use tcl commands to repeatedly read a few lammps dump files
and visualize the atoms, using same viewing angles and drawing methods.
However, the obtained figures have different viewing angles as shown in the
following figures.
http://web.ics.purdue.edu/~yang99/01.jpg
http://web.ics.purdue.edu/~yang99/02.jpg
It seems that the screen origin (the three colored axes) was placed at
different location for different lammps dump files. It results in different
viewing angles, after the rotate and translate commands were executed.
The dimensions of the simulation box of all lammps dump files are same.
Is there a way of fixing the viewing angle or move the screen origin to a
fixed place?
The tcl script I use is listed below. The sample lammps dump files can be
downloaded from the following link, if needed.
http://web.ics.purdue.edu/~yang99/all.zip
Thanks a lot for your help.
set frames 2 ; # total frames
set tsinc 15000000 ; # timestep increase between frames
set tsstart 0 ; # starting time step
set fn_prefix cml_ConW300K_C100eV3000. ; # filename prefix
set fn_postfix .lammpstrj ; # filename suffix
display resize 500 700
# ---- LOOP ---- begin
for {set ii 0} {$ii < $frames} {incr ii} {
puts "Frames: [expr $ii + 1] of $frames"
mol delete all
set timestep [expr $tsstart+$tsinc*$ii]
set filename $fn_prefix$timestep$fn_postfix
mol new $filename
set mid [molinfo index 0]
mol delrep all $mid
axes location off
mol selection {type 1}
mol addrep top
mol modstyle 0 $mid vdw 0.25 100
mol modcolor 0 $mid colorid 8
mol selection {type 2}
mol addrep top
mol modstyle 1 $mid vdw 0.4 100
mol modcolor 1 $mid colorid 1
translate by -0.05 -1. 0
rotate x to -90
rotate y by 30
rotate x by 20
scale to 0.04
#set impact [expr $timestep/5000]
#graphics $mid color white
#graphics $mid text {-1 0 16} "Impacts: $impact" size 3 thickness 2
graphics $mid color cyan
graphics $mid line {0 0 0} {25.32 0 0} width 5 ; # draw box outline
graphics $mid line {25.32 0 0} {25.32 25.32 0} width 5
graphics $mid line {25.32 25.32 0} {0 25.32 0} width 5
graphics $mid line {0 25.32 0} {0 0 0} width 5
graphics $mid line {0 0 0} {0 0 -80} width 5
graphics $mid line {25.32 0 0} {25.32 0 -80} width 5
graphics $mid line {0 25.32 0} {0 25.32 -80} width 5
graphics $mid line {25.32 25.32 0} {25.32 25.32 -80} width 5
render snapshot $fn_prefix$timestep.bmp
}
Xue
- Next message: Ajasja Ljubetič: "Getting the internal coordinates table"
- Previous message: Axel Kohlmeyer: "Re: Changing the color of atoms of a particular name"
- Next in thread: Axel Kohlmeyer: "Re: fix the viewing angles"
- Reply: Axel Kohlmeyer: "Re: fix the viewing angles"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]