Template:Chembox: Difference between revisions

From WikiMD's Wellness Encyclopedia

No edit summary
No edit summary
Tag: Reverted
Line 1: Line 1:
<templatestyles src="Chembox/styles.css"/>
{| class="infobox" style="width:{{{width|22em}}}; background:#f9f9f9; border:1px solid #aaa; padding:5px; font-size:90%;"
{| class="infobox" style="width:22em; background:#f9f9f9; border:1px solid #aaa; padding:5px; font-size:90%;"
|+ style="font-weight:bold; font-size:110%; background:#efefef; padding:3px;" | {{{Name|{{PAGENAME}}}}}
|+ style="font-weight:bold; font-size:110%; background:#efefef; padding:3px;" | {{{name|{{PAGENAME}}}}}


<!-- IMAGE SECTION -->
<!-- IMAGES -->
{{#if: {{{ImageFile|}}} |
|-
|-
| style="text-align:center;" | {{#if: {{{image|}}} |
| style="text-align:center;" | [[File:{{{ImageFile}}}|{{{ImageSize|200px}}}|alt={{{ImageAlt|}}}]]
[[File:{{{image}}}|{{{image_size|200px}}}|alt={{{image_alt|}}}]]<br>
<br><small>{{{ImageCaption|}}}</small>
<small>{{{image_alt|}}}</small>
}}
}}
{{#if: {{{image2|}}} |
{{#if: {{{ImageFile1|}}} |
<br>[[File:{{{image2}}}|{{{image2_size|200px}}}|alt={{{image2_alt|}}}]]<br>
|-
<small>{{{image2_alt|}}}</small>
| style="text-align:center;" | [[File:{{{ImageFile1}}}|{{{ImageSize1|200px}}}|alt={{{ImageAlt1|}}}]]
<br><small>{{{ImageCaption1|}}}</small>
}}
{{#if: {{{ImageFile2|}}} |
|-
| style="text-align:center;" | [[File:{{{ImageFile2}}}|{{{ImageSize2|200px}}}|alt={{{ImageAlt2|}}}]]
<br><small>{{{ImageCaption2|}}}</small>
}}
}}


<!-- IUPAC NAME -->
<!-- NAMES -->
{{#if: {{{IUPACName|}}} |
|-
|-
| style="background:#efefef;" | IUPAC Name
| style="background:#efefef;" | IUPAC Name
| {{{IUPAC_name|}}}
| {{{IUPACName}}}
 
}}
<!-- OTHER NAMES -->
{{#if: {{{OtherNames|}}} |
{{#if: {{{other_names|}}} |
|-
|-
| style="background:#efefef;" | Other Names
| style="background:#efefef;" | Other Names
| {{{other_names}}}
| {{{OtherNames}}}
}}
}}


Line 41: Line 46:
| style="background:#efefef;" | ChemSpider
| style="background:#efefef;" | ChemSpider
| [https://www.chemspider.com/Chemical-Structure.{{{ChemSpiderID}}}.html {{{ChemSpiderID}}}]
| [https://www.chemspider.com/Chemical-Structure.{{{ChemSpiderID}}}.html {{{ChemSpiderID}}}]
}}
{{#if: {{{UNII|}}} |
|-
| style="background:#efefef;" | UNII
| {{{UNII}}}
}}
}}
{{#if: {{{ChEBI|}}} |
{{#if: {{{ChEBI|}}} |
Line 51: Line 51:
| style="background:#efefef;" | ChEBI
| style="background:#efefef;" | ChEBI
| [https://www.ebi.ac.uk/chebi/searchId.do?chebiId=CHEBI:{{{ChEBI}}} {{{ChEBI}}}]
| [https://www.ebi.ac.uk/chebi/searchId.do?chebiId=CHEBI:{{{ChEBI}}} {{{ChEBI}}}]
}}
{{#if: {{{ChEMBL|}}} |
|-
| style="background:#efefef;" | ChEMBL
| [https://www.ebi.ac.uk/chembl/compound_report_card/{{{ChEMBL}}}/ {{{ChEMBL}}}]
}}
{{#if: {{{IUPHAR_ligand|}}} |
|-
| style="background:#efefef;" | IUPHAR Ligand
| [https://www.guidetopharmacology.org/GRAC/LigandDisplayForward?ligandId={{{IUPHAR_ligand}}} {{{IUPHAR_ligand}}}]
}}
{{#if: {{{KEGG|}}} |
|-
| style="background:#efefef;" | KEGG
| [https://www.genome.jp/dbget-bin/www_bget?cpd:{{{KEGG}}} {{{KEGG}}}]
}}
}}
{{#if: {{{DrugBank|}}} |
{{#if: {{{DrugBank|}}} |
Line 73: Line 58:
}}
}}


<!-- CHEMICAL FORMULA -->
<!-- CHEMICAL PROPERTIES -->
|-
|-
| style="background:#efefef;" | Chemical Formula
| style="background:#efefef;" | Chemical Formula
| {{{formula|}}}
| {{{Formula|}}}
 
<!-- MOLAR MASS -->
|-
|-
| style="background:#efefef;" | Molar Mass
| style="background:#efefef;" | Molar Mass
| {{{molar_mass|}}}
| {{{MolarMass|}}}


<!-- MELTING POINT -->
{{#if: {{{MeltingPoint|}}} |
{{#if: {{{melting_point|}}} |
|-
|-
| style="background:#efefef;" | Melting Point
| style="background:#efefef;" | Melting Point
| {{{melting_point}}}
| {{{MeltingPoint}}}
}}
}}


Line 111: Line 93:
}}
}}


<!-- FOOTER -->
|-
|-
| style="text-align:center; font-size:85%; padding:5px;" colspan="2" |
| colspan="2" style="text-align:center; font-size:85%; padding:5px;" | <small>Data sourced from verified databases</small>
<small>Data sourced from verified databases</small>
|}
|}
<noinclude>
<noinclude>
== Usage ==
== Usage ==
This is a non-Lua version of the `Chembox` template for displaying chemical compound data in an infobox.
This template displays chemical compound data in an infobox format.


