VMD-L Mailing List
From: John Stone (johns_at_ks.uiuc.edu)
Date: Fri Mar 23 2007 - 10:25:36 CDT
- Next message: Fred Moore: "coloring names"
- Previous message: Abi Ghanem josephine: "Draw a circle"
- In reply to: Abi Ghanem josephine: "Draw a circle"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Josephine,
Drawing a sphere would be far easier than a circle, since drawing a circle
requires re-computing it's projection as the view is changed. If a sphere
is acceptable, you can use either the "draw" commands or "graphics" commands
to add a sphere to your scene. This is easily done with something like:
set sel [atomselect top "your atom selection text goes here"]
set coords [$sel get {x y z}]
draw sphere [lindex $coords 0]
If you wanted to do this for multiple selected atoms, you could simply write:
set sel [atomselect top "your atom selection text goes here"]
set coords [$sel get {x y z}]
foreach c $coords {
draw sphere $c
}
You can make your sphere transparent, change the color, and various
other attributes using the other draw/graphics commands described
in the User's Guide.
If you must use a circle rather than a sphere, you'll have to write a
routine to render the circle using a set of lines, oriented orthogonal
to the viewing direction. The main complication with doing a circle is
that you'll have to redraw it as you change the viewing orientation so it
looks the way you expect it do.
John Stone
vmd_at_ks.uiuc.edu
On Fri, Mar 23, 2007 at 03:47:12PM +0100, Abi Ghanem josephine wrote:
> Hi,
>
> I am working on a double strand DNA, and counterions (Na+).
> I want to define a circle of 5 A° from a distinct atom from my Base.
> VMD can do that?
> Thanks for ur help,
> Josephine
>
> --
>
>
> Josephine ABI GHANEM
> IBPC, UPR 9080
> 13, rue P. et M. Curie,
> 75005 Paris, FRANCE
>
> email: josephine.abighanem_at_ibpc.fr
> tel: 01 58 41 51 67
> 06 28 07 25 71
-- NIH Resource for Macromolecular Modeling and Bioinformatics Beckman Institute for Advanced Science and Technology University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801 Email: johns_at_ks.uiuc.edu Phone: 217-244-3349 WWW: http://www.ks.uiuc.edu/~johns/ Fax: 217-244-6078
- Next message: Fred Moore: "coloring names"
- Previous message: Abi Ghanem josephine: "Draw a circle"
- In reply to: Abi Ghanem josephine: "Draw a circle"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]