---
title: "CryoSPARC"
id: "27501"
type: "epkb_post_type_1"
slug: "cryosparc"
published_at: "2024-08-06T19:54:33+00:00"
modified_at: "2024-09-19T13:32:20+00:00"
url: "https://docs.rc.fas.harvard.edu/kb/cryosparc/"
markdown_url: "https://docs.rc.fas.harvard.edu/kb/cryosparc.md"
excerpt: "Description CryoSPARC is a closed source, commercially-developed piece software for analyzing single-particle cryoelectron microscopy data. It supports CUDA based GPU-accelerated analysis through the PyCUDA library. It consists of several applications which are bundled in two separate binary packages, termed CryoSPARC..."
taxonomy_epkb_post_type_1_category:
  - "Applications"
---

# CryoSPARC

## Description

[CryoSPARC](https://guide.cryosparc.com/)
 is a closed source, commercially-developed piece software for analyzing single-particle cryoelectron microscopy data. It supports CUDA based GPU-accelerated analysis through the PyCUDA library. It consists of several applications which are bundled in two separate binary packages, termed

- CryoSPARC Master (`cryosparcm`)
- CryoSPARC Worker

The Master package is meant to use relative little compute resources, and at least some sysadmins seem to have decided to allow users to run this directly on login nodes. CryoSPARC Worker can be run on a separate node or the same node, but typically should have access to GPU compute resources. The worker nodes must have password-less SSH access to the master node as well as unfettered TCP on a number of ports. The authoritative list of requirements for installation can be found in the CryoSPARC [guide](https://guide.cryosparc.com/setup-configuration-and-management/cryosparc-installation-prerequisites)
.

In addition to instantiating worker nodes and connecting them to the Master node, CryoSPARC can also be configured with a “Cluster Lane” which submits jobs via the SLURM job scheduler. This is the install strategy described in this document.

### CryoSPARC Master Program

The master program is called with the `cryosparcm` command documented [here](https://guide.cryosparc.com/setup-configuration-and-management/management-and-monitoring/cryosparcm)
. The major mechanism for customizing the behavior of `cryosparcm` is the config file located in `cryosparc_master/config.sh`. It has the license, path to the MongoDB database, master hostname, and the base tcp port. Ensure these settings in your `config.sh` file are correct or you will experience errors.

See the [User Code repo for examples](https://github.com/fasrc/User_Codes/tree/master/Applications/CryoSPARC)
.

### CryoSPARC Operation

At the top level, `cryosparcm` is really a `Supervisor` based `shell` script which manages at least six different applications. For instance, running `cryosparcm start` will bring up the following applications

- app (cli)
- command_core
- command_rtp
- command_vis
- database (MongoDB)
- webapp

These mostly communicate with one another over `TCP`. The `TCP` ports used by each of the component programs are not individually configurable, but the base port to which the user connects is configurable in the `cryosparc_master/config.sh`. Of note, the hostname of the node running the master application is also typically hardcoded in this `config.sh` file. However, if this is left unset, it will take the hostname of the machine on which `cryosparcm start` is called.

### Obtaining a Free Academic CryoSPARC License

CryoSPARC is free for academic use. However, it does require a license. You can [request a license](http://cryosparc.com/download)
 on the CryoSPARC webpage. The process of requesting a license is described in detailed [here](https://guide.cryosparc.com/setup-configuration-and-management/how-to-download-install-and-configure/obtaining-a-license-id)
.

### Installing CryoSPARC on Cannon

We provide a configure script to get up and running with CryoSPARC on Cannon, [found in our FASRC/User_Codes git repo](https://github.com/fasrc/User_Codes/blob/master/Applications/CryoSPARC/)
. When running CryoSPARC, [use a GPU computing node](https://docs.rc.fas.harvard.edu/kb/gpgpu-computing-on-the-cluster/)
 so that the correct CUDA modules are loaded and functioning.

## Examples

There are example config files for your environment available in [FASRC/User_Codes on git](https://github.com/fasrc/User_Codes/blob/master/Applications/CryoSPARC/)
 to help you get up and running with CryoSPARC, and some additions for your `.bashrc` file.

## Resources

- [CryoSPARC documentation](https://cryosparc.com/docs)
- [Downloading and Installing CryoSPARC](https://guide.cryosparc.com/setup-configuration-and-management/how-to-download-install-and-configure/downloading-and-installing-cryosparc)
- [GPU Computing on the FASRC cluster](https://docs.rc.fas.harvard.edu/kb/gpgpu-computing-on-the-cluster/)

Bookmarkable Links

- [1. Description](#Description)
  - [1.1. CryoSPARC Master Program](#CryoSPARC_Master_Program)
  - [1.2. CryoSPARC Operation](#CryoSPARC_Operation)
  - [1.3. Obtaining a Free Academic CryoSPARC License](#Obtaining_a_Free_Academic_CryoSPARC_License)
  - [1.4. Installing CryoSPARC on Cannon](#Installing_CryoSPARC_on_Cannon)

- [2. Examples](#Examples)
- [3. Resources](#Resources)

Last UpdatedSeptember 19, 2024
