Help:Extension/ExMolFunctions
From Metabolomics.JP
Extension Information | |
Implementation | |
Description | |
Author(s) | K, Suwa |
Version | 0.1 |
MediaWiki | |
License | |
Hooks used | |
Token type | |
Contents |
ExMolFunctionsはMol名前空間にMOLデータを保存すると、自動的に組成式、精密質量、平均質量、SMILESデータを計算し、ページに追加書き込みします。Mol名前空間のページにはMOLファイルの中身をそのまま保存します。そのため、wikiソースはそのままMOLファイルと全く同じ中身になります。
また、MOLデータから自動的に画像も生成し、ページ表示時に画像を差し込みます。ページ内には画像情報は書き込まれません。 画像はID(ページ名).pngとID(ページ名)n.pngの二つが作成されますが、この二つの違いはn付き画像は、原子に番号が振ってあることです。
アップロードされたMOLファイルは、$egMolPathで指定されたディレクトリへID(ページ名)の頭4桁のディレクトリ内に保存されます。
Requirements
- GUI環境(Linuxにおいて、Xサーバが利用できない場合はXvfbが利用できます)
- Java 1.6
- MolCalculator.jar 質量計算等を行うプログラム
- armDrawMetabolomics.jar 画像生成を行うプログラム
Download
version | source | md5 | OperationCheck version |
0.1(March 13,2009) | ExMolFunctions.phps | f5469c2ec82eb807747ba3c95e4ef650 | 1.11.1 |
Installtion
- Download the source code and rename it to ExMolFunctions.php.
- Place it in the extensions/ directory.
- 上記jarファイル二つをダウンロードし、適当な場所へ置いて下さい。
- Insert the follow lines to LocalSettings.php
require_once( "$IP/extensions/ExMolFunctions.php" ); $egMolCalculatorJar = 'path to MolCalculator.jar'; $egMolImageJar = 'path to armDrawMetabolomics.jar'; $egJavaBin = 'path to java binary from /'; $egTmpPath = 'path to tmp directory from /'; $egMolPath = 'MOLファイルを保存するDocumentRootからのディレクトリパス'; $wgExtraNamespaces = array( ... xxx => "Mol", xxx+1 => "Mol_Talk", ... );
All is required.
Use 100 or larger numbers for xxx.