Difference between revisions of "User:AngelHerraez/Sandbox MW Extension"
AngelHerraez (talk | contribs) (Created page with "{{Extension |status = unstable |type1 = tag |hook1 = ParserFirstCallInit |author = NicoV, Jaime Prilusky,...") |
AngelHerraez (talk | contribs) (this is draft for content that will go in /www.mediawiki.org/wiki/Extension:Jmol) |
||
(One intermediate revision by the same user not shown) | |||
Line 34: | Line 34: | ||
The '''Jmol''' extension allows for displaying molecular models in interactive 3D inside wiki pages using [[:en:Jmol|JSmol HTML5 objects]]. | The '''Jmol''' extension allows for displaying molecular models in interactive 3D inside wiki pages using [[:en:Jmol|JSmol HTML5 objects]]. | ||
− | Documentation | + | Documentation on its installation and use can be found at [https://sf.net/p/jmol/wiki/MW%20Extension/ the Jmol project pages], as well as at [https://wiki.jmol.org/index.php/MediaWiki Jmol Wiki], with full details and demonstration examples. |
== Usage == | == Usage == | ||
The Jmol extension can be used as a "custom tag" to display a 3D interactive view of a molecule or structure in a wiki page, either: | The Jmol extension can be used as a "custom tag" to display a 3D interactive view of a molecule or structure in a wiki page, either: | ||
+ | * in a popup window, upon user action | ||
* in-line, inserted in the page as the page is loaded | * in-line, inserted in the page as the page is loaded | ||
* in-line, inserted in the page upon user action | * in-line, inserted in the page upon user action | ||
− | |||
=== {{tag|jmolFile|open}} === | === {{tag|jmolFile|open}} === | ||
− | The {{tag|jmolFile|open}} tag can be used to display in 3D a molecule file that has been previously uploaded into a Wiki. | + | The {{tag|jmolFile|open}} tag can be used to display in 3D a molecule or structure file that has been previously uploaded into a Wiki. |
− | This tag | + | :This tag may be disabled by administrators in the configuration file of the wiki, using <code>$wgJmolAuthorizeJmolFileTag = false</code> |
A few examples: | A few examples: | ||
− | * <source lang=html inline><jmolFile>Chair.cml</jmolFile></source> will | + | * <source lang=html inline><jmolFile>Chair.cml</jmolFile></source> will put in the article a ''Chair.cml'' link. When users click on it, a popup window will display the 3D structure specified in <code>File:Chair.cml</code>. |
− | * <source lang=html inline><jmolFile text=" | + | * <source lang=html inline><jmolFile text="chair conformation">Chair.cml</jmolFile></source> will put in the article a ''chair conformation'' link. When this link is clicked on, a popup window will display the 3D structure specified in <code>File:Chair.cml</code>. |
− | |||
− | |||
− | |||
=== {{tag|jmolSmiles|open}} === | === {{tag|jmolSmiles|open}} === | ||
− | The {{tag|jmolSmiles|open}} tag can be used to display in | + | The {{tag|jmolSmiles|open}} tag can be used to display in 3D a molecule file using its [[:en:SMILES|SMILES]] notation. |
− | This tag | + | :This tag may be disabled by administrators in the configuration file of the wiki, using <code>$wgJmolAuthorizeJmolSmilesTag = false</code> |
A few examples: | A few examples: | ||
− | * <source lang=html inline><jmolSmiles>CCCNC</jmolSmiles></source> will | + | * <source lang=html inline><jmolSmiles>CCCNC</jmolSmiles></source> will put in the article a ''CCCNC'' link. When users click on it, a popup window will display the 3D structure that matches the SMILES string ''CCCNC''. |
− | * <source lang=html inline><jmolSmiles text=" | + | * <source lang=html inline><jmolSmiles text="smiles notation">CCCNC</jmolSmiles></source> will put in the article a ''smiles notation'' link. When this link is clicked on, a popup window will display the 3D structure that matches the SMILES string ''CCCNC''. |
− | |||
− | |||
− | |||
=== {{tag|jmolPdb|open}} === | === {{tag|jmolPdb|open}} === | ||
− | The {{tag|jmolPdb|open}} tag can be used to display in | + | The {{tag|jmolPdb|open}} tag can be used to display in 3D a molecule file using its [[:en:Protein Data Bank|PDB]] code. |
− | This tag | + | :This tag may be disabled by administrators in the configuration file of the wiki, using <code>$wgJmolAuthorizeJmolPdbTag = false</code> |
A few examples: | A few examples: | ||
− | * <source lang=html inline><jmolPdb>1ALE</jmolPdb></source> will | + | * <source lang=html inline><jmolPdb>1ALE</jmolPdb></source> will put in the article a ''1ALE'' link. When users click on it, a popup window will display the 3D structure matching the PDB code ''1ALE''. |
− | * <source lang=html inline><jmolPdb text=" | + | * <source lang=html inline><jmolPdb text="Partial structure of Apo-C-I">1ALE</jmolPdb></source> will put in the article a ''Partial structure of Apo-C-I'' link. When this link is clicked on, a popup window will display the 3D structure matching the PDB code ''1ALE''. |
− | + | === {{tag|jmol|open}} === | |
− | |||
− | + | The {{tag|jmol|open}} tag can be used to display in 3D a molecule or structure file in several situations. Its use is more complex than the other tags, but also more flexible. | |
+ | It takes embedded sub-tags (2nd and 3rd level). Documentation is available in [https://sf.net/p/jmol/wiki/MW%20Extension/ the Jmol project pages] or in [http://wiki.jmol.org/index.php/MediaWiki/Extension the Extension page at the Jmol Wiki]. | ||
+ | :This tag may be disabled by administrators in the configuration file of the wiki, using <code>$wgJmolAuthorizeJmolTag = false</code> | ||
− | |||
− | |||
== Installing Jmol extension == | == Installing Jmol extension == | ||
− | + | ||
'''Note:''' Version 6 of the Jmol Extension has been tested against MediaWiki 1.39-1.43. For older installations of MediaWiki you may use previous versions of the Extension. | '''Note:''' Version 6 of the Jmol Extension has been tested against MediaWiki 1.39-1.43. For older installations of MediaWiki you may use previous versions of the Extension. | ||
− | To install the Jmol extension | + | To install the Jmol extension in your wiki, follow instructions at [https://sf.net/p/jmol/wiki/MW%20Extension/ the Jmol project pages] |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
== Wikis using the Jmol extension == | == Wikis using the Jmol extension == | ||
− | If you know a wiki using the Jmol extension, please add it to the list of [http://wiki.jmol.org/index.php/Wikis_Using_Jmol Wikis using Jmol]. | + | If you know a wiki using the Jmol extension, please add it to the list of [http://wiki.jmol.org/index.php/Wikis_Using_Jmol Wikis using Jmol] or report it at [https://sf.net/p/jmol/mailman/jmol-users/ the Jmol-users e-mail list]. |
== Troubleshooting == | == Troubleshooting == | ||
− | + | Please address any queries to [https://sf.net/p/jmol/mailman/jmol-developers/ the Jmol-developers e-mail list] | |
− | |||
== Weblinks == | == Weblinks == | ||
− | + | * [http://jmol.sf.net Jmol official web site] | |
− | * [ | + | * [http://wiki.jmol.org Jmol official Wiki] |
− | * [https:// | + | * [https://sf.net/p/jmol/ Jmol project site] |
+ | * [https://sf.net/p/jmol/code/HEAD/tree/trunk/Jmol-extensions/wiki/MediaWiki/ Browse extension source code] | ||
* [https://proteopedia.org/wiki/index.php/Special:Version Special:Version at Proteopedia], a MediaWiki site dedicated to display of proteins and molecules, using the Jmol Extension. | * [https://proteopedia.org/wiki/index.php/Special:Version Special:Version at Proteopedia], a MediaWiki site dedicated to display of proteins and molecules, using the Jmol Extension. | ||
[[Category:3D extensions{{#translation:}}]] | [[Category:3D extensions{{#translation:}}]] |
Latest revision as of 20:37, 21 January 2025
The Jmol extension allows for displaying molecular models in interactive 3D inside wiki pages using JSmol HTML5 objects.
Documentation on its installation and use can be found at the Jmol project pages, as well as at Jmol Wiki, with full details and demonstration examples.
Contents
Usage
The Jmol extension can be used as a "custom tag" to display a 3D interactive view of a molecule or structure in a wiki page, either:
- in a popup window, upon user action
- in-line, inserted in the page as the page is loaded
- in-line, inserted in the page upon user action
<jmolFile>
The <jmolFile> tag can be used to display in 3D a molecule or structure file that has been previously uploaded into a Wiki.
- This tag may be disabled by administrators in the configuration file of the wiki, using
$wgJmolAuthorizeJmolFileTag = false
A few examples:
- <source lang=html inline>Chair.cml</source> will put in the article a Chair.cml link. When users click on it, a popup window will display the 3D structure specified in
File:Chair.cml
. - <source lang=html inline>chair conformation</source> will put in the article a chair conformation link. When this link is clicked on, a popup window will display the 3D structure specified in
File:Chair.cml
.
<jmolSmiles>
The <jmolSmiles> tag can be used to display in 3D a molecule file using its SMILES notation.
- This tag may be disabled by administrators in the configuration file of the wiki, using
$wgJmolAuthorizeJmolSmilesTag = false
A few examples:
- <source lang=html inline>CCCNC</source> will put in the article a CCCNC link. When users click on it, a popup window will display the 3D structure that matches the SMILES string CCCNC.
- <source lang=html inline>smiles notation</source> will put in the article a smiles notation link. When this link is clicked on, a popup window will display the 3D structure that matches the SMILES string CCCNC.
<jmolPdb>
The <jmolPdb> tag can be used to display in 3D a molecule file using its PDB code.
- This tag may be disabled by administrators in the configuration file of the wiki, using
$wgJmolAuthorizeJmolPdbTag = false
A few examples:
- <source lang=html inline>1ALE</source> will put in the article a 1ALE link. When users click on it, a popup window will display the 3D structure matching the PDB code 1ALE.
- <source lang=html inline>Partial structure of Apo-C-I</source> will put in the article a Partial structure of Apo-C-I link. When this link is clicked on, a popup window will display the 3D structure matching the PDB code 1ALE.
<jmol>
The <jmol> tag can be used to display in 3D a molecule or structure file in several situations. Its use is more complex than the other tags, but also more flexible. It takes embedded sub-tags (2nd and 3rd level). Documentation is available in the Jmol project pages or in the Extension page at the Jmol Wiki.
- This tag may be disabled by administrators in the configuration file of the wiki, using
$wgJmolAuthorizeJmolTag = false
Installing Jmol extension
Note: Version 6 of the Jmol Extension has been tested against MediaWiki 1.39-1.43. For older installations of MediaWiki you may use previous versions of the Extension.
To install the Jmol extension in your wiki, follow instructions at the Jmol project pages
Wikis using the Jmol extension
If you know a wiki using the Jmol extension, please add it to the list of Wikis using Jmol or report it at the Jmol-users e-mail list.
Troubleshooting
Please address any queries to the Jmol-developers e-mail list
Weblinks
- Jmol official web site
- Jmol official Wiki
- Jmol project site
- Browse extension source code
- Special:Version at Proteopedia, a MediaWiki site dedicated to display of proteins and molecules, using the Jmol Extension.
[[Category:3D extensions{{#translation:}}]]