On Wed, Jan 27, 2010 at 3:58 AM, Andrew Dalke <[email protected]> wrote:
> On Jan 26, 2010, at 6:55 AM, Greg Landrum wrote:
>> The fingerprinting functions already have version numbers assigned to
>> them. I exposed this information to python this morning:
>> [4]>>> from rdkit.Chem import rdmolops
>>
>> [5]>>> rdmolops.__LayeredFingerprint_version__
>> Out[5] '0.2.1'
>
> Just a note that leading and trailing "__"s are reserved
> for the Python implementation.

For some reason, despite the fact that I've been using Python for more
than 10 years, I cannot retain the rules/conventions for underscores
in my head for more than a week at a time. I need to have the relevant
portions of PEP8 tattooed on my forearm. ;-)

> Removing the trailing "__" should be fine, but why even
> have the leading "__"?

I want something there to prevent the version names from polluting the
module namespaces too much. For example, they shouldn't show up as
options in "normal" command completion operations.

I switched all the version names to a single leading underscore:

[2]>>> rdmolops._LayeredFingerprint_version
Out[2] '0.2.1'

etc.

>
>> That's part of it. The next part is the boost version, which is also
>> now available (see my previous post from this morning):
>>
>> [10]>>> from rdkit import rdBase
>
> Oh! Another note: the docstring from rdbase says
>
>    No user-serviceable parts inside.
>
> ;)

I had already removed that. :-)

>> But all these pieces of information don't really address the
>> compatibility problem: fingerprints between different versions of the
>> RDKit or different boost versions are often, but not always,
>> compatible with each other.
>>
>> For example, the following combinations of versions should give
>> compatible fingerprints:
>> - RDKit 2009Q3_1+boost 1.40; RDKit 2009Q4_1+boost 1.40; RDKit
>> 2009Q3_1+boost 1.41; RDKit 2009Q4_1+boost 1.41
>> These combinations should also be compatible with each other, but not
>> with those above:
>> - RDKit 2009Q3_1+boost 1.39; RDKit 2009Q4_1+boost 1.39; RDKit
>> 2009Q3_1+boost 1.38; RDKit 2009Q4_1+boost 1.38
>
> Ooof. I see your point. But isn't that something to push down
> into the __LayeredFingerprint_version__ string? That is, what's
> the purpose of the version number that's there, if it can't be
> used as a way to test if two fingerprints can be compared?
>
> Perhaps there could be an ugly set of #defines, to get a
> unique number based on the relevant factors?
>
> #if BOOST_VERSION >= 140
>  LayeredFingerprint_version = "1.1"
> #else
>  LayeredFingerprint_version = "1.0"
> #endif
>
> That's doable, but it's going to be ugly and a bit fragile.

It's a topic that deserves a bit of thought. It's clearly not going to
be resolved for this release.

-greg

------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
Rdkit-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Reply via email to