I'll see if I can make that clearer. You just use
x = [ [1,2,3],[4,5,6],[7,8,9]]
for the matrix. (You can also define 4x4 matrixes.)
Or if you want to get it from an axis and angle of rotation, say 34 degrees
around the x axis:
x = axisangle({1 0 0}, 34)%-9
Then you just use the standard multiply (*):
print x * {1 3 3}
print x * x
etc.
for row 3 you can use
print x[3]
or for column 1 use
print x[-1]
Jmol doesn't distinguish a column vector from a row vector --- they are just
1x3 arrays.
Starting with Jmol 11.9.12 you can use:
print x.row(3)
print x.col(1)
print x.row(3) * y.col(1)
etc.
Bob
On Thu, Dec 3, 2009 at 6:32 PM, Jeffrey Tseng <[email protected]> wrote:
> Hello Bob
>
> Thanks for your tricks for effectively presenting protein surfaces by
> Jmol.
>
> I had a question about the transformation matrix in Jmol. I tried
> to use a pre-computed transformation matrix (3x3) to rotate and move
> protein1 and to superimpose protein2.
>
> However, there are some basic Jmol commands users should have known
> about before performing the transformation.
>
> 1. how to assign a column vector (a point) to a variable
> 2. how to assign a matrix (3x3) to a variable
> 3. how to operate a column wth a matrix
> 4. how to apply a matrix to a structure coordinate
>
> I try to find these solutions yet Jmol seems difficult to perform
> these operations, for example, the order in the multiplication of a
> vector and a matrix.
>
> Would you give an example in order to perform the matrix
> transformation regard above specifc questions ?
>
> Thanks for your kind help.
>
> Jeffrey
>
> --
> Yan Yuan Tseng, PhD
> (http://pocket.uchicago.edu/ytseng/)
> Wen-Hsuing Li's Lab
> Biological Sciences Collegiate Division
> University of Chicago
>
--
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
------------------------------------------------------------------------------
Join us December 9, 2009 for the Red Hat Virtual Experience,
a free event focused on virtualization and cloud computing.
Attend in-depth sessions from your desk. Your couch. Anywhere.
http://p.sf.net/sfu/redhat-sfdev2dev
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users