MolSSI / QCSchema

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

How to represent periodic systems in QCSchema? #86

Open aizvorski opened 3 months ago

aizvorski commented 3 months ago

Is there a way to represent periodic systems? I searched the documentation but couldn't find anything. If not, is there interest in adding this?

It seems the minimum is to add a key "box_vectors" with a value containing the three vectors (flattened into a single list if you prefer). The meaning would be the same as OpenMM's Topology.getPeriodicBoxVectors().

A more ambitious version of this feature would include all the same info that is in CIF files, which have ways to represent symmetrical sites inside a unit cell (as symmetry ops under _symmetry_equiv_pos_as_xyz) as well as the unit cell (typically as length_a, length_b, length_c, angle_alpha, angle_beta, angle_gamma - equivalent to box_vectors). Ideally (and for ease of conversion) it might be literally the same info as in CIF files, possibly except for converting the units.

ghutchis commented 3 months ago

If QCSchema is still alive, I'd suggest it should borrow what we did for Avogadro Chemical JSON https://github.com/OpenChemistry/chemicaljson/blob/60f8a37a160706960c3591a5a508609400ec9122/chemicaljson.py#L166

We prefer the cellVectors, and use a, b, c, alpha, beta, gamma if needed.

Unfortunately, in my experience, not all CIF files include symmetrical sites, which is why we use space group / Hall number information to help identify symmetrically equivalent sites.

But I'd certainly be happy to add these to https://github.com/OpenChemistry/chemicaljson

loriab commented 3 months ago

Yes, there's avid interest in adding periodic spec in just the way you suggest. It's in the plans, but there's no timeframe, unfortunately.