kiharalab / DiffModeler

DiffModeler: a diffusion model based protein complex structure modeling tool.
https://em.kiharalab.org/algorithm/DiffModeler
22 stars 1 forks source link

Issue with revised contour #7

Closed SimonCrouzet closed 3 days ago

SimonCrouzet commented 1 week ago

Hello,

Thank for your work leading to this innovative approach!

I noticed a strange behaviour with the contour variable: in _generate_inputdata(), you are inferring the variable _percentile98 from the density range, and revising the contour value contour = contour/percentile_98. I assume this is to adapt the value depending on the signal on the map itself. However, when I tried on the density map I am using, my density values range between 0 and 1 (and are mostly below 0.5), which made the revised contour being higher than the original one (because _percentile98 was ~0.15), and I ended up with a _gen_inputbox() function returning me 0 boxes from the input because the contour was too high. Shouldn't the revised contour formula be different to take into account _percentile98 values lower than 1?

Hope it can be of any help, Best,

wang3702 commented 1 week ago

Thank you so much for your interest in our work! Actually, I don't think that should happen since our percentile_98 is 98th percentile of all density distribution instead of the 98% max density value.The updated contour also only applied to the normalized density ranging from 0 to 1. Therefore, if 98th percentile of the density is below 0.15, I assume your contour should also be lower than that. Then your revised contour should be ranging from 0 to 1, which should be fine for further process considering the normalized density is in [0,1] range.

Could you please provide the map for further analysis? You can email me wang3702@uw.edu of that. You can also submit your map to our server https://em.kiharalab.org/algorithm/DiffModeler and let me know the job id. I will take a look to see what is wrong. Up to now, we have processed more than 500 jobs of DiffModeler in the server, and I have not noticed the percentile_98 can cause problems.

SimonCrouzet commented 1 week ago

Thank you for your fast and detailed insights on the issue!

I made an attempt using the server and faced the same behaviour - the job id is 16b929d885f77a98d20d78b92235dace. I chose a contour of 0.17 from my map visualization on Chimera, here is the log obtained:

map density range: 0.000000 0.231218
map hist log percentage 98: 0.17456958
detected mode mapc 1, mapr 2, maps 3
Origin: [0.0, 0.0, 0.0]
given contour 0.170000
revised contour 0.973824
In total we prepared 0 boxes as input
dataset loading finished with 0 boxes!

Let me know if I can help you further, Best,

wang3702 commented 1 week ago

I visually inspected your map in Chimera, the proper input contour level should be 0.025. That can leave the map like this

image

If you input contour level is 0.17, there is almost no density left, which is very strange setting:

image

With such a strange contour level, there is nothing left and you should not expect DiffModeler can still model structure from the remained meaningless density.