Filament tracer error

Dear colleagues,

I would like to ask for your help with the “Filament tracer”.

I have negative staining sample.

I am getting the following error:

Traceback (most recent call last): File “cryosparc_worker/cryosparc_compute/”, line 84, in File “cryosparc_worker/cryosparc_compute/jobs/template_picker_gpu/”, line 61, in File “cryosparc_worker/cryosparc_compute/jobs/template_picker_gpu/”, line 246, in File “cryosparc_worker/cryosparc_compute/jobs/template_picker_gpu/”, line 366, in File “cryosparc_worker/cryosparc_compute/engine/”, line 339, in cryosparc_compute.engine.cuda_core.EngineBaseThread.ensure_allocated File “/home/cryosparc_user/software/cryosparc/cryosparc2_worker/deps/anaconda/envs/cryosparc_worker_env/lib/python3.7/site-packages/pycuda/”, line 210, in init self.gpudata = self.allocator(self.size * self.dtype.itemsize) pycuda._driver.MemoryError: cuMemAlloc failed: out of memory

Somehow the initial FFT starts from size 2048!

Another question – does the Manual picker contain all the micrographs?
My options is to pick the filament manually.

Any suggestions?

Thank you.



Hi @Dmitry,

This likely indicates that there is not enough GPU memory to support a lowpass resolution of 20 Å with your micrograph size. Could you try changing the default lowpass resolution of 20 Å to a larger number, perhaps 30 or 40 Å, and seeing if this helps?

If the problem still persists after trying this, I would ask for the following:

  • What is the size of the micrographs in pixels?
  • Are you using templates, or are you using the “template-free” mode?
  • Could you provide a screenshot of the parameters of the job, including the filament size?

Finally with regards to manual picking, the manual picker currently only shows the first 100 micrographs in the dataset. In order to run a manual picker on all micrographs, you would need to run an Exposure Sets Tool job on your original micrographs, with a split batch size of 100, and a number of batches equal to the number of micrographs divided by 100. This job will output multiple exposure datasets each with 100 micrographs in them, which you can use the manual picker on individually. Please note that the manual picker is currently unmodified for the filament case, i.e., you must click on each location you want to pick individually, rather than clicking just on the start and end points. We hope to add this feature in the future, to help accelerate the manual picking of filaments.


Dear Michael,

Thank you for the recommendations.

I have some trouble while splitting the dataset.

I ended up with the following error:

Traceback (most recent call last):

  • File “cryosparc_master/cryosparc_compute/”, line 84, in*
  • File “/home/cryosparc_user/software/cryosparc/cryosparc2_master/cryosparc_compute/jobs/utilities/”, line 80, in run*
  • for batchnum in range(num):*
    TypeError: ‘float’ object cannot be interpreted as an integer

For the input I tried CTF estimated micrographs as motion corrected ones.
Please see the image of my parameters.

What could be the solution?

Thank you in advance.

Hi @Dmitry,

Apologies, this was my bad. The Split num. batches should be rounded up to the nearest integer, so 5 here. As well, please let me know if changing the lowpass resolution from the prior post allowed the filament tracer to run successfully.


Dear Michael @mmclean,

Thank you. I will try that option!

About the low-pass filtering and Filament tracer error –
Yes the low pass filtering worked perfectly in the sense that the program started and picked some areas (the FFT became affordable in the respect of memory for my PC). Another question is that the picking of the filament according to the template that I used was not very good: a lot of empty spaces were mistakenly recognized as a filament. I am connecting that with the microghraphs which are negatively stained.

Hi @Dmitry,

Thanks for the information. We’ve been noticing some issues with negative stained data during particle picking, and one symptom of this is that picking tends to pick in the spaces between actual particles/filaments. There was a recent thread discussing some workarounds with negative stain picking: Blob picker missing highest contrast particles (negative stain) – I believe the main suggestion here was ensuring the micrographs are imported with “negative stain” activated. If that still doesn’t work, it seemed like some users had success with pre-multiplying the micrographs by -1 when importing, and then processing as normal (i.e. with negative stain off).

Please let me know if either of these options helps improve the particle picker!

EDIT: I stand corrected, please see Oli’s suggestion below. We’re planning to re-visit our negative stain workflow to iron out the bugs here.


importing with negative stain activated does not solve issues with neg stain picking - it still misses the best (highest contrast) particles in my experience. The only way to go is to invert the micrographs before import (there is no way to do this upon import to my knowledge), or try @apunjani’s suggestion of using an extreme low pass filter of 120Å+ (which in my hands also improves matters to some degree).