Opened 7 years ago

Last modified 2 years ago

#1470 assigned enhancement

ChimeraX in PyPi — at Version 4

Reported by: Tom Goddard Owned by: Tom Goddard
Priority: major Milestone:
Component: Platform Version:
Keywords: Cc: chimera-programmers
Blocked By: Blocking:
Notify when closed: Platform: all
Project: ChimeraX

Description (last modified by Tom Goddard)

Why don't we put amenable ChimeraX Python modules into PyPi so other developers can use them?

I was asked this at the 3D image hackathon when I gave a demonstration. They wanted to use just map rendering. Today Supritha Amudhu working with John Irwin on using ChimeraX with their docking-related tool was suprised that pip install of ChimeraX did not work.

Almost everything important in Python is in the PyPi ecosystem. We seem behind the times to not be putting any of our modules in PyPi.

I proposed making the PyPi ChimeraX wheel in our CZI Visual Proteomics grant proposal on VR for microscopy (Feb 2021), and also our CZI Essential Open Source Software proposal (infrastructure improvements, May 2021). The CZI grants require redistributable open source licensing and the PyPi package will address that requirement.

Change History (7)

comment:1 by Tristan Croll, 7 years ago

Have you considered Conda? That's where OpenMM lives, and PHENIX 2.0 (planned for late 2019, I believe) will be there as well. Conda's a lot more permissive than PyPI (where technically all Linux builds should be Centos 5 compatible), and having related packages in the same ecosystem would have obvious benefits.

in reply to:  2 ; comment:2 by goddard@…, 7 years ago

Restrictions like CentOS 5 compatible are probably intended to make the packages portable which is a good thing, perhaps some trouble for the developer but good for the user.  I think it makes more sense to go with (by far?) the biggest Python ecosystem which is PyPi.  But the idea is not to try to force everything in ChimeraX into PyPi, just packages where it is not too hard and outside developers would benefit.  So for instance we would probably not try to package OpenMM for PyPi.


comment:3 by Tom Goddard, 4 years ago

I made a ChimeraX wheel from site-packages/chimerax on macOS and tried running non-gui scripts to save images, January 2021. Needed to make a ten to twenty small changes so ChimeraX modules could work without running app initialization code.

I compiled an OSMesa version on macOS and got it working to save images, and made a wheel for easy install in Mac ChimeraX.

I've attached example scripts that work with the PyPi package. One opens a PDB, prints info like number of atoms and saves an image. Another opens a EMDB map, saves GLTF and saves an image. I also attached the setup.py file used to make the chimerax wheel.

by Tom Goddard, 4 years ago

Attachment: setup.py added

Pip setup.py file to create chimerax wheel.

by Tom Goddard, 4 years ago

Attachment: test_map.py added

Example Python script using ChimeraX wheel to open map, save gltf, save image.

by Tom Goddard, 4 years ago

Attachment: test_pdb.py added

Example python script using ChimeraX wheel to open a PDB and save an image.

comment:4 by Tom Goddard, 4 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.