Git Product home page Git Product logo

Comments (6)

z-linlinlin avatar z-linlinlin commented on August 29, 2024

And I tried SmallMol(mol, fixHs=False, removeHs=True), it didn't work

from moleculekit.

stefdoerr avatar stefdoerr commented on August 29, 2024

Hi, did you use force_reading by any chance?
Can you provide me with the molecule to test?

If it's a mol2 file you can also try directly with rdkit to see if it does the same:

from rdkit import Chem
mol = Chem.MolFromMol2File("mylig.mol2", removeHs=False)
mol.GetNumAtoms()

from moleculekit.

z-linlinlin avatar z-linlinlin commented on August 29, 2024

Here is a simple example:

import moleculekit.smallmol.smallmol as mk
import moleculekit.tools.voxeldescriptors as mk_voxel
from rdkit import Chem
from rdkit.Chem import AllChem
smiles = "CN"
mol = Chem.MolFromSmiles(smiles)
mol_H = Chem.AddHs(mol)
AllChem.EmbedMolecule(mol_H)
mol_conformer = Chem.RemoveHs(mol_H)
smallmol = mk.SmallMol(mol_conformer, fixHs=False)
coords_mol = smallmol.get("coords")[:, :, 0]
channel_mol = mk_voxel.getChannels(smallmol)[0]
print(coords_mol.shape, channel_mol.shape)

I hope the channel_mol to be of shape (2, 8) as before, but I got (7, 8).

from moleculekit.

stefdoerr avatar stefdoerr commented on August 29, 2024

Oh nice! You found a bug in copying of molecule. I'm fixing it now and will report once it's release in a new moleculekit version (in an hour or so hopefully).
Thanks a lot!

from moleculekit.

stefdoerr avatar stefdoerr commented on August 29, 2024

Ok version 0.5.5 of moleculekit is out which should fix this. Give it a try and tell me if it worked for you

from moleculekit.

z-linlinlin avatar z-linlinlin commented on August 29, 2024

Ok version 0.5.5 of moleculekit is out which should fix this. Give it a try and tell me if it worked for you

It works well !
Thanks

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.