VMD-L Mailing List
From: Maxim Belkin (mbelkin_at_ks.uiuc.edu)
Date: Wed Nov 18 2015 - 10:52:52 CST
- Next message: Mayne, Christopher G: "Re: FFTK dihedral scan"
- Previous message: kskeby: "Re: Fwd: Compiling VMD with python interpreter on MacOSX"
- In reply to: kskeby: "Re: Fwd: Compiling VMD with python interpreter on MacOSX"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Katrine,
Try repeating all the steps you did from your home directory (i.e. not from the "/Application" folder).
I didn’t look carefully at the error messages you are getting but "/Application" is a special folder in OS X and using it for building vmd is not a great idea. See if vmd built from your home directory gives you the same problems/errors.
Maxim
> On Nov 18, 2015, at 10:43, kskeby <kks_at_chem.au.dk> wrote:
>
> Hi Josh
>
> Thanks for the response.
>
> If I open VMD from the command-line as you suggested I get the following errors:
> ERROR) Could not read the vmd initialization file -
> ERROR) source {/Applications/vmd/vmd-1.9.2/MACOSXX86_64/scripts/vmd/vmdinit.tcl}
> ERROR) couldn't read file "/Applications/vmd/vmd-1.9.2/MACOSXX86_64/scripts/vmd/vmdinit.tcl": no such file or directory
> ERROR) The VMDDIR environment variable is set by the startup
> ERROR) script and should point to the top of the VMD hierarchy.
> ERROR) VMD will continue with limited functionality.
> ERROR) Color definitions file '/Applications/vmd/vmd-1.9.2/MACOSXX86_64/scripts/vmd/colordefs.dat' does not exist.
> ERROR) Parsing color definitions failed.
> ERROR) Material definitions file '/Applications/vmd/vmd-1.9.2/MACOSXX86_64/scripts/vmd/materials.dat' does not exist.
> ERROR) Parsing material definitions failed.
> ERROR) Residue types file '/Applications/vmd/vmd-1.9.2/MACOSXX86_64/scripts/vmd/restypes.dat' does not exist.
> ERROR) Parsing residue types failed.
> ERROR) Atomselection macro file '/Applications/vmd/vmd-1.9.2/MACOSXX86_64/scripts/vmd/atomselmacros.dat' does not exist.
> ERROR) Parsing atomselection macros failed.
> FLTK
> invalid command name "menu"
> invalid command name "menu"
> invalid command name "menu"
> invalid command name "menu"
> vmd > invalid command name "menu"
> Unable to change color name
> Unable to change color name
> Unable to change color name
> ERROR) invalid command name "vmd_load_extension_packages"
>
> However, if I create a link like this:
> cd /Applications/vmd/vmd-1.9.2
> ln -s MACOSXX86_64/vmd_MACOSXX86_64 vmd_MACOSXX86_64
>
> And open vmd using the link, there are no errors, but VMD behaves as before not displaying the loaded molecules.
>
> The FLTK environment variable worked, and the right filebrowser is now shown. Using only scripts is not ideal, but I can definitely live with that. However, problem 3 is still there, no molecule is shown in the display window. Anyone else have any ideas?
>
> Thanks,
> Katrine
>
>> On 18 Nov 2015, at 10:45, Josh Vermaas <vermaas2_at_illinois.edu <mailto:vermaas2_at_illinois.edu>> wrote:
>>
>> Hi Katrine,
>>
>> In my limited experience compiling for Mac, everything goes wrong all the time, and I run back to my linux box for all of its python-infused goodies. That being said, it looks like you've gotten reasonably far. What happens if you try to run VMD from the command line? Say: ./MACOSXX86_64/vmd_MACOSXX86_64 -dispdev text? Or better yet: ./MACOSXX86_64/vmd_MACOSXX86_64 -dispdev text -python
>>
>> When I do that, VMD complains about certain environment variables not being set, but will otherwise behave more or less normally. With regard to your specific questions:
>>
>> 1.) This might be the evil filechooser problem. John has addressed this in past posts, and while it was originally a Yosemite problem, I don't think El Capitan did anything to solve it. Quoting John:
>> "
>> The solution is to set an environment variable to tell VMD not to
>> use the MacOS-provided file browser window, and to instead use the
>> FLTK-based file chooser. This is done by setting the environment variable
>> "VMDFILECHOOSER" to the value "FLTK". This can be done in VMD itself
>> in the text console, in the user's .vmdrc file, in the global .vmdrc
>> file in the VMD.app bundle, or by setting the environment variable in the
>> user's Unix shell .bashrc, etc.
>>
>> To set the variable in VMD or .vmdrc etc, run this command:
>> set env(VMDFILECHOOSER) FLTK
>>
>> To set the variable in bash, add this to .bashrc etc:
>> VMDFILECHOOSER=FLTK
>> export VMDFILECHOOSER
>>
>> After the environment variable is set, VMD will use the alternative
>> file selector window in the graphical interface, and this should prevent
>> the problems you've been encountering.
>>
>> "
>>
>> 2.) I think this is why there aren't any official VMD64 bit builds for Mac. Something about FLTK not playing nice. An intermediate workaround might be to load from a script passed along to -e. Its not ideal, but it would work, and more importantly, can now be a python script because you baked in python support! The three line version would be this:
>>
>> from Molecule import *
>> mol=Molecule()
>> mol.load("filenamegoeshere")
>>
>> 3.) Ick. I think it might be related to 1, but I'm not familiar enough with compiling for Mac to know the best way of getting around it. :(
>>
>> Good luck!
>> -Josh Vermaas
>>
>> On 11/18/2015 08:29 AM, kskeby wrote:
>>> Hi
>>>
>>> I have been trying to compile VMD 1.9.2 with python on my mac running OSX El Capitan (10.11.1). I have managed to make a build, but VMD is not behaving as it should.
>>> 1. When I open the molecule file browser and go to browse for a file, I am not able to actually select a file, they are inactive.
>>> 2. I can load files using the tk console, but the console is not behaving properly. It seems like it does not alway register when a key is pressed, and when I type letters too fast it does not catch all the letters.
>>> 3. When I load a pdf-file and dcd on top of that, no molecule is shown in the OpenGL display.
>>>
>>> Here are the steps I took to build the binaries:
>>>
>>> 1. Install fltk
>>> I tried doing this with Homebrew, however that does not work with El Capitan, and I eventually found this post (https://github.com/mikepurvis/ros-install-osx/issues/12 <https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_mikepurvis_ros-2Dinstall-2Dosx_issues_12&d=BQMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=zFfoK61upjM5BwyoRAsX8dLq7rwWm8aw7r7dqtjgcCE&m=XQ8fa5_HEjkMzUCubp0b7rsWcoT7fRBqgUChTcYjuUA&s=oynDKUVxrRrPOCCGdUsp-1XfFUeveRVTboIc3TjshT8&e=>) that said that you can use the following to install fltk:
>>> > brew reinstall --devel https://raw.githubusercontent.com/dpo/homebrew/ec46018128dde5bf466b013a6c7086d0880930a3/Library/Formula/fltk.rb <https://urldefense.proofpoint.com/v2/url?u=https-3A__raw.githubusercontent.com_dpo_homebrew_ec46018128dde5bf466b013a6c7086d0880930a3_Library_Formula_fltk.rb&d=BQMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=zFfoK61upjM5BwyoRAsX8dLq7rwWm8aw7r7dqtjgcCE&m=XQ8fa5_HEjkMzUCubp0b7rsWcoT7fRBqgUChTcYjuUA&s=rslGEKdfoL3PI3dyCHLKJY55A04b-4Yz8LAjrHzxX_I&e=>
>>>
>>> 3. I already had Xcode (7.1.1 7B1005) and Command line tools installed, so no need to install Tcl, Tk and OpenGL.
>>> I am running Tcl8.5, Tk8.5 and Python2.7.
>>>
>>> 4. I also had XQuartz (X11, <https://urldefense.proofpoint.com/v2/url?u=http-3A__www.xquartz.org_&d=BQMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=zFfoK61upjM5BwyoRAsX8dLq7rwWm8aw7r7dqtjgcCE&m=XQ8fa5_HEjkMzUCubp0b7rsWcoT7fRBqgUChTcYjuUA&s=qFtc9v6nVMPt0YDROcyBF2ExWY_93ug0Kv3KY5vhR4U&e=>http://www.xquartz.org/ <https://urldefense.proofpoint.com/v2/url?u=http-3A__www.xquartz.org_&d=BQMDaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=pwKxBcH8lMqXKaUoT-mFtw&m=GtB9mAIZP8Lj0deuq-J8r5-N7obj1HtxIhIx5Mi9lvs&s=mXKoFDV-gkWi-lbNnjyO3mrYSNDqyI3YPMEnxdE_VrQ&e=>) installed, which should also be done manually, because it is not included with OS X anymore (https://support.apple.com/en-us/HT201341 <https://urldefense.proofpoint.com/v2/url?u=https-3A__support.apple.com_en-2Dus_HT201341&d=BQMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=zFfoK61upjM5BwyoRAsX8dLq7rwWm8aw7r7dqtjgcCE&m=XQ8fa5_HEjkMzUCubp0b7rsWcoT7fRBqgUChTcYjuUA&s=_6phZeaNsP0OFWQMvNKDEPKqy5pUyUJ6sBJDMBNyDzY&e=>).
>>>
>>> 5. Extract the VMD tarball
>>> > cd /Applications/vmd
>>> > tar xvfz vmd-1.9.2.src.tar.gz
>>>
>>> 6. Compile plugins
>>> > cd /Applications/vmd/vmd-1.9.2
>>> > mv ../plugins .
>>> > cd plugins
>>> > export TCLINC=-I/usr/local/include
>>> > export TCLLIB=-L/usr/local/lib
>>> > make MACOSXX86_64 TCLINC=$TCLINC TCLLIB=$TCLLIB
>>>
>>> > export PLUGINDIR=/Applications/vmd/vmd-1.9.2/plugins
>>>
>>> I commented out the following lines in the Makefile:
>>> #-mkdir -p $(PLUGINDIR)/include
>>> #for header in $(PLUGINHEADERS); do cp -p $(INCLUDEDIR)/$$header $(PLUGINDIR)/include || exit 1 ; done
>>> Because I was getting the following error when I tried to do make distrib:
>>> Populating distribution directory with compiled plugins
>>> cp: /Applications/vmd/plugins/include/vmdplugin.h and include/vmdplugin.h are identical (not copied).
>>> make: *** [distrib] Error 1
>>>
>>> > make distrib
>>>
>>> 7. Compile VMD
>>> > cd /Applications/vmd/vmd-1.9.2/
>>>
>>> Changed the configure.options file so that it only contained:
>>> MACOSXX86_64 FLTKOPENGL FLTK TK TCL PYTHON PTHREADS LP64
>>>
>>> > ./configure
>>> > cd src
>>>
>>> This is where I really ran into problems. I had a lot of error when I typed make depend, so I have to change the INCDIRS, LIBS, and LIBDIRS in the Makefile. This is what I ended up with which didn’t give me any error in the dependencies:
>>> INCDIRS = -F/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/System/Library/Frameworks -I../plugins/include -I../plugins/MACOSXX86_64/molfile -I. -I/usr/local/include -I/usr/X11/include -I/usr/local/Cellar/fltk/1.3.3-r10866_1/include
>>>
>>> LIBS = -lfltk_gl -lfltk -framework ApplicationServices -ldl -framework OpenGL -framework AGL -framework Cocoa -framework Python -lpthread -framework Tk -framework Tcl -lmolfile_plugin -framework Carbon $(VMDEXTRALIBS)
>>>
>>> LIBDIRS = -Wl,-executable_path . -lmx -L../plugins/MACOSXX86_64/molfile -L/usr/local/lib -L/usr/local/Cellar/fltk/1.3.3-r10866_1/lib
>>>
>>> > make
>>> I get this error at the end of the make call:
>>> Linking vmd_MACOSXX86_64 ...
>>> /Developer/Tools/Rez -t APPL -o ./MACOSXX86_64/vmd_MACOSXX86_64 vmdmac.r
>>> make: /Developer/Tools/Rez: No such file or directory
>>> make: *** [vmd_MACOSXX86_64] Error 1
>>>
>>> > make install
>>>
>>> Even though there was an error when running the make command, the make install command is able to run, and executable files are created in /usr/local/lib/vmd.
>>>
>>> 8. In order to open VMD I had to create a symbolic link to /usr/local/Cellar/fltk/1.3.3-r10866_1 in /usr/local/opt
>>> > cd /usr/local/opt
>>> > ln -s /usr/local/Cellar/fltk/1.3.3-r10866_1 fltk
>>>
>>> I tried attaching some files with the output from the different commands, but my email seemed not to make it on to the mailing list.
>>>
>>> Is there anyone who can help me figure out what is going on? I would really appreciate it. And please let me know if there is any additional information that you need.
>>>
>>> Thanks,
>>> Katrine
>>>
>>
>
- Next message: Mayne, Christopher G: "Re: FFTK dihedral scan"
- Previous message: kskeby: "Re: Fwd: Compiling VMD with python interpreter on MacOSX"
- In reply to: kskeby: "Re: Fwd: Compiling VMD with python interpreter on MacOSX"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]