RDKit/Cartridge/web をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
|
ログイン
]
開始行:
構造式検索エンジンがあるので、実際に検索できるwebアプリを...
クエリを書くのには JSME Molecule Editor [[http://peter-er...
&color(red){*};&size(10){javascriptベースの化合物描画ツー...
&color(red){*};&size(10){器は、dhtmlxにて作成};
#iframe(https://web.chaperone.jp/c/index.html,style=width...
全体はdhtmlxのdhtmlxLayoutを使ってフレーム分けさせて、左...
&color(red){*};&size(10){dhtmlxのソースは、[[https://web....
&color(red){*};&size(10){dhtmlxのフリー版で&color(magenta...
***構造式のパネル表示部分 [#nd8138f7]
dhtmlxDataViewをライブラリに使ってます。
#code(nonumber){{
myDataView = myLayout.cells("b").attachDataView({
type:{
template:"#mol#",
height:80,
width:80
}
});
myDataView.load("dv.php","xml");
}}
として、こんな感じのphpスクリプトにした
&color(red){*};&size(10){以前pythonで描いたがphpで作り直...
#code(php){{
<?php
$posStart = 0;
$count = 500;
if ( isset($_GET['posStart']) ) $posStart = $_GET['posSta...
if ( isset($_GET['count']) ) $count = $_GET['count'];
if ( isset($_POST['mol']) ) $mol = $_POST['mol'];
$dsn = "pgsql:dbname=chemdb host=localhost port=5432";
$user="caster";
$password="caster";
$dbh = new PDO($dsn, $user, $password);
$sql = "SELECT pubchem_compound_cid FROM pubchem WHERE 1=...
if ( $posStart == 0 ){
$sqlCount = "SELECT count(*) as cnt FROM (".$sql.") a...
$sth = $dbh->query($sqlCount);
$res = $sth->fetch(PDO::FETCH_NUM);
$output="<data total_count='".$res[0]."' pos='".$posS...
$sth = null;
$res = null;
}else{
$output="<data pos='".$posStart."'>";
}
if ( $mol ){
$_SESSION['mol'] = $mol;
$sql .= " and rdkit_smiles @> '".$mol."' LIMIT :limit O...
}else{
$sql .= " LIMIT :limit OFFSET :offset";
}
$sth = $dbh->prepare($sql);
$sth->execute(array(':limit'=> $count, ':offset'=> $posSt...
while($res = $sth->fetch(PDO::FETCH_NUM)){
$output .= "<item id='".$res[0]."'><mol><![CDATA[<IMG...
}
$output .= "</data>";
$dbh = null;
header("Content-Type: text/xml");
print $output;
?>
}}
***部分構造検索 [#n12853a2]
JSMEで描いた構造式はsmilesにもmol形式でも取り出せる。ここ...
まずはボタンの制御のためにjqueryライブラリを設置して、検...
#code(nonumber){{
$(function() {
$('#run').click(function(e){
if ( jsmeApplet.smiles() != "" ){
$.ajax({
type: "POST",
url: "dv.php",
data: {"mol": jsmeApplet.smiles()}
}).done(function(data){
myDataView.clearAll();
myDataView.parse(data,"xml");
});
}
});
});
}}
こんな感じで。詳しくは現物[[http://web.chaperone.jp/c/ind...
***smilesではなくMDL MOL形式から検索するには [#z3ddcd0c]
JSMEには描いた構造式をsmilesで出力する機能の他に、MDL MOL...
このMDL MOL形式のままで検索するには、RDKitのmol_from_ctab...
具体的には
#code(sql){{
SELECT pubchem_compound_cid FROM pubchem WHERE 1=1 and rd...
JME 2016-07-31 Wed Oct 25 00:13:04 GMT+900 2017
6 6 0 0 0 0 0 0 0 0999 V2000
2.4249 0.7000 0.0000 C 0 0 0 0 0 0 0 0...
2.4249 2.1000 0.0000 C 0 0 0 0 0 0 0 0...
1.2124 2.8000 0.0000 C 0 0 0 0 0 0 0 0...
0.0000 2.1000 0.0000 C 0 0 0 0 0 0 0 0...
0.0000 0.7000 0.0000 C 0 0 0 0 0 0 0 0...
1.2124 0.0000 0.0000 C 0 0 0 0 0 0 0 0...
1 2 1 0 0 0 0
2 3 2 0 0 0 0
3 4 1 0 0 0 0
4 5 2 0 0 0 0
5 6 1 0 0 0 0
6 1 2 0 0 0 0
M END
'::cstring);
}}
な感じで直接MDL MOLを入れ込んで、末尾に「&color(magenta){...
終了行:
構造式検索エンジンがあるので、実際に検索できるwebアプリを...
クエリを書くのには JSME Molecule Editor [[http://peter-er...
&color(red){*};&size(10){javascriptベースの化合物描画ツー...
&color(red){*};&size(10){器は、dhtmlxにて作成};
#iframe(https://web.chaperone.jp/c/index.html,style=width...
全体はdhtmlxのdhtmlxLayoutを使ってフレーム分けさせて、左...
&color(red){*};&size(10){dhtmlxのソースは、[[https://web....
&color(red){*};&size(10){dhtmlxのフリー版で&color(magenta...
***構造式のパネル表示部分 [#nd8138f7]
dhtmlxDataViewをライブラリに使ってます。
#code(nonumber){{
myDataView = myLayout.cells("b").attachDataView({
type:{
template:"#mol#",
height:80,
width:80
}
});
myDataView.load("dv.php","xml");
}}
として、こんな感じのphpスクリプトにした
&color(red){*};&size(10){以前pythonで描いたがphpで作り直...
#code(php){{
<?php
$posStart = 0;
$count = 500;
if ( isset($_GET['posStart']) ) $posStart = $_GET['posSta...
if ( isset($_GET['count']) ) $count = $_GET['count'];
if ( isset($_POST['mol']) ) $mol = $_POST['mol'];
$dsn = "pgsql:dbname=chemdb host=localhost port=5432";
$user="caster";
$password="caster";
$dbh = new PDO($dsn, $user, $password);
$sql = "SELECT pubchem_compound_cid FROM pubchem WHERE 1=...
if ( $posStart == 0 ){
$sqlCount = "SELECT count(*) as cnt FROM (".$sql.") a...
$sth = $dbh->query($sqlCount);
$res = $sth->fetch(PDO::FETCH_NUM);
$output="<data total_count='".$res[0]."' pos='".$posS...
$sth = null;
$res = null;
}else{
$output="<data pos='".$posStart."'>";
}
if ( $mol ){
$_SESSION['mol'] = $mol;
$sql .= " and rdkit_smiles @> '".$mol."' LIMIT :limit O...
}else{
$sql .= " LIMIT :limit OFFSET :offset";
}
$sth = $dbh->prepare($sql);
$sth->execute(array(':limit'=> $count, ':offset'=> $posSt...
while($res = $sth->fetch(PDO::FETCH_NUM)){
$output .= "<item id='".$res[0]."'><mol><![CDATA[<IMG...
}
$output .= "</data>";
$dbh = null;
header("Content-Type: text/xml");
print $output;
?>
}}
***部分構造検索 [#n12853a2]
JSMEで描いた構造式はsmilesにもmol形式でも取り出せる。ここ...
まずはボタンの制御のためにjqueryライブラリを設置して、検...
#code(nonumber){{
$(function() {
$('#run').click(function(e){
if ( jsmeApplet.smiles() != "" ){
$.ajax({
type: "POST",
url: "dv.php",
data: {"mol": jsmeApplet.smiles()}
}).done(function(data){
myDataView.clearAll();
myDataView.parse(data,"xml");
});
}
});
});
}}
こんな感じで。詳しくは現物[[http://web.chaperone.jp/c/ind...
***smilesではなくMDL MOL形式から検索するには [#z3ddcd0c]
JSMEには描いた構造式をsmilesで出力する機能の他に、MDL MOL...
このMDL MOL形式のままで検索するには、RDKitのmol_from_ctab...
具体的には
#code(sql){{
SELECT pubchem_compound_cid FROM pubchem WHERE 1=1 and rd...
JME 2016-07-31 Wed Oct 25 00:13:04 GMT+900 2017
6 6 0 0 0 0 0 0 0 0999 V2000
2.4249 0.7000 0.0000 C 0 0 0 0 0 0 0 0...
2.4249 2.1000 0.0000 C 0 0 0 0 0 0 0 0...
1.2124 2.8000 0.0000 C 0 0 0 0 0 0 0 0...
0.0000 2.1000 0.0000 C 0 0 0 0 0 0 0 0...
0.0000 0.7000 0.0000 C 0 0 0 0 0 0 0 0...
1.2124 0.0000 0.0000 C 0 0 0 0 0 0 0 0...
1 2 1 0 0 0 0
2 3 2 0 0 0 0
3 4 1 0 0 0 0
4 5 2 0 0 0 0
5 6 1 0 0 0 0
6 1 2 0 0 0 0
M END
'::cstring);
}}
な感じで直接MDL MOLを入れ込んで、末尾に「&color(magenta){...
ページ名:
1