At 08:03 01/04/2004 +0200, E.L. Willighagen wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Thursday 01 April 2004 01:05, Miguel wrote:
> I am trying to learn about CML
>

Excellent! :-)


> There are only a few examples of .cml files in the Jmol samples directory.
>
> Q: Can someone look at these files and tell me whether or not they are
> good examples for me to be working with?
> Q: Can someone take the existing files and save them in CML format with
> the same coordinates?
>   samples/caffeine.xyz
>   samples/aspirina.mol
>   samples/1crn.pdb

These can also be converted to CML with OpenBabel. (http://openbabel.sf.net) This contains a complete set of examples of conversion to and from the various dialects of CML. The dialects are:


CML-1           deprecated for new applications but supported
CML-1-array  deprecated for new applications but supported

CML-2    probably the commonest now
CML-2-array

There are two syntaxes for CML2. The first is more explicit and easier to parse while the second is more compact. I have people who will not use CML unless it is in array form and people who are the exact opposite. Fortunately modern XML tools make this fairly easy to support.

OpenBabel has a complete set of roundtrips between all formats. That is probably a good place to start.

Will do at the end of today...

> Q: Where can I find other .cml files?

See http://www.xml-cml.org


and

http://wwmm.ch.cam.ac.uk/moin/ChemicalMarkupLanguage. These pages will have the complete and emerging specs


cdk/data/cml*

*And* cdk/src/org/openscience/cdk/test/io/cml/cmlTestFramework.xml

The latter validates if opened with jEdit which has the XML plugin installed.

> samples/estron.cml and samples/glycine-crystal.cml have 'charge' values
> that are decimal values. When I look at
> http://www.xml-cml.org/dtdschema/cmlCore/EXAMPLES/concatenated.xml I see
> 'formalCharge' references which are integers.
>
> Q: Can someone give me 25 word definitions of 'charge' vs. 'formal charge'?

The formal charge is a charge indication given by humans, but molecules spread
this charge over the atoms, leading to 'partial charges'. "Charge" can be
both, but if having a decimal expect it to be a partial charge.

"formalCharge" is an attribute of atom in CML and has precisely defined semantics. "charge" is not part of CML and would have to have a non CML namespace. So a file with a charge attribute is invalid. It would be allowed to write something like:


<atom elementType="N" id="c23" formalCharge="1" jmol:charge="0.123" xmlns:jmol="http://jmol.sf.net/attributes"/>


The reason for this is that there are probably 50+ ways of describing charge. So there has to be a dictionary entry describing what they are. A typical


> Q: Why are there no references to 'charge' in concatenated.xml?

Don't know.

Because it is not part of CML. See the pages at: http://wwmm.ch.cam.ac.uk/moin/CmlSchemaComponents

for all allowed CML names (elements and attributes)

> I am looking at cmlCore.pdf
> When I look up the element 'atom' I see interesting attributes like
> 'formalCharge' and 'occupancy'. But I do not see these defined in
> cmlCore.pdf as elements.

Where did you get cmlCore.pdf from? If it doesn't have these attributes then either it is broken or you need a newer version. Bother those attributes should be there


Elements are different than attributes... like in HTML

<atom occupancy="0.5"/>

This is valid CML


Element atom has attribute occupancy.

> Q: Is this just a documentation problem?

I hope so


>
> I can search cmlCore.xsd and fine these attributes.

In that case the cmlCore.pdf is incorrect or out of date


>
> Q: Is there a tool that I should use to browse/read cmlCore.xsd?

XML-spy has a demo version which you can use for a limited period. Have a look on the http://www.w3.org pages fro XML schema. But we should have a proper version of the PDF mounted



The cmlCore schema is very big, but you could use jEdit with the XML plugin
installed and the plugin which has the Structure Browser plugin window... The
latter will give you a very nice browsing tree...

Best,


P.


Egon

- --
[EMAIL PROTECTED]
PhD on Molecular Representation in Chemometrics
Nijmegen University
http://www.cac.sci.kun.nl/people/egonw/
GPG: 1024D/D6336BA6

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (SunOS)

iD8DBQFAa7C+d9R8I9Yza6YRAhwiAJ9luThxHFVz8s/13NWoBojjlvDaywCgvW6q
8okWMh6A1dK4H+2Yn42mJTM=
=nB+s
-----END PGP SIGNATURE-----



-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.
_______________________________________________
Jmol-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jmol-developers

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: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
Jmol-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jmol-developers

Reply via email to