Hot answers tagged

10 votes

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

Without seeing the SDF itself it's hard to be specific, but here's what the error messages are telling you, in general: the first one normally indicates a badly formed record in the SDF. If you look ...
8 votes

RDkit and PySmiles results differ on some SMILES strings

Speculating a comparison of the outputs by both programs may help, I let RDKit process to SMILES to yield a representation including the atom indices. Derived from ...
  • 1,459
7 votes

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

tldr; That SMILES is invalid This was answered on GitHub by Noel O'Boyle, but I wanted to provide more context. First off, versions: I had to go back and check, but Open Babel 2.3.2 was released in ...
7 votes

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

I think it might be good to have a look at SELFIES by Alan Aspuru-Guzik and co-workers: https://github.com/aspuru-guzik-group/selfies From what I remember from his talk in Girona last December, this ...
  • 751
7 votes

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

As noted by Dr. Landrum, the errors that you are seeing are due to problems in the generation of the original SDF (i.e., improper molecule ending, the atom connectivity, and the use of "Alkyl&...
7 votes
Accepted

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

From reading your comments, and the question, you want to generate optimized structures of small bioactive molecules in solvents, but it has to be fast. I would definitely recommend using semi-...
  • 5,834
7 votes
Accepted

How to convert SMILES to Amino Acids sequence using RDKit

openbabel could also be used to tackle this problem. Convert initial structure to PDB format. I suspect this can be done directly from whatever format you are using for the skeletal structure, but I ...
  • 14.3k
7 votes

How to convert SMILES to Amino Acids sequence using RDKit

Based on your recent comment to want to assemble a protein from scratch, and assuming you want to stick to the naturally occurring $\alpha$-amino acids, I suggest to type the amino acids by their ...
  • 1,459
6 votes
Accepted

Convert SMILES format to Amino Acid masses using RDKit - Cyclopeptides

I'm not sure if it's improper to answer my own question, but I think I've cracked it. For each peptide bond match identified by GetSubstructMatches the index [1] is ...
  • 111
6 votes

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

Your best bet is to keep the molecule (e.g., as a .mol or .sdf file) around and then simply update the coordinates from the <...
6 votes
Accepted

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

My colleague David Koes has a script for this purpose using RDKit rdconf.py A related Open Babel / Pybel script would be globalopt.py, the main portion of which is reproduced below: ...
5 votes
Accepted

RDkit and PySmiles results differ on some SMILES strings

It is a bug in pysmiles. pysmiles has problems with aromatic nitrogen if the SMILES is in aromatic form (lower case) but not if it is kekulized (upper case and double bonds) If we add the hydrogens to ...
  • 411
5 votes
Accepted

Excluding certain sp3-hybridized carbons with SMARTS

Your SMARTS works. To see what a SMARTS finds, it is always a good idea to depict the result. ...
  • 411
4 votes

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

The representation of a molecular structure as SMILES string is a (very) reduced one, often with only implicit hydrogen atoms. Recreating a 3D molecular structure with either OpenBabel or RDKit not ...
  • 1,459
4 votes

How to compute the synthetic accessibility score in Python?

Ertl and Schuffenhauer, who developed the synthetic accessibility score, provide an implementation packaged with RDKit called sascorer.py. This is provided in the Contrib folder of the RDKit repo; ...
  • 14.3k
4 votes

How to obtain fingerprint bits as SMARTS pattern in RDKit

Based on your code and the code found by Geoff. Additionally you have to find the neighbors and change their identity. ...
  • 411
4 votes

How to obtain fingerprint bits as SMARTS pattern in RDKit

I'm not entirely sure I understand your question. You want a SMARTS that matches DrawMorganBit but with an extra * added? If you ...
3 votes

How do you determine substitution patterns using RDKit?

You can get the corresponding indices of the two structures with GenerateDepictionMatching2DStructure. The code was made in a Jupyter notebook. ...
  • 411
3 votes

Change in RDKit's encoding of InChi?

Following @Tyberius suggest, I departed from using Jupyter notebook in favor of the CLI. In contrast of the GitHub gist,* the following script is to report InChi ...
  • 1,459

Only top scored, non community-wiki answers of a minimum length are eligible