-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Friday 20 February 2004 12:18, Tommi Hassinen wrote:
> On Thu, 19 Feb 2004, Miguel Howard wrote:
> > Can you tell me a little about the ghemical?

Will you be using the Ghemical Reader in CDK?

BTW, the link is: http://bioinformatics.org/ghemical/

> It's a molecular modelling program written in C++. Currently it is split
> in 2 parts:
>
> libghemical : only contains the core functionality (no graphics
>       or file I/O), has a built-in molecular mechanics implementation
>       links to external libs to implement quantum-mechanics methods
>       (libmopac7 and scientific toolkit from the MPQC program); the
>       following list shows what can(+) and can't be done(-) currently:
>               +compute energy/forces
>               +do geometry optimization
>               +do a molecular dynamics run
>               +run different conformational searches
>               -do a normal-mode analysis (vibrations/IR)
>
> ghemical : contains a GUI part for gnome.
>
> > What is the input format?
>
> There is a native file format, and many other file formats are accessible
> through file import/export capabilities that depend on OpenBabel.
>
> However, I think none of the file formats directly fit into the plugin
> use, and a new communication protocol is needed.

If you have some time left, I would like to propose CMLComp... Ask Peter 
Murray-Rust about it... CMLComp is in XML format, which nicely embeds in 
other XML languages... just consider it.

> > > I'll learn about cgi and web servers before I start anything at the
> > > server side.
> >
> > Good.
>
> Yesterday evening I read a few tutorials about CGI, so here is the current
> plan (please correct if needed).
>
> Indeed using CGI we can achieve more or less the situation where
> inputs/outputs of the plugin and the server are connected; the only
> limitation seems to be that plugin can only send a single request and
> only after the server has received it, it can send a single reply. But
> this is not too bad, especially since it makes the server quite simple.
>
> So the server would read standard input and write into standard output.
> Now I see that it doesn't make sense to use the gnome/bonobo
> ghemical-server, but instead a completely separate server is needed. Let's
> call it "ghemical-cgi"; it will be a rather simple C++ console program
> that uses resources from libghemical. Later it could be optimized into
> this purpose (say smaller size and on-demand loading of parameter files).
>
> So a web server should be installed and set functional, and the
> ghemcal-cgi program should be copied into the cgi-bin directory. Then the
> web server would launch it for each request separately, and connect it
> into the plugin.
>
> The plugin should ask user for server URL, say
>
>       http://www.something.net        or
>       http://www.something.net:80
>
> Then internally it should add to URL a path to the cgi program:
>
>       http://www.something.net:80/cgi-bin/ghemical-cgi
>
> Now if such a request is sent to the web server, it should launch the
> ghemical-cgi program, right?

Correct.

> Ok then the web-server launches ghemical-cgi so that some environmental
> variables are set. Now the request form plugin should be sent to the
> ghemical-cgi program. Since the request can be a large one (it could
> contain the structure of a peptide or a whole protein molecule perhaps)
> the simple means are not enough; by this I mean ghemical-cgi should get
> the request from standard input.

Yes, you will need to use the POST method of HTTP...

> How to do that then? My docs say that this the way it works if the html
> request the plugin makes is of type POST. How this is done, is still a bit
> unclear, and I'm studying it. Basically a socket should be opened to

Indeed... I don't know how this is done in C++, but for other languages there 
exist many tools... so I guess for C++ too...

>       http://www.something.net:80
>
> and a proper html request string should be sent that accesses
> /cgi-bin/ghemical-cgi file using the POST method. The data to be sent is
> included in this html request. The data should contain a description of
> atoms and bonds, and instructions to ghemical-cgi what to do with them.
> The protocol could be something like this:
>
> -a header part for checking protocol versions etc.
>       "hello, I have a job for you"
>
> -descriptions of atoms/bonds etc.
>       "there a x atoms and y bonds ; atom0 = ... atom1 = ..."
>
> -the comp.chem. method to be used and related settings.
>       "use molecular mechanics"
>       "use a semi-empirical QM method, AM1, with total charge = 0"
>
> -instructions about the operation to be done.
>       "just calculate the energy"
>       "do a geom-optimization and send structures after each x steps"
>
> At this stage ghemical-cgi knows what to do, and can start working. It
> should add only a simple header to the data it sends using stdout to the
> web server, and then it can send data directly to the plugin; the start
> of the reply to web-server and finally to plugin is
>
>       Content-type: text/plain
>
>       this is the first line of reply to the plugin.
>
> Then the plugin just reads and interprets the reply stream until it ends.
> The ghemical-cgi process is shut down and the operation is ready.
>
> Any comments or enhancements?

Talk to Peter... he has been/is doing similar things...

Egon

- -- 
[EMAIL PROTECTED]
PhD on Molecular Representation in Chemometrics
Nijmegen University
http://www.cac.sci.kun.nl/people/egonw/
GPG: 1024D/D6336BA6

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (SunOS)

iD8DBQFANfBsd9R8I9Yza6YRAr3eAJ0etsPJtakqDF9U6oD0yPykypvsewCfZk8l
UyU9DkD5vM97Y0v8YJ5IKXU=
=NVPp
-----END PGP SIGNATURE-----



-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id56&alloc_id438&op=click
_______________________________________________
Jmol-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jmol-developers

Reply via email to