Re: CIF-JSON draft 2017-05-08
- Subject: Re: CIF-JSON draft 2017-05-08
- From: Robert Hanson <hansonr@xxxxxxxxxx>
- Date: Mon, 8 May 2017 11:45:49 -0500
- DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=stolaf.edu; s=stolaf;h=mime-version:in-reply-to:references:from:date:message-id:subject:to;bh=6Gui5oRiO9TD1xOwPKNxu0B6h4kWBk2g19mw5uxjIDM=;b=KVARw6JLXDp5S7Wvys2seD6vweTBcnhEXYh7pDnGXHG9xBV2AmOuCI8/sctbK6c0upino1eEjmuOQczNv3dC7ID+uoOL9aSRbLUJZC5Q/rAEEOUVlxYeeclN7lUqWZZ0ivhW19LHco5kSMQAvv7Ue94YzjCCqcgKkkxrn6YmhSA=
- In-Reply-To: <MWHPR04MB051220BFF5C7093CD86702CCE0EE0@MWHPR04MB0512.namprd04.prod.outlook.com>
- References: <CAM+dB2cwoCG6LhPUePRup_hQtM9mXqwL4tULTPf-WGwJGtKrOA@mail.gmail.com><MWHPR04MB051220BFF5C7093CD86702CCE0EE0@MWHPR04MB0512.namprd04.prod.outlook.com>
From my perspective, the paramount issues are
1. to make CIF-JSON simple to both encode and decode (where "simple" implies lowest knowledge, not necessarily lowest effort)
2. to ensure that a CIF-JSON instance carries all the semantic information of the corresponding CIF
It is in service to both points that I raised the issue of the ambiguity between CIF lists as values on one hand and multiple values in a loop on the other.
I am satisfied to have loop tags be required so as to enable that to be disambiguated, but the more I think about it, the more convinced I become that the best solution would be to present every item’s values, whether one or many, in a JSON array.
_chem_comp_atom.comp_id CA _chem_comp_atom.atom_id CA _chem_comp_atom.alt_atom_id CA _chem_comp_atom.type_symbol CA _chem_comp_atom.charge 2 _chem_comp_atom.pdbx_align 0 _chem_comp_atom.pdbx_aromatic_flag N _chem_comp_atom.pdbx_leaving_ atom_flag N _chem_comp_atom.pdbx_stereo_ config N _chem_comp_atom.model_Cartn_x 0.000 ...
"_chem_comp_atom.model_Cartn_x" : "0.000"
"_chem_comp_atom.model_Cartn_x":["-23.107","-22.157","-23. 424"]
_chem_comp.id HOHwould become:
_chem_comp.name WATER
_chem_comp.type NON-POLYMER
_chem_comp.pdbx_type HETAS
_chem_comp.formula "H2 O"
"_chem_comp.id":["HOH"],equivalence in CIF between scalars and items in single-packet loops. If that were accepted then "loop tags" could remain optional, and perhaps the constraints on it could even be loosened relative to the original proposal.
"_chem_comp.name":["WATER"],
"_chem_comp.type":["NON-POLYMER"],
"_chem_comp.pdbx_type":["HETAS"],
"_chem_comp.formula":["H2 O"],
I am inclined to agree with Marcin, however, that the second null representation in the present proposal constitutes an ugly wart (and I acknowledge my contribution to the present state of the proposal in that area).
(3) Made loop tags compulsory
loop_
_parent_propagation_vector.id
_parent_propagation_vector.kxkykz
k1 [-0.75 0.75 -0.75]
"_parent_propagation_vector.id": ["k1"]
"_parent_propagation_vector.kxkykz": [[-0.75 0.75 -0.75]]
or equivalently:
"_parent_propagation_vector.id": "k1"
"_parent_propagation_vector.kxkykz": [-0.75 0.75 -0.75]
Thus, if we happened upon the kxkykz entry first, we might presume we had a loop in the second case. We would have to know the context -- that kxkykz is always an array. But how/why would we know that context? And in some imaginable case, we might have:
"_parent_propagation_vector.kxkykz": [-0.75 0.75 -0.75]
"_parent_propagation_vector.gxgygz": [-0.75 0.75 -0.75]
?
_______________________________________________ cif-developers mailing list cif-developers@iucr.org http://mailman.iucr.org/cgi-bin/mailman/listinfo/cif-developers
Reply to: [list | sender only]
- Follow-Ups:
- RE: CIF-JSON draft 2017-05-08 (Bollinger, John C)
- References:
- CIF-JSON draft 2017-05-08 (James Hester)
- RE: CIF-JSON draft 2017-05-08 (Bollinger, John C)
- Prev by Date: RE: CIF-JSON draft 2017-05-08
- Next by Date: RE: CIF-JSON draft 2017-05-08
- Prev by thread: RE: CIF-JSON draft 2017-05-08
- Next by thread: RE: CIF-JSON draft 2017-05-08
- Index(es):