Re: [Rdkit-discuss] Problems with conda install on Google Colab

2020-12-14 Thread Matthew Swain via Rdkit-discuss
The conda-forge C++ compiler was updated recently, and this got used when 
building the latest 2020.09.3 release yesterday:
https://github.com/conda-forge/rdkit-feedstock/pull/62/files 


It looks to me like the system libstdc++ is being loaded from 
/usr/lib/x86_64-linux-gnu/libstdc++.so.6 instead of the one provided by conda 
at /usr/local/lib/libstdc++.so.6 (I think).

I wonder if this has always been the case, but the versions were compatible so 
it went unnoticed until now? As you point out in the notebook, you can pin 
RDKit to the previous version as a quick fix, but obviously this isn’t a great 
solution long term.

I don’t know if it might be possible to change LD_LIBRARY_PATH in an already 
running notebook? This is a bit of an unusual situation given the way miniconda 
is installed into an already running notebook process and just added to 
sys.path… It might not be possible to control how native libraries are loaded.

Matt

> On 14 Dec 2020, at 14:08, Jan Halborg Jensen  wrote:
> 
> My conda install script in Colab 
> https://colab.research.google.com/drive/1cAuW02_9r3wFylijGP8rvOUa1-omVwpP?usp=sharing
>  
> 
>  stopped working with the last 1-2 days.
> 
> I now get the following error 
> 
> ImportError:
>  /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.26' not found 
> (required by 
> /usr/local/lib/python3.7/site-packages/rdkit/DataStructs/cDataStructs.so
> 
> Any tips or suggestions are appreciated 
> 
> Best regards, Jan
> 
> 
> 
> ___
> 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] anaconda and virtualenv

2019-03-18 Thread Matthew Swain via Rdkit-discuss

Hi Tom,

If you are using Anaconda, I would recommend just using conda environments for 
this:

https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html

It is very tricky to get RDKit to work with virtualenv, but really easy with 
conda environments.

Matt

On Mar 18, 2019, at 06:13 AM, Tom Zhang  wrote:


Hi, all,


I am in a conflicting situation now between anaconda and virtualenv.
I used anaconda to install Rdkit and it works great.
However, I also have a lot of other python3 code and I use virtualenv for that.
Now, my python3 code in virtualenv has to talk with Rdkit. 
What is the best solution here? Install Rdkit again in virtualenv?
Could I use anaconda and virtualenv at the same time to run my python code and 
Rdkit?
Will this cause any conflicting issues?


Thanks,


Tom 


Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline


___
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] [Question] Ok to switch to conda-forge for RDKit builds?

2018-10-19 Thread Matthew Swain via Rdkit-discuss

I think this demonstrates one drawback of conda-forge right now: it's best to 
go 'all in' on conda-forge for all packages or you run the risk of a broken 
environment.

In this Mac example, I think the issue may just be due to minor discrepancies 
between the recipes on the conda-forge and rdkit channels, so it would 
hopefully just be a short-term problem while people transition and the rdkit 
channel is phased out.

However, on linux, conda-forge currently uses older compilers than the defaults channel, 
so there may be ongoing issues with mixing conda-forge and defaults packages. They are 
currently migrating the entire conda-forge ecosystem to the new compilers (RDKit packages 
are actually already done, hidden under the "gcc7" label, waiting to be 
activated when all other packages are ready) so this will hopefully be resolved soon too.

To use conda-forge for the time being, I'd actually recommend adding conda-forge as the 
highest priority channel in your config (conda config --add channels conda-forge) and 
then install into a clean environment (e.g. conda create -n rdenv rdkit). But once the 
compiler migration is complete, I'd hope that it would be relatively safe to install with 
"conda install -c conda-forge rdkit" into an existing environment with other 
packages from a mix of different channels.

Matt

On Oct 18, 2018, at 06:41 PM, "Peter St. John"  wrote:


So I'm certainly fine with a conda-forge only option, I don't happen to use the 
rdkit channel version.
But I'll point out that I'm in the minority: comparing downloads of recent 
versions on https://anaconda.org/rdkit/rdkit/files vs 
https://anaconda.org/conda-forge/rdkit/files shows that the rdkit channel is 
definitely used more frequently.


