charbj / wiggle

Graphical user interface to integrate cryoEM flexibility analyses with ChimeraX
GNU General Public License v3.0
21 stars 4 forks source link

Put Wiggle on the ChimeraX Toolshed for easier installation #3

Open tomgoddard opened 1 year ago

tomgoddard commented 1 year ago

Hi Charles, I watched your 4 Wiggle tutorial videos. Fantastic! You are joking about combining efforts, my own ChimeraX cryoDRGN viewer prototype hardly does anything while Wiggle is ready for use. But I can perhaps help in small ways since I am the cryoEM developer on the UCSF ChimeraX team. The first thing I would love to see is getting Wiggle on the ChimeraX Toolshed https://cxtoolshed.rbvi.ucsf.edu. This would allow users to just use menu Tools / More Tools... in ChimeraX and simply click on an Install button to have Wiggle and all its dependencies installed. That would be much simpler for users than your intro tutorial approach of installing by cloning the github source. That is the theory. But your case is slightly tricky because you want to install a dependency that uses CUDA and that will need to know the CUDA version. I can perhaps help with a solution for that. Once Wiggle is on Toolshed we can Tweet on the ChimeraX Twitter account about Wiggle. There are 5000 followers, many of them cryoEM researchers and I am sure it will get a fantastic response, and probably have more users than you want (because they'll report bugs!).

charbj commented 1 year ago

Hi Tom!

I'm glad you like it. I know you had only just began, but I still think a concerted effort would be really great. There's no point doubling up our efforts. There is definitely room for improvement in Wiggle (I would like to massively clean up the code) - like any language, practice makes perfect, and I'm learning new things every day.

Regarding the toolshead - this is indeed the plan. I am working toward this goal but I am aware of some unintended behaviour that I want to resolve before pushing this to such a large user base. I still consider Wiggle to be on the fringe of alpha / beta version.

Do you have any suggestions for how to handle the CUDA dependencies? I had also struggled to get ChimeraX to install some pip packages such as umap-learn and pyqtgraph when defining these in the bundle.xml. This is why I resorted to manually installing these via python. Maybe you can reproduce this, although it is likely my fault (I may be doing something silly) - I don't see why it shouldn't work.

tomgoddard commented 1 year ago

Yes we should definitely combine our efforts. To me that means I give you a little help wherever I can.

First thing is I can try putting all your PyPi dependencies in bundle_info.xml and see what goes wrong. That should all work except for the cupy package where a CUDA version is needed. That is a tricky case. I think the solution is to not install cupy as a dependency. As I mention in ticket #7 I think Wiggle would ideally be able to run without CUDA. To install cupy I think the first time Wiggle is run it should look for CUDA and then offer to install the right version of cupy. The user clicks a button to install it or to decline. I haven't done that before but I think it is doable.

tomgoddard commented 1 year ago

ChimeraX had some problems installing the Wiggle PyPi dependencies using ChimeraX command "toolshed install wiggle-0.2.2-py3-none-any.whl" where the wheel file was built using a bundle_info.xml that specified all the PyPi dependencies. These problems have been fixed (ChimeraX ticket https://www.rbvi.ucsf.edu/trac/ChimeraX/ticket/7824) as of November 3, 2022 in the ChimeraX 1.5 release candidate. It will now install all the dependencies except cupy which depends on the system CUDA version. Here is how I listed the dependencies in the Wiggle bundle_info.xml

 <Dependencies>
    <Dependency name="ChimeraX-Core" version="~=1.3"/>
    <Dependency name="ChimeraX-UI" version="~=1.0"/>
    <Dependency name="mrcfile"/>
    <Dependency name="phate"/>
    <Dependency name="pyyaml"/>
    <Dependency name="pyqtgraph"/>
    <Dependency name="scikit-image"/>
    <Dependency name="scikit-learn"/>
    <Dependency name="torch"/>
    <Dependency name="umap-learn"/>
 </Dependencies>

I think the plan for cupy should still be to have Wiggle look for CUDA the first time it is run and offer to install the right version cupy-cudaNNN or warn if no CUDA was found. And ideally Wiggle would be able to run without CUDA.