Difference between revisions of "User:Bduke"

From Jmol
Jump to navigation Jump to search
(New User page)
 
m (add to Category)
 
(36 intermediate revisions by 3 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.
 +
 +
*[http://wiki.jmol.org:81/index.php?title=Special%3ALog&type=upload&user=Bduke&page= My upload log]
 +
 +
=Tests of Jmol incorporated into a MediaWiki wiki=
 +
 +
==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>
 +
<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>
 +
<jmol><jmolApplet><script>set spin X 10; spin on</script>
 +
<name>ethane_e1</name><color>skyblue</color><size>250</size>
 +
<uploadedFileContents>ethane_e.pdb</uploadedFileContents>
 +
</jmolApplet>
 +
<jmolButton><script>spin on</script><name>ethane_e1</name><text>Start spinning</text></jmolButton>
 +
<jmolButton><script>spin off</script><name>ethane_e1</name><text>Stop spinning</text></jmolButton>
 +
</jmol></center>
 +
</td></tr></table>
 +
</center>
 +
 +
These are examples using inlineContents:
 +
 +
<center>
 +
<table><tr><td>
 +
<center>
 +
<jmol><jmolApplet>
 +
<script>set spin X 10; spin on</script>
 +
<name>ethane_s2</name><color>palegreen</color><size>250</size>
 +
<inlineContents>
 +
HEADER    PROTEIN                                19-OCT-95
 +
COMPND    ETHANE
 +
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    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    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    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    8  H8  C      1      0.953  0.215  -1.188  1.00  0.00
 +
CONECT    1    2    6    7    8
 +
CONECT    2    1    3    4    5
 +
CONECT    3    2
 +
CONECT    4    2
 +
CONECT    5    2
 +
CONECT    6    1
 +
CONECT    7    1
 +
CONECT    8    1
 +
MASTER        0    0    0    0    0    0    0    0    8    0    8    0
 +
END
 +
</inlineContents>
 +
</jmolApplet>
 +
<jmolButton><script>spin on</script><name>ethane_s2</name><text>Start spinning</text></jmolButton>
 +
<jmolButton><script>spin off</script><name>ethane_s2</name><text>Stop spinning</text></jmolButton>
 +
</jmol></center>
 +
</td><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td><center>
 +
<jmol><jmolApplet>
 +
<script>set spin X 10; spin on</script>
 +
<name>ethane_e2</name><color>skyblue</color><size>250</size>
 +
<inlineContents>
 +
HEADER    PROTEIN                                19-OCT-95
 +
COMPND    ETHANE
 +
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    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    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    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    8  H8  C      1      0.953  0.215  -1.188  1.00  0.00
 +
CONECT    1    2    6    7    8
 +
CONECT    2    1    3    4    5
 +
CONECT    3    2
 +
CONECT    4    2
 +
CONECT    5    2
 +
CONECT    6    1
 +
CONECT    7    1
 +
CONECT    8    1
 +
MASTER        0    0    0    0    0    0    0    0    8    0    8    0
 +
END
 +
</inlineContents></jmolApplet>
 +
<jmolButton><script>spin on</script><name>ethane_e2</name><text>Start spinning</text></jmolButton>
 +
<jmolButton><script>spin off</script><name>ethane_e2</name><text>Stop spinning</text></jmolButton>
 +
</jmol></center>
 +
</td></tr></table>
 +
</center>
 +
 +
==Artemisinin.pdb uploaded==
 +
 +
<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 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>
 +
<jmol><jmolApplet>
 +
<name>ethane</name><color>red</color><size>250</size>
 +
<wikiPageContents>User:Bduke/ethane-s.pdb</wikiPageContents>
 +
</jmolApplet></jmol></center>
 +
 +
==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>
 +
<jmol><jmolApplet>
 +
<signed>true</signed>
 +
<name>1CRN</name><color>blue</color><size>250</size>
 +
<urlContents>http://www.pdb.org/pdb/files/1crn.pdb.gz</urlContents>
 +
</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==
 +
 +
<center>
 +
<jmol><jmolApplet>
 +
<name>asprin</name><color>green</color><size>250</size><inlineContents>
 +
  21 ATOMS,    21 BONDS,    0 CHARGES, ASPIRIN
 +
    1 CAR    -2.1016  -1.1628  -0.4897    -0.0592
 +
    2 CAR    -1.5789  -2.3192  0.0985    -0.0608
 +
    3 CAR    -0.2880  -2.3169  0.6237    -0.0463
 +
    4 CAR    0.4982  -1.1562  0.5665    0.0767
 +
    5 CAR    -0.0060  -0.0142  -0.1081    0.0989
 +
    6 CAR    -1.3176  -0.0099  -0.5663    -0.0302
 +
    7 C2      1.8754  -1.2008  1.1918    0.2937
 +
    8 O2      2.3237  -2.2044  1.7241    -0.2593
 +
    9 O3      2.6701  -0.1455  1.1998    -0.3274
 +
  10 O3      0.5437  1.1640  0.0040    -0.2771
 +
  11 C2      0.4587  1.8545  1.1222    0.2640
 +
  12 O2      1.0904  2.8925  1.2405    -0.2648
 +
  13 C3    -0.4520  1.4066  2.2316    0.0218
 +
  14 H      -3.0887  -1.1326  -0.8969    0.0618
 +
  15 H      -2.1972  -3.2070  0.1331    0.0617
 +
  16 H      0.0906  -3.2334  1.0831    0.0626
 +
  17 H      -1.6981  0.9134  -0.9708    0.0643
 +
  18 H      2.3570  0.6120  0.7625    0.2205
 +
  19 H      -0.9700  0.4657  2.0214    0.0330
 +
  20 H      -1.2187  2.1784  2.3783    0.0330
 +
  21 H      0.1367  1.2646  3.1468    0.0330
 +
    1    2    1  AROMATIC
 +
    2    3    2  AROMATIC
 +
    3    4    3  AROMATIC
 +
    4    5    4  AROMATIC
 +
    5    6    5  AROMATIC
 +
    6    6    1  AROMATIC
 +
    7    7    4  SINGLE
 +
    8    8    7  DOUBLE
 +
    9    9    7  SINGLE
 +
  10    10    5  SINGLE
 +
  11    11    10  SINGLE
 +
  12    12    11  DOUBLE
 +
  13    13    11  SINGLE
 +
  14    1    14  SINGLE
 +
  15    2    15  SINGLE
 +
  16    3    16  SINGLE
 +
  17    6    17  SINGLE
 +
  18    9    18  SINGLE
 +
  19    13    19  SINGLE
 +
  20    13    20  SINGLE
 +
  21    13    21  SINGLE
 +
</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