Re: [Rdkit-discuss] Chopping and recombining molecules

2014-12-10 Thread Campbell J.E.
HI Greg,

Ideally I’d like the output to be one ring cleaved from the molecule, which 
then can be attached to another similar molecule. Nicks code yesterday allowed 
me to cleave a ring  pretty easily, just have to reattach it now.
Example output would be like this:  n1ccc2nc3cc4cc5ccncc5cc4nc3nc2c1 =  
c1ccncc1 + rest of molecule.

Josh

From: Greg Landrum [mailto:greg.land...@gmail.com]
Sent: 10 December 2014 02:41
To: Campbell J.E.
Cc: rdkit-discuss@lists.sourceforge.net
Subject: Re: [Rdkit-discuss] Chopping and recombining molecules

Hi Josh,

This looks like it might be doable, but before I start guessing: can you please 
give examples(s) of what you would like to have as output for the molecule 
below?

-greg


On Tue, Dec 9, 2014 at 3:23 PM, Campbell J.E. 
mailto:jec1...@soton.ac.uk>> wrote:
Hi rdkit users,

I have some linear ring molecules (such as pentacene, anthracene etc) with 
various substitutions that I want to fragment into individual rings and 
recombine as a new molecule. What’s the best way to do this in rdkit? I’ve been 
trying to use EditableMol but I can’t access all the fragments, or remove more 
bond at once. Here’s my code so far:

#n1ccc2nc3cc4cc5ccncc5cc4nc3nc2c1
break_atoms = [list(x) for x in 
m3.GetSubstructMatches(Chem.MolFromSmarts('[R2]'))]
break_bonds = ((3,20), (5,18), (7,16), (9,14))
em = Chem.EditableMol(m3)
em.RemoveBond(3,20)
nm = em.GetMol()
frags = Chem.GetMolFrags(nm,asMols=True)
[Chem.MolToSmiles(x,True) for x in frags]

I’ve had a look at the substructure replace function as well but I guess I’d 
need to identify the ring substructures first? Thanks for any help.

Josh Campbell

--
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

--
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


[Rdkit-discuss] Avalon test failing(?)

2014-12-10 Thread James Davidson
Hi Greg,

I wondered if you (or anyone else) have been seeing any issues with win64 build 
of the RDKit - with Avalon toolkit support - recently?
Yesterday I updated my local SVN copy of RDKit (to rev4274) and rebuilt.  
Everything seemed to go ok, but the testAvalonLib1 test is now failing (the 
pyAvalonTools test passes) - see below.
I can see that test1.cpp has changed recently, but my AvalonTools source 
hasn't...  Has a problem been introduced into the test?

Kind regards

James


C:\RDKit\build>ctest -R testAvalon -V
UpdateCTestConfiguration  from :C:/RDKit/build/DartConfiguration.tcl
UpdateCTestConfiguration  from :C:/RDKit/build/DartConfiguration.tcl
Test project C:/RDKit/build
Constructing a list of tests
Done constructing a list of tests
Checking test dependency graph...
Checking test dependency graph end
test 2
Start 2: testAvalonLib1

2: Test command: C:\RDKit\build\External\AvalonTools\Release\testAvalonLib1.exe
2: Test timeout computed to be: 9.99988e+006
2: [12:31:18] testing canonical smiles generation
2: [12:31:18] done
2: [12:31:18] testing coordinate generation
2: [12:31:18] done
2: [12:31:18] testing fingerprint generation
2: [12:31:18] c1n1 18
2:   returning
2: [12:31:18] c1n1 6
2: [12:31:18] c1nnccc1 28
2: [12:31:18] c1ncncc1 25
2: [12:31:18] c1cccnc1 18
2: [12:31:18] c1c1 6
2: [12:31:18] c1cccnc1 19
2: [12:31:18] c1cocc1 48
2: [12:31:18]
2:
2: 
2: Test Assert
2: Expression Failed:
2: Violation occurred on line 146 in file 
..\..\..\External\AvalonTools\test1.cpp
2: Failed Expression: bv.getNumOnBits()==53
2: 
2:
1/1 Test #2: testAvalonLib1 ...***Failed2.87 sec

