Template picking error box size 93

The following error I am getting when using Cryosparc V4. Kindly let me know what am I doing wrong.

Thanks

[CPU: 471.4 MB Avail: 57.91 GB]
Computing cc with FFT size 384

[CPU: 471.4 MB Avail: 57.91 GB]
Traceback (most recent call last):
File “cryosparc_master/cryosparc_compute/run.py”, line 96, in cryosparc_compute.run.main
File “cryosparc_master/cryosparc_compute/jobs/template_picker_gpu/run.py”, line 61, in cryosparc_compute.jobs.template_picker_gpu.run.run
File “cryosparc_master/cryosparc_compute/jobs/template_picker_gpu/run.py”, line 155, in cryosparc_compute.jobs.template_picker_gpu.run.do_pick
AssertionError: Template box size is 93 but must be divisible by 2.

make it 94. error says can’t have ODD value input for this parameter

Welcome to the forum @jai_krishna.
Beyond the requirement for the box size to be divisible by 2, the file cryosparc_master/cryosparc_compute/fft_sizes.py lists empirically preferred (for speed of computation) box sizes for certain types of tasks

def fast_cufft_fft2_sizes_single() -> List[int]:
    """
    For single 2D arrays (e.g., micrographs)
    Tested on K40 with rfft2
    """
    return [512,  576,   640,   648,   672,   720,   768,   784,   810,  1024,
            1152,  1280,  1296,  1344,  1440,  1568,  1728,  1792,  2048,
            2160,  2592,  2744,  3456,  4096,  4116,  4480,  4608,  5120,
            5184,  5488,  5832,  6144,  6272,  6400, 8192,  8640,  9216,  9408,
            9720, 10240, 10368, 11664, 12544, 12800, 13122, 13608, 14336,
            16384]


def fast_cufft_fft2_sizes_batch() -> List[int]:
    """
    For multiple 2D arrays (e.g.,  particles)
    Tested on K40 with rfft2
    """
    return [32,   36,   40,   42,   48,   56,   60,   64,   70,   72,   80,
            84,   90,   96,  100,  108,  112,  120,  128,  144,  160,  180,
            192,  200,  216,  224,  240,  256,  270,  288,  300,  320,  324,
            336,  384,  400,  432,  448,  450,  512,
            576,  640,  648,  672,  720,  768,  784,  810,  864,  882, 1024,
            1152, 1280, 1296, 1344, 1440, 1568, 1620, 1728, 1792, 2000, 2048,
            2160, 2592, 2744, 3456, 4096]


def fast_cufft_fft3_sizes() -> List[int]:
    """
    For 3D arrays (e.g., volumes)
    Tested on K40 with rfft3 inplace
    Maximum Sizes:
        - 1120 box size with 11GB (11721506816 bytes GTX1080Ti)
        - 1152 box size with 12GB (12799574016 bytes K40C)
        - 1280 box size with 16GB (16877158400 bytes RTX5000)
        - 1600 box size with 32GB (34055847936 bytes GV100)
    """
    return [42,   48,   50,   56,   60,   64,   72,   80,   84,   90,   96,
            100,  108,  112,  120,  128,  144,  160,  168,  180,  192,  200,
            216,  224,  240,  256,  270,  288,  300,  320,  324,  336,  360,
            378,  384,  392,  400,  432,  450,  512,  540,  576,  600,  640,
            648,  672,  700,  720,  756,  768,  784,  810,  882,  900, 1024,
            1080, 1120, 1152]

The listing inside the fast_cufft_fft2_sizes_batch() definition applies to template picking. Based on the list, you may want to aim for a box size of 90 or 96.

1 Like