Dear Bob,
I try to list frequencies and models of one my crystal output in an external
html list menu.
I found this function in one of your example about vibrations in benzene! See
below.
What would I need to change to make it reading my CRYSTAL frequencies or
models? should I modify var Info = jmolGetPropertyAsArray("auxiliaryinfo") as
var Info = jmolGetPropertyAsArray("model") ??
Another question is: I want to save in a variable the name of the external file
I saved! How can I retrive the filename when I load it as "load ?" ?
Thanks, Piero
//jmolInitialize(".");
function loadVibs(){
var Info = jmolGetPropertyAsArray("auxiliaryinfo")
if(!Info){
alert("No auxiliaryInfo")
return
}
Info=Info.VibFreqs
if(!Info){
alert("No VibFreqs")
return
}
var s="<select id=vib onchange='showFrame(value)'
onkeypress='showFrame()'><option value='1'>no vibration (model 1)</option>";
for(var i=0;i<Info.length;i++)
s+="<option value='"+(i+2)+"'>"+Info[i].freq + " cm-1
"+Info[i].label+"</option>"
s+="</select>"
document.getElementById("freqDiv").innerHTML = s
}
function showFrame(i){
if(arguments.length == 0){
setTimeout("showFrame(-1)",100)
return
}
if(i==-1) {
var d=document.getElementById("vib")
i=d[d.selectedIndex].value
}
jmolScript("frame " + i)
}
--
Pieremanuele Canepa
Room 104
Functional Material Group
School of Physical Sciences, Ingram Building,
University of Kent, Canterbury, Kent,
CT2 7NH
United Kingdom
e-mail: [email protected]
mobile: +44 (0) 7772-9756456
-----------------------------------------------------------
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Jmol-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-developers