I did something similar recently only I used xyz files. The relevant code is below. You can see it in action at:
http://web.me.com/jhansen4/iWeb/Jmol/NewJmolDiv.html code snippet: function getEnergies() { EnergyArray = new Array(); var _jmolText = document.getElementById('jmolText'); _jmolText.value = ""; var modelInfo = jmolGetPropertyAsArray("modelInfo"); var modelCount = modelInfo.modelCount; for (var i = 1; i <= modelCount; i++) { var jmolEval = 'getProperty("auxiliaryInfo.models['+i+'].modelname")'; EnergyArray[i] = parseFloat(jmolEvaluate(jmolEval,divInc).split("=") [2]); var text = "Energy = " + EnergyArray[i] + " kJ/mol\n"; _jmolText.value = _jmolText.value + text; } } in the code jmolText is the divID of the text area for displaying the energies, divInc is an id for the particular jmol applet (out of more than one on the page) Perhaps you can adapt this for your purposes. Let me know if you have any questions about it. *********************************************** Jeff Hansen Department of Chemistry and Biochemistry DePauw University 602 S. College Ave. Greencastle, IN 46135 [email protected] *********************************************** On Apr 8, 2009, at 9:54 AM, Andrew R Turner wrote: > > Hi, > > I have probably missed a really simple way to do this but I have been > trying for a while now with no success so I thought I would ask. > > I have an Jmol applet that loads the results of Gaussian calculations > (*.log files). I notice that in the pop-up menu the list of models has > the energy for the configuration appended (something like 'E(RHF) = > ...'). What I want to do is create a button on the page that displays > this string in the applet window next to the current model. > > I have attempted various combinations of jmolGetPropertyAsArray and > scoured the documentation to no avail. Does anyone know how I might do > this? > > Cheers > > Andy > > ======================================== > Dr Andrew R. Turner > e: [email protected] > t: +44 (0)131 651 3578 > p: Edinburgh Parallel Computing Centre > University of Edinburgh > EH9 3JZ > ======================================== > > -- > The University of Edinburgh is a charitable body, registered in > Scotland, with registration number SC005336. > > > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by: > High Quality Requirements in a Collaborative Environment. > Download a free trial of Rational Requirements Composer Now! > http://p.sf.net/sfu/www-ibm-com > _______________________________________________ > Jmol-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/jmol-users ------------------------------------------------------------------------------ This SF.net email is sponsored by: High Quality Requirements in a Collaborative Environment. Download a free trial of Rational Requirements Composer Now! http://p.sf.net/sfu/www-ibm-com _______________________________________________ Jmol-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/jmol-users

