Re: [Rdkit-discuss] Developing on Visual C++

2009-02-21 Thread George Oakman

Hi,

 

Thanks for trying with gcc. 

 

When I compile and link with bjam and toolset=msvc it works for me too, but it 
is when I try to complie using the build process integrated with Visual C++ 
Express that I get the runtime error.

 

It would be very kind if you could let me have your command line for compiling 
and linking with gcc, this might help me turn the right options on on Visual 
C++.

 

Thanks a lot.

 

George.


 
 Subject: Re: [Rdkit-discuss] Developing on Visual C++
 From: ig...@helix.nih.gov
 To: oakm...@hotmail.com
 CC: rdkit-discuss@lists.sourceforge.net
 Date: Fri, 20 Feb 2009 12:07:17 -0500
 
 George,
 
 I compiled your example with gcc, everything works fine there.
 
 
 Igor
 
 On Fri, 2009-02-20 at 16:25 +, George Oakman wrote:
  Hi all,
  
  I am trying to write a piece of C++ code with the RDKit C++ library
  (I'm using Visual C++ Express edition as the development environment).
  
  Thank you very much for the GettingStarted example in C++, that works
  fine. I can compile the GettingStarted example using bjam very well,
  so I guess this is good news.
  
  I am now trying to create a proper Visual C++ project (WIN32 console
  app) and compile via the Build process on Visual C++. So far so good,
  I have a mini program that compiles and outputs a Hello RDKit using
  BOOST_LOG:
  
  #include stdio.h
  #include GraphMol/RDKitBase.h
  #include RDGeneral/RDLog.h
  using namespace RDKit;
  int main(int argc, char *argv[])
  {
  RDLog::InitLogs();
  BOOST_LOG(rdInfoLog) Hello RDKit std::endl; 
  return 0;
  }
  
  This is a Win32 Console Application, that I link with libRDGeneral.lib
  libGraphMol.lib libRDGeometry.lib
  
  The piece of code above executes fine (although I receive the
  following warning at link time: warning LNK4098: defaultlib 'MSVCRT'
  conflicts with use of other libs; use /NODEFAULTLIB:library).
  
  Things start breaking when I try to create a molecule object with
  RWMol *mol=new RWMol(); 
  
  #include stdio.h
  #include GraphMol/RDKitBase.h
  #include RDGeneral/RDLog.h
  using namespace RDKit;
  int main(int argc, char *argv[])
  {
  RDLog::InitLogs();
  RWMol *mol=new RWMol(); 
  BOOST_LOG(rdInfoLog) Hello RDKit std::endl; 
  return 0;
  }
  
  This piece of code compiles and links well (same warning as before)
  but, at runtime, I receive a 'buffer overflow' on line 28 in RWMol.h:
  
  RWMol() { d_partialBonds.clear(); }
  
  
  Am I missing something obvious?
  
  Sorry, I know you are not really supporting VC++ and prefer the
  boost.build/bjam framework, but maybe someone else is developing using
  Visual C++ projects and could help me.
  
  Thanks for your help,
  
  George.
  
  
  
  
  
  
  
  
  
  
  __
  Beyond Hotmail - see what else you can do with Windows Live Find out
  more!
  --
  Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
  -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
  -Strategies to boost innovation and cut costs with open source participation
  -Receive a $600 discount off the registration fee with the source code: SFAD
  http://p.sf.net/sfu/XcvMzF8H
  ___ Rdkit-discuss mailing list 
  Rdkit-discuss@lists.sourceforge.net 
  https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
 

_
Twice the fun—Share photos while you chat with Windows Live Messenger. Learn 
more.
http://www.microsoft.com/uk/windows/windowslive/products/messenger.aspx

Re: [Rdkit-discuss] Optimizing SSS in the RDKit

2009-02-21 Thread Andrew Dalke

On Feb 17, 2009, at 8:30 PM, Andrew Dalke wrote:

Thanks for the link. I've read [Andrew Smellie's] paper now. It's very
nicely written, clear, with good background, description,
and results,

  ...

Andrew Smellie didn't take what I thought would be
the obvious next step and use a trie (probably a
Patricia trie) to store things.

  ...

Now I want to try it out! :)


I made a first pass implementation of my trie idea using
Python.  It's attached. My quick summary is:


fingerprint   size of  time for  size of  time for  time for
   size bits bits trie trie  trie (no hits)
===   ===    ===    
  9883714 MB 0.05s59 MB0.6s  0.04s
 19881928 MB 0.09s   105 MB0.7s  0.07s

Based on the paper, it seems his C code requires about
160 MB for 200,000 compounds so there's a clear savings
due to at least one of the two memory savings techniques
I tried.

I expect faster performance for the regular  based
screens if I were to do the test directly in C. I'm
guessing a factor of 3.

I expect an even better performance increase and reduced
memory use were I to rewrite the trie in C. There I
expect about 10x-30x performance, which brings them
to the same times. But that's a scientific wild-ass guess.

There's no real conclusion you can draw from these numbers
other than that I've managed to save a lot of memory and
that this is an avenue worth considering.



Andrew
da...@dalkescientific.com





Re: [Rdkit-discuss] Developing on Visual C++

2009-02-21 Thread Igor Filippov [Contr]
George,

Sure, here it is (I named your file t.cpp):
g++ -c -I ../rdkit-svn/Code -I ../rdkit-svn/External/vflib-2.0/include/
-I ../boost_1_37_0 t.cpp

export LD_LIBRARY_PATH=../rdkit-svn/bin/

g++ -o t t.o -L ../rdkit-svn/bin/ -lRDGeneral -lGraphMol -lRDGeometry 

 ./t
[12:37:07]  Hello RDKit 

Hope this helps,
Igor


On Sat, 2009-02-21 at 09:13 +, George Oakman wrote:
 Hi,
  
 Thanks for trying with gcc. 
  
 When I compile and link with bjam and toolset=msvc it works for me
 too, but it is when I try to complie using the build process
 integrated with Visual C++ Express that I get the runtime error.
  
 It would be very kind if you could let me have your command line for
 compiling and linking with gcc, this might help me turn the right
 options on on Visual C++.
  
 Thanks a lot.
  
 George.
 
  
  Subject: Re: [Rdkit-discuss] Developing on Visual C++
  From: ig...@helix.nih.gov
  To: oakm...@hotmail.com
  CC: rdkit-discuss@lists.sourceforge.net
  Date: Fri, 20 Feb 2009 12:07:17 -0500
  
  George,
  
  I compiled your example with gcc, everything works fine there.
  
  
  Igor
  
  On Fri, 2009-02-20 at 16:25 +, George Oakman wrote:
   Hi all,
   
   I am trying to write a piece of C++ code with the RDKit C++
 library
   (I'm using Visual C++ Express edition as the development
 environment).
   
   Thank you very much for the GettingStarted example in C++, that
 works
   fine. I can compile the GettingStarted example using bjam very
 well,
   so I guess this is good news.
   
   I am now trying to create a proper Visual C++ project (WIN32
 console
   app) and compile via the Build process on Visual C++. So far so
 good,
   I have a mini program that compiles and outputs a Hello RDKit
 using
   BOOST_LOG:
   
   #include stdio.h
   #include GraphMol/RDKitBase.h
   #include RDGeneral/RDLog.h
   using namespace RDKit;
   int main(int argc, char *argv[])
   {
   RDLog::InitLogs();
   BOOST_LOG(rdInfoLog) Hello RDKit std::endl; 
   return 0;
   }
   
   This is a Win32 Console Application, that I link with
 libRDGeneral.lib
   libGraphMol.lib libRDGeometry.lib
   
   The piece of code above executes fine (although I receive the
   following warning at link time: warning LNK4098: defaultlib
 'MSVCRT'
   conflicts with use of other libs; use /NODEFAULTLIB:library).
   
   Things start breaking when I try to create a molecule object with
   RWMol *mol=new RWMol(); 
   
   #include stdio.h
   #include GraphMol/RDKitBase.h
   #include RDGeneral/RDLog.h
   using namespace RDKit;
   int main(int argc, char *argv[])
   {
   RDLog::InitLogs();
   RWMol *mol=new RWMol(); 
   BOOST_LOG(rdInfoLog) Hello RDKit std::endl; 
   return 0;
   }
   
   This piece of code compiles and links well (same warning as
 before)
   but, at runtime, I receive a 'buffer overflow' on line 28 in
 RWMol.h:
   
   RWMol() { d_partialBonds.clear(); }
   
   
   Am I missing something obvious?
   
   Sorry, I know you are not really supporting VC++ and prefer the
   boost.build/bjam framework, but maybe someone else is developing
 using
   Visual C++ projects and could help me.
   
   Thanks for your help,
   
   George.
   
   
   
   
   
   
   
   
   
   
  
 __
   Beyond Hotmail - see what else you can do with Windows Live Find
 out
   more!
  
 --
   Open Source Business Conference (OSBC), March 24-25, 2009, San
 Francisco, CA
   -OSBC tackles the biggest issue in open source: Open Sourcing the
 Enterprise
   -Strategies to boost innovation and cut costs with open source
 participation
   -Receive a $600 discount off the registration fee with the source
 code: SFAD
   http://p.sf.net/sfu/XcvMzF8H
   ___ Rdkit-discuss
 mailing list Rdkit-discuss@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
  
 
 
 __
 Share your photos with Windows Live Photos – Free Find out more!
-- 
Igor Filippov [Contr] ig...@helix.nih.gov