[Open Babel] using FastSearch class with Python

2010-11-23 Thread Floriane Montanari
Hi, My request is gonna be very similar to this one in the Mail Archive . I am working on a project completely similar to the one of Mikko Kasanen, the difference being that we are using the Python API for our codi

[Open Babel] Openbabel - RDKit interoperability... Valency problem when generating SMILES string

2010-11-23 Thread JP
Hi there @OpenBabel and Greg I am using OpenBabel 2.3.0 and RDKit 201009 release and trying to get them if not work together at least live peacefully :) So I have a mol file coming from the pdb Astex Diverse Set (1hww.mol). I convert this to a smiles string using Openbabel babel -xn 1hww.mol 1h

Re: [Open Babel] Openbabel - RDKit interoperability... Valency problem when generating SMILES string

2010-11-23 Thread Noel O'Boyle
The mol file has a nitrogen with 4 hydrogens, but the nitrogen does not have a positive charge. This is messed up. Either the nitrogen has only 3 hydrogens (which is probably correct) or it has 4 and a positive charge. The SMILES string from OpenBabel represents this MOL file accurately, but OpenB

Re: [Open Babel] Openbabel - RDKit interoperability... Valency problem when generating SMILES string

2010-11-23 Thread Noel O'Boyle
Sorry, I should have said not "hydrogens" but "bonds". On 23 November 2010 10:25, Noel O'Boyle wrote: > The mol file has a nitrogen with 4 hydrogens, but the nitrogen does > not have a positive charge. This is messed up. Either the nitrogen has > only 3 hydrogens (which is probably correct) or it

Re: [Open Babel] Openbabel - RDKit interoperability... Valency problem when generating SMILES string

2010-11-23 Thread Greg Landrum
JP, Noel's summary below is, in my opinion, dead on: The molfile has problems: 1) there's a 4 coordinate neutral nitrogen 2) it's missing the "M END" line (maybe it's also missing the M CHG line that would fix the nitrogen?) OpenBabel takes the bad mol file and, faithfully, generates a SMILES t

Re: [Open Babel] Openbabel - RDKit interoperability... Valency problem when generating SMILES string

2010-11-23 Thread JP
Thanks Noel, Greg... Its always difficult to decide on what to do: should something wrong be parsed leniently or should it fail with error. Its a philsophical debate as well as technical one. This argument comes up often enough with things like malformed XML - should the parser fail with an erro