Eigenstate / vmd-python

Installable VMD as a python module
Other
129 stars 24 forks source link

Integration with VMD #27

Closed pd15ms089 closed 5 years ago

pd15ms089 commented 5 years ago

Dear Developers, How does the display function/module work? Do we have any kind of Display out from this module? The Actual VMD app is not integrated with this module. While installing via conda I didn't find it to install any other VMD app. Please suggest something... Thanks, Pallab

Eigenstate commented 5 years ago

Hi Pallab, You're right that without the usual VMD GUI the display module and others (molrep, etc) aren't of much use. This interface is in the process of being integrated into the main VMD codebase-- if you need these features you can check out the main VMD CVS tree and compile it yourself.

I'm working on getting offscreen rendering to an EGL buffer working so you can do everything from the module, but this is a low priority right now.

pd15ms089 commented 5 years ago

Dear Robin, I read your document on your own official page. Is it somehow possible to attack the default python binary in the conda environment: home/name/anaconda2/bin ? When we run the command "vmd -python", can you tell me what python interpreter it actually uses?

Your reply would be highly appreciated.

On Wed, Jun 5, 2019 at 1:35 AM Robin Betz notifications@github.com wrote:

Hi Pallab, You're right that without the usual VMD GUI the display module and others (molrep, etc) aren't of much use. This interface is in the process of being integrated into the main VMD codebase-- if you need these features you can check out the main VMD CVS tree and compile it yourself.

I'm working on getting offscreen rendering to an EGL buffer working so you can do everything from the module, but this is a low priority right now.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Eigenstate/vmd-python/issues/27?email_source=notifications&email_token=AGMWSEWWITC3LWT72IZF3LLPY3DGXA5CNFSM4HSCZ2W2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODW5WYQQ#issuecomment-498822210, or mute the thread https://github.com/notifications/unsubscribe-auth/AGMWSERD37YTGIDKKJRNLLLPY3DGXANCNFSM4HSCZ2WQ .

jvermaas commented 5 years ago

It has been a while, but I believe it is whichever interpreter it was hooked up to at compile time. One could check via the contents of sys.version

pd15ms089 commented 5 years ago

Um, yeah it's still showing up python2.5...

On Wed 5 Jun, 2019, 10:12 PM Josh Vermaas, notifications@github.com wrote:

It has been a while, but I believe it is whichever interpreter it was hooked up to at compile time. One could check via the contents of sys.version

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Eigenstate/vmd-python/issues/27?email_source=notifications&email_token=AGMWSESEGHMT4PWHKE6EWDLPY7UFZA5CNFSM4HSCZ2W2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODXAJZIY#issuecomment-499162275, or mute the thread https://github.com/notifications/unsubscribe-auth/AGMWSERHO5CHCSU65PMVOOLPY7UFZANCNFSM4HSCZ2WQ .

jvermaas commented 5 years ago

Right, since it is using either the system python (ldd of the VMD executable links to a system python library) or a barebones python installation bundled in with the executable via static linkage. I think the default is the latter, so there isn't an easy way to replace your python library without a reinstall, which is why vmd-python is so awesome, as it takes alot of the guesswork out of building VMD on new systems.

pd15ms089 commented 5 years ago

Yeah the vmd-python module is amazing, but the cmd it installs still have the same problem we are talking about.

Anyway please continue, that integration part if possible, however that's not necessary that much. Best of luck, from a python lover...

On Wed 5 Jun, 2019, 10:34 PM Josh Vermaas, notifications@github.com wrote:

Right, since it is using either the system python (ldd of the VMD executable links to a system python library) or a barebones python installation bundled in with the executable via static linkage. I think the default is the latter, so there isn't an easy way to replace your python library without a reinstall, which is why vmd-python is so awesome, as it takes alot of the guesswork out of building VMD on new systems.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Eigenstate/vmd-python/issues/27?email_source=notifications&email_token=AGMWSEQKCTXOWIROLNJK27DPY7W3PA5CNFSM4HSCZ2W2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODXAL4PA#issuecomment-499170876, or mute the thread https://github.com/notifications/unsubscribe-auth/AGMWSEQVIGPYUCB7I3DRZGLPY7W3PANCNFSM4HSCZ2WQ .

Eigenstate commented 5 years ago

vmd-python is a Python module that exposes the molecular manipulation functions present in the main VMD program. It's not a full-featured VMD implementation or standalone program, and won't affect the interpreter used in VMD. It doesn't provide a vmd command or a vmd-python command---all it lets you do is run import vmd in Python.

