Dear Greg,

Thank you very much for quick answer.
I think the problem is in the copying from one vector to another:
 for (unsigned int i=9; i < m_vF.size(); i++)
      vNew.push_back(m_vF[i]);

Can this corrupt the content of new vector?

Regards,
Evgueni

On 5 February 2010 05:13, Greg Landrum <greg.land...@gmail.com> wrote:

> Hi Evgueni,
>
> On Thu, Feb 4, 2010 at 5:25 PM, Evgueni Kolossov <ekolos...@gmail.com>
> 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
>



-- 
Dr. Evgueni Kolossov (PhD)
ekolos...@gmail.com
Scientific Software Solutions Ltd.
www.scisoftpro.com
Tel.   +44(0)1628 647 333
Mob. +44(0)7812070446
------------------------------------------------------------------------------
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

Reply via email to