Help:Extension/MolFunctions
From Metabolomics.JP
(Difference between revisions)
(5 intermediate revisions by one user not shown) | |||
Line 7: | Line 7: | ||
__TOC__ | __TOC__ | ||
− | + | Extension to obtain molecular formula, exact mass, and others from MOL-format files. Prepare a MOL-format file with a trailer like: | |
− | + | <pre> | |
− | + | ||
− | + | ||
S SKP 5 | S SKP 5 | ||
ID FL3FECGS0010 | ID FL3FECGS0010 | ||
Line 18: | Line 16: | ||
SMILES C(O)C(C1O)(COC1Oc(c2O)cc(O3)c(C(=O)C=C3c(c4)cc(c(O)c4)O)c2O)O | SMILES C(O)C(C1O)(COC1Oc(c2O)cc(O3)c(C(=O)C=C3c(c4)cc(c(O)c4)O)c2O)O | ||
M END | M END | ||
+ | </pre> | ||
− | + | Since the number of MOL-format files can be large, create directories whose names are the upper 4 digits of the filenames. For example, in the case of FL3FECGS0010, the location will be <tt>/path to mol directory/FL3F/FL3FECGS0010.mol</tt>. | |
− | + | ||
− | + | The system assumes the location of the MOL directory as $_SERVER["DOCUMENT_ROOT"].<br> | |
− | + | For this reason, the extension fails when called from outside of www, such as jobs by maintenance/runJobs.php. In this case, set the DocumentRoot as $spath (line 121). | |
− | + | ||
== Requirements == | == Requirements == | ||
Line 31: | Line 28: | ||
== Download == | == Download == | ||
<table border="1" cellpadding="3" cellspacing="1"> | <table border="1" cellpadding="3" cellspacing="1"> | ||
− | <tr><td>version</td><td>source</td><td> | + | <tr><td>version</td><td>source</td><td>md5</td></tr> |
− | <tr><td>0.1(September | + | <tr><td>0.1(September 26,2008)</td><td>{{#ifexistfile:/data/src/MolFunctions/MolFunctions.phps}}</td><td><pre style="border: 0px; background-color: white; padding: 0em; line-height: 0em">5e2e923d24534af51c4884751e28ec46</pre></td></tr> |
</table> | </table> | ||
== Installtion == | == Installtion == | ||
<ol> | <ol> | ||
− | <li>Download source and rename to MolFunctions.php.</li> | + | <li>Download the source code and rename it to MolFunctions.php.</li> |
− | <li> | + | <li>Place it in the extensions/ directory.</li> |
− | <li>Insert follow | + | <li>Insert the follow lines to LocalSettings.php |
<pre>require_once( "$IP/extensions/MolFunctions.php" ); | <pre>require_once( "$IP/extensions/MolFunctions.php" ); | ||
− | $egMolPath = "path to mol directory from DocumentRoot";</pre> | + | $egMolPath = "path to mol directory from DocumentRoot"; // ex. "/data/mol"</pre> |
− | $ | + | If $egMolPath is nil, the extention stops.</li> |
</ol> | </ol> | ||
== Function == | == Function == | ||
− | # [[ | + | # [[Help:Extensions#.7B.7B.23formula:id.3D.27.27.7D.7D|formula]] |
− | # [[ | + | # [[Help:Extensions#.7B.7B.23avemass:id.3D.27.27.7D.7D|avemass]] |
− | # [[ | + | # [[Help:Extensions#.7B.7B.23extmass:id.3D.27.27.7D.7D|extmass]] |
− | # [[ | + | # [[Help:Extensions#.7B.7B.23smiles:id.3D.27.27.7D.7D|smiles]] |
Latest revision as of 17:33, 26 September 2008
Extension Information | |
Implementation | |
Description | |
Author(s) | K, Suwa |
Version | 0.1 |
MediaWiki | 1.11.1 |
License | |
Hooks used | |
Token type | |
Contents |
Extension to obtain molecular formula, exact mass, and others from MOL-format files. Prepare a MOL-format file with a trailer like:
S SKP 5 ID FL3FECGS0010 FORMULA C20H18O11 EXACTMASS 434.084911418 AVERAGEMASS 434.35032 SMILES C(O)C(C1O)(COC1Oc(c2O)cc(O3)c(C(=O)C=C3c(c4)cc(c(O)c4)O)c2O)O M END
Since the number of MOL-format files can be large, create directories whose names are the upper 4 digits of the filenames. For example, in the case of FL3FECGS0010, the location will be /path to mol directory/FL3F/FL3FECGS0010.mol.
The system assumes the location of the MOL directory as $_SERVER["DOCUMENT_ROOT"].
For this reason, the extension fails when called from outside of www, such as jobs by maintenance/runJobs.php. In this case, set the DocumentRoot as $spath (line 121).
[edit] Requirements
None
[edit] Download
version | source | md5 |
0.1(September 26,2008) | MolFunctions.phps | 5e2e923d24534af51c4884751e28ec46 |
[edit] Installtion
- Download the source code and rename it to MolFunctions.php.
- Place it in the extensions/ directory.
- Insert the follow lines to LocalSettings.php
require_once( "$IP/extensions/MolFunctions.php" ); $egMolPath = "path to mol directory from DocumentRoot"; // ex. "/data/mol"
If $egMolPath is nil, the extention stops.