If you want a VMD installation with a Python interpreter, you'll have to compile VMD yourself and link against the python you want to use. Here's how I do it:

  1. Set the environment variables the build will use with a script. Here's mine. It builds against a conda installation of Python. See the comments for which lines to change. Then source it: source source_me.sh

  2. In your VMD source directory $VMDDIR:

    cd $VMDDIR/plugins
    make LINUXAMD64
    make distrib
  3. Symlink the plugins installed directory into the main source directory, then build cmd.

    cd $VMDDIR/vmd
    ln -s $PLUGINDIR plugins
    cat "LINUXAMD64 OPENGL FLTK TK IMD NETCDF COLVARS TCL PYTHON PTHREADS NUMPY LP64 GCC" > configure.options
    ./configure
    cd src
    make
    make install

Hopefully this works. If not, let me know how I can help as I wrote this up pretty quickly. You'll probably want to get access to the VMD developer CVS tree for all the python functionality to be present. I'm also working on getting binary releases of these to be made available, but that won't be for a while.

pd15ms089 commented 5 years ago

Please check your email I have attached one error image and another env file, when I enter make LINUXAMD64, after sourcing my environmental variable file; this shows the following error message. I am attaching my env file too. I mentioned tcl8.6 in my vmd_me.sh file, but still the compiler is searching for tcl8.5.

On Thu, Jun 6, 2019 at 11:39 PM Robin Betz notifications@github.com wrote:

vmd-python is a Python module that exposes the molecular manipulation functions present in the main VMD program. It's not a full-featured VMD implementation or standalone program, and won't affect the interpreter used in VMD.

If you want a VMD installation with a Python interpreter, you'll have to compile VMD yourself and link against the python you want to use. Here's how I do it:

1.

Set the environment variables the build will use with a script. [Here's mine( https://gist.github.com/Eigenstate/361ef62e418aac2e3d5bb8a9a10d9c4a). It builds against a conda installation of Python. See the comments for which lines to change. Then source it: source source_me.sh 2.

In your VMD source directory $VMDDIR:

cd $VMDDIR/plugins make LINUXAMD64 make distrib

  1. Symlink the plugins installed directory into the main source directory, then build cmd. cd $VMDDIR/vmd ln -s $PLUGINDIR plugins make make install

Hopefully this works. If not, let me know how I can help as I wrote this up pretty quickly. You'll probably want to get access to the VMD developer CVS tree for all the python functionality to be present. I'm also working on getting binary releases of these to be made available, but that won't be for a while.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Eigenstate/vmd-python/issues/27?email_source=notifications&email_token=AGMWSEWTZKTJ6C6PDKYNNVTPZFHFDA5CNFSM4HSCZ2W2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODXDWDJQ#issuecomment-499605926, or mute the thread https://github.com/notifications/unsubscribe-auth/AGMWSEROD4QCPYH3CYFHOWDPZFHFDANCNFSM4HSCZ2WQ .

pd15ms089 commented 5 years ago

vmd-python is a Python module that exposes the molecular manipulation functions present in the main VMD program. It's not a full-featured VMD implementation or standalone program, and won't affect the interpreter used in VMD. It doesn't provide a vmd command or a vmd-python command---all it lets you do is run import vmd in Python.

If you want a VMD installation with a Python interpreter, you'll have to compile VMD yourself and link against the python you want to use. Here's how I do it:

  1. Set the environment variables the build will use with a script. Here's mine. It builds against a conda installation of Python. See the comments for which lines to change. Then source it: source source_me.sh
  2. In your VMD source directory $VMDDIR:
cd $VMDDIR/plugins
make LINUXAMD64
make distrib
  1. Symlink the plugins installed directory into the main source directory, then build cmd.
cd $VMDDIR/vmd
ln -s $PLUGINDIR plugins
cat "LINUXAMD64 OPENGL FLTK TK IMD NETCDF COLVARS TCL PYTHON PTHREADS NUMPY LP64 GCC" > configure.options
./configure
cd src
make
make install

Hopefully this works. If not, let me know how I can help as I wrote this up pretty quickly. You'll probably want to get access to the VMD developer CVS tree for all the python functionality to be present. I'm also working on getting binary releases of these to be made available, but that won't be for a while.

please check this. when I enter make LINUXAMD64, after sourcing my environmental variable file. I mentioned tcl8.6 in my vmd_me.sh file, but still the compiler is searching for tcl8.5. I had sent you an screenshot via mail.