rs-station / careless

Merge X-ray diffraction data with Wilson's priors, variational inference, and metadata
MIT License
16 stars 6 forks source link

wilson-prior-b flag value inconsistent with B-factor value for output mtz #106

Open DorisMai opened 1 year ago

DorisMai commented 1 year ago

Does the wilson-prior-b flag enforce the global Wilson-B factor on the output? I tried to ask Careless to apply a B-factor of 10, but when I run phenix.xtriage on the output .mtz file, I got:

ML estimate of overall B value: 2.11 A**2 Estimated -log of scale factor: -2.38

Here's the command I used for Careless: careless mono \ --disable-image-scales \ --wilson-prior-b=10 \ --studentt-likelihood-dof=16 \ --iterations=30_000 \ --merge-half-datasets \ --test-fraction=0.05 \ "BATCH,dHKL,XDET,YDET" \ ../integrate_gemmi.mtz \ wb10_studentt16_out

kmdalton commented 1 year ago

The prior-b changes the b-factor of the prior distribution. There is some wiggle room in how well the output reflects the prior value. I wouldn't expect it to match exactly. May I ask the resolution of your data? Also, where did the number 10 come from?

kmdalton commented 1 year ago

I have been thinking about this problem a bit. I see two possibly helpful things I can two.

Are either or both of those options helpful?

DorisMai commented 1 year ago

The molecule diffracts to < 1 A.

I simply noticed that some settings (e.g. different metadata used) of Careless gave worse (in terms of R factors) preliminary solutions than others, and those settings happen to have apparently negative B-factor. Therefore, I wondered if trying to enforce a positive (unknown) B-factor would help. Do you think it makes sense to rescale the output to match a particular b-factor value? Any suggestion on finding the desired b-factor?

kmdalton commented 1 year ago

I think it most likely makes more sense to rescale the output than to use the prior b. I fear the prior b might lead to precision loss at higher resolution. I can think about it a little more, but I'm definitely open to including some tools to rescale the output.

kmdalton commented 1 year ago

I'll add that this has been an issue for other users as well. I am motivated to address it.