Difference between revisions of "Sandbox"
AngelHerraez (talk | contribs) (→Get the model from a different server) |
AngelHerraez (talk | contribs) (→Get the model from a different server) |
||
Line 239: | Line 239: | ||
<jmol><jmolApplet> | <jmol><jmolApplet> | ||
<signed>true</signed> | <signed>true</signed> | ||
− | <name>1CRN</name><color>[ | + | <name>1CRN</name><color>[xFFAAAA]</color><size>300</size> |
<urlContents>http://biomodel.uah.es/model3j/glc_bd_p.pdb</urlContents> | <urlContents>http://biomodel.uah.es/model3j/glc_bd_p.pdb</urlContents> | ||
</jmolApplet></jmol> | </jmolApplet></jmol> |
Revision as of 20:01, 1 December 2008
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__918878520197787__ initializing Jmol getValue debug null Jmol getValue logLevel null Jmol getValue allowjavascript null AppletRegistry.checkIn(JSmol_1__918878520197787__) vwrOptions: { "name":"JSmol_1","applet":true,"documentBase":"http://wiki.jmol.org./index.php?diff=5502&oldid=5501&title=Sandbox","platform":"J.awtjs2d.Platform","fullName":"JSmol_1__918878520197787__","codePath":"http:/extensions/Jmol/j2s/","display":"JSmol_1_canvas2d","signedApplet":"true","appletReadyCallback":"Jmol._readyCallback","statusListener":"[J.appletjs.Jmol object]","syncId":"918878520197787","bgcolor":"green" } setting document base to "http://wiki.jmol.org./index.php?diff=5502&oldid=5501&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__918878520197787__ ready |
For some reason, checkboxes are not working with the extension.
Color atoms:
This one uses the inlineContents
tag, with straight MOL data on the left applet and with added pipe characters (|) on the right applet:
|
|
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:
|
|
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] script 1 started pdbGetHeader = true Loading...|Please wait. JSmol exec JSmol_1CRN start applet null Jmol JavaScript applet JSmol_1CRN__918878520197787__ initializing Jmol getValue debug null Jmol getValue logLevel null Jmol getValue allowjavascript null AppletRegistry.checkIn(JSmol_1CRN__918878520197787__) vwrOptions: { "name":"JSmol_1CRN","applet":true,"documentBase":"http://wiki.jmol.org./index.php?diff=5502&oldid=5501&title=Sandbox","platform":"J.awtjs2d.Platform","fullName":"JSmol_1CRN__918878520197787__","codePath":"http:/extensions/Jmol/j2s/","display":"JSmol_1CRN_canvas2d","signedApplet":"true","appletReadyCallback":"Jmol._readyCallback","statusListener":"[J.appletjs.Jmol object]","syncId":"918878520197787","bgcolor":"[xFFAAAA]" } setting document base to "http://wiki.jmol.org./index.php?diff=5502&oldid=5501&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_1CRN (signed) Jmol getValue emulate null defaults = "Jmol" Jmol getValue boxbgcolor null Jmol getValue bgcolor [xFFAAAA] backgroundColor = "[xFFAAAA]" 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_1CRN__918878520197787__ ready |
things work, so IT IS the newlines.
Get the model from a different server
(Uses urlContents
).
I'm not sure if the use of the signed applet is allowed in the configuration of the Jmol MediaWiki Extension for the Jmol Wiki (I rather think it is not).
But this example is working with the unsigned applet even if I set <signed>true</signed>
or <signed>false</signed>
.
Supposedly the unsigned applet should not load a model coming from a different web domain, as per Java security rules... What's going on?
Using <signed>true</signed> :
|
Using <signed>false</signed> : |
Using a pop-up window
An image used for illustration and a caption for requesting the Jmol model:
![]() |