Bundles with dependencies

Hello, Thanks for the tool and the tutorials. I have a machine learning tool based on pytorch to analyse cryo-EM data. I was hoping to package (bundle) it for Chimerax and started to follow tutorials, but I don't think you mention the right way to set up a code environment with depencies. I see a numpy import in the save_new_format tutorial, but it's not listed in the "dependencies" section of the xml file. I guess my question is : can I add arbitrary packages in a bundle ? Is there a way to install pip packages only ? Should I copy all source code in the folder and deal with my imports like that ? In particular, I am thinking of torch that is not so easy to replace... I am hoping you can help me, thanks in advance for the help ! Best, Vincent

Hi Vincent, ChimeraX bundles can list dependencies on PyPi packages. Here's an example of PyPi dependencies in bundle_info.xml of the SEQCROW ChimeraX plugin. ChimeraX will install these when the bundle is installed. https://github.com/QChASM/SEQCROW/blob/971de45120b9cb1b7f1e5ff0f2cee4b998ec6... <Dependencies> <Dependency name="ChimeraX-Core" version=">=1.3, <=1.7"/> <Dependency name="scipy"/> <Dependency name="Send2Trash"/> <Dependency name="psutil"/> <Dependency name="jinja2"/> <!-- bse is large and may fail to install with bad internet <Dependency name="basis-set-exchange"/> --> <!-- wait for numpy to fix fortran stuff in python 3.8 I've tried installing this with just gfortran on windows, but no luck <Dependency name="stripy"/> --> </Dependencies> With PyTorch I don't know if the PyPi packages include CUDA support or how the CUDA version is handled. Maybe they are CPU-only unless compiled from source on the install machine, which of course would require a compiler that only Linux (not Windows) would likely have installed. We should have some documentation on how to handle PyPi dependencies. I don't see anything useful about how to include them in the bundle_info.xml or pyproject.toml documentation for ChimeraX. https://www.cgl.ucsf.edu/chimerax/docs/devel/writing_bundles.html#bundle-for... https://www.cgl.ucsf.edu/chimerax/docs/devel/tutorials/pyproject.html I'll made a ticket to add some documentation for that. https://www.rbvi.ucsf.edu/trac/ChimeraX/ticket/10036 Tom
On Oct 20, 2023, at 4:58 AM, Vincent Mallet via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:
Hello,
Thanks for the tool and the tutorials. I have a machine learning tool based on pytorch to analyse cryo-EM data. I was hoping to package (bundle) it for Chimerax and started to follow tutorials, but I don't think you mention the right way to set up a code environment with depencies. I see a numpy import in the save_new_format tutorial, but it's not listed in the "dependencies" section of the xml file.
I guess my question is : can I add arbitrary packages in a bundle ? Is there a way to install pip packages only ? Should I copy all source code in the folder and deal with my imports like that ? In particular, I am thinking of torch that is not so easy to replace...
I am hoping you can help me, thanks in advance for the help !
Best, Vincent _______________________________________________ ChimeraX-users mailing list -- chimerax-users@cgl.ucsf.edu To unsubscribe send an email to chimerax-users-leave@cgl.ucsf.edu Archives: https://mail.cgl.ucsf.edu/mailman/archives/list/chimerax-users@cgl.ucsf.edu/

help mybundle, I don't know how to add the per argument documentation and go beyond typing hints.
Hello, thanks so much for the prompt reply ! I managed to get most things flowing (I'm going to try and figure out the cuda part now). I am still struggling on a few things : 1. the install from source distribution for packages such as crispr : https://pypi.org/project/cripser/ . I contacted the author to turn his install with pip -U {url} into a regular one, and running pip install cripser on my python works. I think the compilation of the source files silently fails when installing through Chimerax, and have no idea on how to fix it 2. I don't quite understand how to play with the help API, if a user types 3. For now, I am using the name of mrc/map volume files and opening them with python, I don't know if it would be possible to directly retrieve them as python objects in my bundle ? The possibility to use volume data is mentioned in the doc, but there seems to be a missing section <https://www.cgl.ucsf.edu/chimerax/docs/devel/data_interface.html#builtin-dat...> ( https://www.cgl.ucsf.edu/chimerax/docs/devel/data_interface.html#builtin-dat... ) Maybe you can answer some of these questions, and again, thank you so much for the support ! Best, Vincent On Sat, Oct 21, 2023 at 1:37 AM Tom Goddard <goddard@sonic.net> wrote:
Hi Vincent,
ChimeraX bundles can list dependencies on PyPi packages. Here's an example of PyPi dependencies in bundle_info.xml of the SEQCROW ChimeraX plugin. ChimeraX will install these when the bundle is installed.
https://github.com/QChASM/SEQCROW/blob/971de45120b9cb1b7f1e5ff0f2cee4b998ec6...
<Dependencies> <Dependency name="ChimeraX-Core" version=">=1.3, <=1.7"/> <Dependency name="scipy"/> <Dependency name="Send2Trash"/> <Dependency name="psutil"/> <Dependency name="jinja2"/> <!-- bse is large and may fail to install with bad internet <Dependency name="basis-set-exchange"/> --> <!-- wait for numpy to fix fortran stuff in python 3.8 I've tried installing this with just gfortran on windows, but no luck <Dependency name="stripy"/> --> </Dependencies>
With PyTorch I don't know if the PyPi packages include CUDA support or how the CUDA version is handled. Maybe they are CPU-only unless compiled from source on the install machine, which of course would require a compiler that only Linux (not Windows) would likely have installed.
We should have some documentation on how to handle PyPi dependencies. I don't see anything useful about how to include them in the bundle_info.xml or pyproject.toml documentation for ChimeraX.
https://www.cgl.ucsf.edu/chimerax/docs/devel/writing_bundles.html#bundle-for... https://www.cgl.ucsf.edu/chimerax/docs/devel/tutorials/pyproject.html
I'll made a ticket to add some documentation for that.
https://www.rbvi.ucsf.edu/trac/ChimeraX/ticket/10036
Tom
On Oct 20, 2023, at 4:58 AM, Vincent Mallet via ChimeraX-users < chimerax-users@cgl.ucsf.edu> wrote:
Hello,
Thanks for the tool and the tutorials. I have a machine learning tool based on pytorch to analyse cryo-EM data. I was hoping to package (bundle) it for Chimerax and started to follow tutorials, but I don't think you mention the right way to set up a code environment with depencies. I see a numpy import in the save_new_format tutorial, but it's not listed in the "dependencies" section of the xml file.
I guess my question is : can I add arbitrary packages in a bundle ? Is there a way to install pip packages only ? Should I copy all source code in the folder and deal with my imports like that ? In particular, I am thinking of torch that is not so easy to replace...
I am hoping you can help me, thanks in advance for the help !
Best, Vincent _______________________________________________ ChimeraX-users mailing list -- chimerax-users@cgl.ucsf.edu To unsubscribe send an email to chimerax-users-leave@cgl.ucsf.edu Archives: https://mail.cgl.ucsf.edu/mailman/archives/list/chimerax-users@cgl.ucsf.edu/

Hi Vincent, The cripser PyPi package requires compiled code. On Windows or Mac users won't usually have a compiler so you won't be able to distribute your ChimeraX tool if it requires installing cripser from source code. So your best hope is to convince the developer of cripser to provide binary wheels on PyPi for Python 3.11. Currently the binary wheels from cripser are only for Python 3.9 and 3.10. If you still want to know why the compile fails and ChimeraX is not reporting a useful error message use ChimeraX menu Help / Report a Bug... so we know all the details of what you tried. The ChimeraX help command takes the name of a command, not the name of a bundle. Look at the documentation https://www.cgl.ucsf.edu/chimerax/docs/user/commands/help.html When you register a command you call register() and give it a CmdDesc argument that takes a URL to your html help. Here is the documentation https://www.cgl.ucsf.edu/chimerax/docs/devel/modules/core/commands/commands.... If you want to know about Python volume data objects they are in the programming documentation. Look at Volume Data under Python Modules https://www.cgl.ucsf.edu/chimerax/docs/devel/modules.html or probably easier look at the ChimeraX Recipes web site to see simple examples of how to use Python with ChimeraX https://rbvi.github.io/chimerax-recipes/ Tom
On Oct 24, 2023, at 7:34 AM, Vincent Mallet via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:
Hello, thanks so much for the prompt reply ! I managed to get most things flowing (I'm going to try and figure out the cuda part now).
I am still struggling on a few things : 1. the install from source distribution for packages such as crispr : https://pypi.org/project/cripser/ . I contacted the author to turn his install with pip -U {url} into a regular one, and running pip install cripser on my python works. I think the compilation of the source files silently fails when installing through Chimerax, and have no idea on how to fix it 2. I don't quite understand how to play with the help API, if a user types >>help mybundle, I don't know how to add the per argument documentation and go beyond typing hints. 3. For now, I am using the name of mrc/map volume files and opening them with python, I don't know if it would be possible to directly retrieve them as python objects in my bundle ? The possibility to use volume data is mentioned in the doc, but there seems to be a missing section <https://www.cgl.ucsf.edu/chimerax/docs/devel/data_interface.html#builtin-dat...> ( https://www.cgl.ucsf.edu/chimerax/docs/devel/data_interface.html#builtin-dat... )
Maybe you can answer some of these questions, and again, thank you so much for the support !
Best, Vincent
On Sat, Oct 21, 2023 at 1:37 AM Tom Goddard <goddard@sonic.net <mailto:goddard@sonic.net>> wrote:
Hi Vincent,
ChimeraX bundles can list dependencies on PyPi packages. Here's an example of PyPi dependencies in bundle_info.xml of the SEQCROW ChimeraX plugin. ChimeraX will install these when the bundle is installed.
https://github.com/QChASM/SEQCROW/blob/971de45120b9cb1b7f1e5ff0f2cee4b998ec6...
<Dependencies> <Dependency name="ChimeraX-Core" version=">=1.3, <=1.7"/> <Dependency name="scipy"/> <Dependency name="Send2Trash"/> <Dependency name="psutil"/> <Dependency name="jinja2"/> <!-- bse is large and may fail to install with bad internet <Dependency name="basis-set-exchange"/> --> <!-- wait for numpy to fix fortran stuff in python 3.8 I've tried installing this with just gfortran on windows, but no luck <Dependency name="stripy"/> --> </Dependencies>
With PyTorch I don't know if the PyPi packages include CUDA support or how the CUDA version is handled. Maybe they are CPU-only unless compiled from source on the install machine, which of course would require a compiler that only Linux (not Windows) would likely have installed.
We should have some documentation on how to handle PyPi dependencies. I don't see anything useful about how to include them in the bundle_info.xml or pyproject.toml documentation for ChimeraX.
https://www.cgl.ucsf.edu/chimerax/docs/devel/writing_bundles.html#bundle-for... https://www.cgl.ucsf.edu/chimerax/docs/devel/tutorials/pyproject.html
I'll made a ticket to add some documentation for that.
https://www.rbvi.ucsf.edu/trac/ChimeraX/ticket/10036
Tom
On Oct 20, 2023, at 4:58 AM, Vincent Mallet via ChimeraX-users <chimerax-users@cgl.ucsf.edu <mailto:chimerax-users@cgl.ucsf.edu>> wrote:
Hello,
Thanks for the tool and the tutorials. I have a machine learning tool based on pytorch to analyse cryo-EM data. I was hoping to package (bundle) it for Chimerax and started to follow tutorials, but I don't think you mention the right way to set up a code environment with depencies. I see a numpy import in the save_new_format tutorial, but it's not listed in the "dependencies" section of the xml file.
I guess my question is : can I add arbitrary packages in a bundle ? Is there a way to install pip packages only ? Should I copy all source code in the folder and deal with my imports like that ? In particular, I am thinking of torch that is not so easy to replace...
I am hoping you can help me, thanks in advance for the help !
Best, Vincent _______________________________________________ ChimeraX-users mailing list -- chimerax-users@cgl.ucsf.edu <mailto:chimerax-users@cgl.ucsf.edu> To unsubscribe send an email to chimerax-users-leave@cgl.ucsf.edu <mailto:chimerax-users-leave@cgl.ucsf.edu> Archives: https://mail.cgl.ucsf.edu/mailman/archives/list/chimerax-users@cgl.ucsf.edu/
_______________________________________________ ChimeraX-users mailing list -- chimerax-users@cgl.ucsf.edu To unsubscribe send an email to chimerax-users-leave@cgl.ucsf.edu Archives: https://mail.cgl.ucsf.edu/mailman/archives/list/chimerax-users@cgl.ucsf.edu/

Hello Tom, A potential user of my CrAI plugin struggles to install it, and I think his problem comes from a certain version of pytorch (2.3.0) that is buggy on Windows <https://discuss.pytorch.org/t/error-loading-lib-site-packages-torch-lib-shm-...>. For this reason, I tried to impose torch<2.2 in the dependencies, in a similar fashion to the one used in Seqcrow. However, the parser used by Chimerax=1.5 is not happy with the "<" present in <Dependency name="ChimeraX-Core" version=">=1.3, <=1.7"/> (as you suggested above). $chimerax --nogui --cmd "devel install . ; exit"
lxml.etree.XMLSyntaxError: Unescaped '<' not allowed in attributes values, line 40, column 43
Do you have an idea on how to solve this? Best, Vincent On Tue, Oct 24, 2023 at 10:33 PM Tom Goddard <goddard@sonic.net> wrote:
Hi Vincent,
The cripser PyPi package requires compiled code. On Windows or Mac users won't usually have a compiler so you won't be able to distribute your ChimeraX tool if it requires installing cripser from source code. So your best hope is to convince the developer of cripser to provide binary wheels on PyPi for Python 3.11. Currently the binary wheels from cripser are only for Python 3.9 and 3.10. If you still want to know why the compile fails and ChimeraX is not reporting a useful error message use ChimeraX menu Help / Report a Bug... so we know all the details of what you tried.
The ChimeraX help command takes the name of a command, not the name of a bundle. Look at the documentation
https://www.cgl.ucsf.edu/chimerax/docs/user/commands/help.html
When you register a command you call register() and give it a CmdDesc argument that takes a URL to your html help. Here is the documentation
https://www.cgl.ucsf.edu/chimerax/docs/devel/modules/core/commands/commands....
If you want to know about Python volume data objects they are in the programming documentation. Look at Volume Data under Python Modules
https://www.cgl.ucsf.edu/chimerax/docs/devel/modules.html
or probably easier look at the ChimeraX Recipes web site to see simple examples of how to use Python with ChimeraX
https://rbvi.github.io/chimerax-recipes/
Tom
On Oct 24, 2023, at 7:34 AM, Vincent Mallet via ChimeraX-users < chimerax-users@cgl.ucsf.edu> wrote:
Hello, thanks so much for the prompt reply ! I managed to get most things flowing (I'm going to try and figure out the cuda part now).
help mybundle, I don't know how to add the per argument documentation and go beyond typing hints.
I am still struggling on a few things : 1. the install from source distribution for packages such as crispr : https://pypi.org/project/cripser/ . I contacted the author to turn his install with pip -U {url} into a regular one, and running pip install cripser on my python works. I think the compilation of the source files silently fails when installing through Chimerax, and have no idea on how to fix it 2. I don't quite understand how to play with the help API, if a user types 3. For now, I am using the name of mrc/map volume files and opening them with python, I don't know if it would be possible to directly retrieve them as python objects in my bundle ? The possibility to use volume data is mentioned in the doc, but there seems to be a missing section <https://www.cgl.ucsf.edu/chimerax/docs/devel/data_interface.html#builtin-dat...> ( https://www.cgl.ucsf.edu/chimerax/docs/devel/data_interface.html#builtin-dat... )
Maybe you can answer some of these questions, and again, thank you so much for the support !
Best, Vincent
On Sat, Oct 21, 2023 at 1:37 AM Tom Goddard <goddard@sonic.net> wrote:
Hi Vincent,
ChimeraX bundles can list dependencies on PyPi packages. Here's an example of PyPi dependencies in bundle_info.xml of the SEQCROW ChimeraX plugin. ChimeraX will install these when the bundle is installed.
https://github.com/QChASM/SEQCROW/blob/971de45120b9cb1b7f1e5ff0f2cee4b998ec6...
<Dependencies> <Dependency name="ChimeraX-Core" version=">=1.3, <=1.7"/> <Dependency name="scipy"/> <Dependency name="Send2Trash"/> <Dependency name="psutil"/> <Dependency name="jinja2"/> <!-- bse is large and may fail to install with bad internet <Dependency name="basis-set-exchange"/> --> <!-- wait for numpy to fix fortran stuff in python 3.8 I've tried installing this with just gfortran on windows, but no luck <Dependency name="stripy"/> --> </Dependencies>
With PyTorch I don't know if the PyPi packages include CUDA support or how the CUDA version is handled. Maybe they are CPU-only unless compiled from source on the install machine, which of course would require a compiler that only Linux (not Windows) would likely have installed.
We should have some documentation on how to handle PyPi dependencies. I don't see anything useful about how to include them in the bundle_info.xml or pyproject.toml documentation for ChimeraX.
https://www.cgl.ucsf.edu/chimerax/docs/devel/writing_bundles.html#bundle-for... https://www.cgl.ucsf.edu/chimerax/docs/devel/tutorials/pyproject.html
I'll made a ticket to add some documentation for that.
https://www.rbvi.ucsf.edu/trac/ChimeraX/ticket/10036
Tom
On Oct 20, 2023, at 4:58 AM, Vincent Mallet via ChimeraX-users < chimerax-users@cgl.ucsf.edu> wrote:
Hello,
Thanks for the tool and the tutorials. I have a machine learning tool based on pytorch to analyse cryo-EM data. I was hoping to package (bundle) it for Chimerax and started to follow tutorials, but I don't think you mention the right way to set up a code environment with depencies. I see a numpy import in the save_new_format tutorial, but it's not listed in the "dependencies" section of the xml file.
I guess my question is : can I add arbitrary packages in a bundle ? Is there a way to install pip packages only ? Should I copy all source code in the folder and deal with my imports like that ? In particular, I am thinking of torch that is not so easy to replace...
I am hoping you can help me, thanks in advance for the help !
Best, Vincent _______________________________________________ ChimeraX-users mailing list -- chimerax-users@cgl.ucsf.edu To unsubscribe send an email to chimerax-users-leave@cgl.ucsf.edu Archives: https://mail.cgl.ucsf.edu/mailman/archives/list/chimerax-users@cgl.ucsf.edu/
_______________________________________________ ChimeraX-users mailing list -- chimerax-users@cgl.ucsf.edu To unsubscribe send an email to chimerax-users-leave@cgl.ucsf.edu Archives: https://mail.cgl.ucsf.edu/mailman/archives/list/chimerax-users@cgl.ucsf.edu/

Hi Vicent, XML format like HTML uses "<" and ">" characters as part of its basic syntax. The solution is ugly bug you use < to represent "<" and > to represent ">" just as is done in HTML format. https://stackoverflow.com/questions/1091945/what-characters-do-i-need-to-esc... Tom
On Jun 24, 2024, at 5:25 AM, Vincent Mallet via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:
Hello Tom,
A potential user of my CrAI plugin struggles to install it, and I think his problem comes from a certain version of pytorch (2.3.0) that is buggy on Windows <https://discuss.pytorch.org/t/error-loading-lib-site-packages-torch-lib-shm-...>. For this reason, I tried to impose torch<2.2 in the dependencies, in a similar fashion to the one used in Seqcrow.
However, the parser used by Chimerax=1.5 is not happy with the "<" present in <Dependency name="ChimeraX-Core" version=">=1.3, <=1.7"/> (as you suggested above). $chimerax --nogui --cmd "devel install . ; exit"
lxml.etree.XMLSyntaxError: Unescaped '<' not allowed in attributes values, line 40, column 43
Do you have an idea on how to solve this?
Best, Vincent
On Tue, Oct 24, 2023 at 10:33 PM Tom Goddard <goddard@sonic.net <mailto:goddard@sonic.net>> wrote:
Hi Vincent,
The cripser PyPi package requires compiled code. On Windows or Mac users won't usually have a compiler so you won't be able to distribute your ChimeraX tool if it requires installing cripser from source code. So your best hope is to convince the developer of cripser to provide binary wheels on PyPi for Python 3.11. Currently the binary wheels from cripser are only for Python 3.9 and 3.10. If you still want to know why the compile fails and ChimeraX is not reporting a useful error message use ChimeraX menu Help / Report a Bug... so we know all the details of what you tried.
The ChimeraX help command takes the name of a command, not the name of a bundle. Look at the documentation
https://www.cgl.ucsf.edu/chimerax/docs/user/commands/help.html
When you register a command you call register() and give it a CmdDesc argument that takes a URL to your html help. Here is the documentation
https://www.cgl.ucsf.edu/chimerax/docs/devel/modules/core/commands/commands....
If you want to know about Python volume data objects they are in the programming documentation. Look at Volume Data under Python Modules
https://www.cgl.ucsf.edu/chimerax/docs/devel/modules.html
or probably easier look at the ChimeraX Recipes web site to see simple examples of how to use Python with ChimeraX
https://rbvi.github.io/chimerax-recipes/
Tom
On Oct 24, 2023, at 7:34 AM, Vincent Mallet via ChimeraX-users <chimerax-users@cgl.ucsf.edu <mailto:chimerax-users@cgl.ucsf.edu>> wrote:
Hello, thanks so much for the prompt reply ! I managed to get most things flowing (I'm going to try and figure out the cuda part now).
I am still struggling on a few things : 1. the install from source distribution for packages such as crispr : https://pypi.org/project/cripser/ . I contacted the author to turn his install with pip -U {url} into a regular one, and running pip install cripser on my python works. I think the compilation of the source files silently fails when installing through Chimerax, and have no idea on how to fix it 2. I don't quite understand how to play with the help API, if a user types >>help mybundle, I don't know how to add the per argument documentation and go beyond typing hints. 3. For now, I am using the name of mrc/map volume files and opening them with python, I don't know if it would be possible to directly retrieve them as python objects in my bundle ? The possibility to use volume data is mentioned in the doc, but there seems to be a missing section <https://www.cgl.ucsf.edu/chimerax/docs/devel/data_interface.html#builtin-dat...> ( https://www.cgl.ucsf.edu/chimerax/docs/devel/data_interface.html#builtin-dat... )
Maybe you can answer some of these questions, and again, thank you so much for the support !
Best, Vincent
On Sat, Oct 21, 2023 at 1:37 AM Tom Goddard <goddard@sonic.net <mailto:goddard@sonic.net>> wrote:
Hi Vincent,
ChimeraX bundles can list dependencies on PyPi packages. Here's an example of PyPi dependencies in bundle_info.xml of the SEQCROW ChimeraX plugin. ChimeraX will install these when the bundle is installed.
https://github.com/QChASM/SEQCROW/blob/971de45120b9cb1b7f1e5ff0f2cee4b998ec6...
<Dependencies> <Dependency name="ChimeraX-Core" version=">=1.3, <=1.7"/> <Dependency name="scipy"/> <Dependency name="Send2Trash"/> <Dependency name="psutil"/> <Dependency name="jinja2"/> <!-- bse is large and may fail to install with bad internet <Dependency name="basis-set-exchange"/> --> <!-- wait for numpy to fix fortran stuff in python 3.8 I've tried installing this with just gfortran on windows, but no luck <Dependency name="stripy"/> --> </Dependencies>
With PyTorch I don't know if the PyPi packages include CUDA support or how the CUDA version is handled. Maybe they are CPU-only unless compiled from source on the install machine, which of course would require a compiler that only Linux (not Windows) would likely have installed.
We should have some documentation on how to handle PyPi dependencies. I don't see anything useful about how to include them in the bundle_info.xml or pyproject.toml documentation for ChimeraX.
https://www.cgl.ucsf.edu/chimerax/docs/devel/writing_bundles.html#bundle-for... https://www.cgl.ucsf.edu/chimerax/docs/devel/tutorials/pyproject.html
I'll made a ticket to add some documentation for that.
https://www.rbvi.ucsf.edu/trac/ChimeraX/ticket/10036
Tom
On Oct 20, 2023, at 4:58 AM, Vincent Mallet via ChimeraX-users <chimerax-users@cgl.ucsf.edu <mailto:chimerax-users@cgl.ucsf.edu>> wrote:
Hello,
Thanks for the tool and the tutorials. I have a machine learning tool based on pytorch to analyse cryo-EM data. I was hoping to package (bundle) it for Chimerax and started to follow tutorials, but I don't think you mention the right way to set up a code environment with depencies. I see a numpy import in the save_new_format tutorial, but it's not listed in the "dependencies" section of the xml file.
I guess my question is : can I add arbitrary packages in a bundle ? Is there a way to install pip packages only ? Should I copy all source code in the folder and deal with my imports like that ? In particular, I am thinking of torch that is not so easy to replace...
I am hoping you can help me, thanks in advance for the help !
Best, Vincent _______________________________________________ ChimeraX-users mailing list -- chimerax-users@cgl.ucsf.edu <mailto:chimerax-users@cgl.ucsf.edu> To unsubscribe send an email to chimerax-users-leave@cgl.ucsf.edu <mailto:chimerax-users-leave@cgl.ucsf.edu> Archives: https://mail.cgl.ucsf.edu/mailman/archives/list/chimerax-users@cgl.ucsf.edu/
_______________________________________________ ChimeraX-users mailing list -- chimerax-users@cgl.ucsf.edu <mailto:chimerax-users@cgl.ucsf.edu> To unsubscribe send an email to chimerax-users-leave@cgl.ucsf.edu <mailto:chimerax-users-leave@cgl.ucsf.edu> Archives: https://mail.cgl.ucsf.edu/mailman/archives/list/chimerax-users@cgl.ucsf.edu/
_______________________________________________ ChimeraX-users mailing list -- chimerax-users@cgl.ucsf.edu To unsubscribe send an email to chimerax-users-leave@cgl.ucsf.edu Archives: https://mail.cgl.ucsf.edu/mailman/archives/list/chimerax-users@cgl.ucsf.edu/

Hi Tom, Thanks for this prompt reply. However, I did try this fix but I am under the impression that the version requirements creates some kind of internal failures. I include in my code as such, <Dependency name="torch" version="<=2.2"/>. Then, running $chimerax --nogui --cmd "devel install . ; exit" gives the following stdout: ... Executing: toolshed install ./dist/ChimeraX_crai-0.4-py3-none-any.whl reinstall true Errors may have occurred when running pip: pip standard error: --- WARNING: Ignoring invalid distribution -himerax-crai (/home/vmallet/.local/share/ChimeraX/1.5/site-packages) ... """ This warning does not prevent the install from running, but does prevent it from updating the torch version used. (If I print the installed torch version, it is unaffected by my new install). Any hint ? Thanks again and have a great day ! Vincent On Mon, Jun 24, 2024 at 8:40 PM Tom Goddard <goddard@sonic.net> wrote:
Hi Vicent,
XML format like HTML uses "<" and ">" characters as part of its basic syntax. The solution is ugly bug you use < to represent "<" and > to represent ">" just as is done in HTML format.
https://stackoverflow.com/questions/1091945/what-characters-do-i-need-to-esc...
Tom
On Jun 24, 2024, at 5:25 AM, Vincent Mallet via ChimeraX-users < chimerax-users@cgl.ucsf.edu> wrote:
Hello Tom,
A potential user of my CrAI plugin struggles to install it, and I think his problem comes from a certain version of pytorch (2.3.0) that is buggy on Windows <https://discuss.pytorch.org/t/error-loading-lib-site-packages-torch-lib-shm-...>. For this reason, I tried to impose torch<2.2 in the dependencies, in a similar fashion to the one used in Seqcrow.
However, the parser used by Chimerax=1.5 is not happy with the "<" present in <Dependency name="ChimeraX-Core" version=">=1.3, <=1.7"/> (as you suggested above). $chimerax --nogui --cmd "devel install . ; exit"
lxml.etree.XMLSyntaxError: Unescaped '<' not allowed in attributes values, line 40, column 43
Do you have an idea on how to solve this?
Best, Vincent
On Tue, Oct 24, 2023 at 10:33 PM Tom Goddard <goddard@sonic.net> wrote:
Hi Vincent,
The cripser PyPi package requires compiled code. On Windows or Mac users won't usually have a compiler so you won't be able to distribute your ChimeraX tool if it requires installing cripser from source code. So your best hope is to convince the developer of cripser to provide binary wheels on PyPi for Python 3.11. Currently the binary wheels from cripser are only for Python 3.9 and 3.10. If you still want to know why the compile fails and ChimeraX is not reporting a useful error message use ChimeraX menu Help / Report a Bug... so we know all the details of what you tried.
The ChimeraX help command takes the name of a command, not the name of a bundle. Look at the documentation
https://www.cgl.ucsf.edu/chimerax/docs/user/commands/help.html
When you register a command you call register() and give it a CmdDesc argument that takes a URL to your html help. Here is the documentation
https://www.cgl.ucsf.edu/chimerax/docs/devel/modules/core/commands/commands....
If you want to know about Python volume data objects they are in the programming documentation. Look at Volume Data under Python Modules
https://www.cgl.ucsf.edu/chimerax/docs/devel/modules.html
or probably easier look at the ChimeraX Recipes web site to see simple examples of how to use Python with ChimeraX
https://rbvi.github.io/chimerax-recipes/
Tom
On Oct 24, 2023, at 7:34 AM, Vincent Mallet via ChimeraX-users < chimerax-users@cgl.ucsf.edu> wrote:
Hello, thanks so much for the prompt reply ! I managed to get most things flowing (I'm going to try and figure out the cuda part now).
I am still struggling on a few things : 1. the install from source distribution for packages such as crispr : https://pypi.org/project/cripser/ . I contacted the author to turn his install with pip -U {url} into a regular one, and running pip install cripser on my python works. I think the compilation of the source files silently fails when installing through Chimerax, and have no idea on how to fix it 2. I don't quite understand how to play with the help API, if a user types >>help mybundle, I don't know how to add the per argument documentation and go beyond typing hints. 3. For now, I am using the name of mrc/map volume files and opening them with python, I don't know if it would be possible to directly retrieve them as python objects in my bundle ? The possibility to use volume data is mentioned in the doc, but there seems to be a missing section <https://www.cgl.ucsf.edu/chimerax/docs/devel/data_interface.html#builtin-dat...> ( https://www.cgl.ucsf.edu/chimerax/docs/devel/data_interface.html#builtin-dat... )
Maybe you can answer some of these questions, and again, thank you so much for the support !
Best, Vincent
On Sat, Oct 21, 2023 at 1:37 AM Tom Goddard <goddard@sonic.net> wrote:
Hi Vincent,
ChimeraX bundles can list dependencies on PyPi packages. Here's an example of PyPi dependencies in bundle_info.xml of the SEQCROW ChimeraX plugin. ChimeraX will install these when the bundle is installed.
https://github.com/QChASM/SEQCROW/blob/971de45120b9cb1b7f1e5ff0f2cee4b998ec6...
<Dependencies> <Dependency name="ChimeraX-Core" version=">=1.3, <=1.7"/> <Dependency name="scipy"/> <Dependency name="Send2Trash"/> <Dependency name="psutil"/> <Dependency name="jinja2"/> <!-- bse is large and may fail to install with bad internet <Dependency name="basis-set-exchange"/> --> <!-- wait for numpy to fix fortran stuff in python 3.8 I've tried installing this with just gfortran on windows, but no luck <Dependency name="stripy"/> --> </Dependencies>
With PyTorch I don't know if the PyPi packages include CUDA support or how the CUDA version is handled. Maybe they are CPU-only unless compiled from source on the install machine, which of course would require a compiler that only Linux (not Windows) would likely have installed.
We should have some documentation on how to handle PyPi dependencies. I don't see anything useful about how to include them in the bundle_info.xml or pyproject.toml documentation for ChimeraX.
https://www.cgl.ucsf.edu/chimerax/docs/devel/writing_bundles.html#bundle-for... https://www.cgl.ucsf.edu/chimerax/docs/devel/tutorials/pyproject.html
I'll made a ticket to add some documentation for that.
https://www.rbvi.ucsf.edu/trac/ChimeraX/ticket/10036
Tom
On Oct 20, 2023, at 4:58 AM, Vincent Mallet via ChimeraX-users < chimerax-users@cgl.ucsf.edu> wrote:
Hello,
Thanks for the tool and the tutorials. I have a machine learning tool based on pytorch to analyse cryo-EM data. I was hoping to package (bundle) it for Chimerax and started to follow tutorials, but I don't think you mention the right way to set up a code environment with depencies. I see a numpy import in the save_new_format tutorial, but it's not listed in the "dependencies" section of the xml file.
I guess my question is : can I add arbitrary packages in a bundle ? Is there a way to install pip packages only ? Should I copy all source code in the folder and deal with my imports like that ? In particular, I am thinking of torch that is not so easy to replace...
I am hoping you can help me, thanks in advance for the help !
Best, Vincent _______________________________________________ ChimeraX-users mailing list -- chimerax-users@cgl.ucsf.edu To unsubscribe send an email to chimerax-users-leave@cgl.ucsf.edu Archives: https://mail.cgl.ucsf.edu/mailman/archives/list/chimerax-users@cgl.ucsf.edu/
_______________________________________________ ChimeraX-users mailing list -- chimerax-users@cgl.ucsf.edu To unsubscribe send an email to chimerax-users-leave@cgl.ucsf.edu Archives: https://mail.cgl.ucsf.edu/mailman/archives/list/chimerax-users@cgl.ucsf.edu/
_______________________________________________ ChimeraX-users mailing list -- chimerax-users@cgl.ucsf.edu To unsubscribe send an email to chimerax-users-leave@cgl.ucsf.edu Archives: https://mail.cgl.ucsf.edu/mailman/archives/list/chimerax-users@cgl.ucsf.edu/

Hi Vincent, Sounds like the < worked and now you have hit a new bug. Something seems off that the error message calls your ChimeraX distribution "-himerax-crai" instead of "chimerax-crai". It is better to use the ChimeraX bug reporter to report bugs, so we get all the relevant info about your ChimeraX and computer. Run ChimeraX in gui mode and type your "devel install ." command and then use menu Help / Report a Bug.... That way the ChimeraX developers who work on bundle install (Greg and Zach) can figure out what went wrong. The bug reporter also lets you attach a file and you should attach the bundle_info.xml file that causes the problem. If you encounter an error using the old ChimeraX 1.5 your first step should be to update to the current ChimeraX version 1.8 and confirm it is still a problem in 1.8. It is easier for us to debug problems with the current code. Tom
On Jun 24, 2024, at 12:04 PM, Vincent Mallet via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:
Hi Tom,
Thanks for this prompt reply. However, I did try this fix but I am under the impression that the version requirements creates some kind of internal failures. I include in my code as such, <Dependency name="torch" version="<=2.2"/>. Then, running $chimerax --nogui --cmd "devel install . ; exit" gives the following stdout: ... Executing: toolshed install ./dist/ChimeraX_crai-0.4-py3-none-any.whl reinstall true Errors may have occurred when running pip: pip standard error: --- WARNING: Ignoring invalid distribution -himerax-crai (/home/vmallet/.local/share/ChimeraX/1.5/site-packages) ... """
This warning does not prevent the install from running, but does prevent it from updating the torch version used. (If I print the installed torch version, it is unaffected by my new install).
Any hint ?
Thanks again and have a great day ! Vincent
On Mon, Jun 24, 2024 at 8:40 PM Tom Goddard <goddard@sonic.net <mailto:goddard@sonic.net>> wrote:
Hi Vicent,
XML format like HTML uses "<" and ">" characters as part of its basic syntax. The solution is ugly bug you use < to represent "<" and > to represent ">" just as is done in HTML format.
https://stackoverflow.com/questions/1091945/what-characters-do-i-need-to-esc...
Tom
On Jun 24, 2024, at 5:25 AM, Vincent Mallet via ChimeraX-users <chimerax-users@cgl.ucsf.edu <mailto:chimerax-users@cgl.ucsf.edu>> wrote:
Hello Tom,
A potential user of my CrAI plugin struggles to install it, and I think his problem comes from a certain version of pytorch (2.3.0) that is buggy on Windows <https://discuss.pytorch.org/t/error-loading-lib-site-packages-torch-lib-shm-...>. For this reason, I tried to impose torch<2.2 in the dependencies, in a similar fashion to the one used in Seqcrow.
However, the parser used by Chimerax=1.5 is not happy with the "<" present in <Dependency name="ChimeraX-Core" version=">=1.3, <=1.7"/> (as you suggested above). $chimerax --nogui --cmd "devel install . ; exit"
lxml.etree.XMLSyntaxError: Unescaped '<' not allowed in attributes values, line 40, column 43
Do you have an idea on how to solve this?
Best, Vincent
On Tue, Oct 24, 2023 at 10:33 PM Tom Goddard <goddard@sonic.net <mailto:goddard@sonic.net>> wrote:
Hi Vincent,
The cripser PyPi package requires compiled code. On Windows or Mac users won't usually have a compiler so you won't be able to distribute your ChimeraX tool if it requires installing cripser from source code. So your best hope is to convince the developer of cripser to provide binary wheels on PyPi for Python 3.11. Currently the binary wheels from cripser are only for Python 3.9 and 3.10. If you still want to know why the compile fails and ChimeraX is not reporting a useful error message use ChimeraX menu Help / Report a Bug... so we know all the details of what you tried.
The ChimeraX help command takes the name of a command, not the name of a bundle. Look at the documentation
https://www.cgl.ucsf.edu/chimerax/docs/user/commands/help.html
When you register a command you call register() and give it a CmdDesc argument that takes a URL to your html help. Here is the documentation
https://www.cgl.ucsf.edu/chimerax/docs/devel/modules/core/commands/commands....
If you want to know about Python volume data objects they are in the programming documentation. Look at Volume Data under Python Modules
https://www.cgl.ucsf.edu/chimerax/docs/devel/modules.html
or probably easier look at the ChimeraX Recipes web site to see simple examples of how to use Python with ChimeraX
https://rbvi.github.io/chimerax-recipes/
Tom
On Oct 24, 2023, at 7:34 AM, Vincent Mallet via ChimeraX-users <chimerax-users@cgl.ucsf.edu <mailto:chimerax-users@cgl.ucsf.edu>> wrote:
Hello, thanks so much for the prompt reply ! I managed to get most things flowing (I'm going to try and figure out the cuda part now).
I am still struggling on a few things : 1. the install from source distribution for packages such as crispr : https://pypi.org/project/cripser/ . I contacted the author to turn his install with pip -U {url} into a regular one, and running pip install cripser on my python works. I think the compilation of the source files silently fails when installing through Chimerax, and have no idea on how to fix it 2. I don't quite understand how to play with the help API, if a user types >>help mybundle, I don't know how to add the per argument documentation and go beyond typing hints. 3. For now, I am using the name of mrc/map volume files and opening them with python, I don't know if it would be possible to directly retrieve them as python objects in my bundle ? The possibility to use volume data is mentioned in the doc, but there seems to be a missing section <https://www.cgl.ucsf.edu/chimerax/docs/devel/data_interface.html#builtin-dat...> ( https://www.cgl.ucsf.edu/chimerax/docs/devel/data_interface.html#builtin-dat... )
Maybe you can answer some of these questions, and again, thank you so much for the support !
Best, Vincent
On Sat, Oct 21, 2023 at 1:37 AM Tom Goddard <goddard@sonic.net <mailto:goddard@sonic.net>> wrote:
Hi Vincent,
ChimeraX bundles can list dependencies on PyPi packages. Here's an example of PyPi dependencies in bundle_info.xml of the SEQCROW ChimeraX plugin. ChimeraX will install these when the bundle is installed.
https://github.com/QChASM/SEQCROW/blob/971de45120b9cb1b7f1e5ff0f2cee4b998ec6...
<Dependencies> <Dependency name="ChimeraX-Core" version=">=1.3, <=1.7"/> <Dependency name="scipy"/> <Dependency name="Send2Trash"/> <Dependency name="psutil"/> <Dependency name="jinja2"/> <!-- bse is large and may fail to install with bad internet <Dependency name="basis-set-exchange"/> --> <!-- wait for numpy to fix fortran stuff in python 3.8 I've tried installing this with just gfortran on windows, but no luck <Dependency name="stripy"/> --> </Dependencies>
With PyTorch I don't know if the PyPi packages include CUDA support or how the CUDA version is handled. Maybe they are CPU-only unless compiled from source on the install machine, which of course would require a compiler that only Linux (not Windows) would likely have installed.
We should have some documentation on how to handle PyPi dependencies. I don't see anything useful about how to include them in the bundle_info.xml or pyproject.toml documentation for ChimeraX.
https://www.cgl.ucsf.edu/chimerax/docs/devel/writing_bundles.html#bundle-for... https://www.cgl.ucsf.edu/chimerax/docs/devel/tutorials/pyproject.html
I'll made a ticket to add some documentation for that.
https://www.rbvi.ucsf.edu/trac/ChimeraX/ticket/10036
Tom
> On Oct 20, 2023, at 4:58 AM, Vincent Mallet via ChimeraX-users <chimerax-users@cgl.ucsf.edu <mailto:chimerax-users@cgl.ucsf.edu>> wrote: > > Hello, > > Thanks for the tool and the tutorials. I have a machine learning tool based on pytorch to analyse cryo-EM data. I was hoping to package (bundle) it for Chimerax and started to follow tutorials, but I don't think you mention the right way to set up a code environment with depencies. I see a numpy import in the save_new_format tutorial, but it's not listed in the "dependencies" section of the xml file. > > I guess my question is : can I add arbitrary packages in a bundle ? Is there a way to install pip packages only ? Should I copy all source code in the folder and deal with my imports like that ? In particular, I am thinking of torch that is not so easy to replace... > > I am hoping you can help me, thanks in advance for the help ! > > Best, > Vincent > _______________________________________________ > ChimeraX-users mailing list -- chimerax-users@cgl.ucsf.edu <mailto:chimerax-users@cgl.ucsf.edu> > To unsubscribe send an email to chimerax-users-leave@cgl.ucsf.edu <mailto:chimerax-users-leave@cgl.ucsf.edu> > Archives: https://mail.cgl.ucsf.edu/mailman/archives/list/chimerax-users@cgl.ucsf.edu/
_______________________________________________ ChimeraX-users mailing list -- chimerax-users@cgl.ucsf.edu <mailto:chimerax-users@cgl.ucsf.edu> To unsubscribe send an email to chimerax-users-leave@cgl.ucsf.edu <mailto:chimerax-users-leave@cgl.ucsf.edu> Archives: https://mail.cgl.ucsf.edu/mailman/archives/list/chimerax-users@cgl.ucsf.edu/
_______________________________________________ ChimeraX-users mailing list -- chimerax-users@cgl.ucsf.edu <mailto:chimerax-users@cgl.ucsf.edu> To unsubscribe send an email to chimerax-users-leave@cgl.ucsf.edu <mailto:chimerax-users-leave@cgl.ucsf.edu> Archives: https://mail.cgl.ucsf.edu/mailman/archives/list/chimerax-users@cgl.ucsf.edu/
_______________________________________________ ChimeraX-users mailing list -- chimerax-users@cgl.ucsf.edu To unsubscribe send an email to chimerax-users-leave@cgl.ucsf.edu Archives: https://mail.cgl.ucsf.edu/mailman/archives/list/chimerax-users@cgl.ucsf.edu/

Ah ok, I did not know about this procedure ! I will use it for my next bug. In the case at hand, I found out a cheap fix: making a fresh install (I made it crai v0.5 instead of 0.4) seems to take the change into account. So I think removing existing torch installs will fix the problem. Thanks for the assistance ! Best, Vincent On Mon, Jun 24, 2024 at 9:17 PM Tom Goddard <goddard@sonic.net> wrote:
Hi Vincent,
Sounds like the < worked and now you have hit a new bug. Something seems off that the error message calls your ChimeraX distribution "-himerax-crai" instead of "chimerax-crai". It is better to use the ChimeraX bug reporter to report bugs, so we get all the relevant info about your ChimeraX and computer. Run ChimeraX in gui mode and type your "devel install ." command and then use menu Help / Report a Bug.... That way the ChimeraX developers who work on bundle install (Greg and Zach) can figure out what went wrong. The bug reporter also lets you attach a file and you should attach the bundle_info.xml file that causes the problem.
If you encounter an error using the old ChimeraX 1.5 your first step should be to update to the current ChimeraX version 1.8 and confirm it is still a problem in 1.8. It is easier for us to debug problems with the current code.
Tom
On Jun 24, 2024, at 12:04 PM, Vincent Mallet via ChimeraX-users < chimerax-users@cgl.ucsf.edu> wrote:
Hi Tom,
Thanks for this prompt reply. However, I did try this fix but I am under the impression that the version requirements creates some kind of internal failures. I include in my code as such, <Dependency name="torch" version="<=2.2"/>. Then, running $chimerax --nogui --cmd "devel install . ; exit" gives the following stdout: ... Executing: toolshed install ./dist/ChimeraX_crai-0.4-py3-none-any.whl reinstall true Errors may have occurred when running pip: pip standard error: --- WARNING: Ignoring invalid distribution -himerax-crai (/home/vmallet/.local/share/ChimeraX/1.5/site-packages) ... """
This warning does not prevent the install from running, but does prevent it from updating the torch version used. (If I print the installed torch version, it is unaffected by my new install).
Any hint ?
Thanks again and have a great day ! Vincent
On Mon, Jun 24, 2024 at 8:40 PM Tom Goddard <goddard@sonic.net> wrote:
Hi Vicent,
XML format like HTML uses "<" and ">" characters as part of its basic syntax. The solution is ugly bug you use < to represent "<" and > to represent ">" just as is done in HTML format.
https://stackoverflow.com/questions/1091945/what-characters-do-i-need-to-esc...
Tom
On Jun 24, 2024, at 5:25 AM, Vincent Mallet via ChimeraX-users < chimerax-users@cgl.ucsf.edu> wrote:
Hello Tom,
A potential user of my CrAI plugin struggles to install it, and I think his problem comes from a certain version of pytorch (2.3.0) that is buggy on Windows <https://discuss.pytorch.org/t/error-loading-lib-site-packages-torch-lib-shm-...>. For this reason, I tried to impose torch<2.2 in the dependencies, in a similar fashion to the one used in Seqcrow.
However, the parser used by Chimerax=1.5 is not happy with the "<" present in <Dependency name="ChimeraX-Core" version=">=1.3, <=1.7"/> (as you suggested above). $chimerax --nogui --cmd "devel install . ; exit"
lxml.etree.XMLSyntaxError: Unescaped '<' not allowed in attributes values, line 40, column 43
Do you have an idea on how to solve this?
Best, Vincent
On Tue, Oct 24, 2023 at 10:33 PM Tom Goddard <goddard@sonic.net> wrote:
Hi Vincent,
The cripser PyPi package requires compiled code. On Windows or Mac users won't usually have a compiler so you won't be able to distribute your ChimeraX tool if it requires installing cripser from source code. So your best hope is to convince the developer of cripser to provide binary wheels on PyPi for Python 3.11. Currently the binary wheels from cripser are only for Python 3.9 and 3.10. If you still want to know why the compile fails and ChimeraX is not reporting a useful error message use ChimeraX menu Help / Report a Bug... so we know all the details of what you tried.
The ChimeraX help command takes the name of a command, not the name of a bundle. Look at the documentation
https://www.cgl.ucsf.edu/chimerax/docs/user/commands/help.html
When you register a command you call register() and give it a CmdDesc argument that takes a URL to your html help. Here is the documentation
https://www.cgl.ucsf.edu/chimerax/docs/devel/modules/core/commands/commands....
If you want to know about Python volume data objects they are in the programming documentation. Look at Volume Data under Python Modules
https://www.cgl.ucsf.edu/chimerax/docs/devel/modules.html
or probably easier look at the ChimeraX Recipes web site to see simple examples of how to use Python with ChimeraX
https://rbvi.github.io/chimerax-recipes/
Tom
On Oct 24, 2023, at 7:34 AM, Vincent Mallet via ChimeraX-users < chimerax-users@cgl.ucsf.edu> wrote:
Hello, thanks so much for the prompt reply ! I managed to get most things flowing (I'm going to try and figure out the cuda part now).
I am still struggling on a few things : 1. the install from source distribution for packages such as crispr : https://pypi.org/project/cripser/ . I contacted the author to turn his install with pip -U {url} into a regular one, and running pip install cripser on my python works. I think the compilation of the source files silently fails when installing through Chimerax, and have no idea on how to fix it 2. I don't quite understand how to play with the help API, if a user types >>help mybundle, I don't know how to add the per argument documentation and go beyond typing hints. 3. For now, I am using the name of mrc/map volume files and opening them with python, I don't know if it would be possible to directly retrieve them as python objects in my bundle ? The possibility to use volume data is mentioned in the doc, but there seems to be a missing section <https://www.cgl.ucsf.edu/chimerax/docs/devel/data_interface.html#builtin-dat...> ( https://www.cgl.ucsf.edu/chimerax/docs/devel/data_interface.html#builtin-dat... )
Maybe you can answer some of these questions, and again, thank you so much for the support !
Best, Vincent
On Sat, Oct 21, 2023 at 1:37 AM Tom Goddard <goddard@sonic.net> wrote:
Hi Vincent,
ChimeraX bundles can list dependencies on PyPi packages. Here's an example of PyPi dependencies in bundle_info.xml of the SEQCROW ChimeraX plugin. ChimeraX will install these when the bundle is installed.
https://github.com/QChASM/SEQCROW/blob/971de45120b9cb1b7f1e5ff0f2cee4b998ec6...
<Dependencies> <Dependency name="ChimeraX-Core" version=">=1.3, <=1.7"/> <Dependency name="scipy"/> <Dependency name="Send2Trash"/> <Dependency name="psutil"/> <Dependency name="jinja2"/> <!-- bse is large and may fail to install with bad internet <Dependency name="basis-set-exchange"/> --> <!-- wait for numpy to fix fortran stuff in python 3.8 I've tried installing this with just gfortran on windows, but no luck <Dependency name="stripy"/> --> </Dependencies>
With PyTorch I don't know if the PyPi packages include CUDA support or how the CUDA version is handled. Maybe they are CPU-only unless compiled from source on the install machine, which of course would require a compiler that only Linux (not Windows) would likely have installed.
We should have some documentation on how to handle PyPi dependencies. I don't see anything useful about how to include them in the bundle_info.xml or pyproject.toml documentation for ChimeraX.
https://www.cgl.ucsf.edu/chimerax/docs/devel/writing_bundles.html#bundle-for... https://www.cgl.ucsf.edu/chimerax/docs/devel/tutorials/pyproject.html
I'll made a ticket to add some documentation for that.
https://www.rbvi.ucsf.edu/trac/ChimeraX/ticket/10036
Tom
On Oct 20, 2023, at 4:58 AM, Vincent Mallet via ChimeraX-users < chimerax-users@cgl.ucsf.edu> wrote:
Hello,
Thanks for the tool and the tutorials. I have a machine learning tool based on pytorch to analyse cryo-EM data. I was hoping to package (bundle) it for Chimerax and started to follow tutorials, but I don't think you mention the right way to set up a code environment with depencies. I see a numpy import in the save_new_format tutorial, but it's not listed in the "dependencies" section of the xml file.
I guess my question is : can I add arbitrary packages in a bundle ? Is there a way to install pip packages only ? Should I copy all source code in the folder and deal with my imports like that ? In particular, I am thinking of torch that is not so easy to replace...
I am hoping you can help me, thanks in advance for the help !
Best, Vincent _______________________________________________ ChimeraX-users mailing list -- chimerax-users@cgl.ucsf.edu To unsubscribe send an email to chimerax-users-leave@cgl.ucsf.edu Archives: https://mail.cgl.ucsf.edu/mailman/archives/list/chimerax-users@cgl.ucsf.edu/
_______________________________________________ ChimeraX-users mailing list -- chimerax-users@cgl.ucsf.edu To unsubscribe send an email to chimerax-users-leave@cgl.ucsf.edu Archives: https://mail.cgl.ucsf.edu/mailman/archives/list/chimerax-users@cgl.ucsf.edu/
_______________________________________________ ChimeraX-users mailing list -- chimerax-users@cgl.ucsf.edu To unsubscribe send an email to chimerax-users-leave@cgl.ucsf.edu Archives: https://mail.cgl.ucsf.edu/mailman/archives/list/chimerax-users@cgl.ucsf.edu/
_______________________________________________ ChimeraX-users mailing list -- chimerax-users@cgl.ucsf.edu To unsubscribe send an email to chimerax-users-leave@cgl.ucsf.edu Archives: https://mail.cgl.ucsf.edu/mailman/archives/list/chimerax-users@cgl.ucsf.edu/
participants (2)
-
Tom Goddard
-
Vincent Mallet