Bob,

This is very helpful.  Until your note, I just couldn't figure out how to 
properly express what was supposed to go into the []!

So…

atomexp={_N}[7];show atomexp

Prints out:

atomexp = ({126})

While

atomind={_N}[7].atomindex;show atomind

Prints out:

atomind = 126

…and the ({}) makes all the difference to getproperty.

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]>>
Reply-To: 
<[email protected]<mailto:[email protected]>>
Date: Fri, 6 Jul 2012 11:38:30 -0500
To: <[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]>> 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]>>>
Reply-To: 
<[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]>>>
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]>>>
 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>: 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]>>
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


------------------------------------------------------------------------------ 
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

Reply via email to