change box size for e2spt_boxer_convnet

3 views
Skip to first unread message

Dave M

unread,
Dec 29, 2025, 6:07:26 PM (2 days ago) 12/29/25
to em...@googlegroups.com
Hello All,
I am trying to pick particles using e2spt_boxer_convnet.py. I am following the ribosomes tutorial for my own particles (~200 Angs). The 4 binned tomogram pixel is 4.8A, so approximately 1.5x box size would correspond to 64 pixels.
When I try to change box size in the GUI option ChangeBx, I get this error:
Cannot set box size (64) smaller than Network input size (96). Stop.

I am not sure where this default 96 size comes from. Is there any way to change it? I have some noisy data with some other neighboring particles around the target and I think it would be better to use a smaller box size. I tried with 96 box size which picked like 500 particles (I reduced PtclThresh to 0.46) but the initial model looks like some connected blobs nowhere like the particle shape should be.

Thank you for any help.

best wishes,
Dave

Muyuan Chen

unread,
Dec 29, 2025, 6:44:00 PM (2 days ago) 12/29/25
to em...@googlegroups.com
The internal neural network structure and hyper-parameters are optimized for 96 box size, and it only downsamples the images if you specify a larger box size. In principle, the neural network should learn to recognize the target particle from a large surrounding area, and ignore the irrelevant protein densities if needed. Using a smaller box would give it less information to pick particles, and generally only makes it worse.

If your particle is surrounded by many other proteins, changing particle picking strategy won't be very helpful for the initial model generation. Maybe picking some particles (50-100) manually, only including those that are well-separated (and ideally those you are highly confident that are the particles you are targeting), would provide a better initial model. Using a known reference, if exist, as reference for initial model generation might help too. 

Just general comments. Hard to tell more without more information of the data and target protein etc...

Muyuan

--
--
----------------------------------------------------------------------------------------------
You received this message because you are subscribed to the Google
Groups "EMAN2" group.
To post to this group, send email to em...@googlegroups.com
To unsubscribe from this group, send email to eman2+un...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/eman2

---
You received this message because you are subscribed to the Google Groups "EMAN2" group.
To unsubscribe from this group and stop receiving emails from it, send an email to eman2+un...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/eman2/CAL1266%3DpD%2BR8b1YKCa%2BbQBTu0qjJVoFaFTYRqPHM02rHgdc59w%40mail.gmail.com.

Dave M

unread,
Dec 30, 2025, 11:07:02 AM (2 days ago) 12/30/25
to em...@googlegroups.com
Thank you Muyuan. I was thinking of using covnet as it allows picking many particles and going to particle refinement directly without requiring template matching steps. 

best wishes,
Dave


Muyuan Chen

unread,
Dec 30, 2025, 11:37:06 AM (2 days ago) 12/30/25
to em...@googlegroups.com
I am not suggesting template matching. Just get some good particles to have an initial model for refinement. You can still use convnet picked particles later.

On Dec 30, 2025, at 8:07 AM, Dave M <dave....@gmail.com> wrote:



Dave M

unread,
Dec 30, 2025, 6:20:44 PM (2 days ago) 12/30/25
to em...@googlegroups.com
Thank you Muyuan. I would much appreciate it if you could please reply:
a) Without changing the ChangeBx (by default it should remain 96 if I understand correctly) I trained and obtained some new set of ~100 particles (just for testing) from my bin4 tomogram at 4.8A pixel size. In the next step by using e2spt_extract.py I kept boxsz_unbin= -1, I noticed the particle stacks in particles3D folder *.hdf file the size is 192x192x192. I am not sure why this happened. The box length should have remained the same (96x4.8 vs 192x1.2) but it just doubled. 

Also, would it be fine if I use a larger box size at this step (1.5x size of particle)?

b) I do have a map available from EMDB and I generated the template using pytom which has a box size 192 and 1.2A pixel and using this as a reference with starting resolution 50:

e2spt_refine_new.py --ptcls sets/listA.lst --ref sptsgd_00/template_192bxsz_1.2Ang.hdf --iters p,p,t --goldstandard --startres 50 --tophat local --parallel thread:24 --threads 24

I am wondering if it is correct to provide a reference map at the original pixel size or should it be at the binned resolution. 

c) I noticed in the New Initial Model Generator (e2spt_sgd_new.py) I can use some reference model. Does this reference need to be at a binned tomogram pixel or the unbinned.

Thank you.

Dave


Muyuan Chen

unread,
Dec 30, 2025, 6:53:45 PM (2 days ago) 12/30/25
to em...@googlegroups.com
a) particle box size is specified by —boxsz_unbin in the extraction step. It’s unrelated to the size you used for picking. If your particles are crowded, smaller box size is better. 

b) as long as the pixel size is specified correctly in the header of the file, the programs will rescale the reference accordingly. Check “apix_x” in file header, and change it with e2proc3d.py x x —apix xx.

c) due to my laziness, e2spt_sgd_new somehow does not do auto rescaling. However, you can check how the refine_new program does it, or just use the rescaled reference (threed_00) as the reference for spt_sgd. Spt_sgd sometimes converges better if your reference is quite different than the actual particles. 

On Dec 30, 2025, at 3:20 PM, Dave M <dave....@gmail.com> wrote:


Reply all
Reply to author
Forward
0 new messages