OpenChemistry / chemicaljson

Development of the Chemical JSON data representation
63 stars 15 forks source link

Clarify relative energies for 3dSets #19

Open ghutchis opened 1 year ago

ghutchis commented 1 year ago

When creating 3dSets (e.g., conformers, molecular dynamics, following an optimization or IRC) it is useful to retain multiple properties - particularly relative energies.

It's not clear the best way to do handle this.

ghutchis commented 1 year ago

After some thought, I'd like to nest this in properties:

'properties': {
    'totalCharge': 0,
    'spinMultiplicity': 1,
    'sets': {
        'totalEnergies': [ … ]
    }
}

This mirrors sets in orbitals and 3dsets in coords

ghutchis commented 1 year ago

Thoughts @cryos ? - I'd like to implement this soon (to enable conformers)

ghutchis commented 1 year ago

I was actually thinking about how to implement this, and I'd much rather have this second option:

'properties': {
    'totalCharge': 0,
    'spinMultiplicity': 1,
    'energies': [ … ]
}

The difference is that if we avoid nested objects (dictionaries, maps) in properties the parsing code just handles properties as one key/value store (e.g. energies is an array of numbers).

Thus properties would be a VariantMap for Avogadro:

The schema can then specify a few well-defined keys (e.g., totalCharge, spinMultiplicity, energies, totalEnergy, etc.)