Template:Chembox: Difference between revisions

From WikiMD's Wellness Encyclopedia

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


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


<!-- NAMES SECTION -->
<!-- IUPAC NAME -->
{{#if: {{{OtherNames|}}}{{{IUPACName|}}}{{{PIN|}}}{{{SystematicName|}}} |
|-
|-
| style="background:#efefef;" | <b>Names</b>
| style="background:#efefef;" | IUPAC Name
| {{{IUPAC_name|}}}
 
<!-- OTHER NAMES -->
{{#if: {{{other_names|}}} |
|-
|-
| style="padding:5px;" |
| style="background:#efefef;" | Other Names
{{#if: {{{IUPACName|}}} | <b>IUPAC Name:</b> {{{IUPACName}}}<br> }}
| {{{other_names}}}
{{#if: {{{PIN|}}} | <b>PIN:</b> {{{PIN}}}<br> }}
{{#if: {{{SystematicName|}}} | <b>Systematic Name:</b> {{{SystematicName}}}<br> }}
{{#if: {{{OtherNames|}}} | <b>Other Names:</b> {{{OtherNames}}} }}
}}
}}


<!-- SECTIONS -->
<!-- IDENTIFIERS -->
{{#if: {{{Section1|}}} |
{{#if: {{{CAS_number|}}} |
|-
|-
| style="background:#efefef;" | <b>Section 1</b>
| style="background:#efefef;" | CAS Number
| {{{CAS_number}}}
}}
{{#if: {{{PubChem|}}} |
|-
|-
| {{{Section1}}}
| style="background:#efefef;" | PubChem
| [https://pubchem.ncbi.nlm.nih.gov/compound/{{{PubChem}}} {{{PubChem}}}]
}}
}}
{{#if: {{{Section2|}}} |
{{#if: {{{ChemSpiderID|}}} |
|-
|-
| style="background:#efefef;" | <b>Section 2</b>
| style="background:#efefef;" | ChemSpider
| [https://www.chemspider.com/Chemical-Structure.{{{ChemSpiderID}}}.html {{{ChemSpiderID}}}]
}}
{{#if: {{{UNII|}}} |
|-
|-
| {{{Section2}}}
| style="background:#efefef;" | UNII
| {{{UNII}}}
}}
}}
{{#if: {{{Section3|}}} |
{{#if: {{{ChEBI|}}} |
|-
|-
| style="background:#efefef;" | <b>Section 3</b>
| style="background:#efefef;" | ChEBI
| [https://www.ebi.ac.uk/chebi/searchId.do?chebiId=CHEBI:{{{ChEBI}}} {{{ChEBI}}}]
}}
{{#if: {{{ChEMBL|}}} |
|-
|-
| {{{Section3}}}
| style="background:#efefef;" | ChEMBL
| [https://www.ebi.ac.uk/chembl/compound_report_card/{{{ChEMBL}}}/ {{{ChEMBL}}}]
}}
}}
{{#if: {{{Section4|}}} |
{{#if: {{{IUPHAR_ligand|}}} |
|-
|-
| style="background:#efefef;" | <b>Section 4</b>
| style="background:#efefef;" | IUPHAR Ligand
| [https://www.guidetopharmacology.org/GRAC/LigandDisplayForward?ligandId={{{IUPHAR_ligand}}} {{{IUPHAR_ligand}}}]
}}
{{#if: {{{KEGG|}}} |
|-
|-
| {{{Section4}}}
| style="background:#efefef;" | KEGG
| [https://www.genome.jp/dbget-bin/www_bget?cpd:{{{KEGG}}} {{{KEGG}}}]
}}
}}
{{#if: {{{Section5|}}} |
{{#if: {{{DrugBank|}}} |
|-
|-
| style="background:#efefef;" | <b>Section 5</b>
| style="background:#efefef;" | DrugBank
| [https://go.drugbank.com/drugs/{{{DrugBank}}} {{{DrugBank}}}]
}}
 
<!-- CHEMICAL FORMULA -->
|-
|-
| {{{Section5}}}
| style="background:#efefef;" | Chemical Formula
}}
| {{{formula|}}}
{{#if: {{{Section6|}}} |
 
<!-- MOLAR MASS -->
|-
|-
| style="background:#efefef;" | <b>Section 6</b>
| style="background:#efefef;" | Molar Mass
| {{{molar_mass|}}}
 
<!-- MELTING POINT -->
{{#if: {{{melting_point|}}} |
|-
|-
| {{{Section6}}}
| style="background:#efefef;" | Melting Point
| {{{melting_point}}}
}}
}}
{{#if: {{{Section7|}}} |
 
|-
<!-- SMILES -->
| style="background:#efefef;" | <b>Section 7</b>
{{#if: {{{SMILES|}}} |
|-
|-
| {{{Section7}}}
| style="background:#efefef;" | SMILES
| {{{SMILES}}}
}}
}}
{{#if: {{{Section8|}}} |
 
|-
<!-- InChI -->
| style="background:#efefef;" | <b>Section 8</b>
{{#if: {{{InChI|}}} |
|-
|-
| {{{Section8}}}
| style="background:#efefef;" | InChI
| {{{InChI}}}
}}
}}
{{#if: {{{Section9|}}} |
 
|-
<!-- InChIKey -->
| style="background:#efefef;" | <b>Section 9</b>
{{#if: {{{InChIKey|}}} |
|-
|-
| {{{Section9}}}
| style="background:#efefef;" | InChIKey
| {{{InChIKey}}}
}}
}}


<!-- FOOTER -->
|-
|-
| style="text-align:center; font-size:90%;" colspan="2" |
| style="text-align:center; font-size:85%; padding:5px;" colspan="2" |
{{#if: {{{general_note|}}} | {{{general_note}}}<br> }}
<small>Data sourced from verified databases</small>
<small>This data is verified and monitored for accuracy.</small>
|}
|}


<noinclude>
<noinclude>
== Usage ==
== Usage ==
This template is a non-Lua version of `Chembox` for displaying chemical compound information.
This is a non-Lua version of the `Chembox` template for displaying chemical compound data in an infobox.


=== Example ===
=== Example ===
<syntaxhighlight lang="mediawiki">
<syntaxhighlight lang="mediawiki">
{{Chembox
{{Chembox
| Name            = Water
| name          = Cholic acid
| ImageFile      = Water_Molecule.png
| image        = Cholic acid.svg
| ImageSize      = 150px
| image_alt    = Skeletal formula of cholic acid
| ImageCaption   = Structure of a water molecule
| image2        = Cholic acid 3D ball.png
| IUPACName       = Oxidane
| image2_alt    = Ball-and-stick model of cholic acid molecule
| SystematicName = Water
| 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
| OtherNames     = Dihydrogen monoxide
| other_names  = 3α,7α,12α-Trihydroxy-5β-cholan-24-oic acid
| Section1        = <b>Formula:</b> H₂O
| CAS_number    = 81-25-4
| Section2        = <b>Boiling Point:</b> 100°C
| PubChem       = 221493
| general_note   = Common solvent in chemistry
| ChemSpiderID = 192104
| UNII          = G0S7T6QH5O
| ChEBI        = 16359
| ChEMBL        = 1201632
| IUPHAR_ligand = 609
| KEGG          = C05436
| DrugBank     = DB02659
| formula      = C<sub>24</sub>H<sub>40</sub>O<sub>5</sub>
| molar_mass   = 408.57 g/mol
| melting_point = 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
}}
}}
</syntaxhighlight>
</syntaxhighlight>


=== Parameters ===
=== Parameters ===
* `Name` - The title or name of the compound.
* `name` - Name of the compound.
* `ImageFile` - File name for the image.
* `image` / `image2` - Image file names.
* `ImageSize` - Size of the image.
* `image_alt` / `image2_alt` - Alternative text for images.
* `ImageCaption` - Caption for the image.
* `IUPAC_name` - IUPAC-approved name.
* `IUPACName` - IUPAC-approved name.
* `other_names` - Other names or synonyms.
* `SystematicName` - Systematic chemical name.
* `CAS_number`, `PubChem`, `ChemSpiderID`, `UNII`, `ChEBI`, `ChEMBL`, `IUPHAR_ligand`, `KEGG`, `DrugBank` - Database identifiers.
* `OtherNames` - Alternative names.
* `formula` - Chemical formula.
* `Section1``Section9` - Custom data sections.
* `molar_mass` - Molar mass of the compound.
* `general_note` - Footer note for the infobox.
* `melting_point` - Melting point.
* `SMILES`, `InChI`, `InChIKey` - Chemical notations.


== Notes ==
== Notes ==
* This template does not use Lua modules.
* This template uses standard MediaWiki parser functions.
* Sections 1–9 can be used to add custom content.
* Empty parameters are automatically hidden for clean display.
* Empty fields will not be displayed.


</noinclude>
</noinclude>

Revision as of 17:39, 17 December 2024

Page Template:Chembox/styles.css has no content.

Chembox


IUPAC Name

-

- - - - - - - - -

Chemical Formula
Molar Mass

-

-

-

-

Data sourced from verified databases


Usage

This is a non-Lua version of the `Chembox` template for displaying chemical compound data in an infobox.

Example

{{Chembox
| name          = Cholic acid
| image         = Cholic acid.svg
| image_alt     = Skeletal formula of cholic acid
| image2        = Cholic acid 3D ball.png
| image2_alt    = Ball-and-stick model of cholic acid molecule
| 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
| other_names   = 3α,7α,12α-Trihydroxy-5β-cholan-24-oic acid
| CAS_number    = 81-25-4
| PubChem       = 221493
| ChemSpiderID  = 192104
| UNII          = G0S7T6QH5O
| ChEBI         = 16359
| ChEMBL        = 1201632
| IUPHAR_ligand = 609
| KEGG          = C05436
| DrugBank      = DB02659
| formula       = C<sub>24</sub>H<sub>40</sub>O<sub>5</sub>
| molar_mass    = 408.57 g/mol
| melting_point = 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.
  • `image` / `image2` - Image file names.
  • `image_alt` / `image2_alt` - Alternative text for images.
  • `IUPAC_name` - IUPAC-approved name.
  • `other_names` - Other names or synonyms.
  • `CAS_number`, `PubChem`, `ChemSpiderID`, `UNII`, `ChEBI`, `ChEMBL`, `IUPHAR_ligand`, `KEGG`, `DrugBank` - Database identifiers.
  • `formula` - Chemical formula.
  • `molar_mass` - Molar mass of the compound.
  • `melting_point` - Melting point.
  • `SMILES`, `InChI`, `InChIKey` - Chemical notations.

Notes

  • This template uses standard MediaWiki parser functions.
  • Empty parameters are automatically hidden for clean display.