Questions tagged [rdkit]

Questions about using RDKit in matter modeling workflows.

Filter by
Sorted by
Tagged with
6 votes
3 answers
180 views

Cannot draw resonance structure (kekule forms) of a molecule in RDKit

I am having trouble getting the SMILES strings and drawings of the different resonance structutes of a molecule with RDKit. I found an old example online doing this but it doesn't seem to work with ...
Njw96's user avatar
  • 191
5 votes
1 answer
361 views

Valence correction by adding formal charge in RDKit

I am modeling molecules as graphs, with nodes as atom types and edges as bond types (single, double, triple). I do not model formal charges or hydrogens explicitly (only heavy atoms). When trying to ...
Njw96's user avatar
  • 191
4 votes
1 answer
209 views

Pymatgen structure to rdkit molecule

Context I am trying to convert a pymatgen bonded structure, such as one generated by CrystalNN to an rdkit molecule. So I obtain the pymatgen bonded structure with ...
R Walser's user avatar
  • 243
3 votes
1 answer
112 views

SMILES structure of molecule giving error while converting into embedded representation or conformations

I am trying to compute the bond angles of all the pairs of bond in a set of molecule from Colontrix dataset. Some of the molecules are showing up error when I am implementing the following.The error ...
Formal_this's user avatar
5 votes
1 answer
115 views

Undefined stereochemistry in rdkit from mol2

I am about to generate topology from a rdkit mol object with a conformer for a molecule in mol2 format, but receive the error this mol object has 'UndefinedStereochemistry'. As I am from computer ...
Suice May's user avatar
7 votes
1 answer
491 views

How to create a molecular graph from smiles representation

I am trying to create a molecular graph from SMILES representation of molecules on pytorch using rdkit. The following molecule of caffeine is to be modelled. Here we see the molecule with bond lengths ...
Formal_this's user avatar
5 votes
1 answer
287 views

Unexpected atoms while working with XYZ files in rdkit

I am processing some XYZ files using the rdkit library in python. I came across some strange/unexpected behaviour. Consider a sample XYZ file of methanol with ...
Vandan Revanur's user avatar
3 votes
0 answers
152 views

Is it possible to convert the smiles to XYZ file after getting bond distance matrix as in link attached

Rdkit: How can I get a weighted adjacency matrix where the weights are bond lengths, from the SMILES of my molecule? The above link is code to get bond length matrix from smiles. Now are we able to ...
sriram's user avatar
  • 151
4 votes
1 answer
237 views

Should this phenolic hydroxyl be rotatable?

Looking at nelfinavir, I get variable results from different compchem packages on whether the phenol hydroxyl oxygen should be rotatable (SP3) or non-rotatable (SP2). Which one is it? Feasibly, there ...
lewiso1's user avatar
  • 926
4 votes
1 answer
121 views

How to find topographic distance of molecule from mol format

I have written this code using RdKit to find topographic distance ...
sriram's user avatar
  • 151
2 votes
0 answers
56 views

Program for distance matrix using Rdkit [duplicate]

How to find the matrix of Bond lengths between atoms in an hydrogen depleted molecule given the smiles with explicit hydrogen=true. Also how to find the geometric distance between atoms in an ...
sriram's user avatar
  • 151
4 votes
1 answer
119 views

How to create png files of right angle Lewis notation

I've recently begun experimenting with drawing molecules from smiles expressions for use in an educational website. I am looking for a way to create simple structural representations of various ...
Dr Acme Isme's user avatar
4 votes
1 answer
319 views

How to do SMARTS reaction substructure mapping with RDKit

I have been trying to use the RDKit's reaction substructure matching for some time. I want to match all reactions where a C-H bond is being broken to form a new C-C bond. This is my code: ...
S R Maiti's user avatar
  • 6,436
6 votes
1 answer
285 views

Rdkit: How can I get a weighted adjacency matrix where the weights are bond lengths, from the SMILES of my molecule?

Given the SMILES of my molecule, how can I get a weighted adjacency matrix where the weights are the bond lengths, using the Rdkit package and Python?
sriram's user avatar
  • 151
6 votes
2 answers
744 views

How to obtain fingerprint bits as SMARTS pattern in RDKit

I am using RDKit to generate Morgan Fingerprints (similar to ECFP) and then obtaining the bit information. I need the bit information in order to generate a statistics of substructures for each ...
S R Maiti's user avatar
  • 6,436
5 votes
1 answer
320 views

How do you determine substitution patterns using RDKit?

So I have a list of molecules. They all have a common substructure, but different substitution patterns. For example, in the figure below, the leftmost molecule is the base, and the center and ...
Farshud Sorourifar's user avatar
5 votes
1 answer
245 views

Convert SMILES format to Amino Acid masses using RDKit - Cyclopeptides

This is a variation of a question asked on October 30, 2021 here, but it is different enough that I think it warrants a new post. I'm also trying to use RDKit. Is it possible to convert a SMILES ...
CCranney's user avatar
  • 121
9 votes
1 answer
2k views

How to compute the synthetic accessibility score in Python?

I come from a mainly computer science background, but have become involved in a project related to artificial intelligence-based drug discovery. I made a model that generates novel molecules, for ...
user avatar
11 votes
2 answers
4k views

How to input 3D coordinates from xyz file and connectivity from SMILES in rdkit?

I am working on a QSAR project where the 3D structural descriptors are an input to a machine learning model. I am generating the descriptors using the python Mordred API (which uses rdkit). ...
S R Maiti's user avatar
  • 6,436
11 votes
2 answers
1k views

How to convert SMILES to Amino Acids sequence using RDKit

I have the following SMILES, wrapped in Python RDKit: ...
neversaint's user avatar
5 votes
1 answer
638 views

Change in RDKit's encoding of InChi?

Using RDKit (2020.09.5) I would like to assign InChi to molecules expressed as SMILES and fail to replicate this GitHub gist for initial training written about 2 years ago (RDKit 2019.03.2). I would ...
Buttonwood's user avatar
  • 1,579
8 votes
2 answers
1k views

RDkit and PySmiles results differ on some SMILES strings

I recently started using both pysmiles and RDkit to parse SMILES strings into molecules. ...
nir shahar's user avatar
4 votes
0 answers
73 views

RDkit parse zero-order bonds (python) [closed]

I'm a computer scientist, helping with a chemistry project in python. I have been working with the library pysmiles in order to parse ...
nir shahar's user avatar
11 votes
2 answers
354 views

How to canonicalize SMILES written with aromatic bond symbols (:)?

I am using a package called PySmiles and it is returning a dialect of SMILES for aromatic groups that uses aromatic bond symbols e.g. NC:1:N:N:C:[N]1N. RDKit does ...
Cody Aldaz's user avatar
  • 7,937
9 votes
1 answer
152 views

Excluding certain sp3-hybridized carbons with SMARTS

Let's say I have a compound shown above (SMILES: CCC(F)(F)F), and I want to exclude the trifluoromethyl group with SMARTS, how would I do that? I have tried ...
Theophylline's user avatar
10 votes
1 answer
559 views

Computing optimized 3D structures in python that take solvent into account

I have been using RDKit to generate 3D coordinates, cleaning-up the structures using a general-purpose force field as follows: ...
jjkow's user avatar
  • 103
10 votes
1 answer
1k views

Using OpenBabel or RDKIT Python API to generate conformers from a SMILES string

I have a bunch of monomers in the form of SMILES string and I want to generate conformers from them. At the moment, I am using RDKit to convert these SMILES strings to .sdf files, then using ...
megamence's user avatar
  • 4,141
11 votes
0 answers
149 views

Bioisosteric replacement using SMARTS (KNIME and RDKit) [closed]

I am trying to create a KNIME workflow that would accept a list of compounds and carry out bioisosteric replacements (we will use the following example here: carboxylic acid to tetrazole) ...
Antoine Lacour's user avatar
10 votes
2 answers
2k views

RDkit: While converting a *.sdf file to fingerprint, I'm facing several errors

suppl = Chem.SDMolSupplier('1.sdf') for mol in suppl: if mol is None: continue # print(mol.GetNumAtoms()) fps = [Chem.RDKFingerprint(x) for x in supply] I am ...
Protima Rani Paul's user avatar