<html><head><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Alternatively, if you prefer to run your script outside ChimeraX, you could start ChimeraX before your pdb_codes loop using "--cmd 'remotecontrol ...' " to have it listen for commands on a particular port and the send those commands to it in the loop using curl or wget, as described in the remotecontrol help page: <a href="https://www.cgl.ucsf.edu/chimerax/docs/user/commands/remotecontrol.html" class="">Command: remotecontrol</a> .  This would avoid the slowdown caused by starting ChimeraX once per loop iteration.<div class=""><br class=""></div><div class="">--Eric<br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Jul 6, 2021, at 12:21 PM, Tom Goddard via ChimeraX-users <<a href="mailto:chimerax-users@cgl.ucsf.edu" class="">chimerax-users@cgl.ucsf.edu</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html; charset=us-ascii" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">If you want to install additional PyPi packages into the ChimeraX Python use<div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space: pre; background-color: rgb(255, 255, 255);">      </span><span style="white-space: pre-wrap; background-color: rgb(255, 255, 255);" class="">chimerax -m pip install <NameOfPyPiPackage></span></div><div class=""><span style="white-space: pre-wrap; background-color: rgb(255, 255, 255);" class=""><br class=""></span></div><div class="">as discussed in this message</div><div class=""><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span><a href="https://www.rbvi.ucsf.edu/pipermail/chimerax-users/2021-March/002000.html" class="">https://www.rbvi.ucsf.edu/pipermail/chimerax-users/2021-March/002000.html</a><br class=""><div class=""><br class=""></div><div class="">If you don't have permission to modify ChimeraX where you might need to use the --user option to pip install.  On windows you probably need to use the chimerax-console.exe executable.</div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre">   </span>Tom</div><div class=""><br class=""><blockquote type="cite" class=""><div class="">On Jul 6, 2021, at 11:29 AM, James Loy via ChimeraX-users <<a href="mailto:chimerax-users@cgl.ucsf.edu" class="">chimerax-users@cgl.ucsf.edu</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">Tom, Eric--<div class=""><br class=""></div><div class="">Thanks for the responses!</div><div class=""><br class=""></div><div class="">We'd certainly like to read the cif files, but in addition, we'd like to add hydrogens to the protein as well. For an MVP, I was just going to have some script that calls the chimerax CLI.  Something like this (in python):</div><div class=""><br class=""></div><div class=""><font face="monospace" class="">for code in pdb_codes:</font></div><div class=""><font face="monospace" class="">    subprocess.run(f"chimerax --nogui --cmd 'load {code}.cif; addh; save {code}.addh.cif; exit'"</font></div><div class=""><br class=""></div><div class="">This will likely be okay. But, if I am able to call a python script using chimera basically as the interpreter then that might work better. My only question would be how could I utilize other third party libraries? Say, if I were to use chimerax as the interpreter for the entire cif processing pipeline, then I would need to utilize a few outside modules.</div><div class=""><br class=""></div><div class="">Thanks again for your help-- I really appreciate it!</div><div class="">-James</div></div><br class=""><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Jul 6, 2021 at 1:07 PM Eric Pettersen <<a href="mailto:pett@cgl.ucsf.edu" class="">pett@cgl.ucsf.edu</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="overflow-wrap: break-word;" class="">If the <i class="">only</i><span style="font-style:normal" class=""> thing you need ChimeraX for is to read/parse mmCIF </span>files, we do package that part as a separate library: <a href="https://github.com/RBVI/readcif" target="_blank" class="">GitHub - RBVI/readcif: A fast C++ CIF and mmCIF parser</a><div class=""><br class=""></div><div class=""><div class="">--Eric</div><div class=""><br class=""></div><div class=""><span style="white-space:pre-wrap" class="">      </span>Eric Pettersen</div><div class=""><span style="white-space:pre-wrap" class="">     </span>UCSF Computer Graphics Lab</div></div><div class=""><br class=""><div class=""><br class=""><blockquote type="cite" class=""><div class="">On Jul 6, 2021, at 11:01 AM, Tom Goddard via ChimeraX-users <<a href="mailto:chimerax-users@cgl.ucsf.edu" target="_blank" class="">chimerax-users@cgl.ucsf.edu</a>> wrote:</div><br class=""><div class=""><div style="overflow-wrap: break-word;" class="">Hi James,<div class=""><br class=""></div><div class="">  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.</div><div class=""><br class=""></div><div class="">  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.</div><div class=""><br class=""></div><div class=""><span style="white-space:pre-wrap" class="">    </span><a href="https://github.com/RBVI/ChimeraX/tree/develop/src/bundles/mmcif" target="_blank" class="">https://github.com/RBVI/ChimeraX/tree/develop/src/bundles/mmcif</a><br class=""><div class=""><br class=""></div><div class="">But that needs various other ChimeraX modules (atomstruct, element, pyinstance, pdbconnect, readcif, logger, arrays) listed in the mmcif bundle_info.xml file</div><div class=""><br class=""></div><div class=""><span style="white-space:pre-wrap" class="">     </span><a href="https://github.com/RBVI/ChimeraX/blob/develop/src/bundles/mmcif/bundle_info.xml" target="_blank" class="">https://github.com/RBVI/ChimeraX/blob/develop/src/bundles/mmcif/bundle_info.xml</a></div><div class=""><br class=""></div><div class="">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.</div><div class=""><br class=""></div><div class="">  So the standard solution is instead to just run your processing scripts with the ChimeraX application from the command-line</div><div class=""><br class=""></div><div class=""><span style="white-space:pre-wrap" class="">        </span>chimerax --nogui myscript.py</div><div class=""><br class=""></div><div class="">  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.</div><div class=""><br class=""></div><div class=""><span style="white-space:pre-wrap" class=""> </span><a href="https://github.com/RBVI/ChimeraX" target="_blank" class="">https://github.com/RBVI/ChimeraX</a></div><div class=""><br class=""></div><div class="">  Tom</div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""><blockquote type="cite" class=""><div class="">On Jul 3, 2021, at 5:51 AM, James Loy via ChimeraX-users <<a href="mailto:chimerax-users@cgl.ucsf.edu" target="_blank" class="">chimerax-users@cgl.ucsf.edu</a>> wrote:</div><br class=""><div class=""><div dir="ltr" class="">Hello!<div class=""><br class=""></div><div class="">Thank you for creating such an amazing piece of software!</div><div class=""><br class=""></div><div class="">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?</div><div class=""><br class=""></div><div class="">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:</div><div class=""><div style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:12px;line-height:normal;font-family:JuliaMono;background-color:rgba(242,242,206,0.94)" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">/bin/sh -c 'rsync -a $1 .' -- <a href="http://plato.cgl.ucsf.edu/" target="_blank" class="">plato.cgl.ucsf.edu</a>:/usr/local/projects/chimerax/www/data/prereqs/python/Python-3.7.8.tar.xz</span></div><div style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:12px;line-height:normal;font-family:JuliaMono;background-color:rgba(242,242,206,0.94)" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""><a href="mailto:user@plato.cgl.ucsf.edu" target="_blank" class="">user@plato.cgl.ucsf.edu</a>'s password:</span></div></div><div class="">In order to build from source, do I need to register somewhere to get credentials?</div><div class=""><br class=""></div><div class="">Just to be clear, this CIF file processing pipeline is for academic (UT Austin) use, not commercial.</div><div class=""><br class=""></div><div class="">Thanks in advance!</div><div class="">James<br class="">-- <br class=""><div dir="ltr" class=""><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><div class="">James Loy, Ph. D.</div><div class="">614.915.9792<br class=""></div><div class=""><a href="https://www.linkedin.com/in/james-m-loy-ph-d-ba2256a/" target="_blank" class="">LinkedIn</a><br class=""></div></div></div></div></div></div></div>
_______________________________________________<br class="">ChimeraX-users mailing list<br class=""><a href="mailto:ChimeraX-users@cgl.ucsf.edu" target="_blank" class="">ChimeraX-users@cgl.ucsf.edu</a><br class="">Manage subscription:<br class=""><a href="https://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users" target="_blank" class="">https://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users</a><br class=""></div></blockquote></div><br class=""></div></div>_______________________________________________<br class="">ChimeraX-users mailing list<br class=""><a href="mailto:ChimeraX-users@cgl.ucsf.edu" target="_blank" class="">ChimeraX-users@cgl.ucsf.edu</a><br class="">Manage subscription:<br class=""><a href="https://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users" target="_blank" class="">https://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users</a><br class=""></div></blockquote></div><br class=""></div></div></blockquote></div><br clear="all" class=""><div class=""><br class=""></div>-- <br class=""><div dir="ltr" class="gmail_signature"><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><div class="">James Loy, Ph. D.</div><div class="">614.915.9792<br class=""></div><div class=""><a href="https://www.linkedin.com/in/james-m-loy-ph-d-ba2256a/" target="_blank" class="">LinkedIn</a><br class=""></div></div></div></div></div>
_______________________________________________<br class="">ChimeraX-users mailing list<br class=""><a href="mailto:ChimeraX-users@cgl.ucsf.edu" class="">ChimeraX-users@cgl.ucsf.edu</a><br class="">Manage subscription:<br class="">https://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users<br class=""></div></blockquote></div><br class=""></div></div></div>_______________________________________________<br class="">ChimeraX-users mailing list<br class=""><a href="mailto:ChimeraX-users@cgl.ucsf.edu" class="">ChimeraX-users@cgl.ucsf.edu</a><br class="">Manage subscription:<br class="">https://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users<br class=""></div></blockquote></div><br class=""></div></body></html>