At 13:42 02/06/2004 +0200, Miguel wrote:
> hi Miguel, > > I just tried to load an mmcif file in the latest JmolApplet, but ran > into a slew of errors (below). I am using 1d66.cif downloaded straight > from the RCSB. any ideas?
The problem with 1D66.cif is being caused by the fact that they are using a single quote character inside a single quoted string.
ATOM 61 O 'O5'' . G [snip]
That is confusing the parser. I am not aware of *any* other format that allows one to store a quote within a string in this manner. What is the rule for determining that the string is over?
There is a formal grammar for CIF (see http://www.iucr.org/iucr-top/cif/index.html) which confirms this. The textual explanation is
14. Matching single or double quote characters (' or ") may be used to bound a string representing a non-simple data value provided the string does not extend over more than one line.
15. Because data values are invariably separated from other tokens in the file by white space, such a quote-delimited character string may contain instances of the character used to delimit the string provided they are not followed by white space. For example, the data item
_example 'a dog's life'
is legal; the data value is a dog's life.
[PMR - the terminating character(s) are quote+whitespace. That would mean that: _example 'Jones' life' would be an error
Where in the world did they come up with this?
The CIF format was developed in that late 1980's under the aegis of the International Union of Crystallography (I am a consultant to the COMCIFs committee). It was ratified by the Union and there have been several workshops. mmCIF is an extension of CIF which includes a relational structure. The formal publications are:
Hall, S. R. (1991). "The STAR File: A New Format for Electronic Data Transfer and Archiving", J. Chem. Inform. Comp. Sci., 31, 326-333. Hall, S. R., Allen, F. H. and Brown, I. D. (1991). "The Crystallographic Information File (CIF): A New Standard Archive File for Crystallography", Acta Cryst., A47, 655-685. Hall, S.R. & Spadaccini, N. (1994). "The STAR File: Detailed Specifications," J. Chem. Info. Comp. Sci., 34, 505-508.
CIF was developed pre-XML when there were few communal activities in creating structured documents. STAR (a superset of CIF) is formally about as powerful as XML). There is a cascade of DDL->dictionary->instances which corresponds roughly to XML's schemaSchema -> schema -> instances.
IMO CIF was ahead of its time. It needs the same sort of apparatus that XML has developed, parsers, schemas, validation, transformation, databases, etc. The crystallographic community is smaller than the XML community so it has taken time to develop tools and to get feedback on semantics. We are currently working with smallMolecule CIFs which we convert to CML before submitting to Jmol. We find a considerable variation in syntax and semantics and have to develop heuristics for these. Where possible, conversion to XML allows us to use other tools for validation, styling, and transformation.
The mmCIF syntax should be the same as basic CIF but there are additional semantics and a relational-like structure. This can represent quite complex objects and will probably required adding additional protein-based concepts to Jmol.
P.
Peter Murray-Rust Unilever Centre for Molecular Informatics Chemistry Department, Cambridge University Lensfield Road, CAMBRIDGE, CB2 1EW, UK Tel: +44-1223-763069
------------------------------------------------------- This SF.Net email is sponsored by the new InstallShield X.
From Windows to Linux, servers to mobile, InstallShield X is the one
installation-authoring solution that does it all. Learn more and evaluate today! http://www.installshield.com/Dev2Dev/0504 _______________________________________________ Jmol-developers mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jmol-developers
