From: Axel Kohlmeyer (akohlmey_at_cmm.chem.upenn.edu)
Date: Mon May 18 2009 - 09:27:16 CDT

On Mon, 2009-05-18 at 11:45 +0200, Ondrej Marsalek wrote:
> Dear everyone,
>
> I have read the following recently here on the mailing list, by Axel
> Kohlmeyer:
>
> > i had to take a deeper look into the python support code in VMD a
> > while ago and was puzzled to find effectively 3 different levels or
> > types of an API that can be compiled and used all at the same time
> > (with some tweaks) and there is now even the option to compile VMD as
> > a python module to be incorporated into other interpreters (it works,
> > i have been able to do so with the HOOMD code).
>
> That sound very interesting to me, apart from HOOMD I think that ASE
> would have good use for it and perhaps some other projects. As I am
> doing my own build of VMD anyway (because I need/want to use my platform
> python), this should not be a problem. Could someome please point me to
> some instructions or at least hint at where to start looking in the
> code?

the python parts of the VMD source code are easily identified.
the internal flow of execution takes a bit to figure out. due to
many people contributing and different styles of programming between
people and improvements in the quality of c++ support in compilers
over time, things are not always consistent.

in any case, you should compile from the cvs code for this and use
the SHARED compiler option. mind you, there are some restrictions
(e.g. no CUDA support, at least not on x86_64 as you cannot link
-fPIC and -fno-PIC code and nvcc does not (yet) support -fpic
compilation).

> And just a quick question - does that module also include the graphical
> interface, or is it only the text version?

there is a patch from justin that supposedly gets the GUI started on
his machine, i didn't manage to get it working on mine, but didn't
really care much or try hard. if you want GUI controlled calculations,
i'd rather suggest you improve the IMD interface or have the VMD be
the main code and import the other package as a python modules. makes
much more sense to me.

cheers,
   axel.

> Thanks a lot,
> Ondrej

-- 
=======================================================================
Axel Kohlmeyer   akohlmey_at_cmm.chem.upenn.edu   http://www.cmm.upenn.edu
   Center for Molecular Modeling   --   University of Pennsylvania
Department of Chemistry, 231 S.34th Street, Philadelphia, PA 19104-6323
tel: 1-215-898-1582,  fax: 1-215-573-6233,  office-tel: 1-215-898-5425
=======================================================================
If you make something idiot-proof, the universe creates a better idiot.