[Open Babel] generate ObMol from smiles

2013-09-11 Thread Rafel Israels
Dear all, As a new Babel-user first of all I'd like to thank you for this great software !! My question: what is the correct way (in c++) to generate an OBMol object from a smiles-code ? I know how to convert smiles e.g. to inchi directly using a conv->convert(), but I dont see yet how I can get

[Open Babel] generate obMol from smiles

2013-09-13 Thread Rafel Israels
Dear all, As a new Babel-user first of all I'd like to thank you for this great software !! My question: what is the correct way (in c++) to generate an OBMol object from a smiles-code ? I know how to convert smiles e.g. to inchi directly using a conv->convert(), but I dont see yet how I can get

[Open Babel] creating molecules by hand vs. reading from smiles

2013-09-20 Thread Rafel Israels
thank you Craig and Geoff for your answers to my first question. I'm still having problems though, possibly related to the difference between implicit and explicit hydrogens and/or to the less usual atoms that I'm using ? In my code below I create three molecules [Si][Si], [Si]=[Si] and [Si]#[Si

[Open Babel] BOSum() vs Valence

2013-11-07 Thread Rafel Israels
Hello, what would be the correct method to check the consistency of bonds in a molecule ? My first try (below) is wrong: e.g. Aspirin fails this test and if I understand correctly the reason seems that I compare total number of bonds (i.e. counting double bonds twice) with maximum/expected number

Re: [Open Babel] BOSum() vs Valence

2013-11-07 Thread Rafel Israels
> > To find the number of implicit Hs, GetImplicitValence() - GetValence() > > BOSum() -> The sum of the BOs of explicit bonds (otherwise known as > ExplicitValence) > > To find the actual valence: BOSum() + GetImplicitHydrogenCount() > """ > > - Noel &

[Open Babel] BOSum() vs. Valence()

2013-11-09 Thread Rafel Israels
Hello, to check the consistence of bonds in a molecule I tried: FOR_ATOMS_OF_MOL(atom, obMol) if (atom->BOSum() > atom->GetImplicitValence()) return false; return true; But this is wrong: e.g. Aspirin fails this test and if I understand correctly the reason seems that atom->BOSum(

Re: [Open Babel] Problem for compiling the example files

2013-11-19 Thread rafel israels
Hi Nicolas, in my case (also Ubuntu) the problem was that I had to move the -lopenbabel to the end of the line. Seems like your's might be the same problem ? Also I'd recommend to split your command in two, first a compile and then the linking command. That way it's easier to locate problems.

Re: [Open Babel] Isomer generator

2017-01-25 Thread Rafel Israels
Dear Xianghai, to my knowledge the only available tool is OMG, which is based on CDK, not obabel. It is described in the following publication and can be downloaded for free: OMG: Open Molecule Generator (2012) Peironcely et al. Journal of Cheminformatics

Re: [Open Babel] Conformational search

2017-02-28 Thread Rafel Israels
Dear Mohammad, the answer to your first question depends on your situation, e.g.: - what is the origin of your data and how do you use them. For example, if the original data is in pdb format and you can also read/use them as pdb, then there is no reason to convert them into anything els