# Tag Info

10

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 at around that line in the file you will, hopefully, see a misformed record. The next one, "Explicit valence" indicates that the molecule has an atom (...

8

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 the cookbook, the MWE for the Jupyter notebook was from rdkit import Chem from rdkit.Chem.Draw import IPythonConsole from rdkit.Chem import Draw from rdkit.Chem import rdDepictor from rdkit.Chem....

7

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 would need to know your initial format to test this. However, if that doesn't seem to work, you can go from your SMILES to PDB with this snippet: obabel -:'[H]...

7

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 three-letter code. ChemDraw has a name2structure conversion routine understanding these codes. If your institution doesn't have a campus license, the JavaScript ...

7

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 October 2012 Version 3.0 and later implement the Daylight SMILES aromaticity model and have a thoroughly rewritten SMILES code (by Noel). So why do the ...

7

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 should do better than SMILES for many systems, which you can also infer from the title of the corresponding paper: "Self-Referencing Embedded Strings (...

7

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" as an atom). Generally, RDKit just lets you know that it cannot generate the molecule because of an error in the SDF, and then, instead of producing an RDKit ...

6

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-empirical methods, because that would give you the best of both worlds. The calculation will be faster than DFT, and you can use those methods with relatively accurate ...

6

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: pybel._builder.Build(mol.OBMol) mol.addh() ff = pybel._forcefields["mmff94"] success = ff.Setup(mol.OBMol) if not success: ff = pybel._forcefields["uff"] ...

5

Your SMARTS works. To see what a SMARTS finds, it is always a good idea to depict the result. from rdkit import Chem from rdkit.Chem.Draw import IPythonConsole patt = Chem.MolFromSmarts('[CX4;!\$(C(F)(F)F)]') m = Chem.MolFromSmiles('CCC(F)(F)F') m.GetSubstructMatches(patt) m The SMARTS should find all Carbons with 4 connections (implicit Hydrogen count), ...

5

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 .xyz file as you wish. As you mention, reading bond orders from XYZ is imperfect - the file simply doesn't contain them and you have to guess. There is no perfect way to do that. Even a highly accurate algorithm for bond order ...

5

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 the molecule, the nitrogens on index 3 and 6 have none, because they have already three bonds. from rdkit import Chem from rdkit.Chem.Draw import ...

4

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; what this means is it isn't formally part of RDKit, but with a little work can be accessed from RDKit. An example of how to do this is given in an issue on the ...

4

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 only adds the atoms together, it will perform a quick/computational affordable force field optimization with some seed, too. (The seed may be randomized, e.g., ...

3

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 and InChiKey about pyridine: #!/bin/usr/env python3 import rdkit from rdkit import Chem molecule = Chem.MolFromSmiles('n1ccccc1') inchi = str(Chem.MolToInchi(molecule)) inchikey = str(Chem....

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