0% tests passed, 1 tests failed out of 1

Total Test time (real) =   2.98 sec

The following tests FAILED:
  2 - testAvalonLib1 (Failed)
Errors while running CTest


__
PLEASE READ: This email is confidential and may be privileged. It is intended 
for the named addressee(s) only and access to it by anyone else is 
unauthorised. If you are not an addressee, any disclosure or copying of the 
contents of this email or any action taken (or not taken) in reliance on it is 
unauthorised and may be unlawful. If you have received this email in error, 
please notify the sender or postmas...@vernalis.com. Email is not a secure 
method of communication and the Company cannot accept responsibility for the 
accuracy or completeness of this message or any attachment(s). Please check 
this email for virus infection for which the Company accepts no responsibility. 
If verification of this email is sought then please request a hard copy. Unless 
otherwise stated, any views or opinions presented are solely those of the 
author and do not represent those of the Company.

The Vernalis Group of Companies
100 Berkshire Place
Wharfedale Road
Winnersh, Berkshire
RG41 5RD, England
Tel: +44 (0)118 938 

To access trading company registration and address details, please go to the 
Vernalis website at www.vernalis.com and click on the "Company address and 
registration details" link at the bottom of the page..
__--
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] Avalon test failing(?)

2014-12-10 Thread Greg Landrum
Hi James,

The new version of the test code is targeting the 1.2 avalon toolkit
version.
Here's the commit that did that.
https://github.com/rdkit/rdkit/commit/42dab414ee6fbe5489078e5e52046608bbf785cb

As an FYI, to make these tests pass on windows, you need to edit the code
to fix a bug:

you need to comment out line 1446 of reaccsio.c:
   //MyFree((char *)tempdir);

-greg

On Wed, Dec 10, 2014 at 1:44 PM, James Davidson 
wrote:

