Difference between revisions of "User:Bduke"

From Jmol
Jump to navigation Jump to search
(Test of PopUp window)
m (add to Category)
 
(7 intermediate revisions by 2 users not shown)
Line 5: Line 5:
 
=Tests of Jmol incorporated into a MediaWiki wiki=  
 
=Tests of Jmol incorporated into a MediaWiki wiki=  
  
==Test of PopUp window==
+
==How should molecules be shown on Wikipedia==
 
 
<center><jmol><jmolAppletButton><title>Show staggered ethane in popup window using Jmol</title><color>gray</color>
 
<uploadedFileContents>ethane_s.pdb</uploadedFileContents></jmolAppletButton>
 
</jmol></center>
 
 
 
I would suggest that something like this is used on wikipedia or other Wikimedia Foundation projects such as wikiversity or wikibooks, so that the jmol image is only loaded if the reader wants to load it.
 
  
 
{|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"
 
{|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"
Line 23: Line 17:
 
</center>
 
</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.
Another possibility: an image is displayed and the user may request the Jmol model:
+
 
 +
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}}
 
{{clear}}
  
==An example of how a molecule might be shown on Wikipedia==
+
==Test of PopUp window==
  
{|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"
+
This is a simple test of the popup used above:-
|-
 
|<center>
 
<jmol><jmolApplet>
 
<name>ethane_s0</name><color>red</color><size>150</size>
 
<uploadedFileContents>ethane_s.pdb</uploadedFileContents>
 
</jmolApplet>
 
</jmol></center>
 
|-
 
| <center>'''Staggered ethane'''</center>
 
|-
 
|}
 
This is an example of how a molecule might be displayed on Wikipedia, with the text raping to the left of a box with a Jmol image in it.
 
  
The PopUp formula would also be a good way with the pop up box in the chemical infobox. This would leave viewing the molecule to the reader. It woud not appear when opening the page.
+
<center><jmol><jmolAppletButton><title>Show staggered ethane in popup window using Jmol</title><color>gray</color>
 
+
<uploadedFileContents>ethane_s.pdb</uploadedFileContents></jmolAppletButton>
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.
+
</jmol></center>
  
On Wikipedia the paragraph could be lengthened to fit the image by using the template <nowiki>{{clear}}</nowiki>, now installed here.
 
{{clear}}
 
 
==Staggered and eclipsed ethane==
 
==Staggered and eclipsed ethane==
  
Line 84: Line 67:
 
<name>ethane_s2</name><color>palegreen</color><size>250</size>
 
<name>ethane_s2</name><color>palegreen</color><size>250</size>
 
<inlineContents>
 
<inlineContents>
|HEADER    PROTEIN                                19-OCT-95
+
HEADER    PROTEIN                                19-OCT-95
|COMPND    ETHANE
+
COMPND    ETHANE
|AUTHOR    GENERATED BY SYBYL, A PRODUCT OF TRIPOS ASSOCIATES, INC.
+
AUTHOR    GENERATED BY SYBYL, A PRODUCT OF TRIPOS ASSOCIATES, INC.
|HETATM    1  C2  C      1      0.756  -0.045  -0.137  1.00  0.00
+
HETATM    1  C2  C      1      0.756  -0.045  -0.137  1.00  0.00
|HETATM    2  C1  C      1      -0.757  0.044  0.138  1.00  0.00
+
HETATM    2  C1  C      1      -0.757  0.044  0.138  1.00  0.00
|HETATM    3  H3  C      1      -1.291  -0.656  -0.521  1.00  0.00
+
HETATM    3  H3  C      1      -1.291  -0.656  -0.521  1.00  0.00
|HETATM    4  H4  C      1      -1.105  1.069  -0.057  1.00  0.00
+
HETATM    4  H4  C      1      -1.105  1.069  -0.057  1.00  0.00
|HETATM    5  H5  C      1      -0.953  -0.217  1.187  1.00  0.00
+
HETATM    5  H5  C      1      -0.953  -0.217  1.187  1.00  0.00
|HETATM    6  H6  C      1      1.105  -1.069  0.059  1.00  0.00
+
HETATM    6  H6  C      1      1.105  -1.069  0.059  1.00  0.00
|HETATM    7  H7  C      1      1.290  0.657  0.521  1.00  0.00
+
HETATM    7  H7  C      1      1.290  0.657  0.521  1.00  0.00
|HETATM    8  H8  C      1      0.953  0.215  -1.188  1.00  0.00
+
HETATM    8  H8  C      1      0.953  0.215  -1.188  1.00  0.00
|CONECT    1    2    6    7    8
+
CONECT    1    2    6    7    8
|CONECT    2    1    3    4    5
+
CONECT    2    1    3    4    5
|CONECT    3    2
+
CONECT    3    2
|CONECT    4    2
+
CONECT    4    2
|CONECT    5    2
+
CONECT    5    2
|CONECT    6    1
+
CONECT    6    1
|CONECT    7    1
+
CONECT    7    1
|CONECT    8    1
+
CONECT    8    1
|MASTER        0    0    0    0    0    0    0    0    8    0    8    0
+
MASTER        0    0    0    0    0    0    0    0    8    0    8    0
|END
+
END
 
