Pentru a putea vota, modifica pagini sau abona la modificările unei pagini trebuie să fiți autentificați. Cu această ocazie scăpați și de acest mesaj deranjant.

:Chemical equation

De la l10n.ro
Versiunea din 15 noiembrie 2007 01:25, autor: 127.0.0.1 (Discuție) (Chemical equation)
(dif) ← Versiunea anterioară | Versiunea curentă (dif) | Versiunea următoare → (dif)
Salt la: navigare, căutare

A chemical equation consists of reactants an arrow and the products. These products can be the reactants of an immediatly following reaction that yields further products.

Reactants and products are concatenations of chemical formulas (see Type:Chemical formula). The formulas are connected with a + or a * (or x) (which yields ●).

The arrows are ←, → and ⇌ (chemical equilibrium).

Valid formulas are:

  • HC2H3O2(aq) ⇌ H+(aq) + C2H3O2-(aq)
  • 4 Fe2+(aq) + O2(g) + 4 H2O(l) + 2x H2O(l) → 2 Fe2O3●x H2O(s) + 8 H+(aq)
  • 2 H2O ← 4 H + O2
  • CH3CH2OH + H2SO4 (conc. aq) → CH3CH2OSO3H + H2O → H2C=CH2 + H2SO4 + H2O

Wiki text for chemical equations

Chemical equations consist mainly of chemical formulas. These are connected by the following symbols (connectors) in wiki text:

  • ->: → (Reaction)
  • <-: ← (Reaction)
  • <->: ⇌ (Equilibrium)
  • +: +
  • * or x: ●

There must be no spaces within the arrows. An equation must begin and end with a formula. There must be exactly one connector between formulas.

Type for chemical equations

The wiki offers the type Type:Chemical equation. Attributes with this type are checked for correctness with the rules above. Only syntactical correctness can be checked i.e. chemical rules can still be violated.

Grammar for chemical equations as wiki text

(Elements in brackets [] are optional, {} groups elements, * means 0 or more repetitions of a group, + means one or more repetitions, | means "or")

  • Chemical equation: CE := CF [{'+'|'*'} CF]* { {'<-' | '<->' | '->' } CF [{'+'|'*'} CF]*}+
  • Chemical formula: CF (see Type:Chemical formula)

Error messages

Each kind of error message is given by an example:

  • 2H2+O2:"2H2+O2" is not a chemical equation.
  • 2n n H -> H:Syntax error in chemical formula "2n n H".
  • H ** H -> H:There is a missing or needless operator in "H ** H -> H".

Testing chemical equations

Below is a set of expressions in wiki text for chemical equations. The attribute has equation must have the type Type:Chemical equation. Equations that are rejected by the parser are rendered in a box. Error messages will be displayed in the fact box.



* Correct

[[has equation:=C2H5. + O2 -> C2H4 + .OOH]]

[[has equation:=H2O->O2->H2O]]

[[has equation:= Ag -> Br <- Cl]]

[[has equation:= HCl(aq) -> H^+ + Cl^-(aq)]]

[[has equation:=4Fe2^+(aq) + O2(g) + 4 H2O(l) + 2nH2O(l) -> 2Fe2O3*nH2O(s) + 8H^+(aq) ]]

[[has equation:=2 H2O <- H2 + 2O]]

[[has equation:= 4H + 2O -> 2H2O]]

[[has equation:= Mg(NO3)2(l) <-> Mg(((NO3)2)5)4(aq)]]

[[has equation := 6AlBr -> Al2Br6 + 4 Al]]

[[has equation:= 48^Ti3->2 34^Ti^2-]]

[[has equation:= 2 48^Ti3^3+-> 2H2O3C4]]

[[has equation:= 48^Ti^3+<->Ti^3-]]

[[has equation:= FeCl3 + K3PO4 -> FePO4 + KCl]]

[[has equation:= HC2H3O2(aq) <-> H^+(aq) + C2H3O2^-(aq)]]




* Wrong

[[has equation:= 2n n H -> H]]

[[has equation:= H ** H -> H]]

[[has equation:= H + + H -> H]]

[[has equation:= 2H2 O2 -> H]]

[[has equation:= + 2H2 + O2 -> H]]

[[has equation:= 2H2 + O2 + -> H]]

[[has equation:= 2H2 + O2 -> H+]]

[[has equation:= 2H2 + O2 -> +H]]

[[has equation:= H < - > O]]

[[has equation:= H - > O]]

[[has equation:= H < - O]]

[[has equation:= H2O]]

[[has equation:= HCl(aq) -> H+ + Cl-(aq)]]

[[has equation:= HC2H3O2(aq) <-> H+(aq) + C2H3O2-(aq)]]

[[has equation := C6H12O6]]