Template:Molecule: Difference between revisions

From ChemWiki
(Added to the wiki via WikiImport-Script.)
(Added to the wiki via WikiImport-Script.)
 
(8 intermediate revisions by the same user not shown)
Line 1: Line 1:
<noinclude>Template for Molecule</noinclude>
<noinclude>Template for Molecule</noinclude>
‎<includeonly>
‎<includeonly>
* Smiles: {{#set: Smiles={{{smiles}}} }} {{{smiles}}}


{{#if: {{{cid|}}} |* PubChem: [https://pubchem.ncbi.nlm.nih.gov/compound/{{{cid}}} {{{cid}}}]|}}
{| class="float-right infobox molecule-infobox wikitable" style="font-size:90%; margin-top:0; width:410px; max-width:500px;"
{{#if: {{{cas|}}} |* CAS: {{#set: CAS={{{cas}}} }} {{{cas}}}|}}
|-
{{#if: {{{iupacName|}}} |* IUPAC-Name: {{#set: IUPACName={{{iupacName}}} }} {{{iupacName}}}|}}
!colspan="2" style="font-size:120%; text-align:center; " | Properties
{{#if: {{{abbrev|}}} |* Abbreviation: {{#set: Abbreviation={{{abbrev}}} }} {{{abbrev}}}|}}
|-
{{#if: {{{trivialname|}}} |* Trivialname: {{#set: Trivialname={{{trivialname}}} }} {{{trivialname}}}|}}
| CID || {{#if: {{{cid|}}} | [https://pubchem.ncbi.nlm.nih.gov/compound/{{{cid}}} {{{cid}}}]|n/a}}
{{#if: {{{molecularMass|}}} |* Molecular mass: {{#set: MolecularMass={{{molecularMass}}} }} {{{molecularMass}}}|}}
|-
{{#if: {{{molecularFormula|}}} |* Molecular formula: {{#set: MolecularFormula={{{molecularFormula}}} }} {{{molecularFormula}}}|}}
| CAS || {{#if: {{{cas|}}} | {{#set: CAS={{{cas}}} }} {{{cas}}}|n/a}}
{{#if: {{{logP|}}} |* LogP: {{#set: LogP={{{logP}}} }} {{{logP}}}|}}
|-
{{#if: {{{hasVendors|}}} |* Has vendors: {{#set: HasVendors={{{hasVendors}}} }} {{{hasVendors}}}|}}
| IUPAC-Name || {{#if: {{{iupacName|}}} | {{#set: IUPACName={{{iupacName}}} }} {{{iupacName}}}|n/a}}
{{#if: {{{synonyms|}}} |* Synonyms: {{#arraymap:{{{synonyms|}}}|,|x| [[Synonym::x]] }} |}}
|-
| Abbreviation || {{#if: {{{abbrev|}}} | {{#set: Abbreviation={{{abbrev}}} }} {{{abbrev}}}|n/a}}
|-
| Trivialname|| {{#if: {{{trivialname|}}} | {{#set: Trivialname={{{trivialname}}} }} {{{trivialname}}}|n/a}}
|-
| Exact mass ||  {{#if: {{{molecularMass|}}} | {{#set: MolecularMass={{{molecularMass}}} }} {{{molecularMass}}}|n/a}}
|-
| Molecular formula ||{{#if: {{{molecularFormula|}}} | {{#set: MolecularFormula={{{molecularFormula}}} }} {{{molecularFormula}}}|n/a}}
|-
| LogP || {{#if: {{{logP|}}} | {{#set: LogP={{{logP}}} }} {{{logP}}}|n/a}}
|-
| Has vendors || {{#if: {{{hasVendors|}}} | {{#set: HasVendors={{{hasVendors}}} }} {{{hasVendors}}}|n/a}}
|-
| Molecular role || {{#if: {{{molecular_role|}}} | {{#arraymap:{{{molecular_role|}}}|,|x| [[MolecularRole::x]] }}|n/a}}
|-
| Synonyms|| {{#if: {{{synonyms|}}} | {{#arraymap:{{{synonyms|}}}|$|x| [[Synonym::x]] }} |n/a}}
|-
|}


{{#if: {{{inchi|}}} |* InChI: {{#set: InChI={{{inchi}}} }} {{{inchi}}}|}}
{{#if: {{{inchikey|}}} |* InChI-Key: {{#set: InChIKey={{{inchikey}}} }} {{{inchikey}}}|}}
{{#if: {{{abbrev|}}} |* Abbreviation: {{#set: Abbreviation={{{abbrev}}} }} {{{abbrev}}}|}}
{{#if: {{{trivialname|}}} |* Trivialname: {{#set: Trivialname={{{trivialname}}} }} {{{trivialname}}}|}}
{{#if: {{{parent|}}} |* Belongs to molecule collection: [[{{{parent}}}]] | }}
{{#tag:chemform|
{{#tag:chemform|
{{{molOrRxn}}}
{{{molOrRxn}}}
Line 25: Line 36:
}}
}}
{{#arraymap:{{#extractElements:|formula={{{smiles|}}} }}|,|x|[[ContainsElement::x| ]]|\s}}
{{#arraymap:{{#extractElements:|formula={{{smiles|}}} }}|,|x|[[ContainsElement::x| ]]|\s}}
<div>
<div><span class="ce-copy-molOrRxn">Click here to copy MOL-file.</span></div>
<div><span class="toggle-box" resource="chemdata">Click here to show SMILES and InChI.</span></div>
{| id="chemdata" class="infobox wikitable" style="display:none;"
|-
| InChI || {{#if: {{{inchi|}}} | {{#set: InChI={{{inchi}}} }} {{{inchi}}}|}}
|-
| InChI-Key || {{#if: {{{inchikey|}}} | {{#set: InChIKey={{{inchikey}}} }} {{{inchikey}}}|}}
|-
| SMILES || {{#set: Smiles={{{smiles}}} }} {{{smiles}}}
|-
|}
{{#set: Molfile={{{molOrRxn}}} }}
</div>
{{#if: {{{parent|}}} | Belongs to molecule collection: [[{{{parent}}}]] | }}
[[Category:Molecule]]
[[Category:Molecule]]
‎<includeonly>
‎<includeonly>

Latest revision as of 13:55, 21 November 2024

Template for Molecule ‎