Hi,
OBMol::GetGIVector considers the following properties:
* graph theoretical distance
* heavy valence
* aromaticity
* ring membership (boolean)
* atomic number
* implicit valence
OBGraphSymPrivate::GetGIVector considers two additional properties:
* heavy bond sum (see graphsym.cpp, I think Noel wrote this?)
* formal charge
The observed behavior is a direct result from these differences.
As a side note, in Helium the client code can specify a custom atom
invariant to use the generic Morgan's extended connectivities algorithm.
Tim
On Fri, Dec 5, 2014 at 5:33 PM, Craig James <cja...@emolecules.com> wrote:
> I found an odd thing with c1ccccc1[N+](=O)[O-]. When I call
> OBMol::GetGIVector(), it says that the two oxygen atoms have the same
> symmetry classes. But OBGraphSym says they're in different symmetry classes.
>
> Why are there two of these? They both seem to do the same thing, but
> slightly differently. The program below produces this:
>
> OBMol Symmetry classes:
> 5 3 1 2 4 6 7 0 0
> OBGraphSym Symmetry classes:
> 6 4 3 5 7 8 9 2 1
>
>
> Craig
>
>
> #include <openbabel/obconversion.h>
> #include <openbabel/mol.h>
> #include <openbabel/graphsym.h>
>
> using namespace std;
> using namespace OpenBabel;
>
> string smi("c1cccnc1[N+](=O)[O-]");
>
> main(int argc, char **argv) {
> OBConversion conv(&cin, &cout);
> conv.SetInAndOutFormats("smi", "sdf");
> OBMol mol;
> conv.ReadString(&mol, smi);
>
> vector<unsigned int> atom_symclasses;
> vector<unsigned int>::iterator ai;
>
> mol.GetGIDVector(atom_symclasses);
> printf("OBMol Symmetry classes:\n");
> for (ai = atom_symclasses.begin(); ai != atom_symclasses.end(); ai++)
> printf(" %d", *ai);
> printf("\n");
>
> OBGraphSym graph_sym = OBGraphSym(&mol);
> graph_sym.GetSymmetry(atom_symclasses);
> printf("OBGraphSym Symmetry classes:\n");
> for (ai = atom_symclasses.begin(); ai != atom_symclasses.end(); ai++)
> printf(" %d", *ai);
> printf("\n");
> }
>
>
>
> ------------------------------------------------------------------------------
> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
> from Actuate! Instantly Supercharge Your Business Reports and Dashboards
> with Interactivity, Sharing, Native Excel Exports, App Integration & more
> Get technology previously reserved for billion-dollar corporations, FREE
>
> http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
> _______________________________________________
> OpenBabel-discuss mailing list
> OpenBabel-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
>
>
------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
_______________________________________________
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss