MolSSI / QCSchema

A Schema for Quantum Chemistry
http://molssi-qc-schema.readthedocs.io/en/latest/index.html#
BSD 3-Clause "New" or "Revised" License
96 stars 36 forks source link

QC-JSON working prototype -- Jmol #32

Open BobHanson opened 6 years ago

BobHanson commented 6 years ago

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

{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} == { "coordsunits":["angstroms",1.88972613], "coords":[ x1, y1, z1, x2, y2, z2,....], "symbol":["_RLE\",...run-length-encoded data...], "atomnumber":["_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...)

berquist commented 6 years ago

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.

BobHanson commented 6 years ago

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

berquist commented 6 years ago

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.