openmm / spice-dataset

A collection of QM data for training potential functions
MIT License
147 stars 9 forks source link

some dimers have reverse orders of SMILES #59

Closed njzjz closed 1 year ago

njzjz commented 1 year ago
import h5py

with h5py.File("SPICE-1.1.2.hdf5", 'r') as f:
    sub = f['[br-] [k+]']
    print(sub['smiles'][:])
    print(sub['atomic_numbers'][:])

The output is:

['[K+:2].[Br-:1]']
[35 19]

The expected SMILES should be [Br-:1].[K+:2], I have reviewed des370k/createDES370K.py and don't know why the SMILES are reversed.

peastman commented 1 year ago

The order of the atoms in the SMILES string has no meaning. It represents the same pair of atoms either way. The important thing is the indices. The :1 after Br- tells you it corresponds to the first element of atomic_numbers and other fields.

njzjz commented 1 year ago

Thanks