</inlineContents>
 
</inlineContents>
 
</jmolApplet>
 
</jmolApplet>
Line 115: Line 98:
 
<name>ethane_e2</name><color>skyblue</color><size>250</size>
 
<name>ethane_e2</name><color>skyblue</color><size>250</size>
 
<inlineContents>
 
<inlineContents>
|HEADER    PROTEIN                                19-OCT-95
+
HEADER    PROTEIN                                19-OCT-95
|COMPND    ETHANE
+
COMPND    ETHANE
|AUTHOR    GENERATED BY SYBYL, A PRODUCT OF TRIPOS ASSOCIATES, INC.
+
AUTHOR    GENERATED BY SYBYL, A PRODUCT OF TRIPOS ASSOCIATES, INC.
|HETATM    1  C2  C      1      0.756  -0.045  -0.137  1.00  0.00
+
HETATM    1  C2  C      1      0.756  -0.045  -0.137  1.00  0.00
|HETATM    2  C1  C      1      -0.757  0.044  0.138  1.00  0.00
+
HETATM    2  C1  C      1      -0.757  0.044  0.138  1.00  0.00
|HETATM    3  H3  C      1      -1.280  0.345  -0.782  1.00  0.00
+
HETATM    3  H3  C      1      -1.280  0.345  -0.782  1.00  0.00
|HETATM    4  H4  C      1      -0.943  0.788  0.926  1.00  0.00
+
HETATM    4  H4  C      1      -0.943  0.788  0.926  1.00  0.00
|HETATM    5  H5  C      1      -1.127  -0.938  0.465  1.00  0.00
+
HETATM    5  H5  C      1      -1.127  -0.938  0.465  1.00  0.00
|HETATM    6  H6  C      1      1.105  -1.069  0.059  1.00  0.00
+
HETATM    6  H6  C      1      1.105  -1.069  0.059  1.00  0.00
|HETATM    7  H7  C      1      1.290  0.657  0.521  1.00  0.00
+
HETATM    7  H7  C      1      1.290  0.657  0.521  1.00  0.00
|HETATM    8  H8  C      1      0.953  0.215  -1.188  1.00  0.00
+
HETATM    8  H8  C      1      0.953  0.215  -1.188  1.00  0.00
|CONECT    1    2    6    7    8
+
CONECT    1    2    6    7    8
|CONECT    2    1    3    4    5
+
CONECT    2    1    3    4    5
|CONECT    3    2
+
CONECT    3    2
|CONECT    4    2
+
CONECT    4    2
|CONECT    5    2
+
CONECT    5    2
|CONECT    6    1
+
CONECT    6    1
|CONECT    7    1
+
CONECT    7    1
|CONECT    8    1
+
CONECT    8    1
|MASTER        0    0    0    0    0    0    0    0    8    0    8    0
+
MASTER        0    0    0    0    0    0    0    0    8    0    8    0
|END
+
END
 
</inlineContents></jmolApplet>
 
</inlineContents></jmolApplet>
 
<jmolButton><script>spin on</script><name>ethane_e2</name><text>Start spinning</text></jmolButton>
 
<jmolButton><script>spin on</script><name>ethane_e2</name><text>Start spinning</text></jmolButton>
Line 164: Line 147:
 
==wikiPageContent Test from this server==
 
==wikiPageContent Test from this server==
  
This pdb file was uploaded to the wiki as a file and is being read from its page: [[User:Bduke/ethane-s.pdb]]
+
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 172: Line 155:
 
</jmolApplet></jmol></center>
 
</jmolApplet></jmol></center>
  
<!--
+
==urlContents Test from a different server==
==urlContent Test from a different server - does not work==
+
'''Now it works'''. This uses the signed applet to retrieve the file from pdb.org (could be from any server).
 
 
 
<center>
 
<center>
 
<jmol><jmolApplet>
 
<jmol><jmolApplet>
 
<signed>true</signed>
 
<signed>true</signed>
 
<name>1CRN</name><color>blue</color><size>250</size>
 
<name>1CRN</name><color>blue</color><size>250</size>
<urlContents>http://magog.vcp.monash.edu.au/pictures/dave1.pdb</urlContents>
+
<urlContents>http://www.pdb.org/pdb/files/1crn.pdb.gz</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 - not an allowed type in Jmol==
+
 
 +
 
 +
==Alchemy file==
  
 
<center>
 
<center>
Line 232: Line 216:
 
   21    13    21  SINGLE
 
   21    13    21  SINGLE
 
</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