Dear all,
I am working with a program (in C++) which has its own way of dealing
with atoms and molecules. I would like to use the OpenBabel library to
assign types to atoms. For now, when I need to do it I write a .xyz
file and then read it in an OBMol object and assign the types.
This works,
Never written something like this, but briefly looking at some code in
openbabel for reading molecules, you should do
atom = obMol.NewAtom();
At the beginning of each loop. Your code looks like it is just due referencing
an unset pointer, so no surprise it segfaults.
You maybe also have to do