The fix is at Line 183 in obconversion.cpp: - static string title(_title); //potential problems in calling code with multiple molecules! + static string title; //static because returning a pointer to it + title =_title; //now assigned; previously initialized which caused problems with multiple mols
I haven't committed it yet (my git setup is in a tangle at the moment). Chris On 16/07/2013 09:48, Noel O'Boyle wrote: > $ grep append `/usr/bin/find . | grep .cpp` > .... > ./src/transform.cpp: itr = pOptions->find("append"); //Appends values of > desc > riptors or properties to title > ./src/transform.cpp:"--append <list> Append properties or descriptors in list > to > title:\n" > > We're on github if you want to submit a patch for review. Better be > quick though before Chris fixes it! :-) > > - Noel > > > On 15 July 2013 22:27, Jeff Janes <jeff.ja...@gmail.com> wrote: >> I have an sdf file which has a property that is sometimes multiple lines. >> >> When I try to output that property in the title, something very >> strange happens. The title for the first molecule with a multi-lined >> property gets memorized, and then that title gets output for all >> subsequent molecules which also have a multi-lined property. >> >> I don't know what should happen with multiple line properties, but >> surely it is not this. :) >> >> The attempted behavior of joining the lines with a space seems like a >> reasonable behavior, but then it should do that for every molecule, >> not replace the title of subsequent molecules with the title of the >> first afflicted molecule. >> >> >> I've constructed a sdf file, attached, to demonstrate this. >> >> obabel -isdf obabel_test.sdf -ocan --append ' foo1 foo2' >> C 1 A >> CC 2 B B >> CCC 3 C >> CCCC 2 B B >> CCCCC 5 E >> CCCCCC 6 F >> >> The title for butane should be "4 D D", not "2 B B" >> >> This is version 2.3.2. >> >> Any idea what is going on? If I want to dig into the source code >> myself, where should I start? >> >> Cheers, >> >> Jeff >> >> ------------------------------------------------------------------------------ >> See everything from the browser to the database with AppDynamics >> Get end-to-end visibility with application monitoring from AppDynamics >> Isolate bottlenecks and diagnose root cause in seconds. >> Start your free trial of AppDynamics Pro today! >> http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk >> _______________________________________________ >> OpenBabel-discuss mailing list >> OpenBabel-discuss@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/openbabel-discuss >> > > ------------------------------------------------------------------------------ > See everything from the browser to the database with AppDynamics > Get end-to-end visibility with application monitoring from AppDynamics > Isolate bottlenecks and diagnose root cause in seconds. > Start your free trial of AppDynamics Pro today! > http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk > _______________________________________________ > OpenBabel-discuss mailing list > OpenBabel-discuss@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/openbabel-discuss > ------------------------------------------------------------------------------ See everything from the browser to the database with AppDynamics Get end-to-end visibility with application monitoring from AppDynamics Isolate bottlenecks and diagnose root cause in seconds. Start your free trial of AppDynamics Pro today! http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk _______________________________________________ OpenBabel-discuss mailing list OpenBabel-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbabel-discuss