VMD-L Mailing List
From: Axel Kohlmeyer (akohlmey_at_gmail.com)
Date: Sun Jun 02 2019 - 20:21:05 CDT
- Next message: LIGESH B: "Re: Problem While Visualising the Trajectory File from LAMMPS Simulation"
- Previous message: Strahs, Dr. Daniel Bernard: "Re: how to draw boxes with semi-transparent sides"
- In reply to: Abolfazl Musavi: "how to draw boxes with semi-transparent sides"
- Next in thread: Abolfazl Musavi: "Re: how to draw boxes with semi-transparent sides"
- Reply: Abolfazl Musavi: "Re: how to draw boxes with semi-transparent sides"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
On Sat, Jun 1, 2019 at 11:28 PM Abolfazl Musavi <ab.musavi1990_at_gmail.com>
wrote:
> Dear all,
>
>
>
> I want to draw several cubic boxes to separate different regions in the
> simulation box. I want their sides to be semi-transparent and with
> different colors. I do not want to draw a cube by lines because then there
> will not be any side surfaces.
>
>
>
> I would be appreciated if anyone could tell how to do that in VMD.
>
the most straightforward way to do this is via VMD Tcl scripting. here is a
quick demo. for the detailed syntax, please refer to the VMD User's Guide.
# create demo coordinates file
set fp [open "cube.xyz" "w"]
puts $fp "8\ncube edges\nH -5.0 -5.0 -5.0\nH -5.0 -5.0 5.0\nH -5.0 5.0
-5.0\nH -5.0 5.0 5.0\nH 5.0 -5.0 -5.0\nH 5.0 -5.0 5.0\nH 5.0 5.0
-5.0\nH 5.0 5.0 5.0\n"
close $fp
# load file and visualize as points
set mol [mol new cube.xyz waitfor all]
mol modstyle 0 $mol Points 1.000000
# draw three sides as transparent squares
graphics $mol material Transparent
graphics $mol color yellow
graphics $mol triangle {-5 -5 -5} {-5 -5 5} {-5 5 -5}
graphics $mol triangle {-5 5 5} {-5 -5 5} {-5 5 -5}
graphics $mol color red
graphics $mol triangle {-5 -5 -5} {5 -5 5} {5 -5 -5}
graphics $mol triangle {-5 -5 5} {5 -5 5} {-5 -5 -5}
graphics $mol color blue
graphics $mol triangle {-5 5 5} {-5 -5 5} {5 -5 5}
graphics $mol triangle {-5 5 5} { 5 5 5} {5 -5 5}
good luck,
axel.
>
>
> Regards
>
> Abolfazl
>
-- Dr. Axel Kohlmeyer akohlmey_at_gmail.com http://goo.gl/1wk0 College of Science & Technology, Temple University, Philadelphia PA, USA International Centre for Theoretical Physics, Trieste. Italy.
- Next message: LIGESH B: "Re: Problem While Visualising the Trajectory File from LAMMPS Simulation"
- Previous message: Strahs, Dr. Daniel Bernard: "Re: how to draw boxes with semi-transparent sides"
- In reply to: Abolfazl Musavi: "how to draw boxes with semi-transparent sides"
- Next in thread: Abolfazl Musavi: "Re: how to draw boxes with semi-transparent sides"
- Reply: Abolfazl Musavi: "Re: how to draw boxes with semi-transparent sides"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]