﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	blockedby	blocking	notify_on_close	platform	project
497	Using tug atoms or ISOLDE on Mac cannot find OpenMM CPU platform	tic20@…	Tom Goddard	"OpenMM can only find the reference platform on Mac when using ISOLDE or the tug atoms mouse mode.  This bug does not happen in my current development ChimeraX install but the daily build has the problem.  Tug atoms and ISOLDE set an environment variable on Linux OPENMM_PLUGIN_DIR to find the libraries needed for the openmm platforms (cpu, cuda, opencl, ...) to chimerax lib/plugins.  In the past the Mac version seemed to be able to find the plugins directory.  If I set the environment variable on Mac in tug atoms it fixes the problem.

Traceback (most recent call last):
File ""/Applications/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/chimerax/core/ui/mousemodes.py"", line 340, in <lambda>
gw.mousePressEvent = lambda e, s=self: s._dispatch_mouse_event(e, ""mouse_down"")
File ""/Applications/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/chimerax/core/ui/mousemodes.py"", line 281, in _dispatch_mouse_event
f(MouseEvent(event))
File ""/Applications/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/chimerax/tug/tugatoms.py"", line 66, in mouse_down
self._tugger = st = StructureTugger(a.structure)
File ""/Applications/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/chimerax/tug/tugatoms.py"", line 188, in __init__
self._create_openmm_system()
File ""/Applications/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/chimerax/tug/tugatoms.py"", line 313, in _create_openmm_system
platform = mm.Platform.getPlatformByName(self._platform_name)
File ""/Applications/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/simtk/openmm/openmm.py"", line 15450, in getPlatformByName
return _openmm.Platform_getPlatformByName(name)
Exception: There is no registered Platform called ""CPU""

Exception: There is no registered Platform called ""CPU""

File ""/Applications/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/simtk/openmm/openmm.py"", line 15450, in getPlatformByName
return _openmm.Platform_getPlatformByName(name)
See log for Python traceback.

Begin forwarded message:

From: Tristan Croll
Subject: Re: New version of ISOLDE online
Date: December 5, 2016 at 6:42:19 AM PST
To: Tom Goddard 

Hi all,

For the time being, I've just tweaked the makefile to bundle all .so, .dylib and .dll files from the ISOLDE directory, and have modified the Python code to load the correct one based on the value of sys.platform. Any compiled libraries I'll be making at this stage are going to be tiny anyway, so I don't think this is a big deal. Can re-visit to create fully system-specific builds once everything is more mature. I don't have a Windows development environment set up yet, so there's no .dll, but I've set up and tested the build on my wife's iMac. A few things I noted on that:

- Her machine was still running El Cap. In that environment ChimeraX started OK, but trying to download from the Toolshed crashed it with a dependency issue. Didn't save the specific message, I'm afraid, but a quick Google said it was connected to Python 3.5. I suspect you're not too worried about supporting El Cap in any case.
- After upgrading to Sierra, the next issue I ran into was that an out-of-the-box ChimeraX installation doesn't have permissions to write into its own directories, which of course caused the Toolshed installation to fail. Easily fixed at the command line by running 'sudo chown -R <user> Applications/ChimeraX.app', but non-ideal.
- ISOLDE runs, but OpenMM only shows the Reference implementation as being available.

In any case, I've uploaded a new version which should run on both Linux and Mac. Will set up an environment in Windows on my laptop hopefully tonight.

Cheers,

Tristan
"	defect	closed	major		Platform		fixed						all	ChimeraX
