{*}.xyz alone would give you just the average; ".all" indicates that you
want an array of values.
On Fri, Dec 4, 2009 at 1:17 AM, Jeffrey Tseng <[email protected]> wrote:
> This is great.
> After all, jmol has an internal trick.
>
> > var x = {*}.xyz.all
>
> but what dose it mean "all" ? Is this key word needed ?
>
> >
> > In fact, if you then do:
> >
> > {*}.xyz = x
>
> Did you just forget to put "all" back ? like {*}.xyz.all=x
> Dose it mean "restore" ? the molecular will be move back to the initial
> state ??
>
{atom selection}.xxx = <some array>
means "apply the values in the array to the property xxx for the selected
set of atoms sequentially (until you run out of atoms or values)
>
>
>
> This reminds me if any atom has its own variable since you use {*}
>
> For example,
> ATOM 1456 O HIS 180 -24.734 37.744 21.522 1.00 12.88.
>
> How do you access this specific atom's coordinate ?
>
>
> print {atomno=1456}.xyz
print {atomno=1456}.x
print {atomno=1456}.y
> Aslo, since Jmol provides a marco to put a group of atoms together,
> how do you access the a marco's atom coordinate.
>
> For example,
> define poc1 (GLN208.NE2,LEU210.CD2,SER267.CB,ASP269.CB);
>
> How do you access all coordinates of "poc1" ?
>
>
print {poc1}.all
print {poc1}[1]
print {poc1}[2]
etc.
> Since a macro can be nested, dose your rule apply to it ?
>
> For example,
> define poc3 (poc2,poc1);
>
>
yes. This "define" business goes way back and is an alternative to just
defining variables. I would recommend just using the variables and "="
rather than define.
>
> The final comment is about the strategy.
> It looks more complicated to use Joml to handle "transformation" than
> a way of the input of precomputed coordinates transformed by perl or
> others. For example, feeding Jmol with a transformed structure. What
> do you think ?
>
>
I don't know. It's pretty easy to do this in Jmol. I would say it depends
upon whether you want to have the capability of doing the transformation on
the fly and allowing the user to adapt -- for example, to move and rotate
one molecule relative to another using a joystick or something like that --
or just want to make one change and never change it again.
Take a look at the documentation at http://chemapps.stolaf.edu/jmol/docs
There is a lot of information there and answers to all your questions.
[Please address questions like this to [email protected]]
By the way -- matrix business was introduced in Jmol 11.9. With the very
latest (yesterday) I added the .row and .col functions, but you can extract
rows and columns already if you want to do that using xxx[1] xxx[2] xxx[3]
for rows and xxx[-1] xxx[-2] xxx[-3] for columns where xxx is a defined
matrix.
>
>
> Thanks,
>
> Jeffrey
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> >
> >
> > On Thu, Dec 3, 2009 at 11:22 PM, Jeffrey Tseng <[email protected]>
> wrote:
> >>
> >> Hi, Bob
> >>
> >> Thanks for the hints.
> >>
> >> I wonder if there is a Jmol default variable holding coordinates of
> >> all atoms so that one can apply the transformation matrix to that
> >> variable.
> >>
> >> In other words, if I would like to apply the pre-computed
> >> transformation matrix to a structure with thousands of atoms, how
> >> would you do ?
> >>
> >> If there is no such default variable, do users have to construct a
> >> variable holding coordinates of atoms of interest and then apply the
> >> transformation matrix to it ?
> >>
> >>
> >>
> >> Thanks,
> >>
> >> Jeffrey
> >>
> >>
> >>
> >>
> >> On Thu, Dec 3, 2009 at 10:47 PM, Robert Hanson <[email protected]>
> wrote:
> >> > 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
> >> >
> >>
> >>
> >>
> >> --
> >> 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
> >
>
>
>
> --
> 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