Thanks for the file. Turns out I had to add the <?xml version="1.0" ?> tag and remove the <crystal> section before I could get Jmol to read it.
Also, the appears to be a typo in the CML documentation at http://www.xml-cml.org/dtdschema/cmlCore/HTMLDOCS/ Under the <crystal> section, the documentation says that the lattice angles must be specified in the order alpha, gamma, beta, but the example posted therein, as well as all of the files I've found on the site there, have the angles specified in the order alpha, beta, gamma. Minor quibble, I realize.
CML has really turned out to be a nice format. I confess that I haven't looked at it in a year or so, and I'm really impressed with its flexibility. I've decided to stop using .xyz format as my standard and will start using .cml for everything.
On Friday, October 10, 2003, at 10:35 AM, Peter Murray-Rust wrote:
At 15:16 09/10/2003 -0600, Rick Muller wrote:Actually, this didn't work. I took the output from a couple of ABINIT runs I had sitting around. Both loaded nicely into Jmol when I parsed the output file. However, when I saved the file as CML, and re-loaded it into Jmol, it didn't work.
Looking at the resulting CML (attached) there doesn't appear to be any crystal specific information in the file. Which is what I was looking for in the first place.
I'm grateful for any help anyone can offer...
Here is a CML file with crystal info I have generated from a crystal structure (CIF). [Apologies for the size but I don't like posting attachments to lists.] Please feel free to add it to the Jmol distribution.
IIRC the <crystal> element cause problems with Jmol and the molecule didn't display. This may have been fixed. I think the file conforms to the Schema - but it will be better to use <symmetry> elements in <crystal> - I haven't got around to converting the letters to > matrices.
Note that each atom has both fractional and Cartesian coords.
P.
<molecule>
<crystal>
<scalar dictRef="cml:a">10.0321</scalar>
<scalar dictRef="cml:b">33.0634</scalar>
<scalar dictRef="cml:c">7.4379</scalar>
<scalar dictRef="cml:alpha">90.00</scalar>
<scalar dictRef="cml:beta">93.193</scalar>
<scalar dictRef="cml:gamma">90.00</scalar>
<list id="symm" title="symmetry">
<scalar dictRef="cml:symmpos">x, y, z</scalar>
<scalar dictRef="cml:symmpos">-x, y+1/2, -z+1/2</scalar>
<scalar dictRef="cml:symmpos">-x, -y, -z</scalar>
<scalar dictRef="cml:symmpos">x, -y-1/2, z-1/2</scalar>
</list>
</crystal>
<atomArray>
<atom id="a1" elementType="Cl" xFract="0.59866" yFract="0.01974" zFract="-0.21423" x3="5.996493415258073" y3="0.6526715160000004" z3="-1.9279424524947295"/>
<atom id="a2" elementType="N" xFract="0.6121" yFract="0.09690" zFract="-0.2956" x3="6.13111552380227" y3="3.2038434600000008" z3="-2.5406744213655896"/>
<atom id="a3" elementType="C" xFract="0.6765" yFract="0.12959" zFract="-0.3561" x3="6.776179793909877" y3="4.284686006" z3="-3.026653007830128"/>
<atom id="a4" elementType="H" xFract="0.6268" yFract="0.15406" zFract="-0.3617" x3="6.278358455022485" y3="5.093747404" z3="-3.040533724036843"/>
<atom id="a5" elementType="N" xFract="0.8009" yFract="0.13187" zFract="-0.4089" x3="8.02223562001836" y3="4.360070558" z3="-3.488886754789578"/>
<atom id="a6" elementType="C" xFract="0.8633" yFract="0.09631" zFract="-0.3946" x3="8.64726683825927" y3="3.184336054000001" z3="-3.417392854904286"/>
<atom id="a7" elementType="C" xFract="0.8095" yFract="0.06004" zFract="-0.3361" x3="8.108377743045152" y3="1.9851265360000006" z3="-2.9522131700938488"/>
<atom id="a8" elementType="C" xFract="0.6788" yFract="0.06244" zFract="-0.2877" x3="6.799217803556577" y3="2.0644786960000006" z3="-2.519185849132433"/>
<atom id="a9" elementType="N" xFract="0.9023" yFract="0.02918" zFract="-0.3404" x3="9.03791134965984" y3="0.9647900120000006" z3="-3.0360512187259787"/>
<atom id="a10" elementType="C" xFract="1.0081" yFract="0.04700" zFract="-0.3999" x3="10.097659793408052" y3="1.5539798000000007" z3="-3.5377255286320057"/>
<atom id="a11" elementType="H" xFract="1.0891" yFract="0.03303" zFract="-0.4170" x3="10.908998394009235" y3="1.0920841020000005" z3="-3.710175055800137"/>
<atom id="a12" elementType="N" xFract="0.9919" yFract="0.08745" zFract="-0.4355" x3="9.935392073287815" y3="2.8913943300000007" z3="-3.79346248119838"/>
<atom id="a13" elementType="C" xFract="1.0892" yFract="0.11720" zFract="-0.4945" x3="10.910000046602569" y3="3.875030480000001" z3="-4.286668184117628"/>
<atom id="a14" elementType="H" xFract="1.0484" yFract="0.13283" zFract="-0.5969" x3="10.501325788521974" y3="4.391811422000001" z3="-5.025510790581088"/>
<atom id="a15" elementType="H" xFract="1.1108" yFract="0.13638" zFract="-0.3949" x3="11.126357006762884" y3="4.509186492000001" z3="-3.557923060695796"/>
<atom id="a16" elementType="C" xFract="1.2125" yFract="0.09858" zFract="-0.5493" x3="12.145037694184369" y3="3.259389972000001" z3="-4.763163069584672"/>
<atom id="a17" elementType="C" xFract="1.3146" yFract="0.08546" zFract="-0.5939" x3="13.167724991979194" y3="2.825598164000001" z3="-5.151945171743513"/>
<atom id="a18" elementType="H" xFract="1.3970" yFract="0.07486" zFract="-0.6299" x3="13.993086728887064" y3="2.475126124000001" z3="-5.465753305356525"/>
<atom id="a19" elementType="Cl" xFract="0.56889" yFract="0.14440" zFract="0.17211" x3="5.698301438222306" y3="4.77435496" z3="0.9622508086224961"/>
<atom id="a20" elementType="N" xFract="0.6249" yFract="0.06816" zFract="0.2443" x3="6.259327055749124" y3="2.2536013440000007" z3="1.4678953639954957"/>
<atom id="a21" elementType="C" xFract="0.7077" yFract="0.03607" zFract="0.2479" x3="7.088695403030333" y3="1.1925968380000005" z3="1.4484045571125177"/>
<atom id="a22" elementType="H" xFract="0.6726" yFract="0.01178" zFract="0.2944" x3="6.73711534276982" y3="0.3894868520000005" z3="1.8138801965520408"/>
<atom id="a23" elementType="N" xFract="0.8324" yFract="0.03379" zFract="0.1951" x3="8.33775618691882" y3="1.1172122860000004" z3="0.9860031752005931"/>
<atom id="a24" elementType="C" xFract="0.8733" yFract="0.06930" zFract="0.1319" x3="8.74743209759275" y3="2.2912936200000007" z3="0.4930736633465619"/>
<atom id="a25" elementType="C" xFract="0.7991" yFract="0.10492" zFract="0.1197" x3="8.004205873338334" y3="3.4690119280000005" z3="0.44379299492526936"/>
<atom id="a26" elementType="C" xFract="0.6717" yFract="0.10245" zFract="0.1793" x3="6.7281004694298066" y3="3.3873453300000005" z3="0.9582808114094648"/>
<atom id="a27" elementType="N" xFract="0.8724" yFract="0.13584" zFract="0.0473" x3="8.738417224252737" y3="4.491332256000001" z3="-0.1356697717960143"/>
<atom id="a28" elementType="C" xFract="0.9874" yFract="0.11843" zFract="0.0186" x3="9.89031770658775" y3="3.9156984620000004" z3="-0.4133975669112616"/>
<atom id="a29" elementType="H" xFract="1.0593" yFract="0.13245" zFract="-0.0313" x3="10.610505921195465" y3="4.379247330000002" z3="-0.8247252871876639"/>
<atom id="a30" elementType="N" xFract="0.9949" yFract="0.07850" zFract="0.0664" x3="9.96544165108786" y3="2.5954769000000004" z3="-0.06205682072312568"/>
<atom id="a31" elementType="C" xFract="1.1057" yFract="0.04971" zFract="0.0484" x3="11.07527272450281" y3="1.6435816140000006" z3="-0.257852196503729"/>
<atom id="a32" elementType="H" xFract="1.1354" yFract="0.03938" zFract="0.1690" x3="11.372763544723243" y3="1.3020366920000006" z3="0.6225626832012897"/>
<atom id="a33" elementType="H" xFract="1.0737" yFract="0.02643" zFract="-0.0258" x3="10.754743894635677" y3="0.8738656620000007" z3="-0.791863314906443"/>
<atom id="a34" elementType="C" xFract="1.2185" yFract="0.06855" zFract="-0.0348" x3="12.205136849784456" y3="2.266496070000001" z3="-0.9397162186341628"/>
<atom id="a35" elementType="C" xFract="1.3116" yFract="0.08223" zFract="-0.1033" x3="13.137675414179151" y3="2.718803382000001" z3="-1.5012350822187674"/>
<atom id="a36" elementType="H" xFract="1.3866" yFract="0.09326" zFract="-0.1585" x3="13.888914859180245" y3="3.0834926840000008" z3="-1.9537159003374067"/>
<atom id="a37" elementType="Cl" xFract="1.37176" yFract="0.31091" zFract="0.18674" x3="13.740269614329362" y3="10.279741694000004" z3="0.622437037978335"/>
<atom id="a38" elementType="N" xFract="1.3361" yFract="0.23243" zFract="0.1856" x3="13.383080299546174" y3="7.6849260620000015" z3="0.6338840399958106"/>
<atom id="a39" elementType="C" xFract="1.2613" yFract="0.19923" zFract="0.2095" x3="12.63384415973175" y3="6.587221182000001" z3="0.8534468314794671"/>
<atom id="a40" elementType="H" xFract="1.3041" yFract="0.17404" zFract="0.1916" x3="13.062551469679041" y3="5.754354136000001" z3="0.6963925015930966"/>
<atom id="a41" elementType="N" xFract="1.1348" yFract="0.19723" zFract="0.2550" x3="11.366753629163236" y3="6.521094382000001" z3="1.262557353106239"/>
<atom id="a42" elementType="C" xFract="1.0819" yFract="0.23368" zFract="0.2747" x3="10.83687940728913" y3="7.726255312000001" z3="1.4386436130592526"/>
<atom id="a43" elementType="C" xFract="1.1472" yFract="0.27040" zFract="0.2548" x3="11.49095855073675" y3="8.94034336" z3="1.254140861737291"/>
<atom id="a44" elementType="C" xFract="1.2788" yFract="0.26772" zFract="0.2103" x3="12.809133363565337" y3="8.851733448000001" z3="0.8496184459184514"/>
<atom id="a45" elementType="N" xFract="1.0616" yFract="0.30230" zFract="0.2852" x3="10.633543930842167" y3="9.99506582" z3="1.5280848615100315"/>
<atom id="a46" elementType="C" xFract="0.9503" yFract="0.28438" zFract="0.3226" x3="9.518704594460543" y3="9.402569692000002" z3="1.8684548888780925"/>
<atom id="a47" elementType="H" xFract="0.8722" yFract="0.29891" zFract="0.3497" x3="8.736413919066068" y3="9.882980894000001" z3="2.113662944838969"/>
<atom id="a48" elementType="N" xFract="0.95527" yFract="0.24320" zFract="0.3195" x3="9.56848672834928" y3="8.041018880000001" z3="1.8426202464987638"/>
<atom id="a49" elementType="C" xFract="0.8484" yFract="0.21391" zFract="0.3507" x3="8.498020601852387" y3="7.072591894000001" z3="2.1343998844019505"/>
<atom id="a50" elementType="H" xFract="0.8182" yFract="0.20140" zFract="0.2345" x3="8.195521518665279" y3="6.658968760000001" z3="1.2869911562843892"/>
<atom id="a51" elementType="H" xFract="0.8845" yFract="0.19217" zFract="0.4309" x3="8.859617188046247" y3="6.353793578000001" z3="2.710747391787512"/>
<atom id="a52" elementType="C" xFract="0.7345" yFract="0.23259" zFract="0.4315" x3="7.357138298044058" y3="7.6902162060000006" z3="2.799027608024791"/>
<atom id="a53" elementType="C" xFract="0.6405" yFract="0.24657" zFract="0.4953" x3="6.415584860309351" y3="8.152442538" z3="3.3260912464668193"/>
<atom id="a54" elementType="H" xFract="0.5645" yFract="0.25787" zFract="0.5470" x3="5.654328889374908" y3="8.526058958" z3="3.753098197760374"/>
</atomArray>
<bondArray>
<bond atomRefs2="a1 a8" order="1"/>
<bond atomRefs2="a2 a3" order="2"/>
<bond atomRefs2="a2 a8" order="1"/>
<bond atomRefs2="a3 a4" order="1"/>
<bond atomRefs2="a3 a5" order="1"/>
<bond atomRefs2="a5 a6" order="2"/>
<bond atomRefs2="a6 a7" order="1"/>
<bond atomRefs2="a6 a12" order="1"/>
<bond atomRefs2="a7 a8" order="1"/>
<bond atomRefs2="a7 a9" order="2"/>
<bond atomRefs2="a9 a10" order="1"/>
<bond atomRefs2="a10 a11" order="1"/>
<bond atomRefs2="a10 a12" order="1"/>
<bond atomRefs2="a12 a13" order="1"/>
<bond atomRefs2="a13 a14" order="1"/>
<bond atomRefs2="a13 a15" order="1"/>
<bond atomRefs2="a13 a16" order="1"/>
<bond atomRefs2="a16 a17" order="3"/>
<bond atomRefs2="a17 a18" order="1"/>
<bond atomRefs2="a19 a26" order="1"/>
<bond atomRefs2="a20 a21" order="2"/>
<bond atomRefs2="a20 a26" order="1"/>
<bond atomRefs2="a21 a22" order="1"/>
<bond atomRefs2="a21 a23" order="1"/>
<bond atomRefs2="a23 a24" order="2"/>
<bond atomRefs2="a24 a25" order="1"/>
<bond atomRefs2="a24 a30" order="1"/>
<bond atomRefs2="a25 a26" order="1"/>
<bond atomRefs2="a25 a27" order="2"/>
<bond atomRefs2="a27 a28" order="1"/>
<bond atomRefs2="a28 a29" order="1"/>
<bond atomRefs2="a28 a30" order="1"/>
<bond atomRefs2="a30 a31" order="1"/>
<bond atomRefs2="a31 a32" order="1"/>
<bond atomRefs2="a31 a33" order="1"/>
<bond atomRefs2="a31 a34" order="1"/>
<bond atomRefs2="a34 a35" order="3"/>
<bond atomRefs2="a35 a36" order="1"/>
<bond atomRefs2="a37 a44" order="1"/>
<bond atomRefs2="a38 a39" order="2"/>
<bond atomRefs2="a38 a44" order="1"/>
<bond atomRefs2="a39 a40" order="1"/>
<bond atomRefs2="a39 a41" order="1"/>
<bond atomRefs2="a41 a42" order="2"/>
<bond atomRefs2="a42 a43" order="1"/>
<bond atomRefs2="a42 a48" order="1"/>
<bond atomRefs2="a43 a44" order="1"/>
<bond atomRefs2="a43 a45" order="2"/>
<bond atomRefs2="a45 a46" order="1"/>
<bond atomRefs2="a46 a47" order="1"/>
<bond atomRefs2="a46 a48" order="1"/>
<bond atomRefs2="a48 a49" order="1"/>
<bond atomRefs2="a49 a50" order="1"/>
<bond atomRefs2="a49 a51" order="1"/>
<bond atomRefs2="a49 a52" order="1"/>
<bond atomRefs2="a52 a53" order="3"/>
<bond atomRefs2="a53 a54" order="1"/>
</bondArray>
</molecule>
Rick
On Thursday, October 9, 2003, at 02:54 PM, Fabian Dortu wrote:
I have to find the time to generate a CML file from the last version of ABINIT. It is expected this file will be readable by jmol.
Fab
On Thu, 2003-10-09 at 21:49, Miguel wrote:Rick Muller [EMAIL PROTECTED]
Rick Muller [EMAIL PROTECTED]
------------------------------------------------------- This SF.net email is sponsored by: SF.net Giveback Program. SourceForge.net hosts over 70,000 Open Source Projects. See the people who have HELPED US provide better services: Click here: http://sourceforge.net/supporters.php _______________________________________________ Jmol-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jmol-users