One concern: on a mac when I uninstall rdkit from the rdkit channel and subsequently do 
a `conda install -c conda-forge rdkit`, I'll get a non-working rdkit installation. I.e., 
>>> import rdkit.Chem throws a SegFault.
That also appears to happen if you run conda create -n rdkit_test 
conda-forge::rdkit. (see attachment)


So it appears that for the time being, mac conda-forge builds are going to be 
best done as fresh installs with a bunch of the added conda-forge dependencies:


$ conda create -n rdkit_test -c conda-forge rdkit


The following NEW packages will be INSTALLED:


    blas:            1.0-mkl
    boost:           1.68.0-py36h3e44d54_1       conda-forge
    boost-cpp:       1.68.0-h3a22d5f_0           conda-forge
    bzip2:           1.0.6-1                     conda-forge
    ca-certificates: 2018.10.15-ha4d7672_0       conda-forge
    cairo:           1.14.12-h276e583_5          conda-forge
    certifi:         2018.10.15-py36_1000        conda-forge
    clangdev:        6.0.1-default_1             conda-forge
    fontconfig:      2.13.1-hce039c3_0           conda-forge
    freetype:        2.9.1-h6debe1e_4            conda-forge
    gettext:         0.19.8.1-h1f1d5ed_1         conda-forge
    glib:            2.56.2-h464dc38_0           conda-forge
    icu:             58.2-hfc679d8_0             conda-forge
    intel-openmp:    2019.0-118
    jpeg:            9c-h470a237_1               conda-forge
    libcxx:          6.0.1-0                     conda-forge
    libffi:          3.2.1-hfc679d8_5            conda-forge
    libgfortran:     3.0.1-h93005f0_2
    libiconv:        1.15-h470a237_3             conda-forge
    libpng:          1.6.35-ha92aebf_2           conda-forge
    libtiff:         4.0.9-he6b73bb_2            conda-forge
    libxml2:         2.9.8-h422b904_5            conda-forge
    llvm-meta:       6.0.1-0                     conda-forge
    llvmdev:         6.0.1-h2d50403_2            conda-forge
    mkl:             2019.0-118
    mkl_fft:         1.0.6-py36_0                conda-forge
    mkl_random:      1.0.1-py36_0                conda-forge
    ncurses:         6.1-hfc679d8_1              conda-forge
    numpy:           1.15.2-py36h6a91979_1
    numpy-base:      1.15.2-py36h8a80b8c_1
    olefile:         0.46-py_0                   conda-forge
    openssl:         1.0.2p-h470a237_1           conda-forge
    pandas:          0.23.4-py36hf8a1672_0       conda-forge
    pcre:            8.41-hfc679d8_3             conda-forge
    pillow:          5.3.0-py36hc736899_0        conda-forge
    pip:             18.1-py36_1000              conda-forge
    pixman:          0.34.0-h470a237_3           conda-forge
    pycairo:         1.17.1-py36h4d1f301_0       conda-forge
    python:          3.6.6-h5001a0f_0            conda-forge
    python-dateutil: 2.7.3-py_0                  conda-forge
    pytz:            2018.5-py_0                 conda-forge
    rdkit:           2018.03.4-py36h557c172_1000 conda-forge
    readline:        7.0-haf1bffa_1              conda-forge
    setuptools:      40.4.3-py36_0               conda-forge
    six:             1.11.0-py36_1001            conda-forge
    sqlite:          3.25.2-hb1c47c0_0           conda-forge
    tk:   

Re: [Rdkit-discuss] RDKit and Google Summer of Code 2018

2018-01-16 Thread Matthew Swain
I’d be happy to help with a MolVS-inspired standardization project.

Another possible starting point is the mysterious StructChecker already within 
RDKit...

Matt
On 16 January 2018 at 18:04:24, George Papadatos (gpapada...@gmail.com) wrote:

Same here. I would also add the standardisation work done by Francis Atkinson 
at the EBI as an additional starting point. 

George. 

Sent from my giPhone

On 16 Jan 2018, at 17:19, JP  wrote:

Joining the fray, +1 for MolVS

On 16 January 2018 at 16:00, Brian Cole  wrote:
+1 to the MolVS project as well. 

Perhaps an easy bite-size project is to incorporate the open source mae parser 
code into core RDKit: https://github.com/schrodinger/maeparser


On Mon, Jan 15, 2018 at 9:08 PM, Francois BERENGER 
 wrote:
On 01/16/2018 05:51 AM, Tim Dudgeon wrote:
> Incorporating and "industrialising" Matt's MolVS tautomer and
> standardizer code?
> http://molvs.readthedocs.io/en/latest/index.html

If we can vote, I would vote for this one.

> On 15/01/18 07:09, Greg Landrum wrote:
>> Dear all,
>>
>> We've been invited again to participate in the OpenChemistry
>> application for Google Summer of Code.
>>
>> In order to participate we need ideas for projects and mentors to go
>> along with them.
>>
>> The current list of RDKit ideas is being maintained here:
>> http://wiki.openchemistry.org/GSoC_Ideas_2018#RDKit_Project_Ideas
>>
>> (Note: at the point that I'm pressing "send", that's still a copy of
>> last year's project ideas).
>>
>> If you're willing to be a mentor (please ask me about the ~5
>> hours/week required here) or have ideas, please reply to this thread.
>>
>> Best,
>> -greg
>>
>>
>> --
>> 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
>

--
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


--
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  
--
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


[Rdkit-discuss] Re: conda / Windows update to 2016.09 release gives error

2016-12-21 Thread Matthew Swain

I've also encountered this problem with the 2016.09.2 windows packages on the 
rdkit conda channel. It looks like somehow the RDConfig patch in the conda 
recipe hasn't been applied properly in the published packages.

The original lines in the rdkit are:

    condaDir += ['share', 'RDKit']
    _share = os.path.join(*condaDir)

The conda recipe has a Windows-specific patch to change this to:

    condaDir += ['Library','share','RDKit']
    _share = os.path.sep.join(condaDir)

Which looks fine (although the second line doesn't really need changing?). But 
in the published packages it is:

    condaDir += ['share', 'RDKit', 'RDKit']
    _share = os.path.join(condaDir)

This causes the AttributeError because it incorrectly passes a list to 
os.path.join, with no asterisk for unpacking the list into *args. The first 
line is also incorrect.

I built the package myself from the recipe, and didn't see this issue.

Matt

On Dec 09, 2016, at 05:05 PM, Curt Fischer  wrote:

I'm not sure of the source of the problem with the conda 2016.09 release on my 
Windows box, but I was able to revert to a 2016.03 release with a conda install 
-c rmg rdkit=2016.03*

conda couldn't seem to solve the specifications automagically, but after I 
uninstalled boost and did the above command, it identified the proper boost to 
install along with the 2016.03 rdkit.

I now have a functioning rdkit again, but would still be interested in hearing 
from anyone that experiences a similar problem.

On Thu, Dec 8, 2016 at 9:27 AM, Curt Fischer  wrote:
To update rdkit to the September release, I recently did a 

conda install -f --channel https://conda.anaconda.org/rdkit rdkit

on my Windows box, and everything seemed to update fine.  

However now, when I try from rdkit import Chem, I get the disturbing error 
message below.

Is this a sign that my particular installation got borked somehow, and I maybe 
I should reinstall everything again?  Or is this perchance a known issue with 
the 2016.09 release?  If the latter, how do I roll back to the old release 
using conda?  I tried a conda install --channel 
https://conda.anaconda.org/rdkit rdkit=2016.03.4 but that didn't seem to do it.

Thanks all for any help!

Curt

---
AttributeErrorTraceback (most recent call last)
 in ()
> 1 from rdkit import Chem

C:\Anaconda2\lib\site-packages\rdkit\Chem\__init__.py in ()
17 """
18 from rdkit import rdBase
---> 19 from rdkit import RDConfig
20 
21 from rdkit import DataStructs


C:\Anaconda2\lib\site-packages\rdkit\RDConfig.py in ()
31 condaDir[0] = os.path.sep
32   condaDir += ['share', 'RDKit', 'RDKit']
---> 33   _share = os.path.join(condaDir)
34   RDDataDir = os.path.join(_share, 'Data')
35   RDDocsDir = os.path.join(_share, 'Docs')

C:\Anaconda2\lib\ntpath.pyc in join(path, *paths)
63 def join(path, *paths):
64 """Join two or more pathname components, inserting "\\" as needed."""
---> 65 result_drive, result_path = splitdrive(path)
66 for p in paths:
67 p_drive, p_path = splitdrive(p)

C:\Anaconda2\lib\ntpath.pyc in splitdrive(p)
   114 """
   115 if len(p) > 1:
--> 116 normp = p.replace(altsep, sep)
   117 if (normp[0:2] == sep*2) and (normp[2:3] != sep):
   118 # is a UNC path:

AttributeError: 'list' object 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/xeonphi
___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
--
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/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] comparing two or more tables of molecules

2016-12-04 Thread Matthew Swain
Sorry Steve, there was a bug in MolVS that you encountered. Should now be fixed.

"pip install -U molvs" to get the update (v0.0.7).

Matt

> On 1 Dec 2016, at 15:52, Stephen O'hagan  wrote:
> 
> Thanks for the interesting links.
>  
> MolVS looks good, but failed on ‘NC(CC(=O)O)C(=O)[O-].O.O.[Na+]’ which isn’t 
> that extraordinary…
>  
> Couldn’t get Standardise to work at all, even on the example given; API not 
> intuitive or docs wrong or out of date.
>  
> I will have a look at the info in the UniChem paper, though not inclined to 
> use a web service for what I want to do.
>  
> Cheers,
> Steve.
>  
> From: George Papadatos [mailto:gpapada...@gmail.com] 
> Sent: 01 December 2016 14:26
> To: Greg Landrum 
> Cc: Stephen O'hagan ; 
> rdkit-discuss@lists.sourceforge.net; Francis Atkinson 
> Subject: Re: [Rdkit-discuss] comparing two or more tables of molecules
>  
> HI Stephen,
>  
> Further to Greg's excellent reply, see this paper on how InChI strings and 
> keys can be used in practice to map together tautomer (ones covered by InChI 
> at least), isotope, stereo and parent-salt variants. 
> http://rd.springer.com/article/10.1186/s13321-014-0043-5 
> 
>  
> Francis (cc'ed) has a nice notebook somewhere illustrating these nice InChI 
> splits to find these variants.  
>  
> For educational purposes, there have been other approaches like the NCI's 
> identifiers - discussion here: 
> http://acscinf.org/docs/meetings/237nm/presentations/237nm17.pdf 
> 
>  
> For pure structure standardization using RDKit see here: 
> https://github.com/flatkinson/standardiser 
> 
> and 
> https://github.com/mcs07/MolVS 
>  
>  
> Cheers, 
>  
> George
>  
>  
>  
>  
> On 29 November 2016 at 17:02, Greg Landrum  > wrote:
> Wow, this is a great question and quite a fun thread.
>  
> It's hard to really make much of a contribution here without writing a 
> book/review article (something that I'm really not willing to do!), but I 
> have a few thoughts. Most of this is repeating/rephrasing things others have 
> already said.
>  
> I'm going to propose some things as facts. I think that these won't be 
> controversial:
> fact 1: if the structures are coming from different sources, they need to be 
> standardized/normalized before you compare them. This is true regardless of 
> how you want to compare them. The details of the standardization process are 
> not incredibly important, but it does need to take care of the things you 
> care about when comparing molecules. For example, if you don't care about 
> differences between salts, it should strip salts. If you don't care about 
> differences between tautomers, it should normalize tautomers.
> fact 2: The InChI algorithm includes a standardization step that normalizes 
> some tautomers, but does not remove salts.
> fact 3: The InChI representation contain a number of layers defining the 
> structure in increasing detail (this isn't strictly true, because some of the 
> choices about how layers are ordered are arbitrary, but it's close).
> fact 4: canonicalization, the way I define it, produces a canonical atom 
> numbering for a given structure, but it does *not* standardize
> fact 5: the RDKit has essentially no well-documented standardization code
>  
> fact X: we don't have any standard, broadly accepted approach for 
> standardization, canonicalization or representation that is fool-proof or 
> that works for even all of organic chemistry, never mind organometallics. 
> InChI, useful as it is for some things, completely fails to handle things 
> like atropisomers (they are working on this kind of thing, but it's not out 
> yet).
>  
> Given all of this, if I wanted to have flexible duplicate checking *right* 
> now, I think I would use the AvalonTools struchk functionality that the RDKit 
> provides (the new pure-RDKit version still needs a bit more testing) to 
> handle basic standardization and salt stripping and then produce a table that 
> includes the InChI in a couple of different forms. I'd want to be able to 
> recognize molecules that differ only by stereochemistry, molecules that 
> differ only by location of tautomeric Hs, and molecules that differ only by 
> the location of isotopic labels. You can do this with various clever splits 
> of the InChI (how to do it is left as an exercise for the reader and/or a 
> future RDKit blog post). 
>  
> I think there's something fun to be done here with SMILES variants, borrowing 
> heavily from some of the things that Roger has written about:
> https://nextmovesoftware.com/blog/2013/04/25/finding-all-types-of-every-mer/ 
> 

Re: [Rdkit-discuss] No head on brew install

2014-05-27 Thread Matthew Swain
Hi,

That's odd, there should be a head option available.

My hunch is that your homebrew itself is outdated, even though the rdkit 
formula is up to date. Try doing brew update to update everything - it's good 
to do this regularly (followed by brew upgrade, if you want it to upgrade 
everything installed that has new versions available). If that doesn't work, 
maybe try doing the untap, tap, repair procedure and try again.

If it's still not working, try doing brew info rdkit: The head option should 
be listed, and the source should be 
https://github.com/rdkit/homebrew-rdkit/...;. If the details from brew info 
rdkit are wrong, it's possible you have multiple rdkit formulas tapped 
somehow. You can do brew install rdkit/rdkit/rdkit --HEAD to force it to use 
the correct formula.

Matt

On 27 May 2014, at 08:37, Nicholas Firth nicholas.fi...@icr.ac.uk wrote:

 Hi RDKitters, 
 
 I'm trying to update my RDKit verso, using brew. I go through the steps that 
 Matthew Swain emailed about previously but I'm getting an error.
 
 $ brew untap edc/rdkit
 Untapped 1 formula
 
 $ brew tap rdkit/rdkit
 Cloning into '/usr/local/Library/Taps/rdkit-rdkit'...
 remote: Reusing existing pack: 162, done.
 remote: Total 162 (delta 0), reused 0 (delta 0)
 Receiving objects: 100% (162/162), 23.96 KiB, done.
 Resolving deltas: 100% (41/41), done.
 Tapped 1 formula
 
 $ brew tap --repair
 Pruned 0 dead formula
 Tapped 230 formula
 
 $ brew install rdkit --HEAD
 Error: No head is defined for rdkit
 
 I'd much prefer to have the head version, does anyone know how I can go about 
 this using brew?
 
 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
 
 
 image001.gif
 
 
 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.
 --
 The best possible search technologies are now affordable for all companies.
 Download your FREE open source Enterprise Search Engine today!
 Our experts will assist you in its installation for $59/mo, no commitment.
 Test it for FREE on our Cloud platform anytime!
 http://pubads.g.doubleclick.net/gampad/clk?id=145328191iu=/4140/ostg.clktrk___
 Rdkit-discuss mailing list
 Rdkit-discuss@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

--
The best possible search technologies are now affordable for all companies.
Download your FREE open source Enterprise Search Engine today!
Our experts will assist you in its installation for $59/mo, no commitment.
Test it for FREE on our Cloud platform anytime!
http://pubads.g.doubleclick.net/gampad/clk?id=145328191iu=/4140/ostg.clktrk___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] implementation of tautomer enumeration/canonicalization

2014-04-03 Thread Matthew Swain
Hi,

I made a start on some tautomer enumeration and canonicalization code using 
RDKit in python a few months ago but got distracted before it was fully 
complete.

Here's what I have: https://gist.github.com/mcs07/9956421

It's a bit of a mess, but seems to work and might be useful if someone wants to 
build on it.

One thing to note: I started by implementing the transforms using the RDKit 
reaction tools, but ran into problem with it incorrectly breaking open rings in 
certain cases 
(http://www.mail-archive.com/rdkit-discuss%40lists.sourceforge.net/msg03791.html).
 So I switched to just matching SMARTS and then adjusting the relevant bond 
orders and charges as needed. This seems to work alright in my limited testing.

Also I just used the first canonical SMILES alphabetically to break a tie for 
the canonical tautomer, whereas as I believe the original implementation uses 
CACTVS hashcodes.

Matt

On 3 Apr 2014, at 15:55, Markus Sitzmann markus.sitzm...@gmail.com wrote:

 Hello,
 
 I was about to ask the same (I am one of the authors of the mentioned
 paper) - I had seen this post (gosh, a year ago) but had no time back
 then to answer (job search and a move from the US to Europe).
 
 I was digging into this last week a bit, however, I can not say much
 yet - very initial work. If something comes out of it, I would
 contribute it to RDKit. Well, if somebody has already done, I am
 happy, too. Or we join forces (however, for me it is only some private
 hacking with not so much time).
 
 Markus
 
 On Wed, Apr 2, 2014 at 11:32 AM, Dave W davejw...@molplex.com wrote:
 Hi Markus and all,
 
 Did you or anyone else end up coding this up? I am looking into doing it
 myself, but if it's already been done...
 
 Many thanks,
 Dave
 
 
 
 --
 ___
 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


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


Re: [Rdkit-discuss] rdkit homebrew recipe moved to the rdkit organization

2014-03-31 Thread Matthew Swain
Hi,

I've submitted some changes to the homebrew formula here:

https://github.com/rdkit/homebrew-rdkit/pull/6

Also, to avoid having worry about the redirection working correctly, those 
using the formula may want to just point homebrew towards the new location:

brew untap edc/rdkit
brew tap rdkit/rdkit
brew tap --repair


Matt

On 24 Mar 2014, at 08:21, Greg Landrum greg.land...@gmail.com wrote:

 Dear all,
 
 To organize things more cleanly, Eddie and I transferred the homebrew-rdkit 
 github repo from his account to the rdkit organization. It can now be found 
 here;
 https://github.com/rdkit/homebrew-rdkit
 
 If I read the docs correctly, old clones of Eddie's repo should continue to 
 work (and be redirected to the new repo), but it is recommended that people 
 update their clones: 
 https://help.github.com/articles/how-to-transfer-a-repository#redirects-and-git-remotes
 
 
 -greg
 
 --
 Learn Graph Databases - Download FREE O'Reilly Book
 Graph Databases is the definitive new guide to graph databases and their
 applications. Written by three acclaimed leaders in the field,
 this first edition is now available. Download your free book today!
 http://p.sf.net/sfu/13534_NeoTech___
 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] Aromatic Boron SMARTS

2014-02-18 Thread Matthew Swain
Hi,

I don't really know what's going on here, but you could try [#5!B] for you 
SMARTS.

#5 to match any boron, and !B to disallow non-aromatic.

Matt

On 18 Feb 2014, at 16:05, Elizabeth Wylie ewyli...@gmail.com wrote:

 Hello All,
 
 I have a series of 'aromatic' compounds in SMILES provided from a large 
 database. These may or may not be nonsensical compounds, but I'm running into 
 issues finding SMARTS expressions that can match an aromatic boron atom. 
 
 example:
 In [1]: from rdkit import Chem
 
 In [2]: s = Cb1c2sccc2cnn#1 
   
  
 
 In [3]: m = Chem.MolFromSmiles(s) 
   
  
 
 In [4]: t = Chem.MolFromSmarts('B')   
   
  
 
 In [5]: m.HasSubstructMatch(t)
   
  
 Out[5]: False
 
 In [6]: t = Chem.MolFromSmarts('[b]') 
   
  
 [09:54:18] SMARTS Parse Error: syntax error for input: [b]
 
 In [7]: m.Debug()
 Atoms:
 0 6 C chg: 0  deg: 1 exp: 1 imp: 3 hyb: 4 arom?: 0 chi: 0
 1 5 B chg: 0  deg: 3 exp: 3 imp: 0 hyb: 3 arom?: 1 chi: 0
 2 6 C chg: 0  deg: 3 exp: 4 imp: 0 hyb: 3 arom?: 1 chi: 0
 3 16 S chg: 0  deg: 2 exp: 2 imp: 0 hyb: 3 arom?: 1 chi: 0
 4 6 C chg: 0  deg: 2 exp: 3 imp: 1 hyb: 3 arom?: 1 chi: 0
 5 6 C chg: 0  deg: 2 exp: 3 imp: 1 hyb: 3 arom?: 1 chi: 0
 6 6 C chg: 0  deg: 3 exp: 4 imp: 0 hyb: 3 arom?: 1 chi: 0
 7 6 C chg: 0  deg: 2 exp: 3 imp: 1 hyb: 3 arom?: 1 chi: 0
 8 7 N chg: 0  deg: 2 exp: 3 imp: 0 hyb: 3 arom?: 1 chi: 0
 9 7 N chg: 0  deg: 2 exp: 3 imp: 0 hyb: 3 arom?: 1 chi: 0
 Bonds:
 0 0-1 order: 1 conj?: 0 aromatic?: 0
 1 1-2 order: 12 conj?: 1 aromatic?: 1
 2 2-3 order: 12 conj?: 1 aromatic?: 1
 3 3-4 order: 12 conj?: 1 aromatic?: 1
 4 4-5 order: 12 conj?: 1 aromatic?: 1
 5 5-6 order: 12 conj?: 1 aromatic?: 1
 6 6-7 order: 12 conj?: 1 aromatic?: 1
 7 7-8 order: 12 conj?: 1 aromatic?: 1
 8 8-9 order: 12 conj?: 1 aromatic?: 1
 9 9-1 order: 3 conj?: 1 aromatic?: 1
 10 6-2 order: 12 conj?: 1 aromatic?: 1
 
 
 I understand that the lowercase aromatic notation for boron is not accepted 
 in Daylight, but the SMILES parser in RDKit does not seem to have any issues 
 with it within the molecule. Is there a different SMARTS expression that I'm 
 missing that would match these boron atoms? 
 
 This seems like inconsistent behavior given the example below where an 
 aromatic form matches a non-aromatic SMARTS:
 
 In [12]: s = 
 'c1c[se]c(C2CN(c3c3)N=C2c2ccc(C3=NN(c4c4)CC3c3ccc[se]3)s2)c1'
 
 In [13]: m = Chem.MolFromSmiles(s)
   
  
 In [14]: m
 Out[14]: rdkit.Chem.rdchem.Mol at 0x28f90c0
 
 In [15]: t = Chem.MolFromSmarts('[Se]') 
 
 In [16]: m.HasSubstructMatch(t)
 Out[16]: True
 
 
 Thanks
 
 Liz Wylie
 --
 Managing the Performance of Cloud-Based Applications
 Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
 Read the Whitepaper.
 http://pubads.g.doubleclick.net/gampad/clk?id=121054471iu=/4140/ostg.clktrk___
 Rdkit-discuss mailing list
 Rdkit-discuss@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


--
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121054471iu=/4140/ostg.clktrk
___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


[Rdkit-discuss] Stop reaction opening ring

2014-02-12 Thread Matthew Swain
Hi,

If any atoms specified in a reaction happen to form a ring, RDKit will break it 
open:

 rxn = 
AllChem.ReactionFromSmarts('[C:1][C:2][O:3][C:4][C:5][C:1][C:2][C:3][C:4][C:5]')
 mol = Chem.MolFromSmiles('C1CCOC1')
 prod = rxn.RunReactants((mol,))[0][0]
 Chem.MolToSmiles(prod)
   'C'

Is this a bug, or expected behaviour?

It is possible to avoid this by specifying the ring manually in the reactants 
and the products:

 rxn = 
 AllChem.ReactionFromSmarts('[C:1]1[C:2][O:3][C:4][C:5]1[C:1]1[C:2][C:3][C:4][C:5]1')

But then this won't work if there is no ring, i.e. for CCOCC.

Is it possible to ensure that ring bonds are not broken if they are not 
explicitly referenced in the reactants SMARTS?


Matt
--
Android apps run on BlackBerry 10
Introducing the new BlackBerry 10.2.1 Runtime for Android apps.
Now with support for Jelly Bean, Bluetooth, Mapview and more.
Get your Android app in front of a whole new audience.  Start now.
http://pubads.g.doubleclick.net/gampad/clk?id=124407151iu=/4140/ostg.clktrk
___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss