carsonpurnell / cryotomosim_CTS

cryo-EM tomogram simulator
Other
19 stars 3 forks source link

Error running param_model #3

Closed eisfabian closed 1 year ago

eisfabian commented 1 year ago

Hey!

Thanks for the awesome tool! I am excited to play around with it! I just tried to set it up and I ran into this error:

Unable to perform assignment because dot indexing is not supported for variables of this type.
Error in helper_input (line 115)
        tmp.vol = imresize3(tmp,head.pixA/pixelsize);
Error in param_model (line 68)
    layers{i} = helper_input('gui',param.pix); %load layer - how to deal with saved list of layers? 

It looks like tmp.vol can't be assigned because tmp is already a volume array?

        [tmp, head] = ReadMRC(list{i});
        disp(class(tmp));
        %fprintf('resizing from %g to %g pixel size',head.pixA,pixelsize)
        tmp.vol = imresize3(tmp,head.pixA/pixelsize);

Changing the first var seemed to fix it for me!

        [tmp_read, head] = ReadMRC(list{i});
        disp(class(tmp));
        %fprintf('resizing from %g to %g pixel size',head.pixA,pixelsize)
        tmp.vol = imresize3(tmp_read,head.pixA/pixelsize);

Running Matlab R2021a. Let me know if you require additional information.

Best wishes, Fabian

carsonpurnell commented 1 year ago

Thanks for the catch. I've added a fix to the main repo that should resolve that and a related issue, so MRC-based structures are generating complete models on my end. Open this back up if it still fails.

However, I strongly suggest using an atomic structure file if at all possible. There's no control over MRC intensity, so any generated models are likely to have useless levels of intensity. If you must use an MRC, try to scale the protein density to ~0.5*(pixelsize in A)^3 to get somewhere in the realm of a reasonable value next to carbon and ice.