QCSchema icon indicating copy to clipboard operation
QCSchema copied to clipboard

QC-JSON working prototype -- Jmol

Open BobHanson opened this issue 8 years ago • 3 comments

I have a working prototype in Jmol now. Very simple to test.

Just:

  1. download and unzip the [Jmol latest release] (https://sourceforge.net/projects/jmol/files/latest/download?source=files)
  2. start Jmol.jar and open a file...console
  3. load some Jmol-readable calculation output into Jmol using the load command or by drag-dropping into the application.
  4. issue WRITE xxx.qcjson.

A directory of prototypes produced this way is now in the jmol-data qcjson directory.

It is designed just to cover the area that I will be interested in for Jmol. Specifically:

Anyway, it is working. The purpose of this is not to force an issue, just to explore what is needed.

And one of the things I found I needed was an indication of the orbital normalization mode; maybe this is not needed in the final business, but I suggest we have that, as it would allow direct conversion from legacy output such as we have here.

Bob

  • overall format:

["magic number/version", {metadata block} {job block}, {job block}, .... ]

  • basic job/step hierarchy

{job block} == { "metadata":{....}, "steps":[{step block}, {step block},...], "mo_bases":{ basis id: {basis block}, basis id: {basis block}, .... } }

{step block} == { "metadata":{....}, "topology": {topology block}, "vibrations":[{vibration block}, {vibration block},..}, "molecular_orbitals":{molecular orbital block}, }

{topology block} == { "atoms":{atom block} }

{atom block} == { "coords_units":["angstroms",1.88972613], "coords":[ x1, y1, z1, x2, y2, z2,....], "symbol":["_RLE_",...run-length-encoded data...], "atom_number":["_RLE_",...run-length-encoded data...] }

{molecular orbital block} == { "orbitals":[{orbital block},{orbital block}...], "__jmol_calculation_type":critical jmol data", "basis_id":basis id, "__jmol_normalized":boolean, "orbitals_energy_units":["?","?"] }

{basis block} == { "gaussians":[GTO gaussians array of arrays], "shells":[GTO shells array of arrays], "slaters":[STO slaters array] }

etc. (sorry, I know that is not complete...)

BobHanson avatar Dec 15 '17 21:12 BobHanson

For others who were wondering how to run this quickly:

#!/bin/bash

stub=${1%.*}

cat <<EOF > ${stub}.spt
load ${1}
write ${stub}.qcjson
EOF

jmol -onl ${stub}.spt
rm ${stub}.spt

If you are using SSH, you must connect with -X even though no GUI is created.

berquist avatar Dec 17 '17 03:12 berquist

Also, you shouldn't need -x if you use JmolData instead of Jmol, as that version is headless.

BobHanson avatar Dec 17 '17 19:12 BobHanson

In that case, switch the jmol call to

java -jar /usr/share/jmol/JmolData.jar -onl ${stub}.spt

and the change the jar file path as necessary.

berquist avatar Dec 18 '17 22:12 berquist