3D Flex Training strange Plots

Hello,

I ran a 3D Flex tranining with default parameters . I have very different plots from the tutorial video and I am trying to understand what went wrong. Can somebody help me? Could you suggest which how can I improve the parameters to get a better training result?

Thank you very much!

Hi @Sharys! Welcome to the forum!

The plots here definitely don’t look ideal. I’m noticing two things:

  1. Your latent distribution is very narrowly distributed around 0 – ideally, this would range from -1.5 to +1.5 in all dimensions, but yours only ranges from -0.08 to +0.06.
  2. You are seeing essentially no change in loss or penalty.

Latent distribution

Problem number 1 means that you need to decrease the Latent centering strength parameter quite a bit. We call this a “nuisance parameter” because there’s not a great way to know what it should be set to ahead of time, you just need to adjust it as you go.

For your case, I would try reducing it from the default value of 20 to a value of 1 and seeing what the latent distribution looks like after several iterations. Here’s what a recent one of my Flex Train jobs looked like at the end. If I were to run another training job, I would probably reduce the Latent centering strength even a bit more, since no particles end up out at 1.5 in the latent dimensions.

No change in loss or penalty

This is a bit harder to diagnose. No change in loss or penalty essentially means that 3D Flex is not modelling any movement. This can happen for a variety of reasons.

First, it might be that since your latent coordinates were so tightly clustered around zero, there wasn’t “room” for 3D Flex to assign particles to distinct coordinates. Changing the latent centering strength above might help with this.

Second, it could be that there is not very much flexible movement in your sample. Have you run 3D Variability Analysis on this sample? If so, did you see much movement?

Third, it might be that your rigidity is set too high. If you have run 3DVA and did see movement, try reducing the Rigidity (lambda) parameter from the default of 2 to 0.5. If you see movement now, that’s a good sign.

When tuning Rigidity (lambda), you want to set it low enough that the model can produce movement, but not so low that the movement includes unrealistic bending and flexing of protein structure. For this reason, it’s generally good to monitor the progress of a 3D Flex Training job while it runs using 3D Flex Generate. This way if a model has too low a rigidity value and is producing unrealistic movement you can terminate the job early and not waste a bunch of time.


In general, these parameters are highly dataset dependent. In my experience, even two datasets of the same sample will require different values in 3D Flex Training to get a good result. I therefore usually start a training job and let it run for a while, then run a 3D Flex Generate job to assess whether the deformations look reasonable to me. Usually I then kill the training job and adjust the rigidity and latent centering strength as I’ve described above for a second training job.

I repeat this process until I’ve got something that looks promising in the early iterations; I let this final training job run all the way to completion, and then decide if I need to fine-tune other parameters or if I need to add additional dimensions/components.


I hope that’s helpful! I know it’s a lot of information. If you haven’t already, you might be interested in the Continuous Variability video we recently released. It’s a recording from the S2C2 single particle analysis workshop and touches on the technique of 3D Flex (and 3DVA) and how various parameters should be set.

Please let me know if you have any more questions!

1 Like

Dear @rposert,
Thank you for your suggestions. I tried to launch the 3d variability job and I saw movement on my protein. Therefore, I launched the 3d Flex training job by changing the “rigidity” from 2 to 0,5 and “latent centering strenght” from 20 to 1. Attached there are the image of the 3d flex train output and the final model from the 3d flex reconstruct job. As you can see, in the model there are some scattered information in the region that is supposed to be the mobile one. Do you have any suggestions on how I can improve information in this region ?

Thank you very much


Hi @Sharys, thanks for sharing some images of your volume! However, I wonder if you noticed the spikey/wavey texture to your map. Generally, this is a sign of overfitting. I have a few recommendations for you based on these images that might improve your result.

First, I’d return to non-flexible processing and make sure that your particle stack is very clean. 3D Flexible Refinement is extremely sensitive to junk particle images, so it’s important to make your particle stack as clean as you can get it. I’d recommend using iterative Ab Initio Reconstruction and Heterogeneous Refinement until most (~95%) of your particles end up in a high-quality class which looks like your target. I cover this process in a case study we just published, as well as a recording of a workshop that’s linked in that same page.

Next, I’m wondering what pixel size your training particle images were downsampled to? 3D Flex Training is designed to fit the 3DFlex model using all the data (i.e. the two half-sets are combined), but to only use information from the images up to a relatively coarse resolution limit, which is set by the training box size (and therefore training Nyquist resolution limit, which is 2x the training pixel size). Later on, in 3D Flex Reconstruction, the images are split again into their original half-set, and the full resolution images are used (at the reconstruction box size/pixel size). The output half-maps from this step are therefore independent for the resolutions between the training Nyquist and the reconstruction Nyquist limits.

It’s therefore important to set your training pixel size well below your consensus refinement’s GSFSC resolution. For example, if the input particles produced a map with a GSFSC resolution of 3 Å, I would set my training pixel size to at least 5 Å (but probably larger). This would mean the 3D Flex Reconstruction would have independent half-sets from 10 Å (training Nyquist) to the full pixel size Nyquist. This has the added benefit of making training much faster!

You may find that adjusting the training pixel size requires you to change the rigidity as well.

I hope that’s helpful!

2 Likes