Questions tagged [rdkit]

RDKit is a popular open-source library for chemoinformatics and machine learning applied to chemoinformatics.

RDKit is a popular open-source library for chemoinformatics and machine learning applied to chemoinformatics.

251 questions
2
votes
1 answer

How to convert molecule from graph representation to RDKit Mol

I'm working on a Python project involving molecules, and for now I have been representing molecules as graphs. I have three different numpy arrays describing each graph: a binary adjacency matrix, an array storing the atomic number of each atom in…
Daniele Grattarola
  • 1,517
  • 17
  • 25
2
votes
1 answer

Run rdkit in Conda

I'm having a problem to run rdkit in Conda. I have installed Conda on Windows 10, then installed rdkit following here: http://www.rdkit.org/docs/Install.html. When I run conda list at the conda command prompt, I have rdkit in the list: rdkit …
BND
  • 612
  • 1
  • 13
  • 23
2
votes
1 answer

Error MolFromSmiles - RDkit

When i run in python: import rdkit from rdkit import Chem from rdkit.Chem import AllChem mol = Chem.MolFromSmiles('Oc1ccccc1N2C(=O)Nc3cc(ccc23)C(F)(F)F') I get the following error: Boost.Python.ArgumentError: Python argument types…
e7lT2P
  • 1,635
  • 5
  • 31
  • 57
2
votes
0 answers

rdikit installation and import Error

I get this error when I import rdkit. Traceback (most recent call last): File "/home/project/Documents/pycharm-4.0.6/helpers/pycharm/django_manage.py", line 41, in run_module(manage_file, None, '__main__', True) File…
djpy
  • 127
  • 1
  • 10
2
votes
2 answers

how did you install rdkit on heroku

I need to install rdkit in heroku for my heroku app to run. I installed rdkit locally in my laptop by using sudo apt-get install python-rdkit. But when I generated the requirements file using pip freeze , the generated file is not showing the…
anonymous
  • 21
  • 2
1
vote
0 answers

How to reduce size of PyInstaller RDKit executable?

In order to find duplicate chemical structures, I was writing a little Python script using RDKit (Win10, Python3.11.3, without (Ana)Conda). The script seems to work, however, since I want to pass this script to someone who has no Python…
theozh
  • 22,244
  • 5
  • 28
  • 72
1
vote
0 answers

RDKit image MolToImage scales Bond widths and Element Labels inconsistently for different image sizes?

I've noticed that when I create an image from a molecule in RDKit, the size argument leads to inconsistent scaling of the bond width and element labels. The bigger the size, the thinner the lines and the smaller the element labels. I've run a test…
J.Doe
  • 224
  • 1
  • 4
  • 19
1
vote
0 answers

Bond Type of lingands in PDB files all appear as SINGLE

I am learning rdkit. At the moment I want to extract info from the ligand docked in the protein. The problem I face is that the bonds from the ligand are always returned as SINGLE, no matter there actual types, while the bond types of the protein…
vdlmrc
  • 737
  • 5
  • 17
1
vote
1 answer

How to make bond lines thicker with Rdkit

I am using RDkit to draw a molecule in 2D. I am trying to use DrawingOptions.bondLineWidth to control the bond thickness but it doesn't seem to be working (the bond lines remain the same thickness regardless of the value I set it to). Any idea? from…
Julep
  • 760
  • 1
  • 6
  • 18
1
vote
1 answer

how to get indexes and atoms with H from smiles

I am trying to add atom numbers in smiles: from rdkit import Chem mol=Chem.MolFromSmiles('c1ccccc(C(N)=O)1') for i, atom in enumerate(mol.GetAtoms()): atom.SetProp('molAtomMapNumber',str(i)) smi=Chem.MolToSmiles(mol) print(smi) The output…
hal
  • 11
  • 2
1
vote
2 answers

Accessing output of RDKIT Chem.FindAllSubgraphsOfLengthN(mol,n)

I am attempting to use RDKIT Chem.FindAllSubgraphsOfLengthN(mol,n) function but am unable to callout the information from using this function. It runs, but I am unable to obtain the substructures. Does anyone have suggestions on successfully calling…
1
vote
2 answers

How to obtain all n atom fragments (substructures) from a mol file using RDKIT?

I am interested in obtaining fragments, or sub structures, that contain 4 non-hydrogen atoms within a larger molecule. The closest example to accomplishing this is referenced…
1
vote
2 answers

Indexing of strings

I am trying to get an output based on this procedure, which is best to explain with an example. for example in a smile, C(N)(N)CC(N)C, [0, 1, 2, 0, 0, 1, 0] this is the output I am trying to get. It counts the branching (which is…
YZman
  • 47
  • 6
1
vote
0 answers

highlighting smiles features with rdkit

def drawp4core(mol, feats): atoms_list = {} for feat in feats: atom_ids = feat.GetAtomIds() feat_type = feat.GetType() atoms_list[feat_type] = atom_ids return Draw.MolsToGridImage([mol]*len(atoms_list),…
Zayyan Masud
  • 135
  • 1
  • 12
1
vote
1 answer

Problem with automatically-generated SVG display using Cytoscape.js

I'm trying to use Cytoscape.js to create a diagram of chemical reactions generated from student input, but I can't seem to get the images of the molecules to display on each of the nodes. The images I need are automatically generated with…