Sandbox
This is a page for testing.
Jmol extension for MediaWiki
This uses uploadedFileContents
tag with an XYZ file:
![]() Jmol._Canvas2D (Jmol) "JSmol_chair"[x] script 1 started pdbGetHeader = true loadScript /extensions/Jmol/j2s/core/coretext.z.js JSmol exec JSmol_1 start applet null Jmol JavaScript applet JSmol_1__125053496852483__ initializing Jmol getValue debug null Jmol getValue logLevel null Jmol getValue allowjavascript null AppletRegistry.checkIn(JSmol_1__125053496852483__) vwrOptions: { "name":"JSmol_1","applet":true,"documentBase":"http://wiki.jmol.org./index.php?oldid=5521&title=Sandbox","platform":"J.awtjs2d.Platform","fullName":"JSmol_1__125053496852483__","codePath":"http:/extensions/Jmol/j2s/","display":"JSmol_1_canvas2d","signedApplet":"true","appletReadyCallback":"Jmol._readyCallback","statusListener":"[J.appletjs.Jmol object]","syncId":"125053496852483","bgcolor":"green" } setting document base to "http://wiki.jmol.org./index.php?oldid=5521&title=Sandbox" (C) 2015 Jmol Development Jmol Version: 14.29.32 2019-01-29 14:30 java.vendor: Java2Script (HTML5) java.version: 2018-01-28 23:38:52 (JSmol/j2s) os.name: Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com) Access: ALL memory: 0.0/0.0 processors available: 1 useCommandThread: false appletId:JSmol_1 (signed) Jmol getValue emulate null defaults = "Jmol" Jmol getValue boxbgcolor null Jmol getValue bgcolor green backgroundColor = "green" Jmol getValue ANIMFRAMECallback null Jmol getValue APPLETREADYCallback Jmol._readyCallback APPLETREADYCallback = "Jmol._readyCallback" callback set for APPLETREADYCallback Jmol._readyCallback APPLETREADY Jmol getValue ATOMMOVEDCallback null Jmol getValue AUDIOCallback null Jmol getValue CLICKCallback null Jmol getValue DRAGDROPCallback null Jmol getValue ECHOCallback null Jmol getValue ERRORCallback null Jmol getValue EVALCallback null Jmol getValue HOVERCallback null Jmol getValue IMAGECallback null Jmol getValue LOADSTRUCTCallback null Jmol getValue MEASURECallback null Jmol getValue MESSAGECallback null Jmol getValue MINIMIZATIONCallback null Jmol getValue SERVICECallback null Jmol getValue PICKCallback null Jmol getValue RESIZECallback null Jmol getValue SCRIPTCallback null Jmol getValue SYNCCallback null Jmol getValue STRUCTUREMODIFIEDCallback null Jmol getValue doTranslate null language=en_US Jmol getValue popupMenu null Jmol getValue script null Jmol getValue loadInline null Jmol getValue load null Jmol applet JSmol_1__125053496852483__ ready |
For some reason, checkboxes are not working with the extension.
Color atoms:
This one uses the inlineContents
tag:
with straight MOL data:
|
with added pipe characters (|):
|
None of them work. This seems due to a defective parsing of newlines by the extension.
Let's test the same with inline PDB data:
with straight PDB data:
|
with added pipe characters (|):
|
The right applet works. The difference with MOL format is likely because MOL requires the lines in a certain order, while PDB relies on the starting keyword. I think that the extension is inserting extra newlines and quotes, that spoil the MOL parser but not the PDB parser. The newlines are ignored by Jmol.js, or replaced by pipes. Manually added pipes restore a proper start of line for the PDB parser. --AngelHerraez 22:11, 30 November 2008 (CET)
Finally, if we insert the MOL data without any newlines and with pipes:
![]() Jmol._Canvas2D (Jmol) "JSmol_5"[x] loadScript /extensions/Jmol/j2s/core/package.js loadScript /extensions/Jmol/j2s/core/corejmol.z.js loadScript /extensions/Jmol/j2s/J/translation/PO.js loadScript /extensions/Jmol/j2s/core/corescript.z.js JSmol exec JSmol_chair start applet null Jmol JavaScript applet JSmol_chair__125053496852483__ initializing Jmol getValue debug null Jmol getValue logLevel null Jmol getValue allowjavascript null AppletRegistry.checkIn(JSmol_chair__125053496852483__) vwrOptions: { "name":"JSmol_chair","applet":true,"documentBase":"http://wiki.jmol.org./index.php?oldid=5521&title=Sandbox","platform":"J.awtjs2d.Platform","fullName":"JSmol_chair__125053496852483__","codePath":"http:/extensions/Jmol/j2s/","display":"JSmol_chair_canvas2d","signedApplet":"true","appletReadyCallback":"Jmol._readyCallback","statusListener":"[J.appletjs.Jmol object]","syncId":"125053496852483","bgcolor":"black" } setting document base to "http://wiki.jmol.org./index.php?oldid=5521&title=Sandbox" (C) 2015 Jmol Development Jmol Version: 14.29.32 2019-01-29 14:30 java.vendor: Java2Script (HTML5) java.version: 2018-01-28 23:38:52 (JSmol/j2s) os.name: Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com) Access: ALL memory: 0.0/0.0 processors available: 1 useCommandThread: false appletId:JSmol_chair (signed) Jmol getValue emulate null defaults = "Jmol" Jmol getValue boxbgcolor null Jmol getValue bgcolor black backgroundColor = "black" Jmol getValue ANIMFRAMECallback null Jmol getValue APPLETREADYCallback Jmol._readyCallback APPLETREADYCallback = "Jmol._readyCallback" callback set for APPLETREADYCallback Jmol._readyCallback APPLETREADY Jmol getValue ATOMMOVEDCallback null Jmol getValue AUDIOCallback null Jmol getValue CLICKCallback null Jmol getValue DRAGDROPCallback null Jmol getValue ECHOCallback null Jmol getValue ERRORCallback null Jmol getValue EVALCallback null Jmol getValue HOVERCallback null Jmol getValue IMAGECallback null Jmol getValue LOADSTRUCTCallback null Jmol getValue MEASURECallback null Jmol getValue MESSAGECallback null Jmol getValue MINIMIZATIONCallback null Jmol getValue SERVICECallback null Jmol getValue PICKCallback null Jmol getValue RESIZECallback null Jmol getValue SCRIPTCallback null Jmol getValue SYNCCallback null Jmol getValue STRUCTUREMODIFIEDCallback null Jmol getValue doTranslate null language=en_US Jmol getValue popupMenu null Jmol getValue script null Jmol getValue loadInline null Jmol getValue load null Jmol applet JSmol_chair__125053496852483__ ready script 1 started pdbGetHeader = true Loading...|Please wait. Loading...|Please wait. platformSpeed = 5 loadScript /extensions/Jmol/j2s/core/corescriptcmd.z.js The Resolver thinks Mol chair.mol Conformational analysis 0 chair.mol reading 18 atoms ModelSet: haveSymmetry:false haveUnitcells:false haveFractionalCoord:false 1 model in this collection. Use getProperty "modelInfo" or getProperty "auxiliaryInfo" to inspect them. Default Van der Waals type for model set to Babel 18 atoms created ModelSet: not autobonding; use forceAutobond=true to force automatic bond creation Time for creating model: 7 ms loadScript /extensions/Jmol/j2s/JV/DataManager.js loadScript /extensions/Jmol/j2s/J/api/JmolDataManager.js chair.mol Script completed Jmol script terminated platformSpeed = 5 script ERROR: unknown file type ---- data "model" ||chair.mol ||Conformational analysis ||0 || 18 18 0 0 0 1 V2000 || 1.6881 2.1572 -3.0193 C 0 0 0 0 0 || 2.1484 3.6217 -2.9797 C 0 0 0 0 0 || 2.9361 3.9126 -1.6942 C 0 0 0 0 0 || 2.0927 3.5769 -0.4557 C 0 0 0 0 0 || 1.6329 2.1120 -0.4898 C 0 0 0 0 0 || 0.8532 1.8102 -1.7778 C 0 0 0 0 0 || 2.5807 1.4887 -3.0652 H 0 0 0 0 0 || 1.0897 1.9711 -3.9430 H 0 0 0 0 0 || 1.2578 4.2927 -3.0282 H 0 0 0 0 0 || 2.7791 3.8474 -3.8727 H 0 0 0 0 0 || 3.8725 3.3053 -1.6844 H 0 0 0 0 0 || 3.2413 4.9861 -1.6685 H 0 0 0 0 0 || 1.2005 4.2467 -0.4224 H 0 0 0 0 0 || 2.6835 3.7700 0.4714 H 0 0 0 0 0 || 0.9957 1.8928 0.4002 H 0 0 0 0 0 || 2.5240 1.4426 -0.4294 H 0 0 0 0 0 || 0.5642 0.7322 -1.8031 H 0 0 0 0 0 || -0.0919 2.4039 -1.7878 H 0 0 0 0 0 || 1 2 1 0 0 0 || 1 6 1 1 0 0 || 1 7 1 0 0 0 || 1 8 1 6 0 0 || 2 3 1 1 0 0 || 2 9 1 0 0 0 || 2 10 1 6 0 0 || 3 4 1 1 0 0 || 3 11 1 0 0 0 || 3 12 1 0 0 0 || 4 5 1 0 0 0 || 4 13 1 0 0 0 || 4 14 1 1 0 0 || 5 6 1 6 0 0 || 5 15 1 1 0 0 || 5 16 1 0 0 0 || 6 17 1 0 0 0 || 6 18 1 0 0 0 ||M END| end <<<<"model" Script completed Jmol script terminated platformSpeed = 5 The Resolver thinks Pdb loadScript /extensions/Jmol/j2s/core/corebio.z.js reading 14 atoms ModelSet: haveSymmetry:false haveUnitcells:false haveFractionalCoord:false 1 model in this collection. Use getProperty "modelInfo" or getProperty "auxiliaryInfo" to inspect them. Default Van der Waals type for model set to Babel 14 atoms created ModelSet: autobonding; use autobond=false to not generate bonds automatically Time for creating model: 4 ms Script completed Jmol script terminated platformSpeed = 5 The Resolver thinks Pdb reading 14 atoms ModelSet: haveSymmetry:false haveUnitcells:false haveFractionalCoord:false 1 model in this collection. Use getProperty "modelInfo" or getProperty "auxiliaryInfo" to inspect them. Default Van der Waals type for model set to Babel 14 atoms created ModelSet: autobonding; use autobond=false to not generate bonds automatically Time for creating model: 2 ms Script completed Jmol script terminated platformSpeed = 5 The Resolver thinks Mol chair.mol Conformational analysis 0 chair.mol reading 18 atoms ModelSet: haveSymmetry:false haveUnitcells:false haveFractionalCoord:false 1 model in this collection. Use getProperty "modelInfo" or getProperty "auxiliaryInfo" to inspect them. Default Van der Waals type for model set to Babel 18 atoms created ModelSet: not autobonding; use forceAutobond=true to force automatic bond creation Time for creating model: 2 ms chair.mol Script completed Jmol script terminated platformSpeed = 5 FileManager.getAtomSetCollectionFromFile(http://wiki.jmol.org./images/c/c9/Chair.xyz) FileManager opening url http://wiki.jmol.org./images/c/c9/Chair.xyz The Resolver thinks Xyz chair.mol Time for openFile(http://wiki.jmol.org./images/c/c9/Chair.xyz): 101 ms reading 18 atoms ModelSet: haveSymmetry:false haveUnitcells:false haveFractionalCoord:false 1 model in this collection. Use getProperty "modelInfo" or getProperty "auxiliaryInfo" to inspect them. Default Van der Waals type for model set to Babel 18 atoms created ModelSet: autobonding; use autobond=false to not generate bonds automatically Time for creating model: 2 ms chair.mol Script completed Jmol script terminated |
things work, so IT IS the newlines.
Using a pop-up window
An image used for illustration and a caption for requesting the Jmol model:
![]() |