=== Example ===
=== Example ===
<syntaxhighlight lang="mediawiki">
<syntaxhighlight lang="mediawiki">
{{Chembox
{{Chembox
| name          = Cholic acid
| Name        = Cholic acid
| image        = Cholic acid.svg
| ImageFile    = Cholic acid.svg
| image_alt     = Skeletal formula of cholic acid
| ImageAlt     = Skeletal formula of cholic acid
| image2        = Cholic acid 3D ball.png
| ImageCaption = Cholic acid chemical structure
| image2_alt   = Ball-and-stick model of cholic acid molecule
| ImageFile1  = Cholic acid 3D ball.png
| IUPAC_name   = (R)-4-[(3R,5S,7R,8R,9S,10R,12S,13R,14S,17R)-3,7,12-trihydroxy-10,13-dimethyl-1,2,3,4,5,6,7,8,9,11,12,14,15,16,17-tetradecahydrocyclopenta[a]phenanthren-17-yl]pentanoic acid
| ImageAlt1   = 3D ball model
| other_names   = 3α,7α,12α-Trihydroxy-5β-cholan-24-oic acid
| ImageCaption1= Cholic acid 3D structure
| CAS_number   = 81-25-4
| IUPACName   = (R)-4-[(3R,5S,7R,8R,9S,10R,12S,13R,14S,17R)-3,7,12-trihydroxy-10,13-dimethyl-1,2,3,4,5,6,7,8,9,11,12,14,15,16,17-tetradecahydrocyclopenta[a]phenanthren-17-yl]pentanoic acid
| PubChem       = 221493
| OtherNames   = 3α,7α,12α-Trihydroxy-5β-cholan-24-oic acid
| ChemSpiderID = 192104
| CAS_number   = 81-25-4
| UNII          = G0S7T6QH5O
| PubChem     = 221493
| ChEBI         = 16359
| ChemSpiderID = 192104
| ChEMBL        = 1201632
| ChEBI       = 16359
| IUPHAR_ligand = 609
| DrugBank     = DB02659
| KEGG          = C05436
| Formula      = C<sub>24</sub>H<sub>40</sub>O<sub>5</sub>
| DrugBank     = DB02659
| MolarMass   = 408.57 g/mol
| formula      = C<sub>24</sub>H<sub>40</sub>O<sub>5</sub>
| MeltingPoint = 198–200 °C
| molar_mass   = 408.57 g/mol
| SMILES       = C[C@H]1CC[C@H]2[C@@H]3CC[C@H]4[C@@H](C[C@@H](O)[C@H]4[C@@H]3CC[C@H]2[C@@]1(C)C)C[C@@H](CC(=O)O)O
| melting_point = 198-200 °C
| InChI       = 1S/C24H40O5/c1-13-4-5-14-15-6-7-17-20(27)18(15)8-9-21(17)24(14,2)16(13)10-19(26)22(3)11-23(28)12-25/h13-22,25-28H,4-12H2,1-3H3/t13-,14-,15+,16-,17-,18-,19-,20-,21-,22-,24-/m0/s1
| SMILES       = C[C@H]1CC[C@H]2[C@@H]3CC[C@H]4[C@@H](C[C@@H](O)[C@H]4[C@@H]3CC[C@H]2[C@@]1(C)C)C[C@@H](CC(=O)O)O
| InChIKey     = BHQCQFFYRZLCQQ-HPLJOQBZSA-N
| InChI         = 1S/C24H40O5/c1-13-4-5-14-15-6-7-17-20(27)18(15)8-9-21(17)24(14,2)16(13)10-19(26)22(3)11-23(28)12-25/h13-22,25-28H,4-12H2,1-3H3/t13-,14-,15+,16-,17-,18-,19-,20-,21-,22-,24-/m0/s1
| InChIKey     = BHQCQFFYRZLCQQ-HPLJOQBZSA-N
}}
}}
</syntaxhighlight>
</syntaxhighlight>


