I presume it's a C++ "static method", what's called a "class method" in
Python. These are methods that don't require an instance of an object, but
that you can call directly. The confusing part is that (in this case) the
return value is an instance of the class.

This approach might seem a bit roundabout, but it's part of the plugin
architecture. We don't know in advance what plugins might be present. The
user can delete some or add their own that we've never seen. So you need to
go looking for a particular plugin when you want it.

Regards,
- Noel

On Wed, 5 Sep 2018 at 17:30, Geoffrey Hutchison <geoff.hutchi...@gmail.com>
wrote:

> > In first line (1) I declare a pointer to OBOp type named pOp and what I
> dont
> > understand is what am I really assigning, is OBOP a namespace? and what
> does
> > this line really do?
>
> OBOp is a general C++ class. There are different types of “Op”s that
> perform operations on molecules. This first line tells Open Babel to find
> the “gen2D” operation (to generate a 2D depiction).
>
> > In second line I pass &mol2 object to method Do, What does this method
> > really do?
>
> Since the code selected the gen2D operation, it generates 2D coordinates
> for the mol2 object.
>
> Hope that helps,
> -Geoff
>
> ---
> Prof. Geoffrey Hutchison
> Department of Chemistry
> University of Pittsburgh
> tel: (412) 648-0492
> email: geo...@pitt.edu
> twitter: @ghutchis
> web: https://hutchison.chem.pitt.edu/
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> OpenBabel-Devel mailing list
> OpenBabel-Devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/openbabel-devel
>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
OpenBabel-Devel mailing list
OpenBabel-Devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-devel

Reply via email to