Which format? XML, JSON, YAML? - pdera/HPDF-file-format GitHub Wiki
C. Prescher
(1) Dioptas can create jcpds files from cif files on every platform (Dan's solution is based on pymatgen which does not work on windows). When you load a cif file it will ask for an intensity cutoff and d-spacing cutoff (to basically remove low intensity peaks and unnecessary small d-spacings). To get a jcpds, it just needs to be saved after. I also think that the editor in Dioptas can be made stand alone, so that it can be used as a general jcpds editor.
(2) I personally do not like xml, because it has the strange concept of attributes and values, which is not needed for this case in my opinion. I would vote for JSON. Those are basically text files of nested python dictionaries and can be read very easily in almost any language.The file Mark wrote in jcpds and xml would look like this by just a basic conversion:
{
'VERSION': 4,
'COMMENT': 'CaO, EOS by Richet et al., 1988',
'K0': 111.000,
'K0P': 4.20000,
'SYMMETRY': 'CUBIC',
'A':4.8106,
'VOLUME': 111.3256,
'ALPHAT': 00.00E0,
'DIHKL': [2.7774, 36, [1, 1, 1]],
'DIHKL': [2.4059, 100, [2, 0, 0]],
'DIHKL': [1.7009, 54, [2, 2, 0]],
'DIHKL': [1.4505, 16, [3, 1, 1]],
'DIHKL': [1.3888, 16, [2, 2, 2]],
'DIHKL': [1.2026, 6, [4, 0, 0]],
'DIHKL': [1.1037, 6, [3, 3, 1]],
'DIHKL': [1.0758, 16, [4, 2, 0]],
'DIHKL': [0.9819, 12, [4, 2, 2]],
'DIHKL': [0.9257, 6, [5, 1, 1]],
'DIHKL': [0.8504, 6, [4, 4, 0]],
'DIHKL': [0.8131, 10, [5, 3, 1]],
'DIHKL': [0.8018, 16, [6, 0, 0]],
}
However, I would make some rearrangements to make it more extensible and useful for different EOS or maybe even multiple in the file:
{
"VERSION": 4,
"COMMENT": "CaO, EOS by Richet et al., 1988",
"UNIT_CELL":
{
"SYMMETRY": "CUBIC",
"A":4.8106
},
"EOS":
{
"TYPE": "BM3,
"K0": 111.000,
"K0P": 4.20000,
"VOLUME": 111.3256,
"ALPHAT": 00.00E0
},
"REFLECTIONS:
{
"1": [2.7774, 36, [1, 1, 1]],
"2": [2.4059, 100, [2, 0, 0]],
"3": [1.7009, 54, [2, 2, 0]],
"4": [1.4505, 16, [3, 1, 1]],
"5": [1.3888, 16, [2, 2, 2]],
"6": [1.2026, 6, [4, 0, 0]],
"7": [1.1037, 6, [3, 3, 1]],
"8": [1.0758, 16, [4, 2, 0]],
"9": [0.9819, 12, [4, 2, 2]],
"10": [0.9257, 6, [5, 1, 1]],
"11": [0.8504, 6, [4, 4, 0]],
"12": [0.8131, 10, [5, 3, 1]],
"13": [0.8018, 16, [6, 0, 0]]
}
}
I also think the reflection list should not have d-spacings because they are easy to calculate and in case multiple EOS are saved in one jcpds, we could choose the V0, a0, b0, etc. based on the EOS. if the indices in the reflection list should be there or not on could certainly discuss.