QCSchema icon indicating copy to clipboard operation
QCSchema copied to clipboard

How to represent periodic systems in QCSchema?

Open aizvorski opened this issue 1 year ago • 3 comments

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.

aizvorski avatar Jun 10 '24 20:06 aizvorski

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

ghutchis avatar Jun 10 '24 23:06 ghutchis

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.

loriab avatar Jun 10 '24 23:06 loriab

I am creating a prototype for periodic boundary conditions with QCSchema based on the extras field in https://github.com/grimme-lab/mctc-lib/pull/93. This will be used and supported in packages like xtb, tblite, dftd4, s-dftd3, etc.

More details in https://github.com/MolSSI/QCSchema/issues/66

awvwgk avatar Jun 01 '25 09:06 awvwgk