Re: [Rdkit-discuss] Range Error (Better error reporting would be nice)

2011-08-01 Thread Greg Landrum
Hi JP,

On Mon, Aug 1, 2011 at 6:21 PM, JP  wrote:
> When I run the following Set_Protonation_State script
> (using RDKit_2011_03_2)  I get the following unintelligible error.
> Looks like something is not initialised.  Can someone shed some light on
> this?

It's a bug. I'll take a look into it.

-greg

--
BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA
The must-attend event for mobile developers. Connect with experts. 
Get tools for creating Super Apps. See the latest technologies.
Sessions, hands-on labs, demos & much more. Register early & save!
http://p.sf.net/sfu/rim-blackberry-1
___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] Pointing to an example of how to use the reaction stuff (in C++ rdkit)

2011-08-01 Thread Greg Landrum
Dear Hans,

On Sun, Jul 31, 2011 at 1:28 PM, Hans De Winter  wrote:
> Dear all,
>
> I browsed the rdkit-discuss mail archives but couldn't find anything helpful.
>
> I just wanted to have a couple of lines of example code (written in C++, not 
> python!) on how to transform a protonated -COOH group into a deprotonated one 
> -COO[-]. I experimented with the 
> RDKit::RxnSmartsToChemicalReaction("[C:1](=[O:2])[OH:3]>>[C:1](=[O:2])[OH0;-:3]")
>  function, but I get stuck on how to proceed further, e.g. defining the 
> reactants and processing the products.
>
> Any help?

There are a couple of ways to solve this particular problem, the most
flexible of which is certainly using a reaction, as you suggest. About
the only examples for how to use ChemicalReactions from C++ are in the
testing code, but that's not really the best place to learn.

I just added a simple example to the GettingStarted demo that should help:
http://rdkit.svn.sourceforge.net/viewvc/rdkit/trunk/Code/Demos/RDKit/GettingStarted/sample.cpp?revision=1814&view=markup

I would encode your reaction as: "[C:1](=[O:2])[OH:3]>>[C:1](=[O:2])[O-:3]"
Note that each product of the reaction will only have a single
carboxylic acid protonated. You can test if any additional acids are
available by either checking how long the products vector is (the easy
way) or by calling isMoleculeReactantOfReaction() on the product (the
more general way).

I hope this helps,
-greg

Note that using a reaction will only d

--
BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA
The must-attend event for mobile developers. Connect with experts. 
Get tools for creating Super Apps. See the latest technologies.
Sessions, hands-on labs, demos & much more. Register early & save!
http://p.sf.net/sfu/rim-blackberry-1
___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


[Rdkit-discuss] Range Error (Better error reporting would be nice)

2011-08-01 Thread JP
When I run the following Set_Protonation_State script
(using RDKit_2011_03_2)  I get the following unintelligible error.

Looks like something is not initialised.  Can someone shed some light on
this?

Many Thanks.
JP

Range Error
idx
Violation occurred on line 154 in file
/share/apps/RDKit_2011_03_2/Code/GraphMol/ROMol.cpp
Failed Expression: 0 <= 4294967295 <= 28


Traceback (most recent call last):
  File "/home/stuarta/Set_Protonation_State_2.py", line 89, in 
AllChem.Compute2DCoords(reagent1)
RuntimeError: Range Error


temp.smi
Description: application/smil


Set_Protonation_State_2.py
Description: Binary data
--
Got Input?   Slashdot Needs You.
Take our quick survey online.  Come on, we don't ask for help often.
Plus, you'll get a chance to win $100 to spend on ThinkGeek.
http://p.sf.net/sfu/slashdot-survey
___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] confusion matrix

2011-08-01 Thread Paul . Czodrowski
Dear Greg,

> > I have added the code how I generate "my own confusion matrix" to the
Wiki.
> > In my understanding, my function uses the predictions from the
out-of-bag
> > prediction. But I guess that I have overlooked some nasty detail.
>
> You call:
>   pred,conf=cmp.ClassifyExample(pts[i])
> This uses the full composite model to make each prediction, it doesn't
> do the same out-of-bag prediction done by
> ScreenComposite.ShowVoteResults
>
> It is possible to get both the out-of-bag confusion matrix as a python
> object (it's part of the return tuple from
> ScreenComposite.ShowVoteResults) and the breakdown of the out-of-bag
> predictions by point (not quite as straightforward, but possible).
> What exactly are you trying to do?

I'm particularly interested in understanding why the model
fingerprint-based performs rather bad. For this purpose, I would like to
analyze the chemical structures for which the predictions went wrong or did
not go wrong.


>
> > Cheers & Thanks,
> > Paul
> >
> >
> > P.S.: When comparing the results with a PipelinePilot-based Bayesian
> > catagorization model (ECFP_4 & standard settings), I'm surprised to see
> > that the PipelinePilot model is significantly better. I thought that
the
> > MorganFingerprints are comparable to the ECFPs and would have assumed
that
> > the model quality is in a similar range.
>
> It's probably not the fingerprints, but the model-building approach
> that makes the difference here. You can test this if you want in knime
> using the RDKit morgan fingerprints with the naive bayes fingerprint
> learner they added in version 2.4.
Just started a new thread in the knime forum :)

Cheers,
Paul

This message and any attachment are confidential and may be privileged or
otherwise protected from disclosure. If you are not the intended recipient,
you must not copy this message or attachment or disclose the contents to
any other person. If you have received this transmission in error, please
notify the sender immediately and delete the message and any attachment
from your system. Merck KGaA, Darmstadt, Germany and any of its
subsidiaries do not accept liability for any omissions or errors in this
message which may arise as a result of E-Mail-transmission or for damages
resulting from any unauthorized changes of the content of this message and
any attachment thereto. Merck KGaA, Darmstadt, Germany and any of its
subsidiaries do not guarantee that this message is free of viruses and does
not accept liability for any damages caused by any virus transmitted
therewith.

Click http://disclaimer.merck.de to access the German, French, Spanish and
Portuguese versions of this disclaimer.


--
Got Input?   Slashdot Needs You.
Take our quick survey online.  Come on, we don't ask for help often.
Plus, you'll get a chance to win $100 to spend on ThinkGeek.
http://p.sf.net/sfu/slashdot-survey
___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss