Re: [Rdkit-discuss] 2018.03.1 RDKit release

2018-04-24 Thread David Hall
On Tue, Apr 24, 2018 at 7:03 PM, Andrew Dalke 
wrote:

>
> By the way, how do I install RDKit into a specified location? I usually
> expect something like --prefix /usr/local, and there's a
> CMAKE_INSTALL_PREFIX which defaults to "/usr/local" but "make install" puts
> it in the build directory, like
>
>   /Users/dalke/ftps/rdkit-Release_2018_03_1
>
>
You need to turn off RDK_INSTALL_INTREE

-David
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] RPM distros

2017-11-15 Thread David Hall
apt install rpm

should get you rpmbuild

-David

> On Nov 15, 2017, at 2:59 PM, Tim Dudgeon  wrote:
> 
> OK, makes sense, but I'm building on a Debian system. So neither 'yum install 
> rpm-build' nor 'apt-get install rpm-build' doesn't work.
> 
> So (sorry for the stupid question) can DEBs only be built on a Debian based 
> system and RPMs om a Red Hat based system? 
> 
>> On 15/11/2017 19:31, Paolo Tosco wrote:
>> Hi Tim,
>> 
>> It looks like you are missing the rpmbuild binary on the machine where you 
>> are trying to build the RPM.
>> Issuing a
>> yum install rpm-build
>> as root should get it installed.
>> 
>> Cheers,
>> p.
>> 
>>> On 11/15/17 19:00, Tim Dudgeon wrote:
>>> So this now seems to have been merged to master so I gave it a try:
>>> 
>>> root@f083c3e3b6a1:/rdkit/build# cmake -DRDK_BUILD_INCHI_SUPPORT=ON 
>>> -DRDK_INSTALL_INTREE=OFF -DCMAKE_INSTALL_PREFIX=/usr/ ..
>>> -- Could NOT find InChI in system locations (missing:  INCHI_LIBRARY 
>>> INCHI_INCLUDE_DIR)
>>> CUSTOM_INCHI_PATH = /rdkit/External/INCHI-API
>>> -- Found InChI software locally
>>> -- Boost version: 1.62.0
>>> -- Found the following Boost libraries:
>>> --   python
>>> Python Install directory /usr/lib/python2.7/dist-packages
>>> -- Could NOT find Eigen3 (missing:  EIGEN3_INCLUDE_DIR EIGEN3_VERSION_OK) 
>>> (Required is at least version "2.91.0")
>>> Eigen3 not found, disabling the Descriptors3D build.
>>> -- Boost version: 1.62.0
>>> -- Found the following Boost libraries:
>>> --   thread
>>> --   system
>>> --   chrono
>>> --   date_time
>>> --   atomic
>>> -- Boost version: 1.62.0
>>> -- Found the following Boost libraries:
>>> --   serialization
>>> == Using strict rotor definition
>>> == Updating Filters.cpp from pains file
>>> == Done updating pains files
>>> -- Boost version: 1.62.0
>>> -- Found the following Boost libraries:
>>> --   regex
>>> -- Configuring done
>>> -- Generating done
>>> -- Build files have been written to: /rdkit/build
>>> 
>>> 
>>> root@f083c3e3b6a1:/rdkit/build# cpack -G DEB
>>> CPack: Create package using DEB
>>> CPack: Install projects
>>> CPack: - Run preinstall target for: RDKit
>>> CPack: - Install project: RDKit
>>> CPack: -   Install component: runtime
>>> CPack: -   Install component: base
>>> CPack: -   Install component: data
>>> CPack: -   Install component: docs
>>> CPack: -   Install component: dev
>>> CPack: -   Install component: python
>>> CPack: -   Install component: extras
>>> CPack: Create package
>>> CPack: - package: /rdkit/build/RDKit-2018.03.1.dev1-Linux-Development.deb 
>>> generated.
>>> CPack: - package: /rdkit/build/RDKit-2018.03.1.dev1-Linux-Extras.deb 
>>> generated.
>>> CPack: - package: /rdkit/build/RDKit-2018.03.1.dev1-Linux-Python.deb 
>>> generated.
>>> CPack: - package: /rdkit/build/RDKit-2018.03.1.dev1-Linux-Runtime.deb 
>>> generated.
>>> 
>>> 
>>> root@f083c3e3b6a1:/rdkit/build# cpack -G RPM
>>> CPack: Create package using RPM
>>> CPack: Install projects
>>> CPack: - Run preinstall target for: RDKit
>>> CPack: - Install project: RDKit
>>> CPack: -   Install component: runtime
>>> CPack: -   Install component: base
>>> CPack: -   Install component: data
>>> CPack: -   Install component: docs
>>> CPack: -   Install component: dev
>>> CPack: -   Install component: python
>>> CPack: -   Install component: extras
>>> CPack: Create package
>>> CMake Error at /usr/share/cmake-3.7/Modules/CPackRPM.cmake:1573 (message):
>>>   RPM package requires rpmbuild executable
>>> Call Stack (most recent call first):
>>>   /usr/share/cmake-3.7/Modules/CPackRPM.cmake:2442 
>>> (cpack_rpm_generate_package)
>>> 
>>> 
>>> CPack Error: Error while execution CPackRPM.cmake
>>> CPack Error: Error while execution CPackRPM.cmake
>>> CPack Error: Error while execution CPackRPM.cmake
>>> CPack Error: Error while execution CPackRPM.cmake
>>> CPack Error: Problem compressing the directory
>>> CPack Error: Error when generating package: RDKit
>>> 
>>> So it looks like the building the debs works OK (I didn't test them) but 
>>> building rpms fails.
>>> 
>>> I'm probably doing something stupid here as I'm not that familiar with 
>>> cmake and cpack. 
>>> 
>>> 
 On 10/11/2017 00:03, Francois BERENGER wrote:
> On 11/08/2017 08:47 PM, Tim Dudgeon wrote: 
> There is mention of RPM distributions of RDKit 
> (https://copr.fedorainfracloud.org/coprs/giallu/rdkit/). 
> 
> But on trying these: 
> 
> 1. the distro is based on the 2017_03_1 release 
> 2. it fails due to missing libinchi.so.1 dependency. 
 
 In the bugtracker, there is an issue about the .deb: 
 
 https://github.com/rdkit/rdkit/issues/911 
 
 and there is a pull request by Patrick Avery 
 to fix them: 
 
 https://github.com/rdkit/rdkit/pull/1580 
 
 Maybe you can read the pull request, replace DEB by RPM and see 
 if that produces usable RPMs for your distro. 
 
> This is presumably no longer being maintained? 
> Anything that can be done t

Re: [Rdkit-discuss] Conformer generation

2017-10-25 Thread David Hall
Hi Paul,

Your reuse of the variable num_confs inside the loop is causing that
monotonic decrease. So, if a molecule returns 190 conformers, the next
iteration has you only asking for 190 conformers. And so on.

Best,
David



On Wed, Oct 25, 2017 at 12:36 PM, Paul Hawkins 
wrote:

> Hello,
>
>
> I have run into a problem with using the RDKit to generate conformers of
> molecules. I am using the following code:
>
>
> from rdkit import Chem
> from rdkit.Chem import AllChem
>
> from timeit import default_timer as timer
>
>
>
> def GenerateDGConfs(m,num_confs,rms):
> start_time = timer()
> ids = AllChem.EmbedMultipleConfs(m, numConfs=num_confs,
> pruneRmsThresh=rms, maxAttempts=200,enforceChirality=True)
> for id in ids:
> AllChem.MMFFOptimizeMolecule(m, confId=id)
>
> end_time = timer()
> time_diff = end_time - start_time
> #print ("Normal DG = %0.2f" % time_diff)
>
> return m, list(ids), time_diff
>
>
> w = Chem.SDWriter("%s/%s" % (rootdir,"My_conformers.sdf))
>
>
> suppl = Chem.SDMolSupplier("%s/%s" % (rootdir,"My_molecules.sdf"))
> num_confs = 200
> rmsd = 0.5
>
>
> for mol in suppl:
>
> if mol is None: continue
>
> Chem.AssignAtomChiralTagsFromStructure(mol)
> mol1 = Chem.AddHs(mol)
>
> conf_mol, id_list, time_diff = GenerateDGConfs(mol1,num_confs,rmsd)
> num_confs = conf_mol.GetNumConformers()
> for id in id_list:
> w.write(conf_mol, confId=id)
>
>
>
> w.flush()
> w.close()
>
>
> What I see from this is as I go through the molecules in the input file
> the number of conformers returned declines monotonically, starting close to
> the 200 I set as a maximum to around 10 after a few thousand molecules have
> been processed (this applies whether I use 'normal' DG or the ETKDG method.
> As I am a new user of RDKit I am sure I missed something obvious but I
> cannot see it.
>
> Also, once I generate the conformers what is best way to cluster them by
> RMSD so that each conformer has a minimum RMSD to all the others in the set?
>
>
> Any help would be gratefully received.
>
>
>
> Paul.
>
> 
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> ___
> Rdkit-discuss mailing list
> Rdkit-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>
>
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] Using inchikey as entry

2017-08-01 Thread David Hall
I believe InchiKey uses a 1 way hash (sha-256), so what you are asking for is 
basically impossible. That is, to go from InchiKey to molecule requires already 
having a table of molecules corresponding to the InchiKeys. There are various 
services online that have such lookup tables for a large number of molecules 
(e.g. NCI CADD resolver, PubChem).

-David


> On Aug 1, 2017, at 9:05 PM, Kazmierczak Stéphane  
> wrote:
> 
> Hello, I would like to draw molecules with rdkit, but only have inchikeys.
> I compiled rdkit with inchi support but it seems that I can only output 
> inchikeys but not import them. 
> 
> Are there any api function that I am missing ?
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! 
> http://sdm.link/slashdot___
> Rdkit-discuss mailing list
> Rdkit-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] multiline legend in MolsToGridImage

2016-12-20 Thread David Hall
The replace and split methods were removed from the string module in
python3. You can replace the code as follows:

s = s.replace('\r\n', '\n')
s = s.replace('\n\r', '\n')
s = s.replace('\r', '\n')
lines = s.split('\n')


On Tue, Dec 20, 2016 at 2:45 AM, Pavel Polishchuk 
wrote:

> Hi,
>
>   I try to print multiline legends for molecules in a grid and use the
> following code from notebook
>
>   from rdkit import Chem
>   from rdkit.Chem import Draw
>   # from rdkit.Chem.Draw import IPythonConsole
>
>   mols = [Chem.MolFromSmiles(s) for s in ["CCC", "C"]]
>   legends = ["1\nCCC", "2\nC"]
>   Draw.MolsToGridImage(mols, molsPerRow=5, subImgSize=(200,200),
> legends=legends)
>
>   it returns error: AttributeError: module 'string' has no attribute
> 'replace' (full stack is below)
>
>   If I uncomment IPythonConsole import then it returns the picture with
> labels, but with spaces instead of new line symbols.
>
>   What can I do in this situation? RDKit 2016.03.2
>
> Kind regards,
> Pavel.
>
>
> ---AttributeError
> Traceback (most recent call 
> last) in ()  1 mols = 
> [Chem.MolFromSmiles(s) for s in ["CCC", "C"]]  2 legends = ["1\nCCC", 
> "2\nC"]> 3 p = Draw.MolsToGridImage(mols, molsPerRow=5, 
> subImgSize=(200,200), legends=legends)
> /home/pavel/anaconda3/envs/my-rdkit-env/lib/python3.5/site-packages/rdkit/Chem/Draw/__init__.py
>  in MolsToGridImage(mols, molsPerRow, subImgSize, legends, 
> highlightAtomLists, useSVG, **kwargs)387   else:388   return 
> _MolsToGridImage(mols,molsPerRow=molsPerRow,subImgSize=subImgSize,--> 389 
> legends=legends, highlightAtomLists=highlightAtomLists, **kwargs) 
>390 391 def ReactionToImage(rxn, subImgSize=(200,200),**kwargs):
> /home/pavel/anaconda3/envs/my-rdkit-env/lib/python3.5/site-packages/rdkit/Chem/Draw/__init__.py
>  in _MolsToGridImage(mols, molsPerRow, subImgSize, legends, 
> highlightAtomLists, **kwargs)334   highlights=highlightAtomLists[i]   
>  335 if mol is not None:--> 336   img = 
> _moltoimg(mol,subImgSize,highlights,legends[i],**kwargs)337   
> res.paste(img,(col*subImgSize[0],row*subImgSize[1]))338   return res
> /home/pavel/anaconda3/envs/my-rdkit-env/lib/python3.5/site-packages/rdkit/Chem/Draw/__init__.py
>  in _moltoimg(mol, sz, highlights, legend, **kwargs)302 if not 
> hasattr(rdMolDraw2D,'MolDraw2DCairo'):303 img = 
> MolToImage(mol,sz,legend=legend,highlightAtoms=highlights,--> 304 
>  **kwargs)305 else:306 nmol = 
> rdMolDraw2D.PrepareMolForDrawing(mol,kekulize=kwargs.get('kekulize',True))
> /home/pavel/anaconda3/envs/my-rdkit-env/lib/python3.5/site-packages/rdkit/Chem/Draw/__init__.py
>  in MolToImage(mol, size, kekulize, wedgeBonds, fitImage, options, canvas, 
> **kwargs)132 # 
> color=(0,0,1),fill=False,stroke=True)133 
> font=Font(face='sans',size=12)--> 134 
> canvas.addCanvasText(legend,pos,font)135 136   if 
> kwargs.get('returnCanvas',False):
> /home/pavel/anaconda3/envs/my-rdkit-env/lib/python3.5/site-packages/rdkit/Chem/Draw/spingCanvas.py
>  in addCanvasText(self, text, pos, font, color, **kwargs) 72 labelP = 
> pos[0]-txtWidth/2+offset,pos[1]+txtHeight/2 73 color = 
> convertColor(color)---> 74 
> self.canvas.drawString(text,labelP[0],labelP[1],font,color=color) 75 
> return (bw,bh,offset) 76
> /home/pavel/anaconda3/envs/my-rdkit-env/lib/python3.5/site-packages/rdkit/sping/PIL/pidPIL.py
>  in drawString(self, s, x, y, font, color, angle, **kwargs)313 if 
> '\n' in s or '\r' in s:314   self.drawMultiLineString(s, x,y, font, 
> color, angle,--> 315**kwargs)316   
> return317 if not font: font = self.defaultFont
> /home/pavel/anaconda3/envs/my-rdkit-env/lib/python3.5/site-packages/rdkit/sping/pid.py
>  in drawMultiLineString(self, s, x, y, font, color, angle, **kwargs)393   
>   dy = h * math.cos(angle*math.pi/180.0)394 
> dx = h * math.sin(angle*math.pi/180.0)--> 395 s = 
> string.replace(s, '\r\n', '\n')396 s = string.replace(s, 
> '\n\r', '\n')397 s = string.replace(s, '\r', '\n')
> AttributeError: module 'string' has no attribute 'replace'
>
>
>
> 
> --
> Developer Access Program for Intel Xeon Phi Processors
> Access to Intel Xeon Phi processor-based developer platforms.
> With one year of Intel Parallel Studio XE.
> Training and support from Colfax.
> Order your platform today.http://sdm.link/intel
> ___
> Rdkit-discuss mailing list
> Rdkit-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lis

Re: [Rdkit-discuss] Trouble compiling and installing on Ubuntu 14.04

2016-10-03 Thread David Hall
What happens if you do this instead?

cmake -DRDK_BUILD_INCHI_SUPPORT=ON -DPYTHON_EXECUTABLE=/usr/bin/python3.4
..

That seems to work for me on Ubuntu 14.04, also, delete your entire build
directory and make it again before running the command.

-David


On Mon, Oct 3, 2016 at 11:05 AM, Philip Adler  wrote:

> Dear All,
>
> I am trying to compile rdkit to run with Python3.4 on Ubuntu 14.04 as per
> the instructions at http://www.rdkit.org/docs/Install.html For reasons
> which I don't really want to get into we would prefer to avoid anaconda for
> the time being.
>
> That being said, when I try to test the build, I get a number of errors
> and failed tests (the build does not work when called from Python, which is
> unsurprising).
>
> For reference, the cmake command I issued was:
>
> cmake -DRDK_BUILD_INCHI_SUPPORT=ON -D PYTHON_LIBRARY=/usr/lib/python
> 3.4/config-3.4m-x86_64-linux-gnu/libpython3.4.so -D
> PYTHON_INCLUDE_DIR=/usr/include/python3.4/ -D
> PYTHON_EXECUTABLE=/usr/bin/python3.4 -DBOOST_ROOT=/usr/lib/x86_64-linux-gnu/
> ..
>
> The tests which fail are as follows:
>
> The following tests FAILED:
>   5 - pyBV (SEGFAULT)
>   6 - pyDiscreteValueVect (SEGFAULT)
>   7 - pySparseIntVect (SEGFAULT)
>   8 - pyFPB (SEGFAULT)
>  11 - testPyGeometry (SEGFAULT)
>  14 - pyAlignment (Failed)
>  18 - pyForceFieldConstraints (SEGFAULT)
>  20 - pyDistGeom (Failed)
>  33 - pyDepictor (SEGFAULT)
>  45 - pyChemReactions (SEGFAULT)
>  50 - pyFilterCatalog (SEGFAULT)
>  52 - pyFragCatalog (SEGFAULT)
>  54 - pyMolDescriptors (SEGFAULT)
>  57 - pyPartialCharges (SEGFAULT)
>  59 - pyMolTransforms (SEGFAULT)
>  63 - pyForceFieldHelpers (SEGFAULT)
>  65 - pyDistGeom (SEGFAULT)
>  67 - pyMolAlign (SEGFAULT)
>  69 - pyChemicalFeatures (SEGFAULT)
>  71 - pyShapeHelpers (SEGFAULT)
>  73 - pyMolCatalog (SEGFAULT)
>  75 - pyMolDraw2D (SEGFAULT)
>  77 - pyFMCS (SEGFAULT)
>  80 - pyMolHash (SEGFAULT)
>  82 - pyMMPA (SEGFAULT)
>  84 - pyReducedGraphs (SEGFAULT)
>  86 - pySLNParse (SEGFAULT)
>  87 - pyGraphMolWrap (SEGFAULT)
>  88 - pyTestConformerWrap (SEGFAULT)
>  89 - pyTestThreads (SEGFAULT)
>  92 - pyMatCalc (SEGFAULT)
>  93 - pySimDivPickers (SEGFAULT)
>  94 - pyRanker (Failed)
>  96 - pyFeatures (SEGFAULT)
>  97 - pythonTestDbCLI (Failed)
>  98 - pythonTestDirML (Failed)
>  99 - pythonTestDirDataStructs (Failed)
> 101 - pythonTestDirSimDivFilters (Failed)
> 102 - pythonTestDirVLib (Failed)
> 103 - pythonTestDirChem (SEGFAULT)
>
> I must confess I'm a little out of my depth right now, so I don't even
> know where to begin debugging this. Any advice would be greatly appreciated,
>
> Best,
>
> Phil
>
> 
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> ___
> Rdkit-discuss mailing list
> Rdkit-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>
>
--
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] The RDKit and modern C++

2016-09-24 Thread David Hall
I've used Red Hat's developer toolset for years on RHEL5 to be able to
build stuff there using gcc 4.8 and that software has seemed to run fine
when shipping to people running RHEL5 and RHEL6. I have "source
/opt/rh/devtoolset-2/enable" in my bash profile and that sets all the
environment variables whenever I log in. That includes some code built on
top of RDKit, so it seems like it should work on the technical side,
although obviously there is a barrier in getting it installed and set up
correctly.

-David


On Sat, Sep 24, 2016 at 2:25 AM, Greg Landrum 
wrote:

> Dear all,
>
> I just did a blog post describing a proposal for some upcoming changes to
> the RDKit code base:
> https://medium.com/@greg.landrum_t5/the-rdkit-and-
> modern-c-48206b966218?source=linkShare-d698b3fa9f7-1474698147
>
> This is a big and important change and I'd love to hear whatever feedback
> members of the community may have. Please comment either on the blog post
> or here.
>
> Best Regards,
> -greg
>
>
>
>
> 
> --
>
> ___
> Rdkit-discuss mailing list
> Rdkit-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>
>
--
___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] Problems after installing rdkit release 2016_03_1

2016-07-19 Thread David Hall
what does os.environ["PYTHONPATH”] show when you are in IDLE?


> On Jul 19, 2016, at 12:26 PM, Jessica Krause  wrote:
> 
> Dear All,
> 
> I installed the new release of Rdkit in Ubunutu 16.04. I am not able to 
> import rdkit module in my IDLE and Spyder after installing the new 
> release 2016.
> It works in terminal and Ipython Notebook but shows error in IDLE and 
> Spyder.
> 
> In Terminal:
> 
> Python 2.7.12 (default, Jul  1 2016, 15:12:24)
> [GCC 5.4.0 20160609] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
 from rdkit import rdBase
 print rdBase.rdkitVersion
> 2016.03.1
 import os
 os.environ["PYTHONPATH"]
> '/opt/rdkit-Release_2016_03_1:'
 
> 
> In IDLE/Spyder:
> 
> Python 2.7.12 (default, Jul  1 2016, 15:12:24)
> [GCC 5.4.0 20160609] on linux2
> Type "copyright", "credits" or "license()" for more information.
 from rdkit import rdBase
> 
> Traceback (most recent call last):
>   File "", line 1, in 
> from rdkit import rdBase
> ImportError: No module named rdkit
 
> 
> 
> Can somebody help me with this!
> 
> 
> Thanks & Regards,
> 
> Jessica
> 
> 
> --
> What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
> patterns at an interface-level. Reveals which users, apps, and protocols are 
> consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
> J-Flow, sFlow and other flows. Make informed decisions using capacity planning
> reports.http://sdm.link/zohodev2dev
> ___
> Rdkit-discuss mailing list
> Rdkit-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


--
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports.http://sdm.link/zohodev2dev
___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] GetMol and GetMolFrags in C++

2016-04-11 Thread David Hall
When I want to replicate one of RDKit’s python functions in C++, I go to the 
source. RDKit has very readable wrappers that make this a surprisingly nice 
approach (many other pieces of software have pretty ugly wrappers, so this is a 
major compliment to RDKit).

For this, I think the source is:

https://github.com/rdkit/rdkit/blob/master/Code/GraphMol/Wrap/MolOps.cpp#L483

There is a nice if-else that shows you how to get the behaviors of asMols = 
False, then asMols=True. There is obviously a little bit of manipulation to get 
the output into python, but hopefully it is clear how one might make a similar 
pure C++ function.

-David


> On Apr 11, 2016, at 8:24 AM, Yingfeng Wang  wrote:
> 
> lgor,
> 
> Yes, this version looks good. But, I am wondering whether I can specify 
> asMols. I specify asMols in the python version of my tool, so I want to do 
> the same thing for getting the same result in my C++ code. Or could you help 
> me to confirm that the version you mentioned actually has the same effect as 
> asMols = true?
> 
> Thanks.
> Yingfeng
> 
> On Sun, Apr 10, 2016 at 11:35 PM, Igor Filippov  > wrote:
> Did you want
> std::vector > > 
> RDKit::MolOps::getMolFrags ( const ROMol 
>  &  mol, bool  
> sanitizeFrags = true, 
> by any chance? This will return a vector of ROMol's which correspond to the 
> contiguous fragments.
> 
> Igor
> 
> 
> On Sun, Apr 10, 2016 at 11:04 PM, Yingfeng Wang  > wrote:
> Greg,
> 
> Thanks. In python, I am using GetMolFrags by the following way,
> 
> Chem.GetMolFrags(current_modified_mol, asMols=True, sanitizeFrags=False)
> 
> However, there is not a version at the link you mentioned allows me to 
> specify asMols. Could you please give me more hints?
> 
> Thanks.
> Yingfeng
> 
> On Sun, Apr 10, 2016 at 10:49 PM, Greg Landrum  > wrote:
> 
> 
> On Mon, Apr 11, 2016 at 1:35 AM, Yingfeng Wang  > wrote:
> 
> Thanks. Say, the current RWMol object has 10 bonds, so ids of these bonds 
> should be from 1-10. Now, I remove one bond. How do I reset all nine bonds 
> with ids from 1-9 (if one or two atoms are gone with this bond, I also want 
> to reset the ids of these atoms).
> 
> You don't need to do that, it happens automatically
>  
> In addition, say, there are two fragments after one bond is removed. How do I 
> get these two fragments as mols. In python, I can use Chem.GetMolFrags. But 
> how do I get my job done in C++?
> 
> There are a number of different versions of MolOps::getMolFrags(), pick the 
> on that does what you like:
> http://rdkit.org/docs/cppapi/namespaceRDKit_1_1MolOps.html#ad8100d785d32fb3c173b83949766b87b
>  
> 
> 
> Since the Python and C++ function/method names are often similar to each 
> other, a good way to find answers like this is to google for the name of the 
> Python function you are looking for and look for the link to the C++ 
> documentation in the results. 
> 
> Best,
> -greg
> 
> 
> --
> Find and fix application performance issues faster with Applications Manager
> Applications Manager provides deep performance insights into multiple tiers of
> your business applications. It resolves application problems quickly and
> reduces your MTTR. Get your free trial! http://pubads.g.doubleclick.net/
> gampad/clk?id=1444514301&iu=/ca-pub-7940484522588532 
> 
> ___
> Rdkit-discuss mailing list
> Rdkit-discuss@lists.sourceforge.net 
> 
> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss 
> 
> 
> 
> 
> --
> Find and fix application performance issues faster with Applications Manager
> Applications Manager provides deep performance insights into multiple tiers of
> your business applications. It resolves application problems quickly and
> reduces your MTTR. Get your free trial! http://pubads.g.doubleclick.net/
> gampad/clk?id=1444514301&iu=/ca-pub-7940484522588532___
> Rdkit-discuss mailing list
> Rdkit-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

--
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your

Re: [Rdkit-discuss] cis/trans directional bond and smiles strings in python

2015-10-12 Thread David Hall
That behavior appears to all be in python; as you’ve written it, your smiles 
string has a newline before rdkit ever sees it:

>>> print 'C/C=C\n1nc(nn1)C'
C/C=C
1nc(nn1)C
>>> print 'C/C=C\\n1nc(nn1)C'
C/C=C\n1nc(nn1)C


> On Oct 12, 2015, at 4:37 PM, Michael Reutlinger  wrote:
> 
> Hi all,
> 
> I just found an unexpected behaviour in the current RDKit. My input is a 
> perfectly valid smiles with explicitly specified double bond configuration. 
> Actually, similar smiles were obtained using the RDKit.
> 
> The problem is, when submitting the smiles string containing an \n to 
> MolFromSmiles only the part before the \n is used and the rest is 
> disregarded. The \ needs to be quoted to a \\ in order to work correct. 
> 
> Is this a desired / expected behaviour?
> 
> Best,
> Michael
> 
> 
> --
> ___
> Rdkit-discuss mailing list
> Rdkit-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

--
___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] NP-score and SA-score datas

2015-09-06 Thread David Hall
This is the easiest way.

python -c "import json,gzip,pickle; print
json.dumps(pickle.load(gzip.open('publicnp.model.gz', 'rb')))"  >
publicnp.model.json

Modify as appropriate for the other file.

-David

On Sun, Sep 6, 2015 at 11:48 AM, Guillaume GODIN <
guillaume.go...@firmenich.com> wrote:

> Dear Nicholas,
>
> We need to have access rawData in javascript directly from gz files but
> the python pickle.load function has no equivalent in javascript as far as
> I know.
>
> So I need to find a way either to read the file in JS or to extract those
> data into json format or binary json.
>
> Best regards,
>
> *Dr. Guillaume GODIN*
>
> Project Manager
>
> Innovation
>
> CORPORATE R&D DIVISION
>
> DIRECT LINE +41 (0)22 780 3645
>
> MOBILE   +41 (0)79 536 1039
>
> *Firmenich SA*
>
> RUE DES JEUNES 1 | CASE POSTALE 239 | CH-1211 GENEVE 8
>
> --
> *De :* Nicholas Firth [nicholas.fi...@icr.ac.uk]
> *Envoyé :* dimanche, 6. septembre 2015 15:59
> *À :* Guillaume GODIN
> *Cc :* rdkit-discuss@lists.sourceforge.net
> *Objet :* Re: [Rdkit-discuss] NP-score and SA-score datas
>
> Dear Guillaume,
>
> This is a one liner in Python, the model is saved as a Python dictionary
> in the case of the NP model and I believe the SA score is a Python list.
> Probably best you work out what you want to do with it rather than have
> multiple versions of such large files packaged with the source.
>
> >>> import gzip, pickle
> >>> rawData = pickle.load(gzip.open('publicnp.model.gz', 'rb'))
>
> Best,
> Nick
>
> *Nicholas C. Firth* | PhD Student | Cancer Therapeutics
> The Institute of Cancer Research | 15 Cotswold Road | Belmont | Sutton |
> Surrey | SM2 5NG
>
> *T* 020 8722 4033 | *E* nicholas.fi...@icr.ac.uk | *W* www.icr.ac.uk |
> *Twitter* @ICRnews 
>
> *Facebook* www.facebook.com/theinstituteofcancerresearch
>
> *Making the discoveries that defeat cancer*
>
>
> On 6 Sep 2015, at 14:52, Guillaume GODIN 
> wrote:
>
> Dear all,
>
> I need the original unpickle data for javascript to implement those two
> descriptor in RDKitjs.
>
> Can you provide publicnp.model.gz fpscores.pkl.gz uncompressed files
> please ?
>
> thanks in advance
>
> Best regards,
>
> *Dr. Guillaume GODIN*
>
> Project Manager
>
> Innovation
>
> CORPORATE R&D DIVISION
>
> DIRECT LINE +41 (0)22 780 3645
>
> MOBILE   +41 (0)79 536 1039
>
> *Firmenich SA*
>
> RUE DES JEUNES 1 | CASE POSTALE 239 | CH-1211 GENEVE 8
>
>
> **
> DISCLAIMER
> This email and any files transmitted with it, including replies and
> forwarded copies (which may contain alterations) subsequently transmitted
> from Firmenich, are confidential and solely for the use of the intended
> recipient. The contents do not represent the opinion of Firmenich except to
> the extent that it relates to their official business.
> **
> --
> ___
> Rdkit-discuss mailing list
> Rdkit-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>
>
> The Institute of Cancer Research: Royal Cancer Hospital, a charitable
> Company Limited by Guarantee, Registered in England under Company No.
> 534147 with its Registered Office at 123 Old Brompton Road, London SW7 3RP.
>
> This e-mail message is confidential and for use by the addressee only. If
> the message is received by anyone other than the addressee, please return
> the message to the sender by replying to it and then delete the message
> from your computer and network.
>
>
> --
>
> ___
> Rdkit-discuss mailing list
> Rdkit-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>
>
--
___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] Memory management during conformer generation

2015-06-27 Thread David Hall
> On Jun 27, 2015, at 6:05 AM, Dmitri Maziuk  wrote:
> 
> On 6/26/2015 9:48 AM, az wrote:
>> Thanks Jean-Paul
>> 
>> You're right that I eat up a lot of memory with large files but I think
>> its not the whole story. If it were, my memory should come back each
>> time a new file is being read (jobs=[]), no ?
> 
> No. It's a "feature" of garbage collection: your memory may come back 
> anytime between then and program exit.

One could always trigger garbage collection manually.

https://docs.python.org/2/library/gc.html#gc.collect 


And use gc.get_count() to make sure the count of objects went down with the 
collection.

-David--
Monitor 25 network devices or servers for free with OpManager!
OpManager is web-based network management software that monitors 
network devices and physical & virtual servers, alerts via email & sms 
for fault. Monitor 25 devices for free with no restriction. Download now
http://ad.doubleclick.net/ddm/clk/292181274;119417398;o___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] rdkit can not read sodium hexaflourophosphate molfile

2015-05-21 Thread David Hall
See this commit if you want to know how it has been fixed in the development 
code.

https://github.com/rdkit/rdkit/commit/672f8ea2008ca88ee4c9dc91eab74894916a 


-David


> On May 21, 2015, at 4:26 AM, Contact  wrote:
> 
> From: Contact [mailto:cont...@hjhimmler.de ] 
> Sent: Wednesday, May 20, 2015 10:16 AM
> To: 'Greg Landrum'
> Subject: RE: [Rdkit-discuss] rdkit can not read sodium hexaflourophosphate 
> molfile
>  
> HI Greg,
>  
> thanks for the answer.
> Since I am not very familiar with the internals of rdkit-
> What exactly do you mean with ‘.. adding the extra allowed valence for P..’ ?
> Does that mean there exists some kind of ‘ptable’ and I can add an extra 
> valence there ? If yes, where is that ptable located ?
> If not, how do I add the extra valence otherwise ?
>  
> Would appreciate you let me know.
> Best regards
> Hans-Juergen
>  
> From: Greg Landrum [mailto:greg.land...@gmail.com 
> ] 
> Sent: Wednesday, May 20, 2015 4:53 AM
> To: Contact
> Cc: RDKit Discuss
> Subject: Re: [Rdkit-discuss] rdkit can not read sodium hexaflourophosphate 
> molfile
>  
> Hi,
>  
> Properly handing the hypervalent PF6- species has been on the RDKit todo list 
> for a while. There is a quick solution (adding the extra allowed valence for 
> P) and there's a "right" solution (revisiting the valence model). Every time 
> I start to do the first I think I should be doing the second, but I don't 
> have the time to dedicate to that, so it just sits.
>  
> Rather than continuing this, I'll just go ahead and add the extra valence. :-)
> Here's the github item:
> https://github.com/rdkit/rdkit/issues/510 
> 
>  
> -greg
>  
>  
> On Tue, May 19, 2015 at 3:25 PM, Contact  > wrote:
>> HI,
>>  
>> I did draw sodium hexaflourophosphate (using marvin) and saved the structure 
>> as molfile.
>> I have a very simple knime workflow. The workflow consist of a molfile 
>> reader node and a rdkit ‘RDKit From Molecule’ node.
>> The readmolfile node has no problems to read the molfile. 
>> The rdkit ‚RDKit From Molecule’ node can not read the molfile (i.e. the 
>> structure ends up in the  ‘Erroneous input data’ output port.
>> The structure is drawn correct i.e. positive charge on sodium, negative 
>> charge on the phosphor atom.
>> The molfile is attached to the mail.
>>  
>> Any idea why rdkit has problems with reading this molfile ?
>>  
>> Any feedback or clarification is appreciated.
>> Best
>> Hans-Juergen
>> 
>> --
>> One dashboard for servers and applications across Physical-Virtual-Cloud
>> Widest out-of-the-box monitoring support with 50+ applications
>> Performance metrics, stats and reports that give you Actionable Insights
>> Deep dive visibility with transaction tracing using APM Insight.
>> http://ad.doubleclick.net/ddm/clk/290420510;117567292;y 
>> 
>> ___
>> Rdkit-discuss mailing list
>> Rdkit-discuss@lists.sourceforge.net 
>> 
>> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss 
>> 
>  
> --
> One dashboard for servers and applications across Physical-Virtual-Cloud 
> Widest out-of-the-box monitoring support with 50+ applications
> Performance metrics, stats and reports that give you Actionable Insights
> Deep dive visibility with transaction tracing using APM Insight.
> http://ad.doubleclick.net/ddm/clk/290420510;117567292;y___
> Rdkit-discuss mailing list
> Rdkit-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

--
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] FYI: google code shutting down

2015-03-13 Thread David Hall
well, presumably the documentation not in the wiki would continue to be online.

http://rdkit.org/docs/index.html 
http://rdkit.org/docs/api/index.html 
http://rdkit.org/docs/cppapi/index.html 


None of those are the wiki and tend to be more up-to-date.

-David


> On Mar 13, 2015, at 10:39 AM, Dimitri Maziuk  wrote:
> 
> On 2015-03-13 01:25, Greg Landrum wrote:
> 
>> Github does offer the option of setting up a wiki for a project, I
>> haven't done this for the RDKit since it doesn't seem that necessary
>> (and it seems that the information in wikis has a tendency to "rot") but
>> if anyone has strong opinion otherwise, we can get something set up.
> 
> Documentation has a tendency to go out of date whether it's in wiki 
> format or not. What's the proposed alternative: not have any 
> documentation online at all?
> 
> Dimitri
> 
> 
> --
> Dive into the World of Parallel Programming The Go Parallel Website, sponsored
> by Intel and developed in partnership with Slashdot Media, is your hub for all
> things parallel software development, from weekly thought leadership blogs to
> news, videos, case studies, tutorials and more. Take a look and join the 
> conversation now. http://goparallel.sourceforge.net/
> ___
> Rdkit-discuss mailing list
> Rdkit-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

--
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] Chem.Draw darker colors

2015-02-12 Thread David Hall

In [6]: opt.elemDict
Out[6]: 
{0: (0.5, 0.5, 0.5),
 1: (0.55, 0.55, 0.55),
 7: (0, 0, 1),
 8: (1, 0, 0),
 9: (0.2, 0.8, 0.8),
 15: (1, 0.5, 0),
 16: (0.8, 0.8, 0),
 17: (0, 0.8, 0),
 35: (0.5, 0.3, 0.1)}

presumably, you set fluorine and sulfur by changing the values of 9 and 16.

-David

> On Feb 12, 2015, at 12:58 PM, Soren Wacker  wrote:
> 
> but how?
> Soren
> 
> From: Greg Landrum [greg.land...@gmail.com]
> Sent: Wednesday, February 11, 2015 10:27 PM
> To: Soren Wacker
> Cc: RDKit Discuss
> Subject: Re: [Rdkit-discuss] Chem.Draw darker colors
> 
> My other answer about using the DrawingOptions object applies here too. 
> Instead of setting elemDict to be a defaultDict, you would just change the 
> colors for S and F to whatever you prefer.
> 
> -greg
> 
> 
> On Thu, Feb 12, 2015 at 12:13 AM, Soren Wacker 
> mailto:swac...@ucalgary.ca>> wrote:
> 
> Hi,
> 
> I printed some moecules with the Draw module of rdkit and generated some 
> useful figures.
> I noticed that for some elements the contrast to white is very low.
> Therefore, I suggest to change the default colors to the darker versions.
> 
> E.g. darkyellow instead of yellow for sulfur
> and darkcyan instead of cyan for fluorine
> 
> kind regards
> Soren
> 
> --
> Dive into the World of Parallel Programming. The Go Parallel Website,
> sponsored by Intel and developed in partnership with Slashdot Media, is your
> hub for all things parallel software development, from weekly thought
> leadership blogs to news, videos, case studies, tutorials and more. Take a
> look and join the conversation now. http://goparallel.sourceforge.net/
> ___
> Rdkit-discuss mailing list
> Rdkit-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
> 
> 
> --
> Dive into the World of Parallel Programming. The Go Parallel Website,
> sponsored by Intel and developed in partnership with Slashdot Media, is your
> hub for all things parallel software development, from weekly thought
> leadership blogs to news, videos, case studies, tutorials and more. Take a
> look and join the conversation now. http://goparallel.sourceforge.net/
> ___
> Rdkit-discuss mailing list
> Rdkit-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


--
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] Errors while running CTest

2014-09-24 Thread David Hall
Did you start a new bash shell to get those environment variables set? Just 
editing that file does not set them.

-David

> On Sep 24, 2014, at 5:22 AM, Shantheya Balasupramaniam 
>  wrote:
> 
> 
> Dear Sir or Madam,
> 
> i tried to install the RDKit on ubuntu 14.04 (64bit):
> 
> first I installed the pre-requisites by:
> 
> sudo apt-get install flex bison build-essential python-numpy cmake python-dev 
> sqlite3 libsqlite3-dev libboost-dev  libboost-python-dev libboost-regex-dev
> 
> afterwards I downloaded RDKit_2014_03_1.tgz, unzipped it and copied the 
> RDKit_2014_03_1 file to /opt
> 
> then I edited the bash.bashrc in /etc by:
> 
> export RDBASE=/opt/RDKit_2014_03_1
> export LD_LIBRARY_PATH=$RDBASE/lib:$LD_LIBRARY_PATH
> export PYTHONPATH=$RDBASE:$PYTHONPATH
> 
> finally I compiled and installed RDKit by:
> 
> cd $RDBASE
> mkdir build
> cd build
> cmake ..
> make # -j 4 
> make install
> 
> when I did the ctest as sudo I got this:
> 
> Test project /opt/RDKit_2014_03_1/build
>   Start  1: testDict
>  1/78 Test  #1: testDict .   Passed0.03 sec
>   Start  2: testDataStructs
>  2/78 Test  #2: testDataStructs ..***Exception: Other  0.19 
> sec
>   Start  3: pyBV
>  3/78 Test  #3: pyBV .***Failed0.01 sec
>   Start  4: pyDiscreteValueVect
>  4/78 Test  #4: pyDiscreteValueVect ..***Failed0.01 sec
>   Start  5: pySparseIntVect
>  5/78 Test  #5: pySparseIntVect ..***Failed0.01 sec
>   Start  6: testTransforms
>  6/78 Test  #6: testTransforms ...   Passed0.01 sec
>   Start  7: testGrid
>  7/78 Test  #7: testGrid .***Exception: Other  0.19 
> sec
>   Start  8: testPyGeometry
>  8/78 Test  #8: testPyGeometry ...***Failed0.01 sec
>   Start  9: testMatrices
>  9/78 Test  #9: testMatrices .   Passed0.00 sec
>   Start 10: testAlignment
> 10/78 Test #10: testAlignment    Passed0.00 sec
>   Start 11: pyAlignment
> 11/78 Test #11: pyAlignment ..***Failed0.01 sec
>   Start 12: testOptimizer
> 12/78 Test #12: testOptimizer    Passed0.00 sec
>   Start 13: testUFFForceField
> 13/78 Test #13: testUFFForceField    Passed0.04 sec
>   Start 14: testMMFFForceField
> 14/78 Test #14: testMMFFForceField ...***Exception: Other  0.20 
> sec
>   Start 15: pyForceFieldConstraints
> 15/78 Test #15: pyForceFieldConstraints ..***Failed0.01 sec
>   Start 16: testDistGeom
> 16/78 Test #16: testDistGeom .   Passed0.00 sec
>   Start 17: pyDistGeom
> 17/78 Test #17: pyDistGeom ...***Failed0.01 sec
>   Start 18: graphmolTest1
> 18/78 Test #18: graphmolTest1    Passed0.11 sec
>   Start 19: graphmolcpTest
> 19/78 Test #19: graphmolcpTest ...   Passed0.01 sec
>   Start 20: graphmolqueryTest
> 20/78 Test #20: graphmolqueryTest    Passed0.01 sec
>   Start 21: graphmolMolOpsTest
> 21/78 Test #21: graphmolMolOpsTest ...***Exception: SegFault  
> 0.31 sec
>   Start 22: graphmoltestCanon
> 22/78 Test #22: graphmoltestCanon    Passed0.00 sec
>   Start 23: graphmoltestChirality
> 23/78 Test #23: graphmoltestChirality ***Exception: Other  0.22 
> sec
>   Start 24: graphmoltestPickler
> 24/78 Test #24: graphmoltestPickler ..***Exception: Other  0.18 
> sec
>   Start 25: graphmolIterTest
> 25/78 Test #25: graphmolIterTest .   Passed0.01 sec
>   Start 26: testDepictor
> 26/78 Test #26: testDepictor .***Exception: Other  0.18 
> sec
>   Start 27: pyDepictor
> 27/78 Test #27: pyDepictor ...***Failed0.01 sec
>   Start 28: smiTest1
> 28/78 Test #28: smiTest1 .   Passed0.21 sec
>   Start 29: smaTest1
> 29/78 Test #29: smaTest1 .   Passed0.88 sec
>   Start 30: fileParsersTest1
> 30/78 Test #30: fileParsersTest1 .***Exception: Other  0.18 
> sec
>   Start 31: testMolSupplier
> 31/78 Test #31: testMolSupplier ..***Exception: Other  0.18 
> sec
>   Start 32: testMolWriter
> 32/78 Test #32: testMolWriter ***Exception: Other  0.18 
> sec
>   Start 33: testTplParser
> 33/78 Test #33: testTplParser ***Exception: Other  0.18 
> sec
>   Start 34: testMol2ToMol
> 34/78 Test #34: testMol2ToMol ***Exception: Other  0.19 
> sec
>   Start 35: testSubstructMatch
> 35/78 Test #35: testSubstructMatch ...   Passed0.01 sec
>   Start 36: testReaction
> 36/78 Test #36: testReaction .***Exception: Other  0.27 
> sec
>   St

Re: [Rdkit-discuss] DihedralConstraint in MMFF minimize - keeping amides planar

2014-05-16 Thread David Hall
I haven't tried it, but I'm assuming that once Paolo's pull request is
accepted, this will work out of the box.

https://github.com/rdkit/rdkit/pull/261

-David


On Fri, May 16, 2014 at 1:51 PM, Jan Domanski  wrote:

> The reply from Paolo was amazing and quick. I'm looking at this after a
> week and one questions comes to mind: Is there a reason this can't work out
> of the box?
>
>
> On 11 May 2014 23:08, Jan Domanski  wrote:
>
>> Awesome, this was lightning speed Paolo – many thanks!
>>
>> - Jan
>>
>>
>> On 10 May 2014 20:47, Paolo Tosco  wrote:
>>
>>>  Dear Jan,
>>>
>>> the reason why your restraint was seemingly not applied is that
>>> MMFFAddTorsionConstraint() expected a range such as (170, 190). I have just
>>> modified the code to make it more robust in this respect and I submitted a
>>> pull request to Greg. Meanwhile, you may get the results you expect using a
>>> (170, 190) degree range.
>>> Please find attached a slightly modified version of your python script;
>>> in particular, I added a call to SetDihedralDeg() before the constrained
>>> minimization, to avoid troubles to the minimizer in case the geometry
>>> generated by EmbedMultipleConfs() has dihedral values very far from the
>>> desired target value.
>>>
>>> Thanks for your detailed report which allowed chasing down that weakness
>>> in my code!
>>>
>>> Cheers,
>>> Paolo
>>>
>>>
>>> On 05/10/2014 04:28 PM, Jan Domanski wrote:
>>>
>>>  Hi there,
>>>
>>>  Attached is a crystal_ligand.mol2 for the ACE target from DUDE. I'd
>>> like to generate a number of conformers for this ligand. The trick is it
>>> has 2 amide bonds that I'd like to keep planar. As far as I can see neither
>>> MMFF nor UFF will keep those planar by default, at least not for this input
>>> file.
>>>
>>>  One way around it, is to find all the amide bonds by smarts matching.
>>> From that, find the hydrogen connected to N and add a DihedralConstraint on
>>> the 4 atoms before running the minimization.
>>>
>>>  That's what conformers.py is attempting to do (basing on one of the
>>> test scripts). However, I still get non-planar amide bonds and I'm really
>>> confused as to why. I can filter them out manually with GetDihedralDeg().
>>>
>>>  Thanks for all the help (I'm using up all the rdkit credits this
>>> weekend ;) )
>>>
>>>  - Jan
>>>
>>>
>>> --
>>> Is your legacy SCM system holding you back? Join Perforce May 7 to find out:
>>> • 3 signs your SCM is hindering your productivity
>>> • Requirements for releasing software faster
>>> • Expert tips and advice for migrating your SCM 
>>> nowhttp://p.sf.net/sfu/perforce
>>>
>>>
>>>
>>> ___
>>> Rdkit-discuss mailing 
>>> listRdkit-discuss@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>>>
>>>
>>>
>>> --
>>> ==
>>> Paolo Tosco, Ph.D.
>>> Department of Drug Science and Technology
>>> Via Pietro Giuria, 9 - 10125 Torino (Italy)
>>> Tel: +39 011 670 7680 | Mob: +39 348 5537206
>>> Fax: +39 011 670 7687 | E-mail: paolo.tosco@unito.ithttp://open3dqsar.org | 
>>> http://open3dalign.org
>>> ==
>>>
>>>
>>
>
>
> --
> "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
> Instantly run your Selenium tests across 300+ browser/OS combos.
> Get unparalleled scalability from the best Selenium testing platform
> available
> Simple to use. Nothing to install. Get started now for free."
> http://p.sf.net/sfu/SauceLabs
> ___
> Rdkit-discuss mailing list
> Rdkit-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>
>
--
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.
Get unparalleled scalability from the best Selenium testing platform available
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] structure to IUPAC name made on RDkit?

2014-01-14 Thread David Hall
Certainly, RDKit can help, any cheminformatics toolkit with
SMARTS/substructures to quickly classify something as a ketone, ester,
ether, bond orders, ring finding, path finding, etc. can help.

As for how hard it is, I think for drug discovery, most would start with
the Nomenclature of Organic Chemistry:
http://www.iupac.org/home/publications/provisional-recommendations/under-review-by-the-authors/under-review-by-the-authors-container/nomenclature-of-organic-chemistry.html
That's only 1306 pages to go through.

After that, there's inorganic chemistry, although sections of that may not
be handled well by RDKit? I'm not sure about how RDKit handles crystals and
coordination compounds, etc.
http://www.iupac.org/nc/home/publications/iupac-books/books-db/book-details.html?tx_wfqbe_pi1[bookid]=5

Since RDKit recently added PDB support, people may be interested in naming
for peptides and amino acids
http://www.iupac.org/publications/pac/56/5/0595/
And cyclic peptides
http://www.iupac.org/home/publications/provisional-recommendations/under-review-by-the-authors/under-review-by-the-authors-container/nomenclature-of-cyclic-peptides.html

So there's a decent amount of work. I think it is possible, but not a
single weekend project.

I should mention that many commercial vendors have products for this, off
the top of my head:
http://www.acdlabs.com/products/draw_nom/nom/name/
http://www.chemaxon.com/library/iupac-name/
https://www.cambridgesoft.com/Ensemble_for_Chemistry/ChemDraw/
http://www.eyesopen.com/docs/lexichem/current/html/mol2nam.html#chapter-mol2nam

So, at least 4 companies have some sort of algorithm. The only one I've
used is ChemDraw's, and then, I only have done maybe 5 molecules, so I
cannot claim that any of these products work.

-David




On Tue, Jan 14, 2014 at 11:04 AM, Michał Nowotka  wrote:

> Yes, I know there is no algorithm for that. This is why I'm wondering
> how hard it to write one and how RDkit can help here.
>
> On Tue, Jan 14, 2014 at 4:01 PM, Dimitri Maziuk 
> wrote:
> > On 1/14/2014 6:09 AM, Michał Nowotka wrote:
> >> Hi,
> >>
> >> Since there is no open source software converting structure to IUPAC
> >> name (I'm not talking about web services) I was wandering if one can
> >> be implemented using RDkit? Which parts of RDKit would help in doing
> >> that? Any pointers, suggestions?
> >
> > I've suspicion there's no algorithm for it -- cactus is the only one I
> > found that does it and my impression is they're doing a database
> > search... I'd like to be able to generate systematic names without web
> > searches, too.
> >
> > Dima
> >
> >
> >
> >
> --
> > CenturyLink Cloud: The Leader in Enterprise Cloud Services.
> > Learn Why More Businesses Are Choosing CenturyLink Cloud For
> > Critical Workloads, Development Environments & Everything In Between.
> > Get a Quote or Start a Free Trial Today.
> >
> http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
> > ___
> > Rdkit-discuss mailing list
> > Rdkit-discuss@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>
>
> --
> CenturyLink Cloud: The Leader in Enterprise Cloud Services.
> Learn Why More Businesses Are Choosing CenturyLink Cloud For
> Critical Workloads, Development Environments & Everything In Between.
> Get a Quote or Start a Free Trial Today.
>
> http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
> ___
> Rdkit-discuss mailing list
> Rdkit-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>
--
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today. 
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] rdkit.Chem.rdMolDescriptors._CalcMolWt()

2013-12-12 Thread David Hall
Looking at 
https://github.com/rdkit/rdkit/blob/master/Code/GraphMol/atomic_data.cpp , the 
sixth column has the masses to the third decimal place.
Using these,
7*1.008+3*12.011+14.007+2*15.999 = 
89.094


So, just a matter of where one rounds. Given the uncertainties in 
http://iupac.org/publications/pac/78/11/2051/ , I would argue that you are 
concerned with precision at a level beyond what is currently accepted. 

-- 
David Hall


On Thursday, December 12, 2013 at 5:13 PM, Dimitri Maziuk wrote:

> Hi,
> 
> what exactly does
> 
> rdkit.Chem.rdMolDescriptors._CalcMolWt( mol )
> 
> do? :
> 
> #!/usr/bin/python -u
> import sys
> import rdkit
> import rdkit.Chem.rdMolDescriptors
> 
> PYBEL_PATH = "/share/linux/openbabel-2.3.2/lib"
> sys.path.append( PYBEL_PATH )
> import pybel
> 
> H = { "std" : 1.00794 }
> C = { "std" : 12.0107 }
> N = { "std" : 14.0067 }
> O = { "std" : 15.9994 }
> 
> sdf = "CID_5950.sdf"
> 
> mol = rdkit.Chem.SupplierFromFilename( sdf ).next()
> rdkit.Chem.AddHs( mol )
> rdwt = rdkit.Chem.rdMolDescriptors._CalcMolWt( mol )
> 
> obmol = pybel.readfile( "sdf", sdf ).next()
> obmol.addh()
> obwt = obmol.molwt
> 
> mywt = 0.0
> for a in obmol.atoms :
> if a.OBAtom.IsHydrogen() : mywt += H["std"]
> if a.OBAtom.IsCarbon() : mywt += C["std"]
> if a.OBAtom.IsNitrogen() : mywt += N["std"]
> if a.OBAtom.IsOxygen() : mywt += O["std"]
> 
> print
> print "ALA", rdkit.Chem.rdMolDescriptors.CalcMolFormula( mol )
> print "**"
> print "me", mywt
> print "ob", obwt
> print "rd", rdwt
> #
> 
> The output:
> 
> ALA C3H7NO2
> **
> me 89.09318
> ob 89.09318
> rd 89.094
> 
> (without pretty-printing it's
> me 89.0931832
> ob 89.0931832
> rd 89.0939994)
> 
> What am I missing?
> 
> TIA
> -- 
> Dimitri Maziuk
> Programmer/sysadmin
> BioMagResBank, UW-Madison -- http://www.bmrb.wisc.edu
> 
> --
> Rapidly troubleshoot problems before they affect your business. Most IT 
> organizations don't have a clear picture of how application performance 
> affects their revenue. With AppDynamics, you get 100% visibility into your 
> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
> 
> ___
> Rdkit-discuss mailing list
> Rdkit-discuss@lists.sourceforge.net 
> (mailto:Rdkit-discuss@lists.sourceforge.net)
> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss




--
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] libc++ fix for RDKit_2013_06_1

2013-11-05 Thread David Hall
FYI if you want to still use homebrew to install rdkit with the fixes
applied:

brew install --HEAD rdkit

will pull from git head for the rdkit install and compiles on mavericks

-David




On Tue, Nov 5, 2013 at 11:26 AM, Hans De Winter  wrote:

> Hi all,
>
> all errors are gone with the given changes applied :-)
>
> Just for your information, my installation workflow was the following:
>
> 1) brew install boost
> 2) brew install cmake
> 3) export RDBASE="/usr/local/src/RDKit_2013_09_1"
> 4) Modification of the $RDBASE/Code/RDGeneral/Dict.h file as indicated
> 5) export
> DYLD_LIBRARY_PATH="$DYLD_LIBRARY_PATH:$RDBASE/lib:/usr/local/lib"
> 6) export PYTHONPATH="$PYTHONPATH:$RDBASE"
> 7) mkdir build; cd build
> 8) cmake -D
> PYTHON_LIBRARY=/System/Library/Frameworks/Python.framework/Versions/2.7/lib/libpython2.7.dylib
> -D
> PYTHON_INCLUDE_DIR=/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/
> -D PYTHON_EXECUTABLE=/usr/bin/python ..
> 9) make
> 10) sudo make install
>
>
>
> Still only a few warnings left, and just as a matter for being complete,
> here are the snippets of these warnings:
>
> [ 15%] Building CXX object
> Code/Numerics/Optimizer/CMakeFiles/Optimizer_static.dir/LinearSearch.cpp.o
> Linking CXX static library libOptimizer_static.a
> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib:
> file: libOptimizer_static.a(BFGSOpt.cpp.o) has no symbols
> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib:
> file: libOptimizer_static.a(LinearSearch.cpp.o) has no symbols
> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib:
> file: libOptimizer_static.a(BFGSOpt.cpp.o) has no symbols
> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib:
> file: libOptimizer_static.a(LinearSearch.cpp.o) has no symbols
> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib:
> warning for library: libOptimizer_static.a the table of contents is empty
> (no object file members in the library define global symbols)
>
>
> [ 18%] Building CXX object
> Code/ForceField/CMakeFiles/ForceField.dir/MMFF/Nonbonded.cpp.o
> /usr/local/src/RDKit_2013_09_1/Code/ForceField/MMFF/Nonbonded.cpp:91:75: 
> warning:
> adding 'unsigned int' to a string does not append to the string
> [-Wstring-plus-int]
>   PRECONDITION(mmffVdWParamsIAtom, "bad MMFFVdW parameters for atom "
> + idx1);
>
> ~~~^~
> /usr/local/src/RDKit_2013_09_1/Code/RDGeneral/Invariant.h:121:55: note: 
> expanded
> from macro 'PRECONDITION'
>  Invar::Invariant inv( "Pre-condition Violation", mess, \
>   ^
> /usr/local/src/RDKit_2013_09_1/Code/ForceField/MMFF/Nonbonded.cpp:91:75: note:
> use array indexing to silence this warning
>   PRECONDITION(mmffVdWParamsIAtom, "bad MMFFVdW parameters for atom "
> + idx1);
>   ^
>&  [
> /usr/local/src/RDKit_2013_09_1/Code/RDGeneral/Invariant.h:121:55: note: 
> expanded
> from macro 'PRECONDITION'
>  Invar::Invariant inv( "Pre-condition Violation", mess, \
>   ^
> /usr/local/src/RDKit_2013_09_1/Code/ForceField/MMFF/Nonbonded.cpp:92:75: 
> warning:
> adding 'unsigned int' to a string does not append to the string
> [-Wstring-plus-int]
>   PRECONDITION(mmffVdWParamsJAtom, "bad MMFFVdW parameters for atom "
> + idx2);
>
> ~~~^~
> /usr/local/src/RDKit_2013_09_1/Code/RDGeneral/Invariant.h:121:55: note: 
> expanded
> from macro 'PRECONDITION'
>  Invar::Invariant inv( "Pre-condition Violation", mess, \
>   ^
> /usr/local/src/RDKit_2013_09_1/Code/ForceField/MMFF/Nonbonded.cpp:92:75: note:
> use array indexing to silence this warning
>   PRECONDITION(mmffVdWParamsJAtom, "bad MMFFVdW parameters for atom "
> + idx2);
>   ^
>&  [
> /usr/local/src/RDKit_2013_09_1/Code/RDGeneral/Invariant.h:121:55: note: 
> expanded
> from macro 'PRECONDITION'
>  Invar::Invariant inv( "Pre-condition Violation", mess, \
>   ^
> 2 warnings generated.
>
>
> [ 21%] Building CXX object
> Code/ForceField/CMakeFiles/ForceField_static.dir/MMFF/Nonbonded.cpp.o
> /usr/local/src/RDKit_2013_09_1/Code/ForceField/MMFF/Nonbonded.cpp:91:75: 
> warning:
> adding 'unsigned int' to a string does not append to the string
> [-Wstring-plus-int]
>   PRECONDITION(mmffVdWParamsIAtom, "bad MMFFVdW parameters for atom "
> + idx1);
>
> ~~~^~

Re: [Rdkit-discuss] RDkit, OS X 10.9 and clang++

2013-10-26 Thread David Hall
I'm fairly confident this isn't a compiler problem, but a libc++ problem.

CXXFLAGS="-stdlib=libstdc++" cmake ..
gets you past the current problem. But if boost is built against libc++ ,
it doesn't link, so I also built boost against libstdc++ and everything
built.

Based on Greg's playing with emscripten a few months back [1], an update to
libc++ may fix everything. Then again, I'm not sure whether apple would
libc++ with minor os releases.

[1]
https://groups.google.com/d/msg/emscripten-discuss/WyERe1VDl94/QmSRbe6tY3sJ

-David



On Sat, Oct 26, 2013 at 12:15 AM, Greg Landrum wrote:

>
>
> On Fri, Oct 25, 2013 at 11:06 PM, William G. Scott wrote:
>
>> Hi Greg:
>>
>> I’ve just placed two log files on
>> http://fennario.ucsc.edu/~wgscott/temp/rdkit/
>>
>
> The error messages look really familiar, but I unfortunately can't find a
> reference for them. I will keep dredging around though.
>
> One was generated using the /usr/bin/g++ compiler on 10.9, i.e.,
>>
>> zsh-% /usr/bin/g++ --version
>> Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr
>> --with-gxx-include-dir=/usr/include/c++/4.2.1
>> Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
>> Target: x86_64-apple-darwin13.0.0
>> Thread model: posix
>>
>> which seems to be the same as
>>
>> zsh-% /usr/bin/clang++ --version
>> Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
>> Target: x86_64-apple-darwin13.0.0
>> Thread model: posix
>>
>>
>> The other one, which gets a bit further, was generated with fink’s g++
>> version 4.8 compiler in /sw/bin/g++, i.e.,
>>
>> zsh-% /sw/bin/g++-4  --version
>> g++-4 (GCC) 4.8.2
>> Copyright (C) 2013 Free Software Foundation, Inc.
>>
>>
>> However, as a positive control, I just installed the most recently
>> available compilers for 10.8, which still works fine to compile rdkit
>>
>> fennario-% /usr/bin/g++ --version
>> Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr
>> --with-gxx-include-dir=/usr/include/c++/4.2.1
>> Apple LLVM version 5.0 (clang-500.2.76) (based on LLVM 3.3svn)
>> Target: x86_64-apple-darwin12.5.0
>> Thread model: posix
>>
>> It looks almost the same as the one for 10.9, so I am even more stumped
>> than before.
>
>
> Any chance you could try on the 10.9 system with either a different
> version of boost (1.51?) or the new RDKit beta?
> We've got some evidence that it's not the compiler (I also did a clang3.3
> build on my linux box without problems), so trying an alternate boost
> version seems like the next logical step.
>
> Sorry for the inconvenience,
> -greg
>
>
>
> --
> October Webinars: Code for Performance
> Free Intel webinars can help you accelerate application performance.
> Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most
> from
> the latest Intel processors and coprocessors. See abstracts and register >
> http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk
> ___
> Rdkit-discuss mailing list
> Rdkit-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>
>
--
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] git build of RDKIT on Ubuntu 13.04 fails with message recompile with -fPIC

2013-09-08 Thread David Hall
Have you tried using the shared library libpython2.7.so instead of the
static libpython2.7.a ?




On Sun, Sep 8, 2013 at 6:37 AM, hari jayaram  wrote:

> Hello all...
> I managed to solve part of the problem with the build using a modified
> version of FindPythonLibsNew.cmake based on the pne used by numpy mentioned
> here . 
> When I put that FindPythonLibsNew.cmake script
> into /usr/share/cmake-2.8/Modules, the python library linking is reported
> correctly by cmake.
>
> Here is what I see when I run cmake
>
> -- Found PythonInterp: /home/hari/.virtualenvs/ptn2p7p5/bin/python (found
> version "2.7.5")
> -- Searching for Python libs in
> /home/hari/.virtualenvs/ptn2p7p5/lib64;/home/hari/.virtualenvs/ptn2p7p5/lib
> -- Found Python lib /usr/local/lib/libpython2.7.a
> -- Found PythonLibs: /usr/local/lib/libpython2.7.a
>
>
> So the old confusing message where it was
> reporting /usr/local/lib/libpython2.7.a but had a version of 3.3.2 is now
> gone.
>
> Despite this I get the original error reproduced below during rdkit
> building.
>
> Scanning dependencies of target RDBoost
> [  3%] Building CXX object Code/RDBoost/CMakeFiles/RDBoost.dir/Wrap.cpp.o
> Linking CXX shared library ../../lib/libRDBoost.so
> /usr/bin/ld: /usr/local/lib/libpython2.7.a(exceptions.o): relocation
> R_X86_64_32 against `.rodata.str1.8' can not be used when making a shared
> object; recompile with -fPIC
> /usr/local/lib/libpython2.7.a: could not read symbols: Bad value
> collect2: error: ld returned 1 exit status
> make[2]: *** [lib/libRDBoost.so.1.2013.09.1pre] Error 1
> make[1]: *** [Code/RDBoost/CMakeFiles/RDBoost.dir/all] Error 2
> make: *** [all] Error 2
>
>
>
> Thanks
> Hari
>
>
> On Sat, Sep 7, 2013 at 8:20 AM, hari jayaram  wrote:
>
>> The actual error message I get is this one. The previous message I had
>> commented out a section of the code in
>> rdkit/Code/RDBoost/CMakeFiles/RDBoost.dir/Wrap.cpp resulting in a different
>> error. When I start from a clean repository this is the error I get.
>>
>>
>> Scanning dependencies of target RDBoost
>> [  3%] Building CXX object Code/RDBoost/CMakeFiles/RDBoost.dir/Wrap.cpp.o
>> /home/hari/rdkit-git-src/rdkit/Code/RDBoost/Wrap.cpp: In function ‘void
>> throw_index_error(int)’:
>> /home/hari/rdkit-git-src/rdkit/Code/RDBoost/Wrap.cpp:24:55: error:
>> ‘PyInt_FromLong’ was not declared in this scope
>> make[2]: *** [Code/RDBoost/CMakeFiles/RDBoost.dir/Wrap.cpp.o] Error 1
>> make[1]: *** [Code/RDBoost/CMakeFiles/RDBoost.dir/all] Error 2
>> make: *** [all] Error 2
>>
>> Thanks
>> Hari
>>
>> Repeating post in case of non threaded viewers:
>> Hi ,
>> I wanted to use the rdkit version from github under a virtualenv in
>> python.
>> So I wanted to compile rdkit from source instead of using the Ubuntu
>> supplied python-rdkit.
>>
>> The steps I followed were
>>
>> 1) removed Ubuntu supplied python-rdkit  , libpython2.7-dev and
>> libboost-dev ( ver 1.49 )
>>
>> 2) Compiled Python 2.7.5 and  boost 1.53 with suggested flags and
>> settings:
>> Python: /configure CFLAGS=-fPIC --enable-unicode=ucs4 --enable-shared
>> ,
>> boost :./bootstrap.sh --with-libraries=python,regex; ./b2; ./b2
>> install
>>
>>
>> 3) I then ran the make script with
>>
>> cmake -D PYTHON_LIBRARY=/usr/local/lib/libpython2.7.a ..
>>
>> 4) cmake did tell me that it was using the Boost 1.53 I compiled and
>> rather strangely for the python library the correct *.a file with a weird
>> version 3.3.2 ( I had installed python3.3.2 libs in /usr/local/bin as well)
>>
>> -- Found PythonLibs: /usr/local/lib/libpython2.7.a (found version
>> "3.3.2")
>> -- Found PythonInterp: /home/hari/.virtualenvs/ptn2p7p5/bin/python (found
>> version "2.7.5")
>>
>> 5) Failure message
>>
>> After this when I compile it fails with message
>>
>> Scanning dependencies of target RDBoost
>> [  3%] Building CXX object Code/RDBoost/CMakeFiles/RDBoost.dir/Wrap.cpp.o
>> Linking CXX shared library ../../lib/libRDBoost.so
>> /usr/bin/ld: /usr/local/lib/libpython2.7.a(exceptions.o): relocation
>> R_X86_64_32 against `.rodata.str1.8' can not be used when making a shared
>> object; recompile with -fPIC
>> /usr/local/lib/libpython2.7.a: could not read symbols: Bad value
>> collect2: error: ld returned 1 exit status
>> make[2]: *** [lib/libRDBoost.so.1.2013.09.1pre] Error 1
>> make[1]: *** [Code/RDBoost/CMakeFiles/RDBoost.dir/all] Error 2
>> make: *** [all] Error 2
>>
>> ANy ideas what I am doing wrong.
>>
>> Thank you for all your help
>>
>>
>> On Sat, Sep 7, 2013 at 8:11 AM, hari jayaram  wrote:
>>
>>> Hi ,
>>> I wanted to use the rdkit version from github under a virtualenv in
>>> python.
>>> So I wanted to compile rdkit from source instead of using the Ubuntu
>>> supplied python-rdkit.
>>>
>>> The steps I followed were
>>>
>>> 1) removed Ubuntu supplied python-rdkit  , libpython2.7-dev and
>>> libboost-dev ( ver 1.49 )
>>>
>>> 2) Compiled Python 2.7.5 and  boost 1.53 with suggested flags and

Re: [Rdkit-discuss] name generator

2013-08-27 Thread David Hall
Not sure what software is behind it, but the NCI's Chemical Identifier Resolver 
may suit your needs.

For your example, the URL:

http://cactus.nci.nih.gov/chemical/structure/CC(C)O/iupac_name

returns Propan-2-ol

-David

On Aug 27, 2013, at 11:54 AM, Sergio Martinez Cuesta  
wrote:

> thanks Greg,
> 
> indeed, I only found commercial software for it
> 
> http://www.chemaxon.com/marvin/help/applications/molconvert.html
> 
> cheers
> Sergio
> 
> 
> On 27 August 2013 16:45, Greg Landrum  wrote:
>> Dear Sergio,
>> 
>> 
>> On Tue, Aug 27, 2013 at 5:21 PM, Sergio Martinez Cuesta 
>>  wrote:
>>> is there any IUPAC name generator in RDKit?
>>> 
>>> e.g. for transforming "CC(C)O" into "propan-2-ol" ?
>> 
>> There is not. In fact, I'm not aware of any open source structure->name 
>> converters.
>> 
>> -greg
> 
> --
> Introducing Performance Central, a new site from SourceForge and 
> AppDynamics. Performance Central is your source for news, insights, 
> analysis and resources for efficient Application Performance Management. 
> Visit us today!
> http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk
> ___
> Rdkit-discuss mailing list
> Rdkit-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
--
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] Problem of install of RDkit in Ubuntu

2012-07-24 Thread David Hall
Can you specify what other free tools you installed? Some tools have a
tendency to install their own python, causing problems. A common
culprit for this is autodock tools.

Can you run `which python` and see what python you are running? If it
is not /usr/bin/python , it probably was installed by one of these
tools

-David

On Tue, Jul 24, 2012 at 9:32 AM, Abhik Seal  wrote:
> Dear All,
>
> I have a peculiar problem of RDKit installation
> I installed RDKit in ubuntu 11.06 with all the 76 test passed and also i
> started working in it. But it happened three times to me that when i use
> RDkit after 2-3 days later then i found that it cannot recognise the command
> in python
> from rdkit import Chem
> showing error
>
> Which means that i again have to install RDkit ?
>
> It happened three times to me . I didn't upgraded my ubuntu but i installed
> some other free tools.
>
> Did anybody found this problem?
>
>
> Abhik Seal
> Indiana University Bloomington
> Department of Chemical Informatics
> abs...@indiana.edu
> OSDD CHEMINFORMATICS
> +18123699097
> http://mypage.iu.edu/~abseal/index.htm
>
>
> --
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> ___
> Rdkit-discuss mailing list
> Rdkit-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss