Dear Greg,
I am very sorry - I have found the problem: the code is inside the loop and
pointer have been deleted after push_back into vector and for this reason
pointer in vector was not valid any more....

Regards,
Evgueni

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

> Hi Evgueni,
>
> On Wed, Feb 10, 2010 at 11:02 AM, Evgueni Kolossov <ekolos...@gmail.com>
> wrote:
> > Dear Greg,
> >
> > I just cannot understand what's going on - please take a look below:
> >
> > std::string strSmiles = "[*]CCCC";
> > RDKit::RWMol *fragMol = new RDKit::RWMol();
> > fragMol = RDKit::SmilesToMol(strSmiles);
> > RDKit::ROMOL_SPTR msp((RDKit::ROMol *)fragMol);
> >
> > //TESTING
> > std::string strTest = RDKit::MolToSmiles(*msp.get());
> > //TEST RESULT: strTest is the same as strSmiles
> >
> >    RDKit::MOL_SPTR_VECT m_vF;
> >    m_vF.push_back(msp);
> >
> > //TESTING
> > std::string strTest2 = RDKit::MolToSmiles(*m_vF[0].get());
> > //TEST RESULT: EXCEPTION
> >
> > Can you help please!!!!!!
> >
>
> The code above looks fine to me. To test, I compiled it and ran it
> just now and everything worked without problems. Does the exact code
> above lead to an exception when you run it? If so, please let me know
> operating system and compiler version so we can start trying to track
> it down.
>
> -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
------------------------------------------------------------------------------
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
_______________________________________________
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Reply via email to