>  Hi Greg,
>
>
>
> I wondered if you (or anyone else) have been seeing any issues with win64
> build of the RDKit – with Avalon toolkit support – recently?
>
> Yesterday I updated my local SVN copy of RDKit (to rev4274) and rebuilt.
> Everything seemed to go ok, but the testAvalonLib1 test is now failing (the
> pyAvalonTools test passes) – see below.
>
> I can see that test1.cpp has changed recently, but my AvalonTools source
> hasn’t…  Has a problem been introduced into the test?
>
>
>
> Kind regards
>
>
>
> James
>
>
>
>
>
> C:\RDKit\build>ctest -R testAvalon -V
>
> UpdateCTestConfiguration  from :C:/RDKit/build/DartConfiguration.tcl
>
> UpdateCTestConfiguration  from :C:/RDKit/build/DartConfiguration.tcl
>
> Test project C:/RDKit/build
>
> Constructing a list of tests
>
> Done constructing a list of tests
>
> Checking test dependency graph...
>
> Checking test dependency graph end
>
> test 2
>
> Start 2: testAvalonLib1
>
>
>
> 2: Test command:
> C:\RDKit\build\External\AvalonTools\Release\testAvalonLib1.exe
>
> 2: Test timeout computed to be: 9.99988e+006
>
> 2: [12:31:18] testing canonical smiles generation
>
> 2: [12:31:18] done
>
> 2: [12:31:18] testing coordinate generation
>
> 2: [12:31:18] done
>
> 2: [12:31:18] testing fingerprint generation
>
> 2: [12:31:18] c1n1 18
>
> 2:   returning
>
> 2: [12:31:18] c1n1 6
>
> 2: [12:31:18] c1nnccc1 28
>
> 2: [12:31:18] c1ncncc1 25
>
> 2: [12:31:18] c1cccnc1 18
>
> 2: [12:31:18] c1c1 6
>
> 2: [12:31:18] c1cccnc1 19
>
> 2: [12:31:18] c1cocc1 48
>
> 2: [12:31:18]
>
> 2:
>
> 2: 
>
> 2: Test Assert
>
> 2: Expression Failed:
>
> 2: Violation occurred on line 146 in file
> ..\..\..\External\AvalonTools\test1.cpp
>
> 2: Failed Expression: bv.getNumOnBits()==53
>
> 2: 
>
> 2:
>
> 1/1 Test #2: testAvalonLib1 ...***Failed2.87 sec
>
>
>
> 0% tests passed, 1 tests failed out of 1
>
>
>
> Total Test time (real) =   2.98 sec
>
>
>
> The following tests FAILED:
>
>   2 - testAvalonLib1 (Failed)
>
> Errors while running CTest
>
>
>
> __
> PLEASE READ: This email is confidential and may be privileged. It is
> intended for the named addressee(s) only and access to it by anyone else is
> unauthorised. If you are not an addressee, any disclosure or copying of the
> contents of this email or any action taken (or not taken) in reliance on it
> is unauthorised and may be unlawful. If you have received this email in
> error, please notify the sender or postmas...@vernalis.com. Email is not
> a secure method of communication and the Company cannot accept
> responsibility for the accuracy or completeness of this message or any
> attachment(s). Please check this email for virus infection for which the
> Company accepts no responsibility. If verification of this email is sought
> then please request a hard copy. Unless otherwise stated, any views or
> opinions presented are solely those of the author and do not represent
> those of the Company.
>
> The Vernalis Group of Companies
> 100 Berkshire Place
> Wharfedale Road
> Winnersh, Berkshire
> RG41 5RD, England
> Tel: +44 (0)118 938 
>
> To access trading company registration and address details, please go to
> the Vernalis website at www.vernalis.com and click on the "Company
> address and registration details" link at the bottom of the page..
> __
>
--
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] Avalon test failing(?)

2014-12-10 Thread James Davidson
Hi Greg,


> The new version of the test code is targeting the 1.2 avalon toolkit

> version.

> Here's the commit that did that.

> https://github.com/rdkit/rdkit/commit/42dab414ee6fbe5489078e5e52046608bbf785cb

>

> As an FYI, to make these tests pass on windows, you need to edit the code

> to fix a bug:

>

> you need to comment out line 1446 of reaccsio.c:

>//MyFree((char *)tempdir);

Following your advice, I downloaded the 1.2 source from Sourceforge 
(http://sourceforge.net/projects/avalontoolkit/files/AvalonToolkit_1.2/); 
commented-out the line in reaccsio.c; and then reconfigured in cmake and 
rebuilt in VS.  The tests pass now - thanks!

Kind regards

James

__
PLEASE READ: This email is confidential and may be privileged. It is intended 
for the named addressee(s) only and access to it by anyone else is 
unauthorised. If you are not an addressee, any disclosure or copying of the 
contents of this email or any action taken (or not taken) in reliance on it is 
unauthorised and may be unlawful. If you have received this email in error, 
please notify the sender or postmas...@vernalis.com. Email is not a secure 
method of communication and the Company cannot accept responsibility for the 
accuracy or completeness of this message or any attachment(s). Please check 
this email for virus infection for which the Company accepts no responsibility. 
If verification of this email is sought then please request a hard copy. Unless 
otherwise stated, any views or opinions presented are solely those of the 
author and do not represent those of the Company.

The Vernalis Group of Companies
100 Berkshire Place
Wharfedale Road
Winnersh, Berkshire
RG41 5RD, England
Tel: +44 (0)118 938 

To access trading company registration and address details, please go to the 
Vernalis website at www.vernalis.com and click on the "Company address and 
registration details" link at the bottom of the page..
__--
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss