[Rdkit-discuss] MOL_SPTR_VECT

2010-02-04 Thread Evgueni Kolossov
Hi Greg,

I have a vector RDKit::MOL_SPTR_VECT m_vF.
Vector is populated Ok.
Now i am trying to get mols from this vector:
nCount = 0;
RDKit::ROMol *fMol = new RDKit::ROMol(*m_vF[nCount]);

This will compile OK but will throw an exception on execution in
T * operator-> () const
{
 BOOST_ASSERT(px != 0);
 return px;
}
which called from ROMol::initFromOther()

Can you please suggest what is wrong with vector elements access by this
way?

Regards,
Evgueni
--
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
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


[Rdkit-discuss] ANN: Chemistry Toolkit Rosetta

2010-02-04 Thread Andrew Dalke
Hi all,

  I've started a new project called "Chemistry Toolkit Rosetta", or "CTR" for 
short.

http://ctr.wikia.com/

  It's a collection of software problems related to cheminformatics, with 
implementations in different languages and with different toolkits. Right now 
most of them are in Python, mostly because that's what the contributors know 
best. Most of them have solutions with the OpenEye libraries since that's what 
I know best, but there are some with solutions in OEChem/Pybel, RDKit, and CDK.

  With your contribution there can be even more.

  The idea comes from the Rosetta Code project, and is meant as a place to 
compare how the different toolkits handle a problem. If you know how one 
toolkit works then this could be a start for understanding how a different 
toolkit works. Or perhaps you have to choose a toolkit and want some details on 
how they compare code-wise. Or perhaps you're writing the next generation 
cheminformatics API and you want to makes sure it's more elegant, for various 
definitions of elegant, than what exists.

  I've started using with RDKit for a few things, but it's slow going trying to 
understand how it all fits together. That's after all why I started this 
project. What that means is I'm hoping people here will contribute RDKit 
solutions, or improve the ones that exist.

  For that matter, if you have an idea for new coding tasks then go ahead and 
add one. But do bear in mind that CTR is meant as a way to compare different 
toolkits on the same task. RDKit has features like PubMed searching and machine 
learning algorithms which no other toolkit has, so a task based on those 
wouldn't be that useful to others.

  On the other hand, if you wanted to elaborate on how to use RDKit-specific 
features, I'm sure others would appreciated a writeup of it.

  Cheers!

Andrew
da...@dalkescientific.com



--
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
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] MOL_SPTR_VECT

2010-02-04 Thread Greg Landrum
Hi Evgueni,

On Thu, Feb 4, 2010 at 5:25 PM, Evgueni Kolossov  wrote:
>
>
> I have a vector RDKit::MOL_SPTR_VECT m_vF.
> Vector is populated Ok.
> Now i am trying to get mols from this vector:
> nCount = 0;
> RDKit::ROMol *fMol = new RDKit::ROMol(*m_vF[nCount]);
>
> This will compile OK but will throw an exception on execution in
> T * operator-> () const
> {
>  BOOST_ASSERT(px != 0);
>  return px;
> }
> which called from ROMol::initFromOther()
>
> Can you please suggest what is wrong with vector elements access by this
> way?

There's nothing in principle wrong with it. Here's a little sample I
just did that works without problems:
  {
RWMol *m=new RWMol();
m->addAtom(new Atom(6));
m->addAtom(new Atom(6));
m->addBond(0,1,Bond::SINGLE);
ROMOL_SPTR msp((ROMol *)m);
RDKit::MOL_SPTR_VECT m_vF;
m_vF.push_back(msp);

ROMol *nm = new ROMol(*m_vF[0]);
  }

are you 100% certain that the molecules in your vector are ok? You
could test like this:

nCount = 0;
RDKit::ROMol *tMol = m_vF[nCount].get();
tMol->debugMol(std::cerr);

-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
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss