Miguel wrote:
Todd wrote:
I just replace every single quote with a space before I call
jmolAppletInline and Jmol now works fine.
Bad news ... I am not able to reproduce this problem.
I grabbed file CIJQOB.cif from the Jmol CVS and did the following: Build an HTML page with all of the appropriate calls to jmol.js and:
used jmolApplet(400, "somedir/CIJQOB.cif") -> structure displays fine.
put the contents of CIJQOB.cif into a javascript variable (myCif), used jmolAppletInline (400, myCif) - >structure doesn't display.
put the contents of CIJQOB.cif into a javascript variable (myCif), replace all single quotes in the variable with spaces, used jmolAppletInline (400, myCif) - >structure displays fine.
Here is an html page that illustrates what I'm seeing (Firefox, Windows 2000, Sun java v 1.5, apache web server):
You'll need to adjust the jmolInitialize and <script src lines to point to the proper locations.
(miguel, I'll email you this file as an attachment also. If anyone else wants the attachment, let me know.)
When, I run the following html, I don't see a molecule. But if you uncomment the line near the bottom
myCif = myCif.replace(/'/g, " "); Then the molecule is displayed.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html> <head> <title>Untitled</title> <script src="../propdbIncl/Jmol.js"></script> </head>
<body>
<h1>starting..</h1><br>
<script>
var myCif =
"###########################################################################\n" +
"#\n" +
"# Cambridge Crystallographic Data Centre\n" +
"# CCDC \n" +
"# \n" +
"###########################################################################\n" +
"#\n" +
"# This CIF contains data generated directly from an entry in the Cambridge \n" +
"# Structural Database and will include bibliographic, chemical, crystal, \n" +
"# experimental, refinement, and atomic coordinate data, as available.\n" +
"# \n" +
"# Copyright 2004 The Cambridge Crystallographic Data Centre\n" +
"# \n" +
"# This CIF is provided on the understanding that it is used for bona fide \n" +
"# research purposes only. It may contain copyright material of the CCDC\n" +
"# or of third parties, and may not be copied or further disseminated in \n" +
"# any form, whether machine-readable or not, except for the purpose of \n" +
"# generating routine backup copies on your local computer system.\n" +
"# \n" +
"# For further information about the CCDC, data deposition and data \n" +
"# retrieval see <www.ccdc.cam.ac.uk>. Bona fide researchers may freely \n" +
"# download Mercury and enCIFer from this site to visualise CIF-encoded \n" +
"# structures and to carry out CIF format checking respectively.\n" +
"#\n" +
"###########################################################################\n" +
"\n" +
"data_CSD_CIF_CIJQOB\n" +
"_audit_creation_date 2000-03-16\n" +
"_audit_creation_method CSD-ConQuest-V1\n" +
"_database_code_CSD CIJQOB\n" +
"_database_code_depnum_ccdc_archive \'CCDC 132402\'\n" +
"_chemical_formula_sum \'C23 H35 Cl3 Ge1 O3\'\n" +
"_chemical_formula_moiety\n" +
";\n" +
"C23 H35 Cl3 Ge1 O3\n" +
";\n" +
"_journal_coden_Cambridge 95\n" +
"_journal_year 1999\n" +
"_journal_page_first 116\n" +
"_journal_name_full \'Izv.Akad.Nauk SSSR,Ser.Khim.(Russ.)(Russ.Chem.Bull.) \'\n" +
"loop_\n" +
"_publ_author_name\n" +
"\"S.A.Pogozhikh\"\n" +
"\"Yu.E.Ovchinnikov\"\n" +
"\"V.N.Khrustalev\"\n" +
"\"M.Yu.Antipin\"\n" +
"\"R.G.Karpenko\"\n" +
"\"S.P.Kolesnikov\"\n" +
"_chemical_name_systematic\n" +
";\n" +
"3\b-Acetoxy-16\b-trichlorogermyl-5\a-pregnan-20-one\n" +
";\n" +
"_cell_volume 1261.254\n" +
"_exptl_crystal_density_diffrn 1.418\n" +
"_exptl_special_details\n" +
";\n" +
"Absolute configuration\n" +
"\n" +
";\n" +
"_exptl_crystal_preparation \'ether\'\n" +
"_diffrn_ambient_temperature 150\n" +
"#These two values have been output from a single CSD field.\n" +
"_refine_ls_R_factor_gt 0.0533\n" +
"_refine_ls_wR_factor_gt 0.0533\n" +
"_symmetry_cell_setting triclinic\n" +
"_symmetry_space_group_name_H-M \'P 1\'\n" +
"_symmetry_Int_Tables_number 1\n" +
"loop_\n" +
"_symmetry_equiv_pos_site_id\n" +
"_symmetry_equiv_pos_as_xyz\n" +
"1 x,y,z\n" +
"_cell_length_a 8.6953(14)\n" +
"_cell_length_b 12.469(2)\n" +
"_cell_length_c 13.788(2)\n" +
"_cell_angle_alpha 106.420(13)\n" +
"_cell_angle_beta 107.326(12)\n" +
"_cell_angle_gamma 105.767(12)\n" +
"_cell_formula_units_Z 2\n" +
"loop_\n" +
"_atom_type_symbol\n" +
"_atom_type_radius_bond\n" +
"C 0.68\n" +
"H 0.23\n" +
"Cl 0.99\n" +
"Ge 1.27\n" +
"O 0.62\n" +
"loop_\n" +
"_atom_site_label\n" +
"_atom_site_type_symbol\n" +
"_atom_site_fract_x\n" +
"_atom_site_fract_y\n" +
"_atom_site_fract_z\n" +
"Ge1 Ge 1.49999(13) 0.49999(10) 0.99999(9)\n" +
"Cl1 Cl 1.7738(4) 0.6006(3) 1.1033(3)\n" +
"Cl2 Cl 1.3829(6) 0.3889(4) 1.0691(3)\n" +
"Cl3 Cl 1.5238(5) 0.3575(3) 0.8751(3)\n" +
"O1 O 0.2183(12) 0.4097(8) 0.2926(7)\n" +
"O2 O 0.1731(14) 0.5726(11) 0.2811(9)\n" +
"O3 O 1.4637(9) 0.6409(6) 1.1299(5)\n" +
"C1 C 0.5331(13) 0.5684(9) 0.5933(8)\n" +
"H1 H 0.5084(13) 0.5832(9) 0.6589(8)\n" +
"H2 H 0.6037(13) 0.6461(9) 0.5977(8)\n" +
"C2 C 0.3601(13) 0.5137(9) 0.4911(9)\n" +
"H3 H 0.2820(13) 0.4422(9) 0.4922(9)\n" +
"H4 H 0.3054(13) 0.5721(9) 0.4939(9)\n" +
"C3 C 0.3851(17) 0.4801(13) 0.3879(11)\n" +
"H5 H 0.4442(17) 0.5544(13) 0.3803(11)\n" +
"C4 C 0.4904(15) 0.400(1) 0.3791(9)\n" +
"H6 H 0.5168(15) 0.3921(10) 0.3144(9)\n" +
"H7 H 0.4220(15) 0.3196(10) 0.3707(9)\n" +
"C5 C 0.6638(16) 0.4577(11) 0.4851(10)\n" +
"H8 H 0.7319(16) 0.5350(11) 0.4859(10)\n" +
"C6 C 0.7700(16) 0.3792(12) 0.4747(9)\n" +
"H9 H 0.7850(16) 0.3657(12) 0.4059(9)\n" +
"H10 H 0.7080(16) 0.3010(12) 0.4735(9)\n" +
"C7 C 0.9528(14) 0.4431(10) 0.5742(8)\n" +
"H11 H 1.0141(14) 0.3887(10) 0.5705(8)\n" +
"H12 H 1.0209(14) 0.5149(10) 0.5682(8)\n" +
"C8 C 0.9396(17) 0.4800(12) 0.686(1)\n" +
"H13 H 0.8836(17) 0.4063(12) 0.6954(10)\n" +
"C9 C 0.8245(12) 0.5565(9) 0.6892(8)\n" +
"H14 H 0.8817(12) 0.6273(9) 0.6763(8)\n" +
"C10 C 0.6396(14) 0.4880(9) 0.5935(9)\n" +
"C11 C 0.8236(12) 0.6063(8) 0.8042(7)\n" +
"H15 H 0.7592(12) 0.5395(8) 0.8178(7)\n" +
"H16 H 0.7629(12) 0.6611(8) 0.8052(7)\n" +
"C12 C 1.0094(12) 0.6746(8) 0.8983(7)\n" +
"H17 H 1.0693(12) 0.7475(8) 0.8905(7)\n" +
"H18 H 1.0004(12) 0.6987(8) 0.9691(7)\n" +
"C13 C 1.1155(11) 0.5955(8) 0.8961(7)\n" +
"C14 C 1.1171(16) 0.5531(12) 0.7817(10)\n" +
"H19 H 1.1692(16) 0.6264(12) 0.7704(10)\n" +
"C15 C 1.2520(13) 0.4915(10) 0.7938(8)\n" +
"H20 H 1.2011(13) 0.4105(10) 0.7909(8)\n" +
"H21 H 1.2973(13) 0.4874(10) 0.7371(8)\n" +
"C16 C 1.3965(14) 0.5798(11) 0.9109(9)\n" +
"H22 H 1.4907(14) 0.6327(11) 0.9002(9)\n" +
"C17 C 1.3157(11) 0.6608(8) 0.9681(8)\n" +
"H23 H 1.3543(11) 0.7374(8) 0.9588(8)\n" +
"C18 C 0.1254(20) 0.4643(16) 0.2480(13)\n" +
"C19 C -0.0417(20) 0.3761(16) 0.1569(13)\n" +
"H24 H -0.0899(73) 0.4155(28) 0.1124(54)\n" +
"H25 H -0.1218(52) 0.3445(76) 0.1867(13)\n" +
"H26 H -0.0226(30) 0.3109(52) 0.1121(54)\n" +
"C20 C 0.5366(15) 0.3722(10) 0.6031(9)\n" +
"H27 H 0.6017(44) 0.3211(30) 0.6042(57)\n" +
"H28 H 0.4256(40) 0.3293(33) 0.5408(30)\n" +
"H29 H 0.5186(77) 0.3940(11) 0.6701(29)\n" +
"C21 C 1.0387(12) 0.4912(9) 0.9279(8)\n" +
"H30 H 0.9191(26) 0.4436(32) 0.8768(30)\n" +
"H31 H 1.0441(70) 0.5238(9) 1.0014(20)\n" +
"H32 H 1.1048(49) 0.4408(31) 0.9255(47)\n" +
"C22 C 1.3784(13) 0.6920(9) 1.0891(8)\n" +
"C23 C 1.3352(13) 0.7806(10) 1.1595(8)\n" +
"H33 H 1.436(3) 0.8315(43) 1.2275(27)\n" +
"H34 H 1.2414(63) 0.7389(10) 1.1752(47)\n" +
"H35 H 1.2999(88) 0.8297(41) 1.1220(26)\n" +
"Ge2 Ge -0.03386(13) 0.00088(10) 0.25646(9)\n" +
"Cl4 Cl -0.2641(4) -0.0951(3) 0.1058(3)\n" +
"Cl5 Cl -0.0580(6) 0.1493(4) 0.3652(4)\n" +
"Cl6 Cl 0.1352(5) 0.1009(4) 0.1963(3)\n" +
"O4 O 1.2309(13) 0.0854(10) 0.9659(8)\n" +
"O5 O 1.3238(15) -0.0633(11) 0.9252(11)\n" +
"O6 O -0.2127(9) -0.1159(7) 0.3224(6)\n" +
"C24 C 0.7443(13) -0.0838(9) 0.8027(8)\n" +
"H36 H 0.6531(13) -0.1112(9) 0.8274(8)\n" +
"H37 H 0.7390(13) -0.1541(9) 0.7468(8)\n" +
"C25 C 0.9201(15) -0.0294(9) 0.8998(9)\n" +
"H38 H 0.9211(15) 0.0353(9) 0.9593(9)\n" +
"H39 H 0.9367(15) -0.0912(9) 0.9266(9)\n" +
"C26 C 1.0666(19) 0.0196(14) 0.8699(11)\n" +
"H40 H 1.0763(19) -0.0483(14) 0.8185(11)\n" +
"C27 C 1.0373(14) 0.105(1) 0.8149(9)\n" +
"H41 H 1.1293(14) 0.1282(10) 0.7897(9)\n" +
"H42 H 1.0446(14) 0.1779(10) 0.8687(9)\n" +
"C28 C 0.8610(14) 0.0495(10) 0.7169(8)\n" +
"H43 H 0.8605(14) -0.0238(10) 0.6660(8)\n" +
"C29 C 0.8412(14) 0.1285(11) 0.6532(9)\n" +
"H44 H 0.9398(14) 0.1494(11) 0.6331(9)\n" +
"H45 H 0.8408(14) 0.2032(11) 0.6996(9)\n" +
"C30 C 0.6727(13) 0.0638(10) 0.5494(8)\n" +
"H46 H 0.6810(13) -0.0035(10) 0.4979(8)\n" +
"H47 H 0.6557(13) 0.1194(10) 0.5143(8)\n" +
"C31 C 0.5168(15) 0.0165(11) 0.5764(9)\n" +
"H48 H 0.5042(15) 0.0868(11) 0.6223(9)\n" +
"C32 C 0.5372(12) -0.0640(8) 0.6410(7)\n" +
"H49 H 0.5548(12) -0.1314(8) 0.5948(7)\n" +
"C33 C 0.7082(15) 0.0042(10) 0.7507(9)\n" +
"C34 C 0.3748(13) -0.1211(10) 0.6566(9)\n" +
"H50 H 0.3601(13) -0.0584(10) 0.7092(9)\n" +
"H51 H 0.3915(13) -0.1791(10) 0.6887(9)\n" +
"C35 C 0.2057(13) -0.1862(9) 0.5500(8)\n" +
"H52 H 0.2115(13) -0.2568(9) 0.5012(8)\n" +
"H53 H 0.1066(13) -0.2137(9) 0.5682(8)\n" +
"C36 C 0.1799(11) -0.1017(8) 0.4909(7)\n" +
"C37 C 0.3463(16) -0.0548(12) 0.4714(9)\n" +
"H54 H 0.3596(16) -0.1277(12) 0.4308(9)\n" +
"C38 C 0.2963(12) 0.0020(9) 0.3882(8)\n" +
"H55 H 0.3046(12) 0.0835(9) 0.4248(8)\n" +
"H56 H 0.3706(12) 0.0049(9) 0.3478(8)\n" +
"C39 C 0.1074(15) -0.0834(11) 0.3116(9)\n" +
"H57 H 0.1114(15) -0.1391(11) 0.2469(9)\n" +
"C40 C 0.0404(12) -0.1605(9) 0.3709(8)\n" +
"H58 H 0.0398(12) -0.2411(9) 0.3367(8)\n" +
"C41 C 1.3448(18) 0.0340(16) 0.9824(13)\n" +
"C42 C 1.5008(20) 0.1198(15) 1.0857(13)\n" +
"H59 H 1.6028(28) 0.1069(64) 1.0810(37)\n" +
"H60 H 1.485(6) 0.1061(64) 1.1478(16)\n" +
"H61 H 1.5152(80) 0.2016(15) 1.0948(46)\n" +
"C43 C 0.6926(14) 0.1087(10) 0.8306(9)\n" +
"H62 H 0.8055(20) 0.1604(33) 0.8892(29)\n" +
"H63 H 0.6136(66) 0.0773(10) 0.8611(41)\n" +
"H64 H 0.6488(79) 0.1544(36) 0.7920(14)\n" +
"C44 C 0.1476(14) 0.0037(10) 0.5586(8)\n" +
"H65 H 0.0409(49) -0.0274(11) 0.5673(50)\n" +
"H66 H 0.1383(95) 0.0572(36) 0.5209(31)\n" +
"H67 H 0.2432(46) 0.0475(40) 0.6301(23)\n" +
"C45 C -0.1475(13) -0.1777(10) 0.3586(8)\n" +
"C46 C -0.2448(14) -0.2683(10) 0.3924(9)\n" +
"H68 H -0.3326(65) -0.2450(37) 0.4105(58)\n" +
"H69 H -0.1650(21) -0.2714(50) 0.4559(39)\n" +
"H70 H -0.2996(81) -0.3468(16) 0.3326(24)\n" +
"#END\n"; <!-- myCif = myCif.replace(/'/g, " "); -->
jmolInitialize("../propdbIncl");
jmolDebugAlert();
jmolAppletInline(400,myCif);
<!-- jmolApplet(400, "load ./tempimages/CIJQOB.cif") -->;
</script>
<h2>finished</h2>
</body> </html>
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. http://productguide.itmanagersjournal.com/
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users

