Fwd: [chimera-dev] database access
Daniel Greenblatt
dan at cgl.ucsf.edu
Sun Oct 12 22:39:23 PDT 2003
Hi Lars
Currently, Chimera does not have any functionality that interfaces
directly with MySQL-type relational databases, although this will
eventually be implemented as part of another project (but not for a
while still:-). However, Python *does* have several modules devoted to
accessing databases, and one could write an extension to Chimera to
accomplish this. We would certainly be willing to assist you in the
Chimera-side development of such an extension if this is the approach
you ultimately decide to take. See here for more information:
http://www.python.org/topics/database/modules.html
I think that all three approaches you detail are very reasonable.
There are generally two ways to create a model in Chimera. The first is
by reading in a known file format (such as PDB or mol2), and the
second is by manually building the model from raw information.
It seems that your (1) and (3) take the first approach - the server
side (i.e. your database) is responsible for processing the raw
information and giving Chimera a file in a format it understands.
Your method (2) takes the other approach, by supplying Chimera with raw
information, which it then builds into a model. This is also possible
in Chimera, although this all happens in the C++ code, which is not
distributed with Chimera. We don't currently have any examples
illustrating this in our Programmers Guide, but if you decided to
pursue this route, we could provide you with some instructional
examples on how to do this.
It is hard to say which one of these approaches is best, because it
depends on your aims - speed/efficiency? ease of implementation?
Dan Greenblatt
Computer Graphics Lab
University of California, San Francisco
dan at cgl.ucsf.edu
> first)
>
> My plugin accesses the db and creates a temporary file - then it tells
> chimera to load it.
> Advantage chimera can use it native (and probably fast) reading
> routines...
>
>
> second)
>
> The plugin fetches the data form the db and builds up the molecule in
> chimera by use of the python-interface...
>
>
> third()
>
> I tell chimera to access the database X, use password Y, and run
> select /
> or call a stored procedure.
> the stored-procedure or (for older mysql a linked extension function)
> could build up an input-format chimera understands from the actual
> data.
> the select-version would be a bit ugly cause we would need several of
> them
> or place some file-blobs in the bd.
>
>
> I hope your are interested to do some thing about approach three...
>
> Sincerely
> Lars
> _______________________________________________
> Chimera-dev mailing list
> Chimera-dev at cgl.ucsf.edu
> http://www.cgl.ucsf.edu/mailman/listinfo/chimera-dev
>
More information about the Chimera-dev
mailing list