=== Parameters ===
=== Parameters ===
* `name` - Name of the compound.
* `Name` - Name of the compound.
* `image` / `image2` - Image file names.
* `ImageFile`, `ImageFile1` - File names for images.
* `image_alt` / `image2_alt` - Alternative text for images.
* `ImageAlt`, `ImageCaption` - Alternative text and captions for images.
* `IUPAC_name` - IUPAC-approved name.
* `IUPACName` - IUPAC name of the compound.
* `other_names` - Other names or synonyms.
* `OtherNames` - Synonyms for the compound.
* `CAS_number`, `PubChem`, `ChemSpiderID`, `UNII`, `ChEBI`, `ChEMBL`, `IUPHAR_ligand`, `KEGG`, `DrugBank` - Database identifiers.
* `CAS_number`, `PubChem`, `ChemSpiderID`, `ChEBI`, `DrugBank` - External chemical identifiers.
* `formula` - Chemical formula.
* `Formula` - Molecular formula.
* `molar_mass` - Molar mass of the compound.
* `MolarMass` - Molecular weight.
* `melting_point` - Melting point.
* `MeltingPoint` - Melting point temperature.
* `SMILES`, `InChI`, `InChIKey` - Chemical notations.
* `SMILES`, `InChI`, `InChIKey` - Chemical notations.


== Notes ==
== Notes ==
* This template uses standard MediaWiki parser functions.
* Empty fields are automatically hidden.
* Empty parameters are automatically hidden for clean display.
* The design is clean, functional, and compatible with MediaWiki without Lua dependencies.
 
</noinclude>
</noinclude>

Revision as of 17:47, 17 December 2024

Chembox - - - - - - - - - -
Chemical Formula
Molar Mass

-

-

-

-

Data sourced from verified databases

Usage

This template displays chemical compound data in an infobox format.

Example

{{Chembox
| Name         = Cholic acid
| ImageFile    = Cholic acid.svg
| ImageAlt     = Skeletal formula of cholic acid
| ImageCaption = Cholic acid chemical structure
| ImageFile1   = Cholic acid 3D ball.png
| ImageAlt1    = 3D ball model
| ImageCaption1= Cholic acid 3D structure
| IUPACName    = (R)-4-[(3R,5S,7R,8R,9S,10R,12S,13R,14S,17R)-3,7,12-trihydroxy-10,13-dimethyl-1,2,3,4,5,6,7,8,9,11,12,14,15,16,17-tetradecahydrocyclopenta[a]phenanthren-17-yl]pentanoic acid
| OtherNames   = 3α,7α,12α-Trihydroxy-5β-cholan-24-oic acid
| CAS_number   = 81-25-4
| PubChem      = 221493
| ChemSpiderID = 192104
| ChEBI        = 16359
| DrugBank     = DB02659
| Formula      = C<sub>24</sub>H<sub>40</sub>O<sub>5</sub>
| MolarMass    = 408.57 g/mol
| MeltingPoint = 198–200 °C
| SMILES       = C[C@H]1CC[C@H]2[C@@H]3CC[C@H]4[C@@H](C[C@@H](O)[C@H]4[C@@H]3CC[C@H]2[C@@]1(C)C)C[C@@H](CC(=O)O)O
| InChI        = 1S/C24H40O5/c1-13-4-5-14-15-6-7-17-20(27)18(15)8-9-21(17)24(14,2)16(13)10-19(26)22(3)11-23(28)12-25/h13-22,25-28H,4-12H2,1-3H3/t13-,14-,15+,16-,17-,18-,19-,20-,21-,22-,24-/m0/s1
| InChIKey     = BHQCQFFYRZLCQQ-HPLJOQBZSA-N
}}

Parameters

  • `Name` - Name of the compound.
  • `ImageFile`, `ImageFile1` - File names for images.
  • `ImageAlt`, `ImageCaption` - Alternative text and captions for images.
  • `IUPACName` - IUPAC name of the compound.
  • `OtherNames` - Synonyms for the compound.
  • `CAS_number`, `PubChem`, `ChemSpiderID`, `ChEBI`, `DrugBank` - External chemical identifiers.
  • `Formula` - Molecular formula.
  • `MolarMass` - Molecular weight.
  • `MeltingPoint` - Melting point temperature.
  • `SMILES`, `InChI`, `InChIKey` - Chemical notations.

Notes

  • Empty fields are automatically hidden.
  • The design is clean, functional, and compatible with MediaWiki without Lua dependencies.