Introduction to MolServer
MolServer is a server-based program
which delivers chemical database functionality to Microsoft clients via
Automation. As a thin, faceless wrapper around the ChemFinder chemical
database engine, MolServer provides lightweight access to the core CS info
technology, including all aspects of molecule and reaction storage, retrieval,
search, list handling, as well as all of ChemCentral. It does better
than that --- MolServer offers features not previously available in any
client, including multi-threaded searching, database administration
facilities, structure lookup via hash table (coming soon), plus added strength
in error handling, security, list handling, and other areas. MolServer
provides all in an executable less than a third the size of ChemFinder.
- MDI application. Each client
gets a separate document, although multiple documents may share accessto the
- DLL version. For a single
user working with local databases on a client machine, there is no need for
a separate executable.
- Built mostly of existing, shared code
--- MFC and the low-level ChemFinder libraries Mstlib, JDLib, Common, CC,
SDG, IOLib, CDXLib.
- Search options include
substructure, similarity, full structure, formula, mol weight, and
combinations. All ChemFinder search options are controllable:
overlapping fragments, stereo matching, etc.
- Each search takes place in its own thread.
When a search is initiated, the client is given a search object which
can be periodically queried for search status, hits so far, percent
completion, etc., as the search proceeds in the background.
- Search results are transferred as compact hitlist
objects. The hitlist interface includes complete facilities
for iterating, merging, serializing, editing. A hitlist object may be
specified as a search condition, restricting the structures to be examined.
- Database administration functions
are built into the code, but not yet exposed as interfaces. These
include database copy, rename, subset, merge, and view statistics.
- Databases are password-protected.
- Multi-client access to databases is
implemented via system file locks.
- Small executable. The
MolServer release exe is around 1000K, compared to over 3000KB for
- Plug-in drivers. Code is
engineered to make it easy to develop connections to external (non-MST)
MolServer currently exports five classes:
- Document -- connection between a client and a molecule
database. Provides methods for structure retrieval, storage, and
- Search -- object which monitors background search
process. Provides status, hit count, hit list.
- SearchInfo -- object containing search query component(s)
- Hitlist -- a set of integers representing structure ID's.
Methods include merge, serialize, iteration.
- ChemFinder.Molecule -- molecule or reaction structure;
exactly the same code and interface as exported by ChemFinder and CSMol.
MolServer will be our gateway not only to our own
mstfile-based engine, but also to other non-CS molecule database engines such
as Daylight and RS3. Recent changes in MolServer will make it easy to
develop drivers for these engines. We've demonstrated this by
developing our own native (.mst file) driver along with two sample drivers
which work, and provide templates for future ones.
Technical details. The two
principal Automation objects which access the database --- MolServer.Document
and .Search --- are implemented in thin shell classes (CMolServerDoc,
CXSearch), each of which is serviced by a new "driver" object.
The driver provides complete access to some data source having an indexed
collection of structures, i.e., each structure is identified by a unique
Virtual base classes (MolDriver, MolSearchDriver)
define the methods and properties to be implemented by database-specific
driver subclasses. Each driver is implemented in a separate source file,
with common functionality provided by the base classes as much as possible.