Thursday, October 24, 2013
Natural vs. Chemical
Maybe it would help all the people who like to make a firm distinction between 'natural products' -> good and 'chemical products' -> bad to attend such a lecture from time to time...
Wednesday, September 18, 2013
Long time no see
the development of pgchem::tigress - and this Blog - have been quiet for some time now.
Professionally, I'm currently moving into two new spheres of activity, document management for product registration (i.e. license to sell) and bioinformatics, and this occupies most of my time. That my wife had to go to the hospital for a few months (nothing life threatening, but quite hindering) didn't help much either. ;->
But, since Postgresql 9.3 just came out, I'll see if I can manage at least to compile pgchem::tigress against 9.3, OpenBabel 2.3.2 and Indigo 1.1.11 before 2013 ends...
Friday, December 23, 2011
Christmas presents
Jérôme Pansanel has completed the new serialization code for mychem and pgchem, so there is no need to handle stereo and non-stereo queries differently anymore. I have moved the index functions to GCC's vector extensions where applicable, and the first result is that index build times have been roughly cut by half while substructure search times have improved, but not that much.
Index build times
| System | Index build time |
|---|---|
| pgchem with OpenBabel or Indigo | 352137 ms |
| pgchem with OpenBabel or Indigo vectorized | 192815 ms |
OpenBabel with binary storage and FP2 fingerprint vectorized
| Query | Hits | no Index | Hits | with Index |
|---|---|---|---|---|
| GH2 | 4840 | 98416 ms | 4840 | 17044 ms |
| GH7 | 260 | 94053 ms | 260 | 1564 ms |
| GH13 | 580 | 113690 ms | 580 | 34504 ms |
| GH16 | 26910 | 99365 ms | 26910 | 55154 ms |
Merry Christmas and a happy new year!
Saturday, December 17, 2011
Benchmark data published
Thursday, December 15, 2011
Selected GH17 results for 10^6 structures
GH17 substructure search speed
OpenBabel with binary+SMILES storage and FP2 fingerprint
| Query | Hits | no Index | Hits | with Index |
|---|---|---|---|---|
| GH2 | 4840 | 108807 ms | 4840 | 21164 ms |
| GH7 | 260 | 105050 ms | 260 | 1934 ms |
| GH13 | 580 | 118978 ms | 580 | 52416 ms |
| GH16 | 26910 | 109886 ms | 26910 | 64742 ms |
Indigo with binary storage and ext+sub fingerprint
| Query | Hits | no Index | Hits | with Index |
|---|---|---|---|---|
| GH2 | 4840 | 213075 ms | 4840 | 27887 ms |
| GH7 | 410 | 178963 ms | 410 | 4451 ms |
| GH13 | 580 | 251938 ms | 580 | 39134 ms |
| GH16 | 27100 | 172534 ms | 27100 | 80523 ms |
Bingo 1.7beta2 with molfiles as text storage
| Query | Hits | no Index | Hits | with Index |
|---|---|---|---|---|
| GH2 | 4710 | 647889 ms | 4710 | 21733 ms |
| GH7 | 410 | 538784 ms | 410 | 6658 ms |
| GH13 | 580 | 675093 ms | 580 | 12418 ms |
| GH16 | 27100 | 528891 ms | 27100 | 28541 ms |
Index build times
| System | Index build time |
|---|---|
| pgchem with OpenBabel or Indigo | 352137 ms |
| Bingo | 3458681ms |
Again, Bingo without it's index is apparently killed by the overhead of parsing text into the internal molecule format. With index it's a mixed bag, while it shines at GH13 and GH16, pgchem is about equal or faster at GH2 and GH7.
Wednesday, December 14, 2011
GH17 results
Mikhail Rybalkin from GGA Software asked me to do this, so here it is...
The GH17 test queries used
There is a small set of queries used in article Chemical substructure search in SQL by Golovin and Henrick. These queries were lately reused in other articles:
GH1 ONC1CC(C(O)C1O)[n]2cnc3c(NC4CC4)ncnc23
GH2 Nc1ncnc2[n]cnc12
GH3 CNc1ncnc2[n](C)cnc12
GH4 Nc1ncnc2[n](cnc12)C3CCCC3
GH5 CC12CCC3C(CCC4=CC(O)CCC34C)C1CCC2
GH6 OC2=CC(=O)c1c(cccc1)O2
GH7 Nc1nnc(S)s1
GH8 C1C2SCCN2C1
GH9 CP(O)(O)=O
GH10 CCCCCP(O)(O)=O
GH11 N2CCC13CCCCC1C2Cc4c3cccc4
GH12 s1cncc1
GH13 C34CCC1C(CCC2CC(=O)CCC12)C3CCC4
GH14 CCCCCCCCCCCP(O)(O)=O
GH15 CC1CCCC1
GH16 CCC1CCCC1
GH17 CCCC1CCCC1
GH17 substructure search speed
OpenBabel with binary+SMILES storage and FP2 fingerprint
| Query | Hits | no Index | Hits | with Index |
|---|---|---|---|---|
| GH1 | 0 | 9517 ms | 0 | 25 ms |
| GH2 | 484 | 8519 ms | 484 | 111 ms |
| GH3 | 63 | 8632 ms | 63 | 43 ms |
| GH4 | 5 | 8950 ms | 5 | 48 ms |
| GH5 | 36 | 10020 ms | 36 | 78 ms |
| GH6 | 0 | 8696 ms | 0 | 32 ms |
| GH7 | 26 | 8279 ms | 26 | 31 ms |
| GH8 | 170 | 8454 ms | 170 | 56 ms |
| GH9 | 348 | 8068 ms | 348 | 71 ms |
| GH10 | 36 | 8820 ms | 36 | 21 ms |
| GH11 | 66 | 9113 ms | 66 | 52 ms |
| GH12 | 831 | 7920 ms | 831 | 124 ms |
| GH13 | 58 | 9864 ms | 58 | 448 ms |
| GH14 | 4 | 9998 ms | 4 | 36 ms |
| GH15 | 3008 | 8549 ms | 3008 | 555 ms |
| GH16 | 2691 | 8665 ms | 2691 | 501 ms |
| GH17 | 2290 | 8717 ms | 2290 | 560 ms |
Indigo with binary storage and ext+sub fingerprint
| Query | Hits | no Index | Hits | with Index |
|---|---|---|---|---|
| GH1 | 0 | 28161 ms | 0 | 32 ms |
| GH2 | 484 | 19188 ms | 484 | 187 ms |
| GH3 | 68 | 20498 ms | 68 | 78 ms |
| GH4 | 5 | 23388 ms | 5 | 33 ms |
| GH5 | 36 | 25887 ms | 36 | 62 ms |
| GH6 | 0 | 21034 ms | 0 | 31 ms |
| GH7 | 41 | 16302 ms | 41 | 31 ms |
| GH8 | 170 | 16629 ms | 170 | 78 ms |
| GH9 | 373 | 14005 ms | 373 | 98 ms |
| GH10 | 37 | 16881 ms | 37 | 21 ms |
| GH11 | 66 | 24091 ms | 66 | 78 ms |
| GH12 | 829 | 14842 ms | 829 | 210 ms |
| GH13 | 58 | 24470 ms | 58 | 133 ms |
| GH14 | 4 | 21403 ms | 4 | 36 ms |
| GH15 | 3047 | 15817 ms | 3047 | 749 ms |
| GH16 | 2710 | 16767 ms | 2710 | 732 ms |
| GH17 | 2304 | 17524 ms | 2304 | 788 ms |
Bingo 1.7beta2 with molfiles as text storage
| Query | Hits | no Index | Hits | with Index |
|---|---|---|---|---|
| GH1 | 0 | 70277 ms | 0 | 125 ms |
| GH2 | 471 | 56821 ms | 471 | 156 ms |
| GH3 | 68 | 57754 ms | 68 | 125 ms |
| GH4 | 5 | 60067 ms | 5 | 125 ms |
| GH5 | 36 | 65586 ms | 36 | 140 ms |
| GH6 | 79 | 57188 ms | 79 | 125 ms |
| GH7 | 41 | 52134 ms | 41 | 125 ms |
| GH8 | 170 | 51685 ms | 170 | 140 ms |
| GH9 | 373 | 47613 ms | 373 | 138 ms |
| GH10 | 37 | 49961 ms | 37 | 110 ms |
| GH11 | 66 | 61176 ms | 66 | 125 ms |
| GH12 | 774 | 50281 ms | 829 | 156 ms |
| GH13 | 58 | 61108 ms | 58 | 156 ms |
| GH14 | 4 | 53636 ms | 4 | 140 ms |
| GH15 | 3047 | 50213 ms | 3047 | 343 ms |
| GH16 | 2710 | 51227 ms | 2710 | 327 ms |
| GH17 | 2304 | 51495 ms | 2304 | 362 ms |
Fingerprint efficiency (with regard to false positives)
FP2
| Query | Candidates screened | Hits matched | false positives | Efficiency |
|---|---|---|---|---|
| GH1 | 0 | 0 | 0 | 1.000 |
| GH2 | 485 | 484 | 1 | 0.998 |
| GH3 | 69 | 63 | 6 | 0.913 |
| GH4 | 37 | 5 | 32 | 0.135 |
| GH5 | 120 | 36 | 84 | 0.300 |
| GH6 | 79 | 0 | 79 | 0.000 |
| GH7 | 41 | 26 | 15 | 0.634 |
| GH8 | 177 | 170 | 7 | 0.960 |
| GH9 | 377 | 348 | 29 | 0.923 |
| GH10 | 37 | 36 | 1 | 0.973 |
| GH11 | 123 | 66 | 1 | 0.537 |
| GH12 | 831 | 831 | 0 | 1.000 |
| GH13 | 1346 | 58 | 1288 | 0.043 |
| GH14 | 20 | 4 | 16 | 0.200 |
| GH15 | 3760 | 3008 | 752 | 0.800 |
| GH16 | 3305 | 2691 | 614 | 0.814 |
| GH17 | 3305 | 2290 | 715 | 0.762 |
ext+sub
| Query | Candidates screened | Hits matched | false positives | Efficiency |
|---|---|---|---|---|
| GH1 | 0 | 0 | 0 | 1.000 |
| GH2 | 484 | 484 | 1 | 1.000 |
| GH3 | 68 | 68 | 0 | 1.000 |
| GH4 | 5 | 5 | 0 | 1.000 |
| GH5 | 47 | 36 | 11 | 0.766 |
| GH6 | 0 | 0 | 0 | 1.000 |
| GH7 | 41 | 41 | 0 | 1.000 |
| GH8 | 170 | 170 | 0 | 1.000 |
| GH9 | 373 | 373 | 0 | 1.000 |
| GH10 | 37 | 37 | 0 | 1.000 |
| GH11 | 66 | 66 | 0 | 1.000 |
| GH12 | 829 | 829 | 0 | 1.000 |
| GH13 | 259 | 58 | 201 | 0.224 |
| GH14 | 20 | 4 | 16 | 0.200 |
| GH15 | 3061 | 3047 | 14 | 0.995 |
| GH16 | 2720 | 2710 | 10 | 0.996 |
| GH17 | 2720 | 2304 | 416 | 0.847 |
Index build times
| System | Index build time |
|---|---|
| pgchem with OpenBabel or Indigo | 25690 ms |
| Bingo | 336319 ms |
Indigo's ext+sub fingerprint is truly more selective than FP2. Still, OpenBabel with binary storage shows the better prformance because of its
Also, the result for GH3, GH7, GH9, GH12, GH15, GH16, and GH17 are different between OpenBabel and Indigo, and Bingo finds 79 hits for GH6 where pgchem finds zero.
Index building on pgchem is 13 times faster than Bingo, but since pgchem (currently) does not support features like tautomer searching or SMARTS searching with index support this comparison is a bit like apples and oranges.
The slow performance of Bingo without index, comparable to pgchem without binary storage, is quite likely a result of the storage of molecules in textual representation. Parsing text to binary molecules is a first class performance killer. Unfortunately, there is no way to convert molecules into native format directly with Bingo for PostgreSQL, but Bingo does the conversion implicitly when building the index.
Friday, December 9, 2011
OBMol de-/serialization revisited
The OBChiralData isn't used anymore. Also the functions OBAtom::IsClockwise, and OBAtom::IsAntiClockwise are obsolate. Instead, you should serialize the OBCisTransStereo and OBTetrahedralStereo data objects.
Fortunately (for me, since I don't have the time at the moment), Jérôme Pansanel has:...started the serialization of the OBCisTransStereo and OBTetrahedralStereo objects.
For the time being, I have tried the following workaround and it seems to be working well. First, I have removed now unneccessary code from the unserialization:
bool unserializeOBMol(OBBase* pOb, const char *serializedInput)
{
OBMol* pmol = pOb->CastAndClear<OBMol>();
OBMol &mol = *pmol;
unsigned int i,natoms,nbonds;
unsigned int *intptr = (unsigned int*) serializedInput;
++intptr;
natoms = *intptr;
++intptr;
nbonds = *intptr;
++intptr;
_ATOM *atomptr = (_ATOM*) intptr;
mol.ReserveAtoms(natoms);
OBAtom atom;
int stereo;
for (i = 1; i <= natoms; i++) {
atom.SetIdx(atomptr->idx);
atom.SetHyb(atomptr->hybridization);
atom.SetAtomicNum((int) atomptr->atomicnum);
atom.SetIsotope((unsigned int) atomptr->isotope);
atom.SetFormalCharge((int) atomptr->formalcharge);
stereo = atomptr->stereo;
if(stereo == 3) {
atom.SetChiral();
}
atom.SetSpinMultiplicity((short) atomptr->spinmultiplicity);
if(atomptr->aromatic != 0) {
atom.SetAromatic();
}
if (!mol.AddAtom(atom)) {
return false;
}
atom.Clear();
++atomptr;
}
_BOND *bondptr = (_BOND*) atomptr;
unsigned int start,end,order,flags;
for (i = 0;i < nbonds;i++) {
flags = 0;
start = bondptr->beginidx;
end = bondptr->endidx;
order = (int) bondptr->order;
if (start == 0 || end == 0 || order == 0 || start > natoms || end > natoms) {
return false;
}
order = (unsigned int) (order == 4) ? 5 : order;
stereo = bondptr->stereo;
if (stereo) {
if (stereo == 1) {
flags |= OB_WEDGE_BOND;
}
if (stereo == 6) {
flags |= OB_HASH_BOND;
}
}
if (bondptr->aromatic != 0) {
flags |= OB_AROMATIC_BOND;
}
if (!mol.AddBond(start,end,order,flags)) {
return false;
}
++bondptr;
}
intptr = (unsigned int*) bondptr;
mol.SetAromaticPerceived();
mol.SetKekulePerceived();
return true;
}
if (strchr (querysmi, '@') != NULL)
{
//Match against an OBMol generated from SMILES
}
else
{
//Match against an OBMol deserialized from binary
}
Tuesday, December 6, 2011
First Light
Substructure search speed
| Rank | Build | Storage | Fingerprint | Hits | no Index | Hits | with Index |
|---|---|---|---|---|---|---|---|
| 1 | OpenBabel | binary+SMILES | FP2 | 8070 | 9236 ms | 8067 | 936 ms |
| 2 | Indigo | binary | ext+sub | 8049 | 24821 ms | 8049 | 2418 ms |
| 3 | OpenBabel | SMILES | FP2 | 8070 | 57971 ms | 8067 | 5432 ms |
I've checked why the OpenBabel FP2 fingerprint eliminates three structures that otherwise would pass: Using the VF2 OBIsomorphismMapper instead of the OBSmartsPattern, it's also 8067 without index. But it's about four times slower, 90526 ms without index, 8798 with index.
The structures in question are: 80944, 83450 and 99925 and I'm pretty sure it's caused by differences in aromaticity detection.
Stereochemistry in substructure searches
| Check | Query | Expected | Indigo binary | OpenBabel SMILES | OpenBabel binary |
|---|---|---|---|---|---|
| R/S different | select 'C[C@H]([C@@H](C(=O)O)N)O'::molecule <= 'O=C(O)[C@H](N)[C@@H](O)C'::molecule | false | pass | fail | fail |
| R/S same | select 'C[C@H]([C@@H](C(=O)O)N)O'::molecule <= 'C[C@H]([C@@H](C(=O)O)N)O'::molecule | true | pass | pass | pass |
| E/Z different | select 'C(=C\Cl)\Cl'::molecule <= 'C(=C/Cl)\Cl'::molecule | false | pass | fail | fail |
OpenBabel fails the 'E/Z different' and 'R/S different' checks, but these are known issues up to version 2.3.1.
Indigo has no obvious issues with matching R/S and E/Z stereochemistry.
Fingerprint efficiency
| Fingerprint type | Candidates screened | Hits matched | false positives | Efficiency |
|---|---|---|---|---|
| ext+sub | 8090 | 8049 | 41 | 0.995 |
| FP2 | 8145 | 8067 | 78 | 0.99 |
Pretty close.
Wednesday, November 30, 2011
What's up, doc?
OK, I have now a working (i.e. not crashing & giving meaningful results) hybrid version of pgchem::tigress with OpenBabel and Indigo, where the OpenBabel functions in the search engine have been replaced by Indigo functionality.
Why?
- To see if it can be done :-)
- To learn more about programming with Indigo
- To see which is faster
- Indigo has better reaction support as it seems
Interestingly I could keep the external interface almost stable. As only a dozen or so functions outside the search engine are affected by the change, I think with some #IFDEFs I can make a common codebase that compiles either to 100% OpenBabel or the hybrid version.
Monday, November 14, 2011
R-Matrix implementation with Indigo
I have been trying programming with Indigo recently and here is my first, straightforward (to avoid the term 'naive') implementation of an Ugi like R-Matrix (Gasteiger/Engel, Chemoinformatics, 2003, Wiley-VCH, p. 185ff.) for adding make/break/change bond detection to its reaction mapper:
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include "indigo.h"
static inline int mp(const int column, const int row, const int maxRows)
{
return column-1+((row-1)*maxRows);
}
int main(int argc, char *argv[])
{
int index, reaction, reactant, product, atom, bond, atomIter, reactantIter, productIter, neighborIter, totalAtoms, mappingNumber, targetMappingNumber, bondMakeBreak;
int *bMatrix, *eMatrix;//, *rMatrix;
totalAtoms=0;
qword session = indigoAllocSessionId();
indigoSetSessionId(session);
printf("%s\n",indigoVersion());
reaction = indigoLoadReactionFromFile("c:/temp/testrxn.rxn");
//indigoFoldHydrogens(handle);
indigoDearomatize(reaction);
//printf("1:%s\n",indigoGetLastError());
indigoAutomap(reaction,"discard");
reactantIter = indigoIterateReactants(reaction);
while((reactant = indigoNext(reactantIter)))
{
totalAtoms+=indigoCountAtoms(reactant);
}
indigoFree(reactantIter);
bMatrix = (int*) calloc(totalAtoms*totalAtoms,sizeof(int));
eMatrix = (int*) calloc(totalAtoms*totalAtoms,sizeof(int));
//rMatrix = (int*) calloc(totalAtoms*totalAtoms,sizeof(int));
reactantIter = indigoIterateReactants(reaction);
while((reactant = indigoNext(reactantIter)))
{
atomIter = indigoIterateAtoms(reactant);
while((atom = indigoNext(atomIter)))
{
mappingNumber = indigoGetAtomMappingNumber(reaction,atom);
//printf("%i\n",mappingNumber);
//indigoGetExplicitValence(atom, &valence);
//printf("%i\n",valence);
//bMatrix[mp(mappingNumber, mappingNumber, totalAtoms)]=valence;
neighborIter = indigoIterateNeighbors(atom);
while((atom = indigoNext(neighborIter)))
{
targetMappingNumber = indigoGetAtomMappingNumber(reaction,atom);
index = mp(mappingNumber, targetMappingNumber, totalAtoms);
if(bMatrix[index]==0)
{
bond=indigoBond(atom);
bMatrix[index]=indigoBondOrder(bond);
}
}
//printf("\n");
indigoFree(neighborIter);
}
indigoFree(atomIter);
}
indigoFree(reactantIter);
productIter = indigoIterateProducts(reaction);
while((product = indigoNext(productIter)))
{
atomIter = indigoIterateAtoms(product);
while((atom = indigoNext(atomIter)))
{
mappingNumber = indigoGetAtomMappingNumber(reaction,atom);
//printf("%i\n",mappingNumber);
//indigoGetExplicitValence(atom, &valence);
//printf("%i\n",valence);
//eMatrix[mp(mappingNumber, mappingNumber, totalAtoms)]=valence;
neighborIter = indigoIterateNeighbors(atom);
while((atom = indigoNext(neighborIter)))
{
targetMappingNumber = indigoGetAtomMappingNumber(reaction,atom);
index = mp(mappingNumber, targetMappingNumber, totalAtoms);
//printf("%i",indigoBondOrder(bond));
if(eMatrix[index]==0)
{
bond=indigoBond(atom);
eMatrix[index]=indigoBondOrder(bond);
}
}
//printf("\n");
indigoFree(neighborIter);
}
indigoFree(atomIter);
}
indigoFree(productIter);
for(int i=0; i<(totalAtoms*totalAtoms); i++)
{
bondMakeBreak=eMatrix[i]-bMatrix[i];
//rMatrix[i]=bondMakeBreak;
if(bondMakeBreak>0)
{
if(bMatrix[i]>0)
printf("change: %i to %i\n",(i / totalAtoms)+1,(i % totalAtoms)+1);
else
printf("make: %i to %i\n",(i / totalAtoms)+1,(i % totalAtoms)+1);
}
else if(bondMakeBreak<0)
{
if(bMatrix[i]>1)
printf("change: %i to %i\n",(i / totalAtoms)+1,(i % totalAtoms)+1);
else
printf("break: %i to %i\n",(i / totalAtoms)+1,(i % totalAtoms)+1);
}
}
//printf("2:%s\n",indigoGetLastError());
indigoSaveRxnfileToFile(reaction,"c:/temp/testrxn_mapped.rxn");
//printf("3:%s\n",indigoGetLastError());
indigoFree(reaction);
indigoReleaseSessionId(session);
free(bMatrix);
free(eMatrix);
//free(rMatrix);
return 0;
}
- 50% too much memory consumption, since only half of the R-Matrix would suffice
- Each bond is found twice (Atom1 to Atom2 and Atom2 to Atom1)
- The make/break/change info is not added to the mapped reaction file
Have fun!
Monday, May 23, 2011
Putting things into perspective
Radiation in Japan
I am no physicist, but this is so straightforward ignorant of factors like long term exposure effects, ingestion of radionuclides and non-uniform contamination that it leaves me speechless.
Dear silicon valley executives with geiger counters, leave them at home. Please.
Monday, May 9, 2011
JSDraw available again
JSDraw
As being haunted by 'issues' with plugin type editors based on Java or ActiveX for years, it's nice to see that browser-native editing/depiction of chemical structures is gaining more and more momentum.
The other players I know of are:
ChemWriter
Ketcher
Sketcher 2D
Friday, April 29, 2011
Java in-memory compression
Sure, one could do it for every variable individually, but how about compressing whole Objects using the standard serializing mechanism?
If you use WEKA, you have the SerializedObject.
If not - enter the CompressedReference:
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.io.Serializable;
import java.util.zip.GZIPInputStream;
import java.util.zip.GZIPOutputStream;
public class CompressedReference<T extends Serializable> implements Serializable {
private static final long serialVersionUID = 7967994340450625830L;
private byte[] theCompressedReferent = null;
public CompressedReference(T referent) {
try {
compress(referent);
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
public int size() {
return theCompressedReferent.length;
}
public T get() {
try {
return decompress();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (ClassNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return null;
}
private void compress(T referent) throws IOException {
ByteArrayOutputStream bos = new ByteArrayOutputStream();
GZIPOutputStream zos = new GZIPOutputStream(bos);
ObjectOutputStream ous = new ObjectOutputStream(zos);
ous.writeObject(referent);
zos.finish();
bos.flush();
theCompressedReferent = bos.toByteArray();
bos.close();
}
@SuppressWarnings("unchecked")
private T decompress() throws IOException, ClassNotFoundException {
T tmpObject = null;
ByteArrayInputStream bis = new ByteArrayInputStream(theCompressedReferent);
GZIPInputStream zis = new GZIPInputStream(bis);
ObjectInputStream ois = new ObjectInputStream(zis);
tmpObject = (T) ois.readObject();
ois.close();
return tmpObject;
}
}
A quick test shows 528 byte size for a String of 250 characters (since Unicode needs two bytes per char) and 64 bytes after compression, a ratio of about 8:1. The only requirement is that the Object stored in the reference has to implement Serializable.
And yes, I have to clear those TODO reminders... ;-)
Update
The compression ratio for a CDK Molecule representation of 2-Fluoronaphthalene is about 3:1.
The compression ratio for the V2000 mofile of 2-Fluoronaphthalene is about 7:1.
Friday, November 26, 2010
pgchem::tigress sets new world record!
This is the largest installation I know of and therefore sets a new world record - for pgchem. :-)
Friday, November 12, 2010
Development of pgchem::tigress 2.0 has started
The overall good news is that the Makefile could be simplified a lot with help from Steffen Neumann from the Leibniz Institute of Plant Biochemistry and all current functions are still working with OB 2.3. The build process on Windows is still a bitch compared to building on Posix systems, though.
The roadmap for 2.0:
- A lot of code needs cleanup,
especially the make_molecule() function, which is unreadable and error prone. Mr. Neumann has also identified various possible memory leaks that need to be fixed Allow 2D coordinate generation for Molfile outputUsing OBQuery for non-SMARTS substructure searchingAdd Spectrophore(TM) outputAdd support for exporting Andrew Dalke's chemfp formats (at least FPS)Move SVG output from Dingo to OB, having one library less to care for- Add the fingerprint linear optimizer in a generally usable implementation
- See if the new stereochemistry inside OB fixes various issues that were reported
Basic reaction support- Win64 builds ?
This will take some time, so don't hold your breath. Since there are already some bugs reported for OB 2.3.0 I guess I'll have to wait for those being fixed before a production release of pgchem::tigress 2.0 becomes available.
Tuesday, November 9, 2010
GCC6 Day Three (09.11)
- Noel O'Boyles lecture about the in-silico design of polymers with optimal properties for organic solar cells. As far as I understood this, the predicted efficency for organic solar cells is about 13 %. Experimentally 6 % have been reached yet. By using OpenBabel together with cclib and Gaussian, synthetically accessible polymers with 11 % predicted efficiency could be designed.
- Roger Sayle from NextMove showed his recent work on a chemistry aware spell checker, based on the observation, that the current problems with chemical text mining do not come from poor OCR or poor name2structure conversion, but mainly from bad input because of typos etc. in the source texts and common spell checking software cannot cope with this.
Monday, November 8, 2010
GCC6 Day Two (08.11)
- The WizePairZ algorithm was quite interesting. It aims to solve the problem that often unwanted properties of drug candidates scale in correlation with wanted properties. The idea behind WizePairZ is to automatically find transformations from one moelcule to another that reduce unwanted properties (ideally while improving wanted properties). Then such transformations are applied to molecules which are close to the boundary between 'unwanted' and 'wanted' space in order to push them over the boundary.
- The in-silico prediction of Phototocicity aims to find molecular descriptors and associated models that allow to predict the potential phototoxicity of substances, especially their UV absorption between 290 - 450 nm wavelength where the human skin doesn't filter anymore and the ozone layer doesn't filter yet.
GCC6 Day One (07.11)
Arrived 14:00 in Goslar
What's new in Knime presentation:
Mainly usability improvements, like conditional paths through workflows and annotations. This is really getting somewhere. Release planned for December 6th 2010
My presentation:
I was not boohed from the stage
MOSGrid presentation:
It's a molecular simulation grid driven by a consortium of academia and industry, lead by the University of Cologne
The planned usage is, that you can specify a task through a web interface in MSML (molecular simulation markup laguage), which describes a task for the grid, then the MSML is translated into input specific to a program (e.g. Gaussian).
The program is then run on the grid and the program specific output is translated again into MSML and returned to the user.
Currently
- Gaussian
- Turbomole
are supported.
Tasks can be chained into workflows. Lots of expertise and manpower, and if buerocracy doesn't step in the way, this could work and is worth a look. Unfortunately, the licensing of the used programs in a grid seems to be an unsolved legal problem.
Demonstration of MOSGrid:
A basic web interface (to Gaussian I guess) was shown and how to run quantum calculations on the grid from there. The interface is designed for humans. Currently there are no plans to offer this as a service to machines. Licensinsg issues of using commercial software in a grid must be ironed out to make it widely available, but beta testing will start in December to a limited number of users.