[Open Babel] Converting xyz file to a SMILES string in C++

2014-04-15 Thread Nicolas Cheron
Hello, I would like to convert a file File.xyz into a SMILES string in a C++ program. I have done the following (I am simplifying): ifstream input("File.xyz"); ostringstream streamOBabel; OpenBabel::OBConversion conv(&input, &streamOBabel); conv.SetInAndOutFormats("XYZ","SMI"); conv.Convert(); st

Re: [Open Babel] Converting xyz file to a SMILES string in C++

2014-04-12 Thread Nicolas Cheron
I had looked, but now deeply enough. With "conv.AddOption("n",OpenBabel::OBConversion::OUTOPTIONS);" it is now working perfectly. Thanks for your help Nicolas 2014-04-12 4:12 GMT-04:00 Noel O'Boyle : > Have you looked at the options for SMILES output? (hint hint :-) > > - Noel > > > On 11 Apri

Re: [Open Babel] Converting xyz file to a SMILES string in C++

2014-04-12 Thread Noel O'Boyle
Have you looked at the options for SMILES output? (hint hint :-) - Noel On 11 April 2014 23:16, Nicolas Cheron wrote: > Hello, > > I would like to convert a file File.xyz into a SMILES string in a C++ > program. I have done the following (I am simplifying): > > ifstream input("File.xyz"); > ost

[Open Babel] Converting xyz file to a SMILES string in C++

2014-04-11 Thread Nicolas Cheron
Hello, I would like to convert a file File.xyz into a SMILES string in a C++ program. I have done the following (I am simplifying): ifstream input("File.xyz"); ostringstream streamOBabel; OpenBabel::OBConversion conv(&input, &streamOBabel); conv.SetInAndOutFormats("XYZ","SMI"); conv.Convert(); st