User:AngelHerraez/Sandbox2: Difference between revisions

From SklogWiki
Jump to navigation Jump to search
(testing the Chembox template)
(use new template variant)
Line 1: Line 1:
== Simple use of Chembox_3DStruct ==
== Simple use of Chembox_3DStruct ==
A use of the Chembox_3DStruct template that puts a link with the molecule name leading to a pop-up window with Jmol. <s>The molecule should be uploaded as a file.</s> File types not allowed in this Wiki.  
A use of the Chembox_3DStruct_Simple template that puts a link with the molecule name leading to a pop-up window with Jmol. <s>The molecule should be uploaded as a file.</s> File types not allowed in this Wiki.  


Let's change the template so that it uses model files uploaded as wiki pages. This code:
Let's change the template so that it uses model files uploaded as wiki pages. This code:
  <nowiki>{{Chembox 3DStruct|Water.pdb}}</nowiki>
  <nowiki>{{Chembox 3DStruct Simple|Water.pdb}}</nowiki>
renders so:
renders so:
{{Chembox 3DStruct|Water.pdb}}
{{Chembox 3DStruct Simple|Water.pdb}}


Another example:
Another example:
  <nowiki>{{Chembox 3DStruct|Benzene.pdb}}</nowiki>
  <nowiki>{{Chembox 3DStruct Simple|Benzene.pdb}}</nowiki>
renders so:
renders so:
{{Chembox 3DStruct|Benzene.pdb}}
{{Chembox 3DStruct Simple|Benzene.pdb}}


Works OK!
Works OK!
== Use of Chembox (mini version) ==
This reproduces (part of) the Chembox_Structure template at Wikipedia.
{| class="toccolours" border="1" width="{{{BoxWidth|250px}}}" style="float: right; clear: right; margin: 0 0 1em 1em; border-collapse: collapse;"
{{Chembox Structure
| 3DStruct = Caffeine.mol
| CrystalStruct =
| Coordination =
| MolShape = mostly planar
}}
|}

Revision as of 00:38, 26 May 2009

Simple use of Chembox_3DStruct

A use of the Chembox_3DStruct_Simple template that puts a link with the molecule name leading to a pop-up window with Jmol. The molecule should be uploaded as a file. File types not allowed in this Wiki.

Let's change the template so that it uses model files uploaded as wiki pages. This code:

{{Chembox 3DStruct Simple|Water.pdb}}

renders so: 3D structure: <jmol><jmolAppletLink>

  <wikiPageContents>Water.pdb</wikiPageContents>
  <text>Water.pdb</text>
</jmolAppletLink>

</jmol>

Another example:

{{Chembox 3DStruct Simple|Benzene.pdb}}

renders so: 3D structure: <jmol><jmolAppletLink>

  <wikiPageContents>Benzene.pdb</wikiPageContents>
  <text>Benzene.pdb</text>
</jmolAppletLink>

</jmol>

Works OK!