|
From: <ern...@ba...> - 2009-03-13 08:26:05
|
Hello, >what would be the preferred method of serializing an OBMol object into memory? >Endianness et al. is not an issue, but the whole data structure should be saved. >I assume that instead of storing e.g. a SMILES string and building the OBMol every time it's needed from that string, reading a readymade OBMol into memory is faster...? maybe I shall clarify my question. :-) I filter many matches of OBMols through a SMARTS pattern in PostgreSQL. Within PostgreSQL, every time a function is called - per table row - it forgets all that was before. So I have to parse the OBMol _every row_ and instantiate the SMARTS Pattern _every row_. For the SMARTS pattern, there might be a solution of saving a pointer to in shared memory between calls to avoid init()-ing it every call, but for the parsing of the OBMols I'm still searching for a clever method to avoid the parsing and perception steps every time. As parsing and perception can be done upon saving the OBMol the first time in the database, a means of storing the OBMol, or at least the essential data structures to recreate it faster than from a textual format like SMILES, would be great. Is this RTFM? I have not found any documentation about serializing OBMol, parts of OBMol or something like the fastest input format yet... Best Regards Ernst-Georg Schmid |