windows¤Ê¤é¼ê·Ú¤Ç´ÉÍý¤·¤ä¤¹¤¤MSSQL¤«¤Ê¤È»×¤¦¤Î¤À¤¬¡¢express¤À¤ÈÀ©Ì󤬤¢¤ë¡£¤·¤«¤â¥á¥â¥êÀ©¸Â¤Î1GB¤Ï¿É¤¤¡£
¤Ê¤Î¤Ç¡¢¤½¤¦¤¤¤Ã¤¿À©¸Â¤Î¤Ê¤¤PostgreSQL¤Ç¤ÎBingo¤òºî¤Ã¤Æ¤ß¤¿¡£
¢£Ä´Ã£
http://www.enterprisedb.com/products-services-training/pgdownload ¤³¤³¤«¤é 9.0.x ¤« 9.1.x ¤Îpostgresql¤ò
¼èÆÀ¡£²ÔưOS¤Ë¹ç¤ï¤»¤ÆWin x86-32¤«Win x86-64¤Î¤É¤Á¤é¤«¤òÁªÂò¤·¤Æ¥¤¥ó¥¹¥È¡¼¥ë¡£
postgresql¤Î¥¤¥ó¥¹¥È¡¼¥ë¤Ë¤ª¤¤¤Æ
¥×¥í¥°¥é¥à¤Î¾ì½ê 
¤È
¥Ç¡¼¥¿¤Î³ÊǼ¾ì½ê 
¤ò·è¤á¤Æ¡¢postgresql¤òư¤«¤¹¥æ¡¼¥¶(postgres)¤Î¥Ñ¥¹¥ï¡¼¥É¤È»ÈÍѤ¹¤ëportÈÖ¹æ(5432)¤ä
locale(C)¤ò![]()
Äê¤á¤Æ¥¤¥ó¥¹¥È¡¼¥ë¡£¤³¤Î¸å¡¢¥¹¥¿¥Ã¥¯¥Ó¥ë¥À¤Ë¤Æ¥É¥é¥¤¥Ð¡¼¤Ê¤ÉÁªÂò²Äǽ¤Ç¤¢¤ë¤¬¡¢É¬Íפ˱þ¤¸¤Æ¡£
*postgresql¤ò²Ôư¤µ¤»¤ë¥æ¡¼¥¶¤Ï¡¢¥í¡¼¥«¥ë¤Îwindows¥æ¡¼¥¶¤È¤·¤Æ¿·µ¬¤ËºîÀ®¤µ¤ì¤ë¡£½ê°¤¹¤ë¥°¥ë¡¼¥×¤ÏUsers¤Ç¤¢¤ë¡£
postgresql.conf¤Ë¤¢¤ëshared_buffersÃͤÏ64MB¤ËÊѹ¹¤·¤ÆºÆ²Ôư¤µ¤»¤¿¤Û¤¦¤¬¤¤¤¤¤ß¤¿¤¤¡£
¢£¥¤¥ó¥¹¥È¡¼¥ë
*»öÁ°¤Ë¡ÖMicrosoft Visual C++ 2010 ºÆÈÒÉÛ²Äǽ¥Ñ¥Ã¥±¡¼¥¸¡×¤ò¥¤¥ó¥¹¥È¡¼¥ë¤¹¤ë¤è¤¦¤Ë¡£x86/x64¤Ï·¤¨¤Æ¡£
Bingo¤ÎpostgresqlÈǤò¼èÆÀ¤³¤³¤«¤é http://ggasoftware.com/download ¼èÆÀ¤¹¤ë¡£
¥À¥¦¥ó¥í¡¼¥É¤·¤¿¤â¤Î¤òŸ³«¤·¤Æ¡¢¤½¤ÎÃæ¤Ë¤¢¤ë bin\bingo_postgres.dll ¥Õ¥¡¥¤¥ë¤ò postgresql¤Î¥é¥¤¥Ö¥é¥êÃÖ¤¾ì½ê¤Ë
¥³¥Ô¡¼¤·¤Þ¤¹¡£ÂçÄñ¤Ï C:\Program Files\PostgreSQL\9.1\lib ¤«¤È¡£
¤½¤Î¸å¡¢Æ±¤¸¤¯Å¸³«¤·¤¿¥Õ¥¡¥¤¥ë¤ÎÃæ¤Ë¤¢¤Ã¤¿ bingo-pg-install ¤ò»È¤Ã¤Æpostgresql¤ËBingo¤òǧ¼±¤µ¤»¤ëSQLʸ¤òºîÀ®¤µ¤»¤Þ¤¹¡£
¥³¥Þ¥ó¥É¥×¥í¥ó¥×¥È¤òµ¯Æ°¤µ¤»¡¢
move bingo-postgres9.1-1.7-beta3-win32 c:\bingo *Ÿ³«¥Õ¥©¥ë¥À¤ò°Üư
cd c:\bingo
cp bin\bingo_postgres.dll "C:\Program Files\PostgreSQL\9.1\lib"
bingo-pg-install -libdir "C:\Program Files\PostgreSQL\9.1\lib"
Target directory : "C:/Program Files/PostgreSQL/9.1/lib"
Schema name : bingo
Proceed (y/N)? y *y¤ÈÆþÎϤ·¤Þ¤¹
*ɬ¤º¤·¤âpostgresql¤Îlib¥Õ¥©¥ë¥À¤Ëbingo_postgres.dll¤ò¥³¥Ô¡¼¤¹¤ëɬÍפϤʤ¤¤¬¡¢
¤½¤ÎºÝc:\bingo¥Õ¥©¥ë¥À¤Ï¾ï¤Ë»²¾È¤µ¤ì¤ë»ö¤Ë¤Ê¤ë¡£¤Ä¤Þ¤êº£¸å¡¢c:\bingo¤Ï¾Ã¤»¤Ê¤¤¡£°Üư¤Ç¤¤Ê¤¯¤Ê¤ë¡£
¤³¤ì¤Ç¥¤¥ó¥¹¥È¡¼¥ëÍÑSQL¤¬ºîÀ®¤µ¤ì¤Þ¤¹¡£¤³¤ÎSQLʸ¤ÏBingo¤ò»È¤¤¤¿¤¤¥Ç¡¼¥¿¥Ù¡¼¥¹¤´¤È¤Ë»ÈÍѤ·¤Þ¤¹¡£
¤³¤ÎSQLʸ¤Ë¤è¤Ã¤Æbingo¤Î´Ø¿ô¡¦¥³¥Þ¥ó¥É¤¬ºî¤é¤ì¤Þ¤¹
windows[¥¹¥¿¡¼¥È]->[PostgreSQL9.1]->[pgAdmin ·]¤òµ¯Æ°¤µ¤»¡¢¿·µ¬¥Ç¡¼¥¿¥Ù¡¼¥¹[ChEMBL_13]¤òºîÀ®¤·¤Þ¤¹¡£
¤½¤·¤Æ¥³¥Þ¥ó¥É¥×¥í¥ó¥×¥È¤«¤é
cd c:\bingo
psql -U postgres -d ChEMBL_13 -f bingo_install.sql *postgres¤Î¥Ñ¥¹¥ï¡¼¥É¤¬Ê¹¤«¤ì¤Þ¤¹
ºï½ü¤Î¤È¤¤ÏƱ¤¸¤¯
psql -U postgres -d ChEMBL_13 -f bingo_uninstall.sql *postgres¤Î¥Ñ¥¹¥ï¡¼¥É¤¬Ê¹¤«¤ì¤Þ¤¹
¢£¥Æ¥¹¥È
°ì±þ¥Æ¥¹¥È
psql -U postgres -d ChEMBL_13
ChEMBL_13=# select bingo.getversion();
getversion
------------
1.7-beta3
(1 ¹Ô)
ChEMBL_13=#
¤È°ì±þ¤Î·ë²Ì¤Ï¼è¤ì¤¿¡£
psql -U postgres -d ChEMBL_13
ChEMBL_13=# CREATE TABLE chem (
ChEMBL_13(# ID text primary key,
ChEMBL_13(# MOL text
ChEMBL_13(# );
¤ÈMSSQL¤ÈƱÍͤËchem¥Æ¡¼¥Ö¥ë¤òºîÀ®¡£sdf¤Î¥¤¥ó¥Ý¡¼¥È¤ÏMSSQL¤Ï¥×¥í¥·¡¼¥¸¥ã¤Ç¤¢¤ë¤¬¡¢postgres¤Ï´Ø¿ô¤Ë¤Æ¹Ô¤¦¡£
ChEMBL_13=# SELECT bingo.ImportSDF('chem','MOL','chembl_id ID','C:\bingo\src\chembl_13.sdf.gz');
ID¤òvarchar(30)¤Ë¤·¤Æ¤ß¤¿¤¬¡¢¥¨¥é¡¼¤¬Ê֤äƤ¤¿¡£¤É¤¦¤â text, bytea, integer¤·¤«¥µ¥Ý¡¼¥È¤·¤Ê¤¤¤ß¤¿¤¤¡£
\timing¤ò»È¤Ã¤Æ½èÍý»þ´Ö¤ò·×¬¤¹¤ë¤È »þ´Ö: 288436.015 ms¤È½Ð¤¿£µÊ¬¤«¤«¤é¤Ê¤¤
psql -U postgres -d ChEMBL_13
ChEMBL_13=# create index idx_mol on chem using bingo_idx (mol bingo.molecule);
ÅÓÃæ
NOTICE: processed 15000 structures
NOTICE: processed 16000 structures
¤È¤É¤³¤Þ¤Ç½èÍý¤¬¿Ê¤ó¤Ç¤¤¤ë¤«¤ò¼¨¤·¤Æ¤¯¤ì¤ë¡£¤½¤ì¤ÈMOL¤¬²ø¤·¤¤¤È¤½¤ÎÅÔÅÙ
molfile loader : direction of bond #7 makes no sense
stereocenters: all 3 bonds up near stereoatom
stereocenters: stereo type of the opposite bonds mismatch
¤È¤«¤òɽ¼¨¤·¤Æ¤¯¤ì¤ë¡£(ChEMBL_13¤Î¥¤¥ó¥Ç¥Ã¥¯¥¹ºîÀ®¤Ë¤Ï 8966337.580ms(2»þ´ÖȾ¤Û¤É))
¤Ã¤¬¡¢¤É¤ÎID¤Ê¤Î¤«ÉÔÌÀ¡£¤æ¤¨¤Ë
ChEMBL_13=# select chem.ID, bingo.CheckMolecule(MOL) from chem where bingo.CheckMolecule(MOL) is not null
¤Ë¤ÆÂоݤò¼èÆÀ¤¹¤ë¡£¤¹¤ë¤È¤´¿ÆÀڤˤâID¤È¤½¤Î¸¶°ø¤òÎóµó¤·¤Æ¤¯¤ì¤ë¡£

¤³¤³¤Ç®Å٥ƥ¹¥È
ChEMBL_13=# select count(chem.ID) from chem where bingo.CheckMolecule(MOL) is not null
count
-------
6729
(1 ¹Ô)
»þ´Ö: 710614.787 ms
ChEMBL_13=#
¼¡¤Ë²¾ÁÛ¥Þ¥·¥ó¤Ç2core CPU¤ËÊѹ¹¤·¤ÆÆ±Íͤθ¡º÷¤ò¹Ô¤Ã¤¿¤¬¡¢ÊѤï¤é¤º¡£¤É¤¦¤â1core¤·¤«»È¤Ã¤Æ¤¯¤ì¤Ê¤¤¤ß¤¿¤¤¡£
¥Ñ¡¼¥Æ¥£¥·¥ç¥Ë¥ó¥°¤È¤«¤Çchem¥Æ¡¼¥Ö¥ë¤òʬ³ä¤¹¤ì¤ÐÁ᤯¤Ê¤ë¤Î¤«¤Ê¡©