Discussion List Archives

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ddlm-group] The Grazulis eliding proposal: how to incorporateinto CIF?. .. .. .. .

Dear Herbert,

On Monday, August 01, 2011 5:48 PM, you wrote:

>The present change document is unclear about the non-inclusion of the
>terminal linefeed in all text fields.

I take it, then, that you do not find the Sugar\nFlour\nButter example in the current draft to be sufficient for this purpose.  Fair enough, but that leaves me uncertain of what kind of clarification you are looking for.  Perhaps you would be willing to suggest something specific?


>If the comment side of the original line-folding protocol is
>acceptable, the change document should say so.  Otherwise, by
>explicitly including the text field part of paragraph 26, but
>not the comment part, the impression might be created that
>the comment line folding is excluded from CIF2.

Comment folding is acceptable, _and_ it is excluded *from standardization* into CIF *syntax*.  These are compatible because
1) Folding and unfolding comments does not change the syntactic validity of CIFs
2) Comments have no meaning to CIF, other than constituting whitespace, so folded and unfolded forms are syntactically, grammatically, and even semantically equivalent from a CIF perspective.

Other kinds of comment transformation are in the same class, and are equally acceptable and equally non-standardized.  For example, one could imagine transforming CIF comments by adding, removing, or regularizing whitespace between the comment start character and the first printable character.

The CIF syntax specifications do not require any particular handling of comments beyond treating them as whitespace.  Processors aren't required even to retain them or pass them on to an application, though they are certainly permitted to do so.  Likewise, they are permitted perform any transformation they wish on comment bodies.  There is no advantage in choosing any one particular transformation to promote from a "may" to a "must".

Text field prefixing provides a good contrast.  It must be included in the syntax if we want it, because it imposes additional syntax requirements on text fields (either their bodies must not start with a prefix or every line must be prefixed as specified by the protocol).

Text field line folding is in the middle.  It doesn't impose any additional syntactic constraints, but its inclusion would be justified by its role in ensuring that CIF syntax is capable of expressing arbitrary string values.  There is no analogous general mandate for CIF comments.

If it would help, I would be happy to add a brief clarifying remark to Change 11 that summarizes the status of comment line folding in CIF2.  For example: "Although CIF 1.1's common semantic features include an analogous line-folding protocol for comments, that protocol is not incorporated into CIF 2.0 _syntax_.  Although it remains outside the scope of CIF syntax, it is anticipated that some CIF 2.0 processors will continue to recognize that protocol."

>The question on a terminal ;\ was not whether is it syntactically
>correct under the current CIF2 document, but what the document
>expects us to do about it.

The CIF syntax specification does not answer that question.  CIF syntax places no particular expectations on what processors should do with input that fails to be well-formed CIF.  Indeed, it places very few expectations even on what they should do with input that *is* well-formed CIF.

>  It comes up because in existing
>validation suites for the line-folding protocol under CIF1, rather
>than treating as an error, it uses it as a way to allow an
>embedded \n; in a line-folded text field.  Inasmuch as we are
>in agreement that \n;\ is not a syntactically valid termination
>of a text field in CIF2 as defined in the change document, there
>is no harm in those of us who use the construct under as a
>non-conflicting extension to CIF1 to continue to do so under CIF2.

That is a question of application design, not CIF syntax.  It is perilous to write files using that formalism, as some CIF processors would certainly reject them, but that's outside the scope of the spec.  The spec merely defines that such files are not well-formed CIFs.  As for reading files that use it, I adapt an old saw from the Fortran community: if the file does not comply with the CIF specifications then a processor may do anything it wants with it, including starting World War III.  I do trust that most CIF readers will exercise greater restraint, however.



John C. Bollinger, Ph.D.
Department of Structural Biology
St. Jude Children's Research Hospital

Email Disclaimer:  www.stjude.org/emaildisclaimer

ddlm-group mailing list

Reply to: [list | sender only]
International Union of Crystallography

Scientific Union Member of the International Science Council (admitted 1947). Member of CODATA, the ISC Committee on Data. Partner with UNESCO, the United Nations Educational, Scientific and Cultural Organization in the International Year of Crystallography 2014.

International Science Council Scientific Freedom Policy

The IUCr observes the basic policy of non-discrimination and affirms the right and freedom of scientists to associate in international scientific activity without regard to such factors as ethnic origin, religion, citizenship, language, political stance, gender, sex or age, in accordance with the Statutes of the International Council for Science.