Re: [Open Babel] Smiles conversion problems with Ion and Zwitterion

2012-12-05 Thread Miguel Quirós Olozábal
Hello. Yes, an input flag (at least for some input formats like cif or smiles) meaning "please keep hydrogens as they are in the input and do not add or remove hydrogens even if you think that they may be missing or wrong" will surely help. Best wishes, Miguel Quirós El mié, 05-12-2012 a las 09:

Re: [Open Babel] Smiles conversion problems with Ion and Zwitterion

2012-12-05 Thread Noel O'Boyle
I think the underlying problem is that the current aromaticity code is optimized for the situation where the location of hydrogens is unknown. This is useful for PDB files, but in the general case, it is solving a more difficult problem than we need to. I'm not 100% sure of the interaction between

Re: [Open Babel] Smiles conversion problems with Ion and Zwitterion

2012-12-04 Thread Miguel Quirós Olozábal
Hello, I am using openbabel to convert the CIFs of the Crystallography Open Database to SMILES and subsequently perform substructure searches. I have pointed out several times in this forum the problems that I am finding in such conversions and searches, many of them similar to that your are hintin

Re: [Open Babel] Smiles conversion problems with Ion and Zwitterion

2012-12-04 Thread Scott McKechnie
Apologies, it was attached in the e-mail before last but had an identifier name (SOXGES.search2.cif) and so may have caused confusion. I've attached it again in this e-mail. As a general question, is it possible to convert coordinates to smiles that will always preserve the elements present (but m

Re: [Open Babel] Smiles conversion problems with Ion and Zwitterion

2012-12-04 Thread Chris Morley
Your problem is the incorrect conversion of a cif file, but you haven't shown one yet. (Not that I know much about cif files, but others may.) Conversions in OB go through an internal data structure, OBMol. It sound like the problem is in the cif to OBMol part, not in the OBMol to SMILES. Chris

Re: [Open Babel] Smiles conversion problems with Ion and Zwitterion

2012-12-04 Thread Scott McKechnie
Thanks Chris for the helpful comments. Sorry to keep on but I'm still left with the problem on going from cif to smiles where the original number of elements is not conserved. What I want is to be able to reliably represent the original cif molecule as a smiles string and from there recreate the mo

Re: [Open Babel] Smiles conversion problems with Ion and Zwitterion

2012-12-04 Thread Chris Morley
Scott Your "correct smiles" is not right. The sum of the bond orders to the charged nitrogen should be 4, and is only 3 (it has no H attached). The correct SMILES is in my post below. Even with it, the round trip via xyz: obabel -:"C(=O)(O)C[C@@H](C(=O)[O-])n1c[nH+]cc1" -oxyz --gen3D | obabel -

Re: [Open Babel] Smiles conversion problems with Ion and Zwitterion

2012-12-04 Thread Scott McKechnie
Hi Chris, Thanks for your reply and apologies for the delayed response. Converting the cif to xyz and viewing the molecule shows the correct structure but converting the xyz file to smi and then generating coordinates and viewing shows the addition of a H atom. The correct smiles is: C(=O)(O)C[C@

Re: [Open Babel] Smiles conversion problems with Ion and Zwitterion

2012-11-30 Thread Chris Morley
On 30/11/2012 12:03, scott_m wrote: > Dear all, > > The conversion of (S)-3-carboxy-2-(imidazol-3-ium-1-yl)propanoate from a > .cif file to .smi and subsequent generation of coordinates from the .smi > file results in the addition of an extra H to one of the ring C atoms. The > original cif formula