OK, sorry, I'm wrong. Let me clear up my mess:

APPLET:

Vibration vectors are available along with atom data using

var Data = jmolGetPropertyAsArray("atomInfo","[some atom expression]")

for example:

var atomInfo = jmolGetPropertyAsArray("atominfo","model=2")

This returns

atomInfo=new Array()
atomInfo[0]=new Array()
atomInfo[0].element="hydrogen"
atomInfo[0].visible=false
atomInfo[0].model=2
atomInfo[0].radius=0.5
atomInfo[0].visibilityFlags=8
atomInfo[0].clickabilityFlags=8
atomInfo[0].bondCount=1
atomInfo[0].atomno=1
atomInfo[0].elemno=1
atomInfo[0].vibVector=new Array()
atomInfo[0].vibVector[0]=0
atomInfo[0].vibVector[1]=0
atomInfo[0].vibVector[2]=0.3154
atomInfo[0].z=0
atomInfo[0].y=0
atomInfo[0].x=2.4571667
atomInfo[0].partialCharge=0
atomInfo[0].sym="H"
atomInfo[0].colix=-32767
atomInfo[0].spacefill=0.24
atomInfo[0].color="ffffff"
atomInfo[0].info="H1/2 #1"
atomInfo[0]._ipt=12
atomInfo[0].formalCharge=0
...
So, for the applet, that's all the information you need to construct a 
model.

APPLICATION:

Here you would have to construct the model using Jmol scripting. 
Unfortunately, right now there is no
simple way of getting the vibration vector for a specific atom. The 
following, though, will be implemented in Jmol 11.3.27.

#This is Jmol script. You would have this in a .spt file and run it 
using the script command
function getVectors(modelNumber, scaleFactor);
    var theatoms = {model=modelNumber}
    var n = theatoms.size;
    var s = "" + n + "\n";
    var s = s + "max vibration for model " + modelNumber + "\n";
    for (var i = 1; i <= n; i=i+1);
        s = s + theatoms[i].label("%e");
        s = s + " " +(theatoms[i].x + theatoms[i].vx*scaleFactor);
        s = s + " " +(theatoms[i].y + theatoms[i].vy*scaleFactor);
        s = s + " " +(theatoms[i].z + theatoms[i].vz*scaleFactor);
        s = s + "\n";
    end for;
    return s;
end function;

#---------------

Then what you can do is, for example:

x = getVectors(3,1)
write variable x "myfile.xyz"


Bob Hanson










Sebastian Schwieger wrote:

>The application.
>I just found http://jmol.sourceforge.net/jslibrary/ but this only talks 
>about the applet (as far as I've read and understood it) . So is it 
>possible with the application as well?
>
>Thanks,
>Sebastian
>
>Bob Hanson schrieb:
>  
>
>>are you using the applet or the application?
>>
>>Sebastian Schwieger wrote:
>>
>>    
>>
>>>Hi Bob,
>>>
>>>I'm using Gaussian03 output.
>>>Is there a example or tutorial on how to to implement the use of 
>>>functions in Jmol.js?
>>>
>>>Thanks,
>>>Sebastian Schwieger
>>>
>>>Bob Hanson schrieb:
>>> 
>>>
>>>      
>>>
>>>>Some preliminary work related to this was done. For Mopac and Spartan 
>>>>files, vibration information is available via Jmol.js using the 
>>>>jmolGetPropertyAsArray() function:
>>>>
>>>>VibrationData = jmolGetPropertyAsArray("auxiliaryInfo").vibration
>>>>
>>>>Then VibrationData[0] is the data for the first vibrational mode, 
>>>>VibrationData[1] is the data for the second vibrational mode, etc.
>>>>Within each of those, [0] is for the first atom, [1] is for the second 
>>>>atom, etc.
>>>>Within each of those, [0] is for x, [1] is for y, and [2] is for z
>>>>
>>>>So the vibration vector for the 3rd vibrational mode, atomno=2 is
>>>>
>>>>VibrationData[2][1][0],VibrationData[2][1][1],VibrationData[2][1][2]
>>>>
>>>>Then you can do with that whatever you want. Similarly,
>>>>
>>>>FrequencyData = jmolGetPropertyAsArray("auxiliaryInfo").VibFreqs
>>>>
>>>>This could be expanded to the other model types easily enough if desired.
>>>>
>>>>What file type are you using?
>>>>
>>>>Bob
>>>>
>>>>Sebastian Schwieger wrote:
>>>>
>>>>   
>>>>
>>>>        
>>>>
>>>>>Dear jmol users and developers,
>>>>>
>>>>>can I write xyz coordinates of a molecule corresponding to a 
>>>>>displacement along a vibrational mode?
>>>>>I can animate the vibration, but did not figure out how to export the 
>>>>>animated structure. Actually, I don't need the animation, but the two 
>>>>>structures corresponding to the largest amplitude.
>>>>>
>>>>>Any help is appreciated.
>>>>>
>>>>>Sebastian Schwieger
>>>>>
>>>>>-------------------------------------------------------------------------
>>>>>This SF.net email is sponsored by: Microsoft
>>>>>Defy all challenges. Microsoft(R) Visual Studio 2005.
>>>>>http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
>>>>>_______________________________________________
>>>>>Jmol-users mailing list
>>>>>[email protected]
>>>>>https://lists.sourceforge.net/lists/listinfo/jmol-users
>>>>>
>>>>>
>>>>>     
>>>>>
>>>>>          
>>>>>
>>>>   
>>>>
>>>>        
>>>>
>>>-------------------------------------------------------------------------
>>>This SF.net email is sponsored by: Microsoft
>>>Defy all challenges. Microsoft(R) Visual Studio 2005.
>>>http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
>>>_______________________________________________
>>>Jmol-users mailing list
>>>[email protected]
>>>https://lists.sourceforge.net/lists/listinfo/jmol-users
>>> 
>>>
>>>      
>>>
>>    
>>
>
>
>-------------------------------------------------------------------------
>This SF.net email is sponsored by: Microsoft
>Defy all challenges. Microsoft(R) Visual Studio 2005.
>http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
>_______________________________________________
>Jmol-users mailing list
>[email protected]
>https://lists.sourceforge.net/lists/listinfo/jmol-users
>  
>


-- 
Robert M. Hanson
Professor of Chemistry
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



-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to