Hi Noel,

thank you, that's very helpful.
That document is the first stop when I'm migrating stuff, but I completely 
missed the concept, since I was looking for an explicit mention of that 
function. Although, from what's written there, I assumed that:

 OBMol.UnsetFlag(OB_PH_CORRECTED_MOL)

wold now become:

 OBMol.SetFlag(OB_PH_CORRECTED_MOL, False)

But this does not seem to work, at least in Python, suggesting that SetFlag() 
takes still only a single argument. Any clues?

Besides, I am suspecting this API change might be behind the serious issue of 
the nitrogens with 5 bonds. I've tried reproducing it with two versions of 
obabel, 2.4.1 and 3.1.0, and the results are attached. Same thing with Python, 
when testing the code I'm porting from 2 to 3, I noticed the regression is 
there, too.

This is a major showstopper for us, so if there's a way to fix it or work 
around it, I'll be happy to know.

Thanks,

S



On 9/16/21 12:51 AM, Noel O'Boyle wrote:
Hi Stefano,

Most of the changes in 3.0 are described at 
https://open-babel.readthedocs.io/en/latest/UseTheLibrary/migration.html#molecule-atom-and-bond-flags
 
<https://open-babel.readthedocs.io/en/latest/UseTheLibrary/migration.html#molecule-atom-and-bond-flags>.
 In short, OBMol::SetPartialChargesPerceived(false). The rationale for this change is 
described at https://github.com/openbabel/openbabel/pull/1951 
<https://github.com/openbabel/openbabel/pull/1951>.

Regards,
Noel


On Wed, 15 Sept 2021 at 18:11, Stefano Forli <fo...@scripps.edu 
<mailto:fo...@scripps.edu>> wrote:

    Hi,

    I'm cleaning up some of our code that was written for v.2 and I found 
something I don't know how to port to the new version.
    When assigning Gasteiger charges, it was possible to force the 
recalculation from scratch for molecules that already had charges by using the 
method OBMol::UnsetPartialChargesPerceived()

    The method is still listed in the comments in molchrg.cpp, but it's not in 
the OBMol anymore.
    I've tried looking for alternatives, possibly using the OBMol::UnsetFlag() 
method, but no luck.

    Any suggestions?

    Thank you!

    S


--
       Stefano Forli, PhD

       Associate Professor
       Dept. of Integrative Structural
       and Computational Biology, MB-112A
       Scripps Research
       10550  North Torrey Pines Road
       La Jolla,  CA 92037-1000,  USA.

          tel: +1 (858)784-2055
          email: fo...@scripps.edu <mailto:fo...@scripps.edu>
    https://forlilab.org <https://forlilab.org>


    _______________________________________________
    OpenBabel-discuss mailing list
    OpenBabel-discuss@lists.sourceforge.net 
<mailto:OpenBabel-discuss@lists.sourceforge.net>
    https://lists.sourceforge.net/lists/listinfo/openbabel-discuss 
<https://lists.sourceforge.net/lists/listinfo/openbabel-discuss>


--

 Stefano Forli, PhD

 Associate Professor
 Dept. of Integrative Structural
 and Computational Biology, MB-112A
 Scripps Research
 10550  North Torrey Pines Road
 La Jolla,  CA 92037-1000,  USA.

    tel: +1 (858)784-2055
    email: fo...@scripps.edu
    https://forlilab.org

Attachment: ammonium_OB2.mol2
Description: chemical/mol2

Attachment: ammonium_OB3.mol2
Description: chemical/mol2

Attachment: ammonium.xyz
Description: Xmol XYZ data

_______________________________________________
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss

Reply via email to