Difference between revisions of "User:Bduke"

From Jmol
Jump to navigation Jump to search
m (urlContent Test from a different server - does not work: Test)
m (add to Category)
 
(19 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
Interested in Jmol in general and in particular right now about adding Jmol images to Wikis, particularly Wikipedia.
 
Interested in Jmol in general and in particular right now about adding Jmol images to Wikis, particularly Wikipedia.
  
==Tests of Jmol incorporated into a MediaWiki wiki==  
+
*[http://wiki.jmol.org:81/index.php?title=Special%3ALog&type=upload&user=Bduke&page= My upload log]
  
===Uploaded file tests===
+
=Tests of Jmol incorporated into a MediaWiki wiki=  
  
This now works, but earlier it give an error. Also I was unable to upload anything. It warned that only image types can be uploaded.
+
==How should molecules be shown on Wikipedia==
 +
 
 +
{|name="userboxes" id="userboxes" style="margin-left: 1em; margin-bottom: 0.5em; width: 170px; border: {{{bordercolor|#99B3FF}}} solid 1px; background-color: {{{backgroundcolor|#FFFFFF}}}; {{{extra-css|}}}" align="right"
 +
|-
 +
|<center>[[Image:Ethane s.gif]]</center>
 +
|-
 +
| <center>'''Staggered ethane''' <br />
 +
<jmol><jmolAppletLink><title>Show in 3D using Jmol (popup window)</title><color>gray</color>
 +
<uploadedFileContents>ethane_s.pdb</uploadedFileContents></jmolAppletLink>
 +
</jmol>
 +
</center>
 +
|-
 +
|} This is an example of how a molecule might be displayed on Wikipedia, or other Wikimedia Foundation projects such as wikiversity or wikibooks, with the text raping to the left of a box with a Jmol image in it. The Jmol image is only loaded if the reader wants to load it by clicking on the text below the straight image.
 +
 
 +
While there are several ways of having the data file, it seems to me that on Wikipedia the easiest and most suitable would be to have them uploaded like images. Preferable they could be uploaded to Commons but the current extension would not, I believe, accept that.
 +
 
 +
On Wikipedia the paragraph could be lengthened to fit the image by using the template <nowiki>{{clear}}</nowiki>, as here.
 +
{{clear}}
 +
 
 +
==Test of PopUp window==
 +
 
 +
This is a simple test of the popup used above:-
 +
 
 +
<center><jmol><jmolAppletButton><title>Show staggered ethane in popup window using Jmol</title><color>gray</color>
 +
<uploadedFileContents>ethane_s.pdb</uploadedFileContents></jmolAppletButton>
 +
</jmol></center>
 +
 
 +
==Staggered and eclipsed ethane==
 +
 
 +
These are pdb files generated by Sybyl for staggered and eclipsed ethane. They use uploadedFileContents type for the data. Use the buttons and the menu that comes up by right mouse clicking on the image to manipulate the images. The left mouse can be used to move the image.
  
 
<center>
 
<center>
<table><tr><td>
+
<table><tr><td>
 +
<center>
 +
<jmol><jmolApplet><script>set spin X 10; spin on</script>
 +
<name>ethane_s1</name><color>palegreen</color><size>250</size>
 +
<uploadedFileContents>ethane_s.pdb</uploadedFileContents>
 +
</jmolApplet>
 +
<jmolButton><script>spin on</script><name>ethane_s1</name><text>Start spinning</text></jmolButton>
 +
<jmolButton><script>spin off</script><name>ethane_s1</name><text>Stop spinning</text></jmolButton>
 +
</jmol></center>
 +
</td><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td>  
 
<center>
 
<center>
<jmol><jmolApplet><script>set spin X 25; spin on</script>
+
<jmol><jmolApplet><script>set spin X 10; spin on</script>
<name>D_galactose</name><color>black</color><size>400</size>
+
<name>ethane_e1</name><color>skyblue</color><size>250</size>
<uploadedFileContents>D_galactose.pdb</uploadedFileContents>
+
<uploadedFileContents>ethane_e.pdb</uploadedFileContents>
 
</jmolApplet>
 
</jmolApplet>
<jmolButton><script>spin on</script><name>heparin_1</name><text>Start spinning</text></jmolButton>
+
<jmolButton><script>spin on</script><name>ethane_e1</name><text>Start spinning</text></jmolButton>
<jmolButton><script>spin off</script><name>heparin_1</name><text>Stop spinning</text></jmolButton>
+
<jmolButton><script>spin off</script><name>ethane_e1</name><text>Stop spinning</text></jmolButton>
</jmol>
+
</jmol></center>  
</center>
 
 
</td></tr></table>
 
</td></tr></table>
 
</center>
 
</center>
  
===Staggered and eclipsed ethane===
+
These are examples using inlineContents:
 
 
These are pdb files generated by Sybyl for staggered and eclipsed ethane. Use the buttons and the menu that comes up by right mouse clicking on the image to manipulate the images. The left mouse can be used to move the image.
 
 
 
These used to work but no longer do so.
 
  
 
<center>
 
<center>
 
<table><tr><td>
 
<table><tr><td>
 
<center>
 
<center>
<jmol>
+
<jmol><jmolApplet>
<jmolApplet>
 
 
<script>set spin X 10; spin on</script>
 
<script>set spin X 10; spin on</script>
<name>ethane-s</name>
+
<name>ethane_s2</name><color>palegreen</color><size>250</size>
<color>palegreen</color>
 
<size>250</size>
 
 
<inlineContents>
 
<inlineContents>
 
HEADER    PROTEIN                                19-OCT-95
 
HEADER    PROTEIN                                19-OCT-95
Line 60: Line 90:
 
</inlineContents>
 
</inlineContents>
 
</jmolApplet>
 
</jmolApplet>
<jmolButton><script>spin on</script><name>ethane-s</name><text>Start spinning</text></jmolButton>
+
<jmolButton><script>spin on</script><name>ethane_s2</name><text>Start spinning</text></jmolButton>
<jmolButton><script>spin off</script><name>ethane-s</name><text>Stop spinning</text></jmolButton>
+
<jmolButton><script>spin off</script><name>ethane_s2</name><text>Stop spinning</text></jmolButton>
 
</jmol></center>
 
</jmol></center>
 
</td><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td><center>
 
</td><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td><center>
<jmol>
+
<jmol><jmolApplet>
<jmolApplet>
 
 
<script>set spin X 10; spin on</script>
 
<script>set spin X 10; spin on</script>
<name>ethane-e</name>
+
<name>ethane_e2</name><color>skyblue</color><size>250</size>
<color>skyblue</color><size>250</size>
 
 
<inlineContents>
 
<inlineContents>
 
HEADER    PROTEIN                                19-OCT-95
 
HEADER    PROTEIN                                19-OCT-95
Line 92: Line 120:
 
END
 
END
 
</inlineContents></jmolApplet>
 
</inlineContents></jmolApplet>
<jmolButton><script>spin on</script><name>ethane-e</name><text>Start spinning</text></jmolButton>
+
<jmolButton><script>spin on</script><name>ethane_e2</name><text>Start spinning</text></jmolButton>
<jmolButton><script>spin off</script><name>ethane-e</name><text>Stop spinning</text></jmolButton>
+
<jmolButton><script>spin off</script><name>ethane_e2</name><text>Stop spinning</text></jmolButton>
 
</jmol></center>
 
</jmol></center>
 
</td></tr></table>
 
</td></tr></table>
 
</center>
 
</center>
  
<!--
+
==Artemisinin.pdb uploaded==
None of these work, so commented out for now.
+
 
 +
<center>
 +
<table><tr><td>
 +
<center>
 +
<jmol><jmolApplet><script>set spin X 25; spin on</script>
 +
<name>Artemisinin</name><color>black</color><size>400</size>
 +
<uploadedFileContents>Artemisinin.pdb</uploadedFileContents>
 +
</jmolApplet>
 +
<jmolButton><script>spin on</script><name>Artemisinin</name><text>Start spinning</text></jmolButton>
 +
<jmolButton><script>spin off</script><name>Artemisinin</name><text>Stop spinning</text></jmolButton>
 +
</jmol>
 +
</center>
 +
</td></tr></table>
 +
</center>
 +
 
 +
Some examples that do not work are commented out below. Feel free to edit this page to look at them.
  
===wikiPageContent Test from this server===
 
  
This seems to be not supported on this wiki.
+
==wikiPageContent Test from this server==
 +
 
 +
This pdb data was put into a page in the wiki as text content and is being read from its page: [[User:Bduke/ethane-s.pdb]]
  
 
<center>
 
<center>
Line 110: Line 154:
 
<wikiPageContents>User:Bduke/ethane-s.pdb</wikiPageContents>
 
<wikiPageContents>User:Bduke/ethane-s.pdb</wikiPageContents>
 
</jmolApplet></jmol></center>
 
</jmolApplet></jmol></center>
-->
 
===urlContent Test from a different server - does not work===
 
  
 +
==urlContents Test from a different server==
 +
'''Now it works'''. This uses the signed applet to retrieve the file from pdb.org (could be from any server).
 
<center>
 
<center>
<jmol>
+
<jmol><jmolApplet>
<jmolApplet>
 
 
<signed>true</signed>
 
<signed>true</signed>
<name>1CRN</name>
+
<name>1CRN</name><color>blue</color><size>250</size>
<color>blue</color>
+
<urlContents>http://www.pdb.org/pdb/files/1crn.pdb.gz</urlContents>
<size>250</size>
 
<urlContents>http://magog.vcp.monash.edu.au/pictures/1CRN.pdb</urlContents>
 
 
</jmolApplet></jmol></center>
 
</jmolApplet></jmol></center>
  
<!--
+
The model does not show up here because we cannot combine signed and unsigned applets in the same wiki page. You will se it working while you '''edit''' this subsection, but not in the whole page.
===Alchemy file - does not work===
+
 
 +
 
 +
==Alchemy file==
  
 
<center>
 
<center>
Line 174: Line 217:
 
</inlineContents></jmolApplet></jmol></center>
 
</inlineContents></jmolApplet></jmol></center>
  
-->
+
[[Category:Pages Using Jmol MW Extension]]

Latest revision as of 20:40, 23 November 2010

Interested in Jmol in general and in particular right now about adding Jmol images to Wikis, particularly Wikipedia.

Tests of Jmol incorporated into a MediaWiki wiki

How should molecules be shown on Wikipedia

Ethane s.gif
Staggered ethane

This is an example of how a molecule might be displayed on Wikipedia, or other Wikimedia Foundation projects such as wikiversity or wikibooks, with the text raping to the left of a box with a Jmol image in it. The Jmol image is only loaded if the reader wants to load it by clicking on the text below the straight image.

While there are several ways of having the data file, it seems to me that on Wikipedia the easiest and most suitable would be to have them uploaded like images. Preferable they could be uploaded to Commons but the current extension would not, I believe, accept that.

On Wikipedia the paragraph could be lengthened to fit the image by using the template {{clear}}, as here.


Test of PopUp window

This is a simple test of the popup used above:-

Staggered and eclipsed ethane

These are pdb files generated by Sybyl for staggered and eclipsed ethane. They use uploadedFileContents type for the data. Use the buttons and the menu that comes up by right mouse clicking on the image to manipulate the images. The left mouse can be used to move the image.

        

These are examples using inlineContents:

        

Artemisinin.pdb uploaded

Some examples that do not work are commented out below. Feel free to edit this page to look at them.


wikiPageContent Test from this server

This pdb data was put into a page in the wiki as text content and is being read from its page: User:Bduke/ethane-s.pdb

urlContents Test from a different server

Now it works. This uses the signed applet to retrieve the file from pdb.org (could be from any server).

The model does not show up here because we cannot combine signed and unsigned applets in the same wiki page. You will se it working while you edit this subsection, but not in the whole page.


Alchemy file