Local refinement error (cryoSPARC v4.5.3)

Hi, I’m currently using cryoSPARC v4.5.3 and got the following error during local refinement job

I used the mask having the local region created by chimera saved as same box size and binarized with Volume Tools to use it as local refinement input

Neither using the specified fulcrum value (measured in chimera) nor the default mask center or box center), i encounter the error above image.

I think the error is due to input mask because the local refinement job is working when i used the non-uniform refinement dynamic mask. However, when i used cryoSPARC v4.4.1, there are no problems with same mask creation method (chimera segger → import volume → volume tool). What should i do?

  • When i used gaussian prior option with default static mask option, it’s not working, but dynamic mask option successfully give the result. Are there any reasons why these coordination cause the error?

Welcome to the forum @LDE .
Please can you post the Traceback as text to improve the searchability of the forum.

Sorry for late reply.

[CPU:   9.07 GB  Avail:1011.49 GB]
Traceback (most recent call last):
  File "/home/cryosparc_user/cryosparc/cryosparc_worker/cryosparc_compute/jobs/runcommon.py", line 2294, in run_with_except_hook
    run_old(*args, **kw)
  File "/home/cryosparc_user/cryosparc/cryosparc_worker/deps/anaconda/envs/cryosparc_worker_env/lib/python3.10/threading.py", line 953, in run
    self._target(*self._args, **self._kwargs)
  File "cryosparc_master/cryosparc_compute/engine/newengine.py", line 2714, in cryosparc_master.cryosparc_compute.engine.newengine.process.work
  File "cryosparc_master/cryosparc_compute/engine/newengine.py", line 2766, in cryosparc_master.cryosparc_compute.engine.newengine.process.work
  File "cryosparc_master/cryosparc_compute/engine/newengine.py", line 1518, in cryosparc_master.cryosparc_compute.engine.newengine.EngineThread.compute_error
ValueError: Detected NaN values in newengine.compute_error. 11294500 NaNs in total, 500 particles with NaNs.

[CPU:   9.07 GB  Avail:1011.49 GB]
Traceback (most recent call last):
  File "/home/cryosparc_user/cryosparc/cryosparc_worker/cryosparc_compute/jobs/runcommon.py", line 2294, in run_with_except_hook
    run_old(*args, **kw)
  File "/home/cryosparc_user/cryosparc/cryosparc_worker/deps/anaconda/envs/cryosparc_worker_env/lib/python3.10/threading.py", line 953, in run
    self._target(*self._args, **self._kwargs)
  File "cryosparc_master/cryosparc_compute/engine/newengine.py", line 2714, in cryosparc_master.cryosparc_compute.engine.newengine.process.work
  File "cryosparc_master/cryosparc_compute/engine/newengine.py", line 2766, in cryosparc_master.cryosparc_compute.engine.newengine.process.work
  File "cryosparc_master/cryosparc_compute/engine/newengine.py", line 1518, in cryosparc_master.cryosparc_compute.engine.newengine.EngineThread.compute_error
ValueError: Detected NaN values in newengine.compute_error. 11294500 NaNs in total, 500 particles with NaNs.

And the below is the input parameter.

@LDE Please can you

  1. download and set aside for future reference the job’s error report when the job is still in its failed state.
  2. clear the job and run it again with the same inputs and parameters.

Does the job fail again? At exactly the same point and with the same error message?

Yes. I clear the job and rerun it with same input and parameters, but fail like below




J39_fsc_iteration_000
J39_guinier_plot_iteration_000
J39_noise_model_iteration_000
J39_viewing_direction_distribution_iteration_000
J39_posterior_precision_directional_distribution_iteration_000


Thanks @LDE for trying this. Please can you post the output of the command

cryosparcm eventlog P99 J199 | tail -n 30

where you replace P99, J199 with the failed job’s project and job IDs, respectively.

This is the output of the command from my failed job’s project (P295) and job (J39)

[Fri, 05 Jul 2024 01:48:58 GMT] [CPU RAM used: 7935 MB] Done in 12.343s.
[Fri, 05 Jul 2024 01:48:58 GMT] [CPU RAM used: 7935 MB] Outputting files…
[Fri, 05 Jul 2024 01:49:02 GMT] [CPU RAM used: 8353 MB] Done in 4.204s.
[Fri, 05 Jul 2024 01:49:02 GMT] [CPU RAM used: 8353 MB] Done iteration 0 in 147.640s. Total time so far 162.550s
[Fri, 05 Jul 2024 01:49:02 GMT] [CPU RAM used: 8353 MB] ----------------------------- Start Iteration 1
[Fri, 05 Jul 2024 01:49:02 GMT] [CPU RAM used: 8353 MB] Using Max Alignment Radius 141.000 (2.445A)
[Fri, 05 Jul 2024 01:49:02 GMT] [CPU RAM used: 8353 MB] Using Full Dataset (split 188933 in A, 188690 in B)
[Fri, 05 Jul 2024 01:49:04 GMT] [CPU RAM used: 8558 MB] Minimizing over per-particle scale factor
[Fri, 05 Jul 2024 01:49:04 GMT] [CPU RAM used: 8365 MB] Current alpha values ( nan | nan | nan | nan | nan )
[Fri, 05 Jul 2024 01:49:04 GMT] [CPU RAM used: 8365 MB] Engine Started.
[Fri, 05 Jul 2024 01:49:04 GMT] Alignment map A
[Fri, 05 Jul 2024 01:49:04 GMT] Alignment map B
[Fri, 05 Jul 2024 01:49:09 GMT] [CPU RAM used: 8541 MB] Traceback (most recent call last):
File “/home/cryosparc_user/cryosparc/cryosparc_worker/cryosparc_compute/jobs/runcommon.py”, line 2294, in run_with_except_hook
run_old(*args, **kw)
File “/home/cryosparc_user/cryosparc/cryosparc_worker/deps/anaconda/envs/cryosparc_worker_env/lib/python3.10/threading.py”, line 953, in run
self._target(*self._args, **self._kwargs)
File “cryosparc_master/cryosparc_compute/engine/newengine.py”, line 2714, in cryosparc_master.cryosparc_compute.engine.newengine.process.work
File “cryosparc_master/cryosparc_compute/engine/newengine.py”, line 2766, in cryosparc_master.cryosparc_compute.engine.newengine.process.work
File “cryosparc_master/cryosparc_compute/engine/newengine.py”, line 1518, in cryosparc_master.cryosparc_compute.engine.newengine.EngineThread.compute_error
ValueError: Detected NaN values in newengine.compute_error. 11294500 NaNs in total, 500 particles with NaNs.
[Fri, 05 Jul 2024 01:49:09 GMT] [CPU RAM used: 8541 MB] Traceback (most recent call last):
File “/home/cryosparc_user/cryosparc/cryosparc_worker/cryosparc_compute/jobs/runcommon.py”, line 2294, in run_with_except_hook
run_old(*args, **kw)
File “/home/cryosparc_user/cryosparc/cryosparc_worker/deps/anaconda/envs/cryosparc_worker_env/lib/python3.10/threading.py”, line 953, in run
self._target(*self._args, **self._kwargs)
File “cryosparc_master/cryosparc_compute/engine/newengine.py”, line 2714, in cryosparc_master.cryosparc_compute.engine.newengine.process.work
File “cryosparc_master/cryosparc_compute/engine/newengine.py”, line 2766, in cryosparc_master.cryosparc_compute.engine.newengine.process.work
File “cryosparc_master/cryosparc_compute/engine/newengine.py”, line 1518, in cryosparc_master.cryosparc_compute.engine.newengine.EngineThread.compute_error
ValueError: Detected NaN values in newengine.compute_error. 11294500 NaNs in total, 500 particles with NaNs.

@LDE Please can you try

  1. using a Particle Sets Tool job, create a subset of 100000 particles from job J39’s input particles.
  2. clone job J39 and replace the input particles with the subset created in the previous step.
  3. run the cloned job and let us know whether the job completes normally or throws any errors.

I retry the J39’s cloned job using a subset of 100000 particles from the output of a Particle Sets Tool, but got the same error.

[CPU: 8.17 GB Avail:1009.03 GB]
Traceback (most recent call last):
File “/home/cryosparc_user/cryosparc/cryosparc_worker/cryosparc_compute/jobs/runcommon.py”, line 2294, in run_with_except_hook
run_old(*args, **kw)
File “/home/cryosparc_user/cryosparc/cryosparc_worker/deps/anaconda/envs/cryosparc_worker_env/lib/python3.10/threading.py”, line 953, in run
self._target(*self._args, **self._kwargs)
File “cryosparc_master/cryosparc_compute/engine/newengine.py”, line 2714, in cryosparc_master.cryosparc_compute.engine.newengine.process.work
File “cryosparc_master/cryosparc_compute/engine/newengine.py”, line 2766, in cryosparc_master.cryosparc_compute.engine.newengine.process.work
File “cryosparc_master/cryosparc_compute/engine/newengine.py”, line 1518, in cryosparc_master.cryosparc_compute.engine.newengine.EngineThread.compute_error
ValueError: Detected NaN values in newengine.compute_error. 11294500 NaNs in total, 500 particles with NaNs.