Giter Site home page Giter Site logo

Comments (13)

stefdoerr avatar stefdoerr commented on June 15, 2024

Hm, could you provide me with an example molecule? I got a bit confused by the explanation.

from moleculekit.

ungsik avatar ungsik commented on June 15, 2024

from moleculekit.

stefdoerr avatar stefdoerr commented on June 15, 2024

Great! I just had to add Xe to the ions list, so now it formats it correctly as in the PDB file 'XE ' instead of ' XE '. I will make a fix release soon.

from moleculekit.

stefdoerr avatar stefdoerr commented on June 15, 2024

ea0bf30 Done.

Once (and if) this passes https://travis-ci.org/Acellera/moleculekit/builds/578267436 you will have a new 0.1.23 release of moleculekit with the fix.

Thanks for the report :)

from moleculekit.

ungsik avatar ungsik commented on June 15, 2024

from moleculekit.

ungsik avatar ungsik commented on June 15, 2024

from moleculekit.

stefdoerr avatar stefdoerr commented on June 15, 2024

No, that would break the PDB format. I would not change the string formatting. But I will try now to find all "ions" of scPDB and I'll report back.

from moleculekit.

stefdoerr avatar stefdoerr commented on June 15, 2024

To make it more clear, PDB has a weird way of differentiating between ions and non-ions by the spaces before and after the atom name. For example a carbon-alpha atom will be ' CA ' while a calcium atom will be 'CA '. So you need to be very careful about where you put spaces. The good thing is that if a mol2 file of scPDB fails to read I can check in the PDB database and see how they used spaces for that atom and reproduce that behaviour.

from moleculekit.

ungsik avatar ungsik commented on June 15, 2024

from moleculekit.

stefdoerr avatar stefdoerr commented on June 15, 2024

Sorry for half-assing it before. Now I added all the elements of scPDB (Xe, Rb, Lu, Ga) to the element-guessing code 8472d24

This is the 0.1.24 release build which will support them all https://travis-ci.org/Acellera/moleculekit/builds/578404945

from moleculekit.

stefdoerr avatar stefdoerr commented on June 15, 2024

Okay I'll reopen this issue open because fixing the reading of the unsupported metals does not really fix the guessing. Now all files are read fine but for example cadmium "CD" in 4b7b is guessed as element carbon "C". This is a quite hard problem though considering atom type names. Maybe the Du element could be used if it's a mol2 standard but adding support just for scPDB mol2 files seems like a bad hack.

from moleculekit.

stefdoerr avatar stefdoerr commented on June 15, 2024

Note that you can also read the mol2 files with the SmallMol reader which marks the unknown elements as * instead of trying to guess them and then convert to Molecule if that serves you better for now.

from moleculekit.smallmol.smallmol import SmallMol
sm = SmallMol('./4b7b_1/protein.mol2')
mol = sm.toMolecule()

from moleculekit.

stefdoerr avatar stefdoerr commented on June 15, 2024

Indeed Du atom types in mol2 are defined in Corina/SYBYL and TriPos. So I added some code to correctly mark them as ion/metals so that they don't get confused with carbons etc.
d8694a9

This should close the issue well.

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.