Template:MassBank/Matrix

From Metabolomics.JP
(Difference between revisions)
Jump to: navigation, search
m
Line 10: Line 10:
  
 
   function mass(str)
 
   function mass(str)
     local c,h,cl,n,o,p,s=string.match(str,"(C?[1-9]?[0-9]?)(H?[1-9]?[0-9]?)(C?l?[2-9]?)(N?[1-9]?[0-9]?)(O?[1-9]?[0-9]?)(P?[2-9]?)")(S?[2-9]?)");
+
     local c,h,cl,n,o,p,s=string.match(str,"(C?[1-9]?[0-9]?)(H?[1-9]?[0-9]?)(C?l?[2-9]?)(N?[1-9]?[0-9]?)(O?[1-9]?[0-9]?)(P?[2-9]?)(S?[2-9]?)");
 
     c = atomicNum("C", c) * 12;
 
     c = atomicNum("C", c) * 12;
 
     h = atomicNum("H", h);
 
     h = atomicNum("H", h);
     cl= atomicNum("Cl", cl) * 35;
+
     cl= atomicNum("Cl",cl) * 35;
 
     n = atomicNum("N", n) * 14;
 
     n = atomicNum("N", n) * 14;
 
     o = atomicNum("O", o) * 16;
 
     o = atomicNum("O", o) * 16;
Line 24: Line 24:
 
     ---computes str1 - str2. If negative, returns nil.---
 
     ---computes str1 - str2. If negative, returns nil.---
 
     local c1,h1,cl1,n1,o1,p1,s1=string.match(str1,"(C?[1-9]?[0-9]?)(H?[1-9]?[0-9]?)(C?l?[2-9]?)(N?[1-9]?[0-9]?)(O?[1-9]?[0-9]?)(P?[2-9]?)(S?[2-9]?)");
 
     local c1,h1,cl1,n1,o1,p1,s1=string.match(str1,"(C?[1-9]?[0-9]?)(H?[1-9]?[0-9]?)(C?l?[2-9]?)(N?[1-9]?[0-9]?)(O?[1-9]?[0-9]?)(P?[2-9]?)(S?[2-9]?)");
     local c2,h2,cl1,n2,o2,p2,s2=string.match(str2,"(C?[1-9]?[0-9]?)(H?[1-9]?[0-9]?)(C?l?[2-9]?)(N?[1-9]?[0-9]?)(O?[1-9]?[0-9]?)(P?[2-9]?)(S?[2-9]?)");
+
     local c2,h2,cl2,n2,o2,p2,s2=string.match(str2,"(C?[1-9]?[0-9]?)(H?[1-9]?[0-9]?)(C?l?[2-9]?)(N?[1-9]?[0-9]?)(O?[1-9]?[0-9]?)(P?[2-9]?)(S?[2-9]?)");
 
     c1 = atomicNum("C", c1);
 
     c1 = atomicNum("C", c1);
 
     h1 = atomicNum("H", h1);
 
     h1 = atomicNum("H", h1);
Line 108: Line 108:
 
   end
 
   end
 
|
 
|
{{{data|CHNOS}}}
+
{{{data|CHClNOPS}}}
 
}}
 
}}
 
|#|{{#bar:}}}}
 
|#|{{#bar:}}}}
 
|}
 
|}
 
</small>
 
</small>

Revision as of 14:52, 12 May 2009

MassBank/Matrix 141
CHClNOPS
141
CHClNOPS

Personal tools
Namespaces

Variants
Actions
Navigation
metabolites
Toolbox