Giter Site home page Giter Site logo

Comments (6)

stefdoerr avatar stefdoerr commented on June 15, 2024

Ugh, this is a protein preparation / bonding issue. pdb2pqr adds terminal atoms to GLN 227 during the protein preparation but the distances are probably a bit off for atom 3514 so the bonds are not guessed correctly for it and it's not considered "protein" anymore.

In [8]: prot = prepareProteinForAtomtyping(prot)

In [11]: prot.atomselect('not protein', indexes=True)                                                                                                                                                              
Out[11]: array([3514], dtype=int32)

In [12]: prot.get('resname', sel='not protein')                                                                                                                                                                    
Out[12]: array(['GLN'], dtype=object)

In [13]: prot.get('resid', sel='not protein')                                                                                                                                                                      
Out[13]: array([227])

If that atom is not close to any site of interest I would suggest removing it with prot.remove('index 3514') and continuing with the voxelization. A bit of an extreme solution but sometimes you really can't win with such complex protocols and external software.
If it occurs in many other cases feel free to report them and I will check if anything can be done about it.

from moleculekit.

keisuke-yanagisawa avatar keisuke-yanagisawa commented on June 15, 2024

I catch the reason. Hmmmmm...
Actually I met the error several times, and thus far I avoided those by downloading atomtyper.py and voxeldescriptors.py and modified notallowed = ~(protsel | metalsel) to notallowed = ~(protsel | metalsel | stdaasel) (there is an another reason to decide modify atomtyper.py: some protein has PB, BA, and other metals, btw).

Actually, I utilized preprocessed PDB files, thus I could not guarantee which PDB record raise the error in original state. If you want, I will check it for original PDB files of interest.

from moleculekit.

keisuke-yanagisawa avatar keisuke-yanagisawa commented on June 15, 2024

But my second thought is that below code is probably more robust:

prot = Molecule("pdb1e2x.ent.gz")
prot.filter("protein or ions") # remove H2O and SO4
prot = prepareProteinForAtomtyping(prot)
prot.filter("protein or ions") # remove isolated atoms

prot_vox, prot_centers, prot_N = getVoxelDescriptors(prot, buffer=1)

Is it valid way to avoid the issue for you?

from moleculekit.

stefdoerr avatar stefdoerr commented on June 15, 2024

from moleculekit.

keisuke-yanagisawa avatar keisuke-yanagisawa commented on June 15, 2024

Okay I understand! I will monitor the numbers.

from moleculekit.

stefdoerr avatar stefdoerr commented on June 15, 2024

I will close the issue for now. If you have any further questions feel free to comment here or open a new one

from moleculekit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.