On Mon, Oct 25, 2010 at 4:44 PM, Oliver Stueker <
[email protected]> wrote:

>
> I'm using an array to store the atoms that define a plane in the order
> that I want:
>
> faceDefs = [ [ {2807:*/1.1} , {2786:*/1.1} , {2813:*/1.1} ] ,  /* face  1
> */
>             [ {2757:*/1.1} , {2730:*/1.1} , {2751:*/1.1} ] ,  /* face  2 */
>             [ {2702:*/1.1} , {2723:*/1.1} , {2729:*/1.1} ] ,  /* face  3 */
>            ...
>             [ {2842:*/1.1} , {2863:*/1.1} , {2869:*/1.1} ] ]; /* face 20 */
>
> (always defining the corners clockwise from a designated start-point)
>
>
> perfect


> And if I then run e.g.:
>
> for ( var i=1 ; i <= 20 ; i++ ) {
>    var faceAtoms  = faceDefs[i]
>    plane_i = @{"plane_" + i} ;
>    line_i  = @{"normal_" + i} ;
>

"@" is only for nonmathematical commands such as SELECT and CONNECT -- the
original Jmol set. There's a note to this effect somewhere in the
documenation... In any case, you can just use:

  var plane_i  = "plane_" + i
  var line_i = "normal_" + i


>    draw @plane_i            FIXED {...@faceatoms[1]} {...@faceatoms[2]}
> {...@faceatoms[3]} ;
>

Here you should use the @ before the { } to introduce it as math:

draw ID @plane_i FIXED @{faceAtoms[1]} @{faceAtoms[2]} @{faceAtoms[3]}

I guess it works that way, but this is clearer, I think.



>    draw @line_i  @{">" + i}  FIXED LENGTH 15.0 WIDTH 1.0  PERP $...@plane_i ;
>

that one's good.


> }
>
>
> I notice that only eight of the 20 vectors point away from the center
> of the polyhedron.
>
> And those are exactly the faces for which:
>
> > Var q1 = quaternion(center1, x1, xy1)
> > Var q2 = quaternion(center2, x2, xy2)
> > rotate selected @{q2/q1}
>
> orientates my planes (from the other file) also that the attached
> chains to the outside of the polyhedron.
> (though most planes are still rotated by +120° or -120° around the
> axis  normal to the triangles center)
>
>


> I really don't know anymore where should be the bug in my code (or brain).
>
>


> Is it possible Jmol quietly reorders the reference points in commands like:
> Var q1 = quaternion(@faceAtoms[1]}, @faceAtoms[2]}, @faceAtoms[3]} )
>

no. I can guarantee that that is working perfectly. You can test that using:

reset; rotate @{!q1}

and see that it is rotating just perfectly, setting 1-2 along x and 3 above
that.


> or
> draw @plane_i            FIXED {...@faceatoms[1]} {...@faceatoms[2]}
> {...@faceatoms[3]} ;
>
>
>
almost. There appears to be a bug in the PERP option. Jmol has a bug there.
Fixing....


> Oliver
>
>
> ------------------------------------------------------------------------------
> Nokia and AT&T present the 2010 Calling All Innovators-North America
> contest
> Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
> $10 million total in prizes - $4M cash, 500 devices, nearly $6M in
> marketing
> Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store
> http://p.sf.net/sfu/nokia-dev2dev
> _______________________________________________
> Jmol-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/jmol-users
>



-- 
Robert M. Hanson
Professor of Chemistry
St. Olaf College
1520 St. Olaf Ave.
Northfield, MN 55057
http://www.stolaf.edu/people/hansonr
phone: 507-786-3107


If nature does not answer first what we want,
it is better to take what answer we get.

-- Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900
------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store 
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to