Difference between revisions of "Sandbox"
AngelHerraez (talk | contribs) |
AngelHerraez (talk | contribs) (→Jmol extension for MediaWiki) |
||
Line 31: | Line 31: | ||
</jmol> | </jmol> | ||
+ | For some reason, checkboxes are not working with the extension. | ||
+ | |||
Color atoms: | Color atoms: | ||
− | |||
<jmol> | <jmol> | ||
<jmolMenu> | <jmolMenu> | ||
Line 51: | Line 52: | ||
− | This one uses the <code>inlineContents</code> tag, with straight data on the left and with added pipe characters (|) on the right: | + | This one uses the <code>inlineContents</code> tag, with straight MOL data on the left applet and with added pipe characters (|) on the right applet: |
<table width="100%"><tr> | <table width="100%"><tr> | ||
<td> | <td> | ||
Line 108: | Line 109: | ||
<size>150</size> | <size>150</size> | ||
<color>green</color> | <color>green</color> | ||
+ | <inlineContents>|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 | ||
+ | </inlineContents> | ||
+ | </jmolApplet> | ||
+ | </jmol> | ||
+ | </td> | ||
+ | </tr></table> | ||
+ | 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: | ||
+ | <table width="100%"><tr> | ||
+ | <td> | ||
+ | <jmol> | ||
+ | <jmolApplet> | ||
+ | <size>150</size> | ||
<inlineContents> | <inlineContents> | ||
− | + | REMARK Butane | |
− | + | HETATM 1 C UNK 0 -0.769 0.000 0.000 C | |
− | + | HETATM 2 C UNK 0 0.769 0.000 0.000 C | |
− | + | HETATM 3 C UNK 0 -1.383 -0.728 1.203 C | |
− | + | HETATM 4 C UNK 0 1.382 -0.741 1.196 C | |
− | + | HETATM 5 H UNK 0 -1.127 1.059 0.007 H | |
− | + | HETATM 6 H UNK 0 -1.142 -0.461 -0.945 H | |
− | + | HETATM 7 H UNK 0 -1.001 -0.311 2.163 H | |
− | + | HETATM 8 H UNK 0 1.128 -0.488 -0.940 H | |
− | + | HETATM 9 H UNK 0 1.143 1.051 -0.017 H | |
− | + | HETATM 10 H UNK 0 -2.493 -0.625 1.206 H | |
− | + | HETATM 11 H UNK 0 -1.156 -1.818 1.183 H | |
− | + | HETATM 12 H UNK 0 2.492 -0.792 1.105 H | |
− | + | HETATM 13 H UNK 0 1.155 -0.230 2.158 H | |
− | + | HETATM 14 H UNK 0 1.000 -1.787 1.259 H | |
− | + | END | |
− | | 1 | + | </inlineContents> |
− | + | </jmolApplet> | |
− | | 0 | + | </jmol> |
− | + | </td> | |
− | | 0. | + | <td> |
− | + | <jmol> | |
− | | 1 | + | <jmolApplet> |
− | | | + | <size>150</size> |
− | | | + | <inlineContents> |
− | | | + | |REMARK Butane |
− | + | |HETATM 1 C UNK 0 -0.769 0.000 0.000 C | |
− | | | + | |HETATM 2 C UNK 0 0.769 0.000 0.000 C |
− | | | + | |HETATM 3 C UNK 0 -1.383 -0.728 1.203 C |
− | | | + | |HETATM 4 C UNK 0 1.382 -0.741 1.196 C |
− | + | |HETATM 5 H UNK 0 -1.127 1.059 0.007 H | |
− | | | + | |HETATM 6 H UNK 0 -1.142 -0.461 -0.945 H |
− | + | |HETATM 7 H UNK 0 -1.001 -0.311 2.163 H | |
− | | | + | |HETATM 8 H UNK 0 1.128 -0.488 -0.940 H |
− | | | + | |HETATM 9 H UNK 0 1.143 1.051 -0.017 H |
− | + | |HETATM 10 H UNK 0 -2.493 -0.625 1.206 H | |
− | + | |HETATM 11 H UNK 0 -1.156 -1.818 1.183 H | |
− | | | + | |HETATM 12 H UNK 0 2.492 -0.792 1.105 H |
− | + | |HETATM 13 H UNK 0 1.155 -0.230 2.158 H | |
− | + | |HETATM 14 H UNK 0 1.000 -1.787 1.259 H | |
− | + | |END | |
</inlineContents> | </inlineContents> | ||
</jmolApplet> | </jmolApplet> | ||
Line 155: | Line 210: | ||
</td> | </td> | ||
</tr></table> | </tr></table> | ||
− | + | 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. | ||
+ | --[[User:AngelHerraez|AngelHerraez]] 22:11, 30 November 2008 (CET) | ||
== Using a pop-up window == | == Using a pop-up window == |
Revision as of 21:11, 30 November 2008
This is a page for testing.
Jmol extension for MediaWiki
This uses uploadedFileContents
tag with an XYZ file:
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)
Using a pop-up window
An image used for illustration and a caption for requesting the Jmol model: