[chimerax-users] Using ChimeraX as a Python Library

Eric Pettersen pett at cgl.ucsf.edu
Tue Jul 6 11:07:24 PDT 2021


If the only thing you need ChimeraX for is to read/parse mmCIF files, we do package that part as a separate library: GitHub - RBVI/readcif: A fast C++ CIF and mmCIF parser <https://github.com/RBVI/readcif>

--Eric

	Eric Pettersen
	UCSF Computer Graphics Lab


> On Jul 6, 2021, at 11:01 AM, Tom Goddard via ChimeraX-users <chimerax-users at cgl.ucsf.edu> wrote:
> 
> Hi James,
> 
>   The ChimeraX Python modules have not been packaged to be used outside the ChimeraX application.  I have tried making a chimerax module that can be installed in any Python (with the right version for binary compatibility) where all its Python capabilities can be used without needing the application user interface.  But we have not distributed that, it has lots of problems.  We have put it into two grant proposals to get funding for it but one proposal was not funded and the other we are still waiting to hear about.
> 
>   In theory it shouldn't be hard to reuse specific parts of ChimeraX, for instance reading mmCIF files.  That is in the mmcif ChimeraX Python module.
> 
> 	https://github.com/RBVI/ChimeraX/tree/develop/src/bundles/mmcif <https://github.com/RBVI/ChimeraX/tree/develop/src/bundles/mmcif>
> 
> But that needs various other ChimeraX modules (atomstruct, element, pyinstance, pdbconnect, readcif, logger, arrays) listed in the mmcif bundle_info.xml file
> 
> 	https://github.com/RBVI/ChimeraX/blob/develop/src/bundles/mmcif/bundle_info.xml <https://github.com/RBVI/ChimeraX/blob/develop/src/bundles/mmcif/bundle_info.xml>
> 
> and those in turn require some other ChimeraX Python modules.  ChimeraX contains hundreds of Python modules, so how will you figure out which ones you need?  The easy solution is to take them all.  But there are more problems, because the ChimeraX application initializes many of the modules, for instance, letting the atomic data structures module know where the residue template files are located.  So you also need to figure that out.  These many obstacles are why we proposed funding to make the code more usable without running the ChimeraX application -- it will be a good bit of work.
> 
>   So the standard solution is instead to just run your processing scripts with the ChimeraX application from the command-line
> 
> 	chimerax --nogui myscript.py
> 
>   For compiling ChimeraX you must be using old ChimeraX source code (your example is fetching Python 3.7 but ChimeraX has used Python 3.8 for the last 9 months).  The current ChimeraX build does not fetch third party libraries with rsync, it uses https and curl and does not need a password.  So use the current ChimeraX source from github and  you should not have that problem.
> 
> 	https://github.com/RBVI/ChimeraX <https://github.com/RBVI/ChimeraX>
> 
>   Tom
> 
> 
> 
>> On Jul 3, 2021, at 5:51 AM, James Loy via ChimeraX-users <chimerax-users at cgl.ucsf.edu> wrote:
>> 
>> Hello!
>> 
>> Thank you for creating such an amazing piece of software!
>> 
>> I'm trying to use portions of ChimeraX for part of a CIF file processing pipeline. In order to automate the process, I'm building a docker image that has ChimeraX installed. Ideally, we would like to use the pieces of ChimeraX we need by importing the relevant python modules. Is this possible? If so, must I build ChimeraX from source?
>> 
>> Additionally, I have tried several times to build v1.1.1 from source and I have not been able to. I am always prompted for a password when trying to rsync the dependencies:
>> /bin/sh -c 'rsync -a $1 .' -- plato.cgl.ucsf.edu:/usr/local/projects/chimerax/www/data/prereqs/python/Python-3.7.8.tar.xz
>> user at plato.cgl.ucsf.edu <mailto:user at plato.cgl.ucsf.edu>'s password:
>> In order to build from source, do I need to register somewhere to get credentials?
>> 
>> Just to be clear, this CIF file processing pipeline is for academic (UT Austin) use, not commercial.
>> 
>> Thanks in advance!
>> James
>> -- 
>> James Loy, Ph. D.
>> 614.915.9792
>> LinkedIn <https://www.linkedin.com/in/james-m-loy-ph-d-ba2256a/>
>> _______________________________________________
>> ChimeraX-users mailing list
>> ChimeraX-users at cgl.ucsf.edu
>> Manage subscription:
>> https://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users
> 
> _______________________________________________
> ChimeraX-users mailing list
> ChimeraX-users at cgl.ucsf.edu
> Manage subscription:
> https://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://plato.cgl.ucsf.edu/pipermail/chimerax-users/attachments/20210706/514be757/attachment.html>


More information about the ChimeraX-users mailing list