moleculekit icon indicating copy to clipboard operation
moleculekit copied to clipboard

SIGSEGV-Error

Open maximilian-salomon opened this issue 7 years ago • 13 comments

Hi Devs,

I have found a new problem. Maybe this is worth a new ticket.

I have observed, that sometimes the call of getVoxelDescriptors leads to a SIGSEGV-Error. After reading through this error, it seems, that this is often a software-sided problem. Did you have experience with this?

maximilian-salomon avatar Jun 06 '19 09:06 maximilian-salomon

we will need the input files to reproduce and debug it

stefdoerr avatar Jun 06 '19 09:06 stefdoerr

An example is 2f2h protein.pdb of the refined dataset pdbbind. I have observed, that sometimes a restart of the script can help but not every time. Mostly the problem raises at big proteins. For all but one times I get this error, the protein had over 50k atoms.

maximilian-salomon avatar Jun 06 '19 09:06 maximilian-salomon

One can solve this, by deleting some atoms. So for example prot.filter('Some_Cutoff'). But I would say, that this can not be the optimal solution.

I have also tested my memory. The hardware seems OK.

maximilian-salomon avatar Jun 06 '19 10:06 maximilian-salomon

@BioFreak95 instead of filtering by cutoff you should filter the chains instead, so in the end you have only the monomer that contains the ligand, because you're not interested in the other chains anyway

If the ligand is at the interface between two chains then include both.

There are still some very large proteins in the set (~20ish) for which you can not avoid this problem for now I think.

Dom1L avatar Jun 06 '19 15:06 Dom1L

Thank you for the information. Could you give an example? Maybe for 1a1e which is Linked in issue #12.

Actually I do Not directly understand what you mean. Ich have to pay attention to do not delete any Atom in the box. And it sounds like i have to Filter manually the chains for all the complexes, because the chains are different. Right?

Did you can give a reason, why a chain-selection is netter than a cutoff? Actually I have a boxsize of 24 and Cut Off all atoms which are more 60 angstrom in distance to the ligand center. So I would think far away. But maybe I have a mistake in my theory.

PS. Sorry for the bad english. German autocorrection... I gave up after the 3. sentence

maximilian-salomon avatar Jun 06 '19 15:06 maximilian-salomon

So from what I read here and in the other issue it sounds like you haven't done much preprocessing.

Things you should do before actually applying the voxelization procedure are:

  • filter unnecessary ions or molecules out of the structure
  • run the proteinPrepare procedure of moleculekit to adjust the protonation state and also to filter alternative sidechain conformers in the files
  • remove unnecessary protein chains, if your ligand is in chain A you don't really care about the other chains

This should also resolve your issue with Selenium in the other issue. So before voxelizing and using the data as is, be aware of common issues with crystallographic data/models and clean the data to your needs.

Dom1L avatar Jun 06 '19 16:06 Dom1L

Well

The filtering of unnecessary ions and molecules can be done with

Mol.filter('protein')

Right? I always do this.

Also the proteinprepare function I always use as second step.

As mentioned in the other ticket, this leads in some ways to errors, which I show in Ticket #12. Also the selenium error raises after filtering of protein and preperation function.

The filtering of the Chain seems problematic. I would assume, that the ligand is not always in the same chain. So it seems like, I have to filter this for every molecule manually. For around 4k complexes this seems not doable. Did you know a method, how one can do this automatically? Maybe this could be the last trick. Also, does it not change the chemical properties of the molecule, if one is filtering out some sidechains? I would expect a big influence on the chemical properties, the voxel-features and also on the binding behavior. But I do not know. This is just a rough assumption. What is your opinion to this?

Is there any case, in which the deactivation of validitychecks is a good idea?

Nevetheless. In some cases the ligand has for example 5 bonds for a carbon. The converting with autodock can fix this, but nobody knows, if the result is the experimental ligand and in the worst but not unprobable case, the fixed ligand is wrong and the binding affinity does not match to the complex anymore. It seems, that this could be a problem and could lead to a bias in a CNN. But this is just a really rough assumption and thats why I am sceptical if this is a good idea. But this is another Problem, which is not part of this ticket.

maximilian-salomon avatar Jun 06 '19 17:06 maximilian-salomon

np.unique(mol.get('chain', sel='within 8 of resname MOL'))

stefdoerr avatar Jun 07 '19 13:06 stefdoerr

The protein preparation will indeed move some stuff around a bit but not too significantly I would say. You need it mostly if your proteins are missing the hydrogens as there is no other way to get them. Unless you want to do KDeep without any hydrogens (but make sure you remove them all) which is an option. Might even work.

Filtering out alternative locations of sidechains is not really an issue as there should not be any in this dataset

stefdoerr avatar Jun 07 '19 13:06 stefdoerr

As for modifying the ligands the only other option is to write to the maintainers of the database to clarify issues with their ligands which could take some time, or having a legit chemist in the lab who can tell you how it should be.

stefdoerr avatar Jun 07 '19 13:06 stefdoerr

Ah well. Sure i know the difference about sidechains and chains. But I did not expect, that there are chains which do not have any atom in a specific range around the ligand. But there are. In this case, maybe you are right and it could be a better option, to no destroy the chains, which are close to the ligand. Your method deletes less atoms than my. Which is always good. Thank you for this point. I did not see this.

For KDeep I would try both. For deleting the hydrogens, one could use the filter-function. Right?

I have wrote them. If they bring a solution, I try this. If not, I would use AutoDock or an reduced dataset without the broken.

Maybe in this case, the ticket can be closed from my side. The SIGSEGV-error is something more complicated I think. The only solution here is, to reduce the number of atoms.

maximilian-salomon avatar Jun 07 '19 17:06 maximilian-salomon

I replicated the segfault and found the cause. The cause is this issue which we have already reported to openbabel https://github.com/openbabel/openbabel/issues/1955 Practically larger protein structures will segfault when being read in with openbabel. Nothing we can do other than wait for them to fix the issue or reduce the number of atoms.

stefdoerr avatar Jun 28 '19 14:06 stefdoerr

And thanks for the report! :)

stefdoerr avatar Jun 28 '19 14:06 stefdoerr