On Sun, Jul 8, 2012 at 6:54 PM, Kubasik, Matt <[email protected]>wrote:

> Thanks, Bob, I will use the syntax you recommend below.  On my machine (OS
> X with Jmol 12.3.31) , no "" needed for the atom expression.
>
> It seems like
>
> x = getProperty("atominfo.x", {_N}[7])
> Show x
>
> yes -- right, that's it. My error there. I'm glad you've got that
mechanism now. Much better.



> Gives x as a the sole element of a vector, whereas the syntax I was trying
> to use (x=getproperty(atominfo[10].x) ) offers x as a number (when it
> offers a result in Jmol.jar).
>
> I suppose this result makes sense, since x = getProperty("atominfo",
> {_N}[7]) offers the full array of all atom properties.  Excellent!
>
>
The idea here is to deliver as little extra as possible. If you were to use
{*} with atom properties with a protein and then filter it, that would be
really a lot of wasted flips. Jmol's scripting language is not compiled in
any optimized way, so thinks like this:

  for (var i = 1; i < {protein}.length; i++)

is VERY inefficient and way worse than

  for(var i = {protein}.length; i > 0; --i)

Maybe the next generation of Jmol guru's can clean that up, but that's just
the way it is for now.

Bob





> From: Robert Hanson <[email protected]<mailto:[email protected]>>
> Reply-To: <[email protected]<mailto:
> [email protected]>>
> Date: Sun, 8 Jul 2012 16:19:43 -0500
> To: <[email protected]<mailto:
> [email protected]>>
> Subject: Re: [Jmol-users] Jmol .jar vs JmolData.jar: help with getproperty
>
> OK, I know what it is. Good idea to use -onx; ignore the last comment. The
> default second parameter is "{visible}" for getProperty("atomInfo"). With
> JmolData, it is determining that nothing is visible. Which, of course, it
> isn't, but.... So I'll see what I can do about that. In the mean time, use
>
> x = getProperty("atomInfo", "{*}")
>
> or -- here's your opportunity to to that right!
>
> x = getProperty("atominfo", "{_N}[7]")
>
> There we go! Much more efficient!
>
>
>
> On Sun, Jul 8, 2012 at 4:03 PM, Robert Hanson <[email protected]<mailto:
> [email protected]>> wrote:
> I guess there's a difference there with those flags. JmolData doesn't need
> any flags because it automatically adds -onx, but there is something odd
> there. In any case, with JmolData, just do this:
>
> java  -jar $JmolData  $freqfile  -s $script
>
>
>
>
> On Fri, Jul 6, 2012 at 2:07 PM, Kubasik, Matt <[email protected]
> <mailto:[email protected]>> wrote:
> Bob,
>
>
>
> However, I'm still having difficulty with JmolData.jar and Jmol.jar.  In
> the following script, Jmol.jar prints values for getproperty, but
> JmolData.jar does not print values.
>
>
>
> bindex=({_N}[3].atomindex+1)
> print bindex
> bx=GetProperty("atomInfo["+bindex+"].x");
> print bx
>
> (No difference if using "show" or "print")
>
> For a direct comparison, the shell script I'm using invokes Jmol right
> after JmolData (Jmol 12.3.31):
>
> java  -jar $JmolData -onx  $freqfile  -s $script
> java  -jar $Jmol -onx  $freqfile  -s $script
>
>
>
>
> Any thoughts?  Is it some kind of variable typing issue? Could it be
> something with my file, which contains 322 models, the last 321 of which
> contain vibrational mode info from a Gaussian calc?
>
> The syntax bx=GetProperty("atominfo.x",bindex), where bindex={(* and
> 1.322)[29]}, seems to work in JmolData.jar (and in Jmol.jar).
>
> Matt
>
> From: Robert Hanson <[email protected]<mailto:[email protected]><mailto:
> [email protected]<mailto:[email protected]>>>
> Reply-To: <[email protected]<mailto:
> [email protected]><mailto:[email protected]
> <mailto:[email protected]>>>
> Date: Fri, 6 Jul 2012 11:38:30 -0500
> To: <[email protected]<mailto:
> [email protected]><mailto:[email protected]
> <mailto:[email protected]>>>
> Subject: Re: [Jmol-users] Jmol .jar vs JmolData.jar: help with getproperty
>
> Oh, right. You can't do that. The string must contain a simple expression
> like atomInfo[3]:
>
> print getProperty("atomInfo[" + ({_N}[7].atomIndex + 1) + "].x")
>
> Sorry about the  "+1" but  that's because atomIndex is one of the very few
> 0-based properties.
>
>
>
>
> On Fri, Jul 6, 2012 at 10:58 AM, Kubasik, Matt <[email protected]
> <mailto:[email protected]><mailto:[email protected]<mailto:
> [email protected]>>> wrote:
> Thanks, Bob.
>
> My problem is in combining atom expression syntax and the brackets in the
> getproperty command.
>
> Of the two below, the first is empty, and the second returns the correct
> value.  What is wrong with the first?
>
> nx=getproperty("atomInfo[{(_N)[7]}].x")
> print nx
>
> nx=getproperty("atomInfo.x",{(_N)[7]})
> print nx
>
> Matt
>
> From: Robert Hanson <[email protected]<mailto:[email protected]><mailto:
> [email protected]<mailto:[email protected]>><mailto:[email protected]
> <mailto:[email protected]><mailto:[email protected]<mailto:
> [email protected]>>>>
> Reply-To: <[email protected]<mailto:
> [email protected]><mailto:[email protected]
> <mailto:[email protected]>><mailto:
> [email protected]<mailto:[email protected]
> ><mailto:[email protected]<mailto:
> [email protected]>>>>
> Date: Fri, 6 Jul 2012 10:27:18 -0500
> To: <[email protected]<mailto:
> [email protected]><mailto:[email protected]
> <mailto:[email protected]>><mailto:
> [email protected]<mailto:[email protected]
> ><mailto:[email protected]<mailto:
> [email protected]>>>>
> Subject: Re: [Jmol-users] Jmol .jar vs JmolData.jar: help with getproperty
>
> Yes. The only  thing JmolData does not have is a graphical interface.
>
>
> On Thu, Jul 5, 2012 at 11:01 AM, Kubasik, Matt <[email protected]
> <mailto:[email protected]><mailto:[email protected]<mailto:
> [email protected]>><mailto:[email protected]<mailto:
> [email protected]><mailto:[email protected]<mailto:
> [email protected]>>>> wrote:
> Dear list,
>
> I am seeking guidance on getproperty (and possibly correct atom
> expressions) within JmolData.jar.  Will x=getproperty(“atominfo[nnn].xxx”}
> work in JmolData.jar?
>
> I would like to use JmolData.jar to process Gaussian output files
> containing vibrational vectors of atoms in different vibrational modes.
>
> The following sequence works fine in Jmol.jar (invoked via terminal’s
> command-line, e.g." java  -jar $Jmol -on  $freqfile  -s $script"), but it
> prints an empty string in JmolData.jar:
>
> framenumber=258
> frame @framenumber
> c_index=16
> cvibvector=getproperty("atomInfo["+c_index+"].vibVector")
> show cvibvector
>
>
> try
>
> print
>
> instead of
>
> show
>
>
>
> Is it that “frame” does not work in JmolData.jar?  Do I need a rigorous
> atom expression (for the 16th atom of the 258th frame) for JmolData.jar?
>
> As a work-around, the following syntax for getproperty places the
> vibvector for EVERY 16th atom of EVERY frame in an array in JmolData.jar:
>
> c_index=16
> allcvibes=getproperty("atominfo.vibVector",{atomno=c_index})
>
> Is there a better way to specify a particular atom of a particular
> frame/model in JmolData.jar?
>
> Matt Kubasik
> Department of Chemistry and Biochemistry
> Fairfield University
>
> PS  Getproperty "modelinfo" seems to work equally well in either Jmol.jar
> or JmolData.jar.  E.g., the following works the same in both:
>
> freq=getproperty("modelinfo.models["+framenum+"].modelProperties.Frequency");
>
>
> Details:
> Jmol Version: 12.3.31  2012-06-16 00:04
> java.vendor: Apple Inc.
> java.version: 1.6.0_31
> os.name<http://os.name><http://os.name><http://os.name>: Mac OS X
> Access: ALL
> memory: 11.3/85.0
>
>
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Jmol-users mailing list
> [email protected]<mailto:[email protected]
> ><mailto:[email protected]<mailto:
> [email protected]>><mailto:[email protected]
> <mailto:[email protected]><mailto:
> [email protected]<mailto:[email protected]
> >>>
> https://lists.sourceforge.net/lists/listinfo/jmol-users
>
>
>
> --
> Robert M. Hanson
> Larson-Anderson Professor of Chemistry
> Chair, Chemistry Department
> St. Olaf College
> Northfield, MN
> http://www.stolaf.edu/people/hansonr
>
>
> 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
>
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference Exclusive live event will cover all the
> ways today's security and threat landscape has changed and how IT managers
> can respond. Discussions will include endpoint security, mobile security
> and the latest in malware threats.
> http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/_______________________________________________Jmol-users
>  mailing list
> [email protected]<mailto:[email protected]
> ><mailto:[email protected]<mailto:
> [email protected]>><mailto:[email protected]
> <mailto:[email protected]><mailto:
> [email protected]<mailto:[email protected]>>>
> https://lists.sourceforge.net/lists/listinfo/jmol-users
>
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Jmol-users mailing list
> [email protected]<mailto:[email protected]
> ><mailto:[email protected]<mailto:
> [email protected]>>
> https://lists.sourceforge.net/lists/listinfo/jmol-users
>
>
>
> --
> Robert M. Hanson
> Larson-Anderson Professor of Chemistry
> Chair, Chemistry Department
> St. Olaf College
> Northfield, MN
> http://www.stolaf.edu/people/hansonr
>
>
> 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
>
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference Exclusive live event will cover all the
> ways today's security and threat landscape has changed and how IT managers
> can respond. Discussions will include endpoint security, mobile security
> and the latest in malware threats.
> http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/_______________________________________________Jmol-users
>  mailing list
> [email protected]<mailto:[email protected]
> ><mailto:[email protected]<mailto:
> [email protected]>>
> https://lists.sourceforge.net/lists/listinfo/jmol-users
>
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Jmol-users mailing list
> [email protected]<mailto:[email protected]>
> https://lists.sourceforge.net/lists/listinfo/jmol-users
>
>
>
> --
> Robert M. Hanson
> Larson-Anderson Professor of Chemistry
> Chair, Chemistry Department
> St. Olaf College
> Northfield, MN
> http://www.stolaf.edu/people/hansonr
>
>
> 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
>
>
>
>
>
> --
> Robert M. Hanson
> Larson-Anderson Professor of Chemistry
> Chair, Chemistry Department
> St. Olaf College
> Northfield, MN
> http://www.stolaf.edu/people/hansonr
>
>
> 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
>
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference Exclusive live event will cover all the
> ways today's security and threat landscape has changed and how IT managers
> can respond. Discussions will include endpoint security, mobile security
> and the latest in malware threats.
> http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/_______________________________________________Jmol-users
>  mailing list
> [email protected]<mailto:[email protected]>
> https://lists.sourceforge.net/lists/listinfo/jmol-users
>
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Jmol-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/jmol-users
>



-- 
Robert M. Hanson
Larson-Anderson Professor of Chemistry
Chair, Chemistry Department
St. Olaf College
Northfield, MN
http://www.stolaf.edu/people/hansonr


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
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to