Re: [Rdkit-discuss] Stop bond highlights

2017-11-27 Thread Nicholas Firth
Hi Greg,

That's perfect. Thank you!

Cheers,
Nick

On Fri, 24 Nov 2017, 16:40 Greg Landrum, <greg.land...@gmail.com> wrote:

> Hi Nick,
>
> When you import IPythonConsole it monkey patches the substructure function
> so that it saves info about the results when you do a substructure search
> on a molecule.
> The data member is called __sssAtoms, and if you delete that you should no
> longer get the coloring:
> Heres a bit of demo:
>
> In [1]: from rdkit import Chem
>
> In [2]: from rdkit.Chem.Draw import IPythonConsole
>
> In [3]: m = Chem.MolFromSmiles('CCOC')
>
> In [4]: m.GetSubstructMatch(Chem.MolFromSmiles('CO'))
> Out[4]: (1, 2)
>
> In [5]: m.__sssAtoms
> Out[5]: [1, 2]
>
> In [7]: del m.__sssAtoms
>
>
> You, of course, need to check that the data member is there.
>
> If you're unlikely to want to see highlighting at all, it's easier to just
> turn if off:
>
> In [12]: IPythonConsole.highlightSubstructs=False
>
> In [13]: m.GetSubstructMatch(Chem.MolFromSmiles('CO'))
> Out[13]: (1, 2)
>
> In [14]: m.__sssAtoms
> Out[14]: []
>
>
>
> I hope this helps,
> -greg
>
>
>
> On Thu, Nov 23, 2017 at 2:05 PM, Nicholas Firth <nfi...@evartech.co.uk>
> wrote:
>
>> Howdy RDKitters,
>>
>> Been a while since I used this list, so forgive me if my question is
>> silly.
>>
>> I'm seeing some weird behaviour from drawing molecules. I've got some
>> wrapper classes that I'm using to write some de novo design code, which
>> involves fragmenting molecules, and I've obviously been fairly lax with my
>> namespacing. Essentially when I fragment my molecule the first bond that is
>> cut is highlighted when I draw the original molecule but the rest of the
>> cuts aren't (because I reassign variables). There's an example of what I
>> mean here <https://i.imgur.com/kvb3YyG.png> (
>> https://i.imgur.com/kvb3YyG.png)
>>
>> I tried to ClearComputedProps on the molecule but it still highlights the
>> bond, does anyone know of a way to clear this from the molecule so that it
>> doesn't get drawn? I'm going to clear up my programming issues to stop this
>> particular artefact, but it would definitely be helpful to understand this
>> for the rest of my code.
>>
>> Cheers,
>> Nick
>>
>>
>> --
>> 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] Stop bond highlights

2017-11-23 Thread Nicholas Firth
Howdy RDKitters,

Been a while since I used this list, so forgive me if my question is silly.

I'm seeing some weird behaviour from drawing molecules. I've got some
wrapper classes that I'm using to write some de novo design code, which
involves fragmenting molecules, and I've obviously been fairly lax with my
namespacing. Essentially when I fragment my molecule the first bond that is
cut is highlighted when I draw the original molecule but the rest of the
cuts aren't (because I reassign variables). There's an example of what I
mean here  (https://i.imgur.com/kvb3YyG.png
)

I tried to ClearComputedProps on the molecule but it still highlights the
bond, does anyone know of a way to clear this from the molecule so that it
doesn't get drawn? I'm going to clear up my programming issues to stop this
particular artefact, but it would definitely be helpful to understand this
for the rest of my code.

Cheers,
Nick
--
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] Rev. 5775 (Windows) - pyGraphMolWrap test fails

2015-07-13 Thread Nicholas Firth
Looks like the problem opening the file with the extra parameters used ('t+') 
as the gzip module just sticks a 'b' on the end of the opening mode

if mode and 'b' not in mode:
mode += 'b'

The test should run if line 3033 is changed from
 outf = gzip.open(tempfile.mktemp(),'wt+')
to
 outf = gzip.open(tempfile.mktemp(),'wb+')

which I would put right but I still have zero idea how to use git :)

The more interesting question is why does this work on Unix/Mac but not on 
Windows, and why do you get this error when it's not in the gzip code?


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.ukmailto:nicholas.fi...@icr.ac.uk | 
W www.icr.ac.ukhttp://www.icr.ac.uk/ | Twitter 
@ICRnewshttps://twitter.com/ICRnews
Facebook 
www.facebook.com/theinstituteofcancerresearchhttp://www.facebook.com/theinstituteofcancerresearch
Making the discoveries that defeat cancer

[cid:image001.gif@01CE053D.51D3C4E0]

On 13 Jul 2015, at 15:16, James Davidson 
j.david...@vernalis.commailto:j.david...@vernalis.com wrote:

gzip.pyc


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.--
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] create a mol from core and mol fragments

2015-07-03 Thread Nicholas Firth
Hi Axel, 

I was sure there was something in the core that did this but I can't seem to 
find it now! I have a function that uses isotope labelled dummy atoms to attach 
fragments if it's of any use? As with most the code I write, it doesn't have 
the greatest error handling, or rational use of deepcopy.

def connectAllFragsIsomeric(molList):
numFrags = len(molList)
isotopeList = []
allIsos = []
# This loop is to make a list of molecules along with which isotopes they 
contain
# so I can keep track of where which R-Groups are later
for i in range(numFrags):
molList[i] = processToIsomericMol(molList[i])
for atom in molList[i].GetAtoms():
isotope = atom.GetIsotope()
if(isotope):
isotopeList.append(isotope)
allIsos.append(isotope)
molList[i] = [molList[i], deepcopy(isotopeList)]
del isotopeList[:]

allIsos.sort()
allIsos = list(set(allIsos))

for i in allIsos:
reactantIdx = []
# Find two fragments with the labeled R-group
for j in range(len(molList)):
if(i in molList[j][1]):
reactantIdx.append(j)
# Sanity check that there are only two frags with the same R-group
if(len(reactantIdx) != 2):
print 'Too many fragments with a R-groups numbered with %i' % i
exit()
rxn = 
AllChem.ReactionFromSmarts('[a,A:1]-[%i*:2].[a,A:3]-[%i*:4][a,A:1]-[a,A:3].[%i*:2][%i*:4]'
 % (i, i, i, i))
ps = rxn.RunReactants((molList[reactantIdx[0]][0], 
molList[reactantIdx[1]][0]))
newMol = ps[0][0]
newIsos = list(set(molList[reactantIdx[0]][1]) | 
set(molList[reactantIdx[1]][1]))
newIsos.remove(i)
molList.append([newMol, newIsos])
del molList[reactantIdx[1]]
del molList[reactantIdx[0]]
return molList



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


From: Axel Pahl [axelp...@gmx.de]
Sent: 03 July 2015 07:27
To: RDKit Discuss
Subject: [Rdkit-discuss] create a mol from core and mol fragments

Dear fellow RDKitters,

I use ReplaceCore and GetMolFrags to create a 2D SAR table:


tmp = Chem.ReplaceCore(mol, core_mol, labelByIndex=True)

frag_mols = list(Chem.GetMolFrags(tmp, asMols=True))


Is it also possible to do the reverse? Create a new molecule from the core and 
two fragments?
I would like to fill the gaps in the SAR table and calculate some properties 
for these molecules.

Kind regards,
Axel

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.

--
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] RDKit Tools for the IPython Notebook

2015-07-03 Thread Nicholas Firth
Axel,

This is excellent. I may actually be able to get other people to use my work 
now I can use a nice interface!

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


From: Axel Pahl [axelp...@gmx.de]
Sent: 02 July 2015 13:31
To: RDKit Discuss
Subject: [Rdkit-discuss] RDKit Tools for the IPython Notebook

Dear fellow RDKitters,

the RDKit community is always so helpful that I wanted share back two functions 
that I use in the IPython Notebook from which I thought that they could be of 
use to others, as well.

- show_table:
Display a list of molecules in a table with molecule properties as columns.
When an ID property is given, the table becomes interactive and compounds can 
be selected.
I know that this can be also done with PandasTools but that might be overkill 
in some situations. Also the table from Pandas is not interactive to my 
knowledge.

- jsme:
Display Peter Ertl's Javascript Melecule Editor to enter a molecule directly in 
the IPython notebook (how cool is that??)

If you are interested, please have a look at the 
GitHubhttps://github.com/apahl/rdkit_ipynb_tools repo and the 
examplehttp://nbviewer.ipython.org/github/apahl/rdkit_ipynb_tools/blob/master/rdkit_ipynb_tools.ipynb
 notebook.

Kind regards,
Axel

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.

--
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] SMILES: Why are rings consisting of wildcards assumed to be aromatic?

2015-06-15 Thread Nicholas Firth
Is this not a case of Schrodingers aromaticity? Until we know what the dummy 
atom is, it is both aromatic and not? 


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


From: Peter Shenkin [shen...@gmail.com]
Sent: 15 June 2015 17:11
To: Greg Landrum
Cc: RDKit Discuss
Subject: Re: [Rdkit-discuss] SMILES: Why are rings consisting of wildcards 
assumed to be aromatic?

On Mon, Jun 15, 2015 at 9:54 AM, Greg Landrum 
greg.land...@gmail.commailto:greg.land...@gmail.com wrote:
On Thu, Jun 11, 2015 at 5:54 PM, Peter Shenkin 
shen...@gmail.commailto:shen...@gmail.com wrote:
If I canonicalize *1**1 in RDKit, I get  [*]1:[*]:[*]:1.

I expected [*]1[*][*]1.
...

This is certainly a bug and I've put it on the list of stuff to fix:
https://github.com/rdkit/rdkit/issues/518


Thanks much, Greg. That is very helpful.

Pursuing another remark you made, RDKit canonicalizes C1=C*C=C1 as [*]11. 
This may also be unwarranted, because the wildcard could be another C, in which 
case the structure would not be aromatic.

-P.

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


Re: [Rdkit-discuss] Building mol manually

2015-05-22 Thread Nicholas Firth
Hi Eric,

I don't know if there is a recommended way, but there's an easy way for sure!

from rdkit import Chem
m = Chem.Mol() #creates a blank molecule, can use an existing RDKit molecule 
though
em = Chem.EditableMol(m)
idx1 = em.AddAtom(Chem.Atom(6)) #this returns the RDKit index of the atom 
you're creating, which is atomic number 6
idx2 = em.AddAtom(Chem.Atom(6))
bondIdx = em.AddBond(idx1,idx2, Chem.BondType.SINGLE) #returns the RDKit index 
of the bond you're creating
m = em.GetMol()
Chem.SanitizeMol(m)
from rdkit.Chem import AllChem
AllChem.EmbedMolecule(m)
AllChem.MMFFOptimizeMolecule(m)
print Chem.MolToMolBlock(m)

 RDKit  3D

  2  1  0  0  0  0  0  0  0  0999 V2000
0.75400.0. C   0  0  0  0  0  0  0  0  0  0  0  0
   -0.75400.0. C   0  0  0  0  0  0  0  0  0  0  0  0
  1  2  1  0
M  END


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.ukmailto:nicholas.fi...@icr.ac.uk | 
W www.icr.ac.ukhttp://www.icr.ac.uk/ | Twitter 
@ICRnewshttps://twitter.com/ICRnews
Facebook 
www.facebook.com/theinstituteofcancerresearchhttp://www.facebook.com/theinstituteofcancerresearch
Making the discoveries that defeat cancer

[cid:image001.gif@01CE053D.51D3C4E0]

On 22 May 2015, at 15:22, Eric Smoll 
ericsm...@gmail.commailto:ericsm...@gmail.com wrote:

Hello RDKIT users,

I have a molecular data structure with the connectivity of all atoms in my 
molecule. Is there a recommended way to build a mol object by manually 
specifying each atom and each bond perhaps relaxing the coordinates with a 
forcefield?

Best,
Eric
--
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


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.--
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] generating scaffold trees

2015-05-22 Thread Nicholas Firth
We have an as yet unpublished method which is similar (but performs better) 
implemented in RDKit. However we use MOE for the scaffold tree. It would be 
quite easy to implement in RDKit , but I have a thesis to write! 

My suggestion would be to ask Nathan to write up the paper and then give you 
guys the code. 

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


From: George Papadatos [gpapada...@gmail.com]
Sent: 22 May 2015 16:27
To: Axel Pahl
Cc: RDKit Discuss
Subject: Re: [Rdkit-discuss] generating scaffold trees

Hi all,

Coincidentally, we had a chat about this with James the other day.
Maybe the good colleagues at the ICR have implemented this already with RDKit? 
Nick?

Cheers,

g


On 22 May 2015 at 13:38, Axel Pahl axelp...@gmx.demailto:axelp...@gmx.de 
wrote:
Dear RDKitters,

has someone used the RDKit to generate scaffold trees from molecules as
described in this paper:
Schuffenhauer, A., Ertl, P., Roggo, S., Wetzel, S., Koch, M. A.,
Waldmann, H., J. Chem. Inf. Model. 2007, 47, 47-58

I know that this is possible with ScaffoldHunter and that there is a
Pipeline Pilot component for it, but being able to do it in RDKit would
fit especially well in my workflow...

Kind regards and have a nice weekend,
Axel


--
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.netmailto: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.

--
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] SDF tags and -

2015-04-29 Thread Nicholas Firth
Ahh ok… Interesting way to format a file! Got to love ChemAxon...

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.ukmailto:nicholas.fi...@icr.ac.uk | 
W www.icr.ac.ukhttp://www.icr.ac.uk/ | Twitter 
@ICRnewshttps://twitter.com/ICRnews
Facebook 
www.facebook.com/theinstituteofcancerresearchhttp://www.facebook.com/theinstituteofcancerresearch
Making the discoveries that defeat cancer

[cid:image001.gif@01CE053D.51D3C4E0]

On 29 Apr 2015, at 12:23, Paolo Tosco 
paolo.to...@unito.itmailto:paolo.to...@unito.it wrote:

Hi Nick,

newlines in data properties are fine, but they should not include blank lines 
(i.e., multiple newlines).
For example, in:

  my_property1
1

2

3

4

  my_property2
1234

  my_property3
5678

my_property1 will be truncated to just 1. Based on the specifications, if you 
want to include a blank line, it should actually be either a   or a \t, 
rather than being completely blank.

Cheers,
Paolo

On 04/29/15 12:16, Nicholas Firth wrote:
I use SD files with new lines in the properties quite frequently (inherited 
from Pipeline Pilot's merge function) and I've never had a problem reading 
them. I've attached an SD file that works fine for me.

In [2]: suppl = Chem.SDMolSupplier('/Volumes/nfirth/tempf.sdf')

In [3]: m = suppl[0]

In [4]: t = m.GetProp('genNum')

In [5]: print t
1
2
3
4

In [6]: print t.split('\n')
['1', '2', '3', '4']


So I guess the problem is in the writer?

Best,
Nick

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.



--
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.netmailto: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


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.--
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] Python GetShortestPath()?

2015-04-21 Thread Nicholas Firth
Ahh apologise, I misunderstood the question! I thought it seemed a bit simple!

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.ukmailto:nicholas.fi...@icr.ac.uk | 
W www.icr.ac.ukhttp://www.icr.ac.uk/ | Twitter 
@ICRnewshttps://twitter.com/ICRnews
Facebook 
www.facebook.com/theinstituteofcancerresearchhttp://www.facebook.com/theinstituteofcancerresearch
Making the discoveries that defeat cancer

[cid:image001.gif@01CE053D.51D3C4E0]

On 21 Apr 2015, at 18:08, James Davidson 
j.david...@vernalis.commailto:j.david...@vernalis.com wrote:

Hi Nick,

Well on the plus side I don't get a segfault(!)
On the minus side - unfortunately I think this approach only gives the length 
of the shortest path, rather than a list of the atom ids in the shortest path.

Kind regards

James

-Original Message-
From: Nicholas Firth [mailto:nicholas.fi...@icr.ac.ukhttp://icr.ac.uk]
Sent: 21 April 2015 17:44
To: James Davidson; 
rdkit-discuss@lists.sourceforge.netmailto:rdkit-discuss@lists.sourceforge.net
Subject: RE: Python GetShortestPath()?

Dear James,

I tried to be helpful and show you how I do it with GetAdjacencyMatrix,
however I ran into my old friend the segmentation fault 11 as there is still
some weird error with this function.

Here's what I have though, should work for you.


from rdkit import Chem
m =

Chem.MolFromSmiles('CC[C@H](CO)NC1=NC(=C2C(=N1)N(C=N2)C(C)C)NCC
3=CC=
CC=C3')
atomIdx1 = 0
atomIdx2 = 10
print(Chem.GetAdjacencyMatrix(m)[atomIdx1][atomIdx2])
Segmentation fault: 11



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.ukmailto:nicholas.fi...@icr.ac.uk | W 
www.icr.ac.ukhttp://www.icr.ac.uk | Twitter @ICRnews


From: James Davidson [j.david...@vernalis.commailto:j.david...@vernalis.com]
Sent: 21 April 2015 17:06
To: 
rdkit-discuss@lists.sourceforge.netmailto:rdkit-discuss@lists.sourceforge.net
Subject: [Rdkit-discuss] Python GetShortestPath()?

Dear All,

I might be having a 'moment' here, but for the life of me I can't seem to find
the equivalent of RDKit::MolOps::getShortestPath exposed in python(?).
I want to pass in two atom ids, and get back a list of atom ids in the shortest
path.  I could possibly try to roll my own by using GetDistanceMatrix() and
GetAdjacencyMatrix(), but I think I may struggle(!).

So, any pointer to GetShortestPath() greatly appreciated!

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.commailto: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.comhttp://www.vernalis.com and click on the 
Company address
and registration details link at the bottom of the page..
__


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.

__
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

Re: [Rdkit-discuss] Python GetShortestPath()?

2015-04-21 Thread Nicholas Firth
Dear James,

I tried to be helpful and show you how I do it with GetAdjacencyMatrix, however 
I ran into my old friend the segmentation fault 11 as there is still some weird 
error with this function.

Here's what I have though, should work for you.


 from rdkit import Chem
 m = 
 Chem.MolFromSmiles('CC[C@H](CO)NC1=NC(=C2C(=N1)N(C=N2)C(C)C)NCC3=CC=CC=C3')
 atomIdx1 = 0
 atomIdx2 = 10
 print(Chem.GetAdjacencyMatrix(m)[atomIdx1][atomIdx2])
Segmentation fault: 11



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


From: James Davidson [j.david...@vernalis.com]
Sent: 21 April 2015 17:06
To: rdkit-discuss@lists.sourceforge.net
Subject: [Rdkit-discuss] Python GetShortestPath()?

Dear All,

I might be having a ‘moment’ here, but for the life of me I can’t seem to find 
the equivalent of RDKit::MolOps::getShortestPath exposed in python(?).
I want to pass in two atom ids, and get back a list of atom ids in the shortest 
path.  I could possibly try to roll my own by using GetDistanceMatrix() and 
GetAdjacencyMatrix(), but I think I may struggle(!).

So, any pointer to GetShortestPath() greatly appreciated!

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

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.

--
BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
Develop your own process in accordance with the BPMN 2 standard
Learn Process modeling best practices with Bonita BPM through live exercises
http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
source=Sourceforge_BPM_Camp_5_6_15utm_medium=emailutm_campaign=VA_SF
___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] Chopping and recombining molecules

2014-12-09 Thread Nicholas Firth
Hi Josh,

I've done a fair bit of breaking bonds and putting things back together, and 
I've tended to use the EditableMol class to do this. However I haven't been 
breaking any ring bonds.

As I'm sure you can see by looking at the molecule the reason you're getting 
this behaviour is because you're breaking the 'wrong' bond here. You might want 
to have a look at doing a different way, having a quick look at the code you 
might want to try PathToSubmol here.

m3 = Chem.MolFromSmiles('n1ccc2nc3cc4cc5ccncc5cc4nc3nc2c1')
r = m3.GetRingInfo()
aMap={}
nm = Chem.PathToSubmol(m3,r.AtomRings()[0], atomMap = aMap)

Will give you the first ring, however it will break some bonds, but this is 
easily fixed as aMap now contains the mapping from the previous molecule to the 
new molecule. So a quick fix would be to iterate over each of the bonds in the 
old molecule and then create the corresponding bonds in the new one.

em = Chem.EditableMol(nm)
for bond in m3.GetBonds():
if(bond.GetBeginAtomIdx() in aMap and bond.GetEndAtomIdx() in aMap):
try:
em.AddBond(aMap[bond.GetBeginAtomIdx()], 
aMap[bond.GetEndAtomIdx()], Chem.BondType.AROMATIC)
except:
pass
nnm = em.GetMol()

Which I thought would solve your problem, however the Chem.PathToSubmol command 
seems to give me an extra atom… Maybe someone else can help with that one??

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.ukmailto:nicholas.fi...@icr.ac.uk | 
W www.icr.ac.ukhttp://www.icr.ac.uk/ | Twitter 
@ICRnewshttps://twitter.com/ICRnews
Facebook 
www.facebook.com/theinstituteofcancerresearchhttp://www.facebook.com/theinstituteofcancerresearch
Making the discoveries that defeat cancer

[cid:image001.gif@01CE053D.51D3C4E0]

On 9 Dec 2014, at 14:23, Campbell J.E. 
jec1...@soton.ac.ukmailto:jec1...@soton.ac.uk wrote:

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]


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.--
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=164703151iu=/4140/ostg.clktrk___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] Chopping and recombining molecules

2014-12-09 Thread Nicholas Firth
I should add, the try/except statement was a hack to get round creating the 
same bond twice. I'm sure there's a more intelligent way to do this… but I 
haven't had lunch yet so I cheated.

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.ukmailto:nicholas.fi...@icr.ac.uk | 
W www.icr.ac.ukhttp://www.icr.ac.uk/ | Twitter 
@ICRnewshttps://twitter.com/ICRnews
Facebook 
www.facebook.com/theinstituteofcancerresearchhttp://www.facebook.com/theinstituteofcancerresearch
Making the discoveries that defeat cancer

[cid:image001.gif@01CE053D.51D3C4E0]

On 9 Dec 2014, at 14:54, Nicholas Firth 
nicholas.fi...@icr.ac.ukmailto:nicholas.fi...@icr.ac.uk wrote:

Hi Josh,

I've done a fair bit of breaking bonds and putting things back together, and 
I've tended to use the EditableMol class to do this. However I haven't been 
breaking any ring bonds.

As I'm sure you can see by looking at the molecule the reason you're getting 
this behaviour is because you're breaking the 'wrong' bond here. You might want 
to have a look at doing a different way, having a quick look at the code you 
might want to try PathToSubmol here.

m3 = Chem.MolFromSmiles('n1ccc2nc3cc4cc5ccncc5cc4nc3nc2c1')
r = m3.GetRingInfo()
aMap={}
nm = Chem.PathToSubmol(m3,r.AtomRings()[0], atomMap = aMap)

Will give you the first ring, however it will break some bonds, but this is 
easily fixed as aMap now contains the mapping from the previous molecule to the 
new molecule. So a quick fix would be to iterate over each of the bonds in the 
old molecule and then create the corresponding bonds in the new one.

em = Chem.EditableMol(nm)
for bond in m3.GetBonds():
if(bond.GetBeginAtomIdx() in aMap and bond.GetEndAtomIdx() in aMap):
try:
em.AddBond(aMap[bond.GetBeginAtomIdx()], 
aMap[bond.GetEndAtomIdx()], Chem.BondType.AROMATIC)
except:
pass
nnm = em.GetMol()

Which I thought would solve your problem, however the Chem.PathToSubmol command 
seems to give me an extra atom… Maybe someone else can help with that one??

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.ukmailto:nicholas.fi...@icr.ac.uk | 
W www.icr.ac.ukhttp://www.icr.ac.uk/ | Twitter 
@ICRnewshttps://twitter.com/ICRnews
Facebook 
www.facebook.com/theinstituteofcancerresearchhttp://www.facebook.com/theinstituteofcancerresearch
Making the discoveries that defeat cancer

image001.gif

On 9 Dec 2014, at 14:23, Campbell J.E. 
jec1...@soton.ac.ukmailto:jec1...@soton.ac.uk wrote:

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]



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.--
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=164703151iu=/4140/ostg.clktrk___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] Chem.GetDistanceMatrix Causes Seg Fault

2014-10-29 Thread Nicholas Firth
/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/vecLib

External Modification Summary:
  Calls made by other processes targeting this process:
task_for_pid: 0
thread_create: 0
thread_set_state: 0
  Calls made by this process:
task_for_pid: 0
thread_create: 0
thread_set_state: 0
  Calls made by all processes on this machine:
task_for_pid: 254734
thread_create: 6
thread_set_state: 0

VM Region Summary:
ReadOnly portion of Libraries: Total=87.5M resident=56.3M(64%) 
swapped_out_or_unallocated=31.2M(36%)
Writable regions: Total=27.1M written=10.2M(38%) resident=12.7M(47%) 
swapped_out=0K(0%) unallocated=14.4M(53%)
 
REGION TYPE  VIRTUAL
===  ===
MALLOC 17.5M
MALLOC guard page32K
STACK GUARD56.0M
Stack  8192K
VM_ALLOCATE   8K
__DATA 3204K
__LINKEDIT 60.7M
__TEXT 26.7M
__UNICODE   544K
shared memory12K
===  ===
TOTAL 172.7M

Model: MacPro5,1, BootROM MP51.007F.B03, 12 processors, 6-Core Intel Xeon, 2.66 
GHz, 64 GB, SMC 1.39f11
Graphics: ATI Radeon HD 5770, ATI Radeon HD 5770, PCIe, 1024 MB
Memory Module: DIMM 1, 8 GB, DDR3 ECC, 1333 MHz, 0x802C, 
0x31384B534631473732505A2D314734443120
Memory Module: DIMM 2, 8 GB, DDR3 ECC, 1333 MHz, 0x802C, 
0x31384B534631473732505A2D314734443120
Memory Module: DIMM 3, 8 GB, DDR3 ECC, 1333 MHz, 0x802C, 
0x31384B534631473732505A2D314734443120
Memory Module: DIMM 4, 8 GB, DDR3 ECC, 1333 MHz, 0x802C, 
0x31384B534631473732505A2D314734443120
Memory Module: DIMM 5, 8 GB, DDR3 ECC, 1333 MHz, 0x802C, 
0x31384B534631473732505A2D314734443120
Memory Module: DIMM 6, 8 GB, DDR3 ECC, 1333 MHz, 0x802C, 
0x31384B534631473732505A2D314734443120
Memory Module: DIMM 7, 8 GB, DDR3 ECC, 1333 MHz, 0x802C, 
0x31384B534631473732505A2D314734443120
Memory Module: DIMM 8, 8 GB, DDR3 ECC, 1333 MHz, 0x802C, 
0x31384B534631473732505A2D314734443120
AirPort: spairport_wireless_card_type_airport_extreme (0x14E4, 0x8E), Broadcom 
BCM43xx 1.0 (5.106.98.100.17)
Bluetooth: Version 4.1.7f2 12718, 3 service, 21 devices, 3 incoming serial ports
Network Service: Ethernet 1, Ethernet, en0
Network Service: Ethernet 2, Ethernet, en1
Network Service: Wi-Fi, AirPort, en2
PCI Card: ATI Radeon HD 5770, sppci_displaycontroller, Slot-1
Serial ATA Device: HL-DT-ST DVD-RW GH61N
Serial ATA Device: Hitachi HDS723020BLA642, 2 TB
Serial ATA Device: Hitachi HDS723020BLA642, 2 TB
Serial ATA Device: M4-CT512M4SSD2, 512.11 GB
Serial ATA Device: M4-CT512M4SSD2, 512.11 GB
USB Device: hub_device, apple_vendor_id, 0x9126, 0xfa20 / 2
USB Device: Keyboard Hub, apple_vendor_id, 0x1006, 0xfa23 / 6
USB Device: Apple Keyboard, apple_vendor_id, 0x0250, 0xfa232000 / 7
USB Device: Display Audio, apple_vendor_id, 0x1105, 0xfa24 / 5
USB Device: Display iSight, apple_vendor_id, 0x8508, 0xfa25 / 4
USB Device: Apple LED Cinema Display, apple_vendor_id, 0x9226, 0xfa26 / 3
USB Device: BRCM2046 Hub, 0x0a5c  (Broadcom Corp.), 0x4500, 0x5a10 / 2
USB Device: Bluetooth USB Host Controller, apple_vendor_id, 0x8215, 0x5a11 
/ 4
USB Device: USB Receiver, 0x046d  (Logitech Inc.), 0xc52b, 0x3a20 / 2
FireWire Device: built-in_hub, 800mbit_speed
Nicholas C. Firth| PhD Student | Cancer TherapeuticsThe Institute of Cancer Research | 15 Cotswold Road | Belmont | Sutton | Surrey | SM2 5NGT020 8722 4033|Enicholas.fi...@icr.ac.uk|Wwww.icr.ac.uk|Twitter@ICRnewsFacebookwww.facebook.com/theinstituteofcancerresearchMaking the discoveries that defeat cancer

On 28 Oct 2014, at 15:20, Nicholas Firth nicholas.fi...@icr.ac.uk wrote:Hello RDKitters,I'm having a problem with crashing my python every time I callChem.GetDistanceMatrix. It doesn't seem to matter what molecule I use, it causes Segmentation Fault: 11(everyone's favourite error).I started to dig through the code, but expected to find the function in CodeGraphMolMolOps but it doesn't appear to be there, although it is in the header file. So I'm a bit stuck.Anyone got any bright ideas?Thanks!
Best,NickNicholas C. Firth| PhD Student | Cancer TherapeuticsThe Institute of Cancer Research | 15 Cotswold Road | Belmont | Sutton | Surrey | SM2 5NGT020 8722 4033|Enicholas.fi...@icr.ac.uk|Wwww.icr.ac.uk|Twitter@ICRnewsFacebookwww.facebook.com/theinstituteofcancerresearchMaking the discoveries that defeat cancerimage001.gif

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


Re: [Rdkit-discuss] UGM Update

2014-10-24 Thread Nicholas Firth
Hi Christos, 

I did a few tweets using #rdkitugm2014 but it's by no means representative of 
the excellent presentations. 

I guess people will be putting their slides into the repository in the next few 
days. 


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


From: Christos Kannas [chriskan...@gmail.com]
Sent: 24 October 2014 12:17
To: RDKit
Subject: [Rdkit-discuss] UGM Update

Hi RDKiters,

How is UGM going?
Is there a tweet feed to follow?

Hope you are having a nice and interesting time!

Best,

Christos

Christos Kannas

Researcher
Ph.D Student

[http://s.c.lnkd.licdn.com/scds/common/u/img/webpromo/btn_viewmy_160x25.png]http://cy.linkedin.com/in/christoskannas

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


Re: [Rdkit-discuss] Reaction Problem

2014-09-25 Thread Nicholas Firth
As expected a simple answer. I didn't realise the 'reagents' had to be ordered.

Thanks Greg.

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.ukmailto:nicholas.fi...@icr.ac.uk | 
W www.icr.ac.ukhttp://www.icr.ac.uk/ | Twitter 
@ICRnewshttps://twitter.com/ICRnews
Facebook 
www.facebook.com/theinstituteofcancerresearchhttp://www.facebook.com/theinstituteofcancerresearch
Making the discoveries that defeat cancer

[cid:image001.gif@01CE053D.51D3C4E0]

On 24 Sep 2014, at 18:47, Greg Landrum 
greg.land...@gmail.commailto:greg.land...@gmail.com wrote:

Could it be that you mean ps = rxn.RunReactants((sub,ring)) ?

-greg


On Wed, Sep 24, 2014 at 6:50 PM, Nicholas Firth 
nicholas.fi...@icr.ac.ukmailto:nicholas.fi...@icr.ac.uk wrote:
Hi RDKitters,

I'm having an issue with running some reactions, I've taken a snapshot of my 
IPython notebook. I'm expecting to see some reactants there.

I'm guessing I'm just being stupid, so thanks in advance for the answers!

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.ukmailto:nicholas.fi...@icr.ac.uk | 
W www.icr.ac.ukhttp://www.icr.ac.uk/ | Twitter 
@ICRnewshttps://twitter.com/ICRnews
Facebook 
www.facebook.com/theinstituteofcancerresearchhttp://www.facebook.com/theinstituteofcancerresearch
Making the discoveries that defeat cancer

image001.gif
Screen Shot 2014-09-24 at 17.49.09.png

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.

--
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311iu=/4140/ostg.clktrk
___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.netmailto: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.--
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311iu=/4140/ostg.clktrk___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


[Rdkit-discuss] Reaction Problem

2014-09-24 Thread Nicholas Firth
Hi RDKitters,

I'm having an issue with running some reactions, I've taken a snapshot of my 
IPython notebook. I'm expecting to see some reactants there.

I'm guessing I'm just being stupid, so thanks in advance for the answers!

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.ukmailto:nicholas.fi...@icr.ac.uk | 
W www.icr.ac.ukhttp://www.icr.ac.uk/ | Twitter 
@ICRnewshttps://twitter.com/ICRnews
Facebook 
www.facebook.com/theinstituteofcancerresearchhttp://www.facebook.com/theinstituteofcancerresearch
Making the discoveries that defeat cancer

[cid:image001.gif@01CE053D.51D3C4E0]
[cid:E766679D-E87B-4564-885B-CB60A383C085@icr.ac.uk]

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.--
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311iu=/4140/ostg.clktrk___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] Write mol/sdf files

2014-08-26 Thread Nicholas Firth
Hi,

I personally don't use the inChi support, but I am aware that you have to 
install it as an optional package.

Optional packages
If you would like to install the RDKit InChI support (first available in 
the Q2 2011 release), follow the instructions in $RDBASE/External/INCHI-API to 
get a copy of the InChI source and put it in the appropriate place.


You can read more on the installation page 
(http://www.rdkit.org/docs/Install.html). Good luck!

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


From: acanada [acan...@cnio.es]
Sent: 26 August 2014 16:17
To: Paul Emsley
Cc: rdkit-discuss@lists.sourceforge.net
Subject: Re: [Rdkit-discuss] Write mol/sdf files

Thank you for your answer. That is what I'm trying to do. Having the inchi 
string inside inChi variable:

from rdkit import Chem
m = Chem.MolFromInchi(inChi)


I get this error
AttributeError: 'module' object has no attribute 'MolFromInchi'
I think it is well imported, isn't it?





El Aug 26, 2014, a las 4:55 PM, Paul Emsley escribió:

 On 26/08/14 10:42, acanada wrote:

 What is the best approach to write mol/sdf files for a compound which I 
 already have chebi, inChi?



 m=Chem.MolFromInchi('InChI=1S/C8H10N4O2/c1-10-4-9-6-5(10)7(13)12(3)8(14)11(6)2/h4H,1-3H3')
 print file('foo.mol','w+'),Chem.MolToMolBlock(m)



 --
 Slashdot TV.
 Video for Nerds.  Stuff that matters.
 http://tv.slashdot.org/
 ___
 Rdkit-discuss mailing list
 Rdkit-discuss@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


**NOTA DE CONFIDENCIALIDAD** Este correo electrónico, y en su caso los ficheros 
adjuntos, pueden contener información protegida para el uso exclusivo de su 
destinatario. Se prohíbe la distribución, reproducción o cualquier otro tipo de 
transmisión por parte de otra persona que no sea el destinatario. Si usted 
recibe por error este correo, se ruega comunicarlo al remitente y borrar el 
mensaje recibido.
**CONFIDENTIALITY NOTICE** This email communication and any attachments may 
contain confidential and privileged information for the sole use of the 
designated recipient named above. Distribution, reproduction or any other use 
of this transmission by any party other than the intended recipient is 
prohibited. If you are not the intended recipient please contact the sender and 
delete all copies.


--
Slashdot TV.
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
___
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.

--
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] Unhashed info in hashed fingerprint

2014-07-21 Thread Nicholas Firth
I've never tried it. What would be the motivation for doing so? This would, in 
general, increase similarity values for molecules, but it will also likely 
leads to more bit collisions in the fingerprints.

Academic interest mainly. I wonder whether the distribution of similarities 
would just shift so everything was more similar or whether you'd find a more 
interesting change in the similarity distribution. I highly doubt however that 
it would improve retrieval rate in a virtual screen.

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.ukmailto:nicholas.fi...@icr.ac.uk | 
W www.icr.ac.ukhttp://www.icr.ac.uk/ | Twitter 
@ICRnewshttps://twitter.com/ICRnews
Facebook 
www.facebook.com/theinstituteofcancerresearchhttp://www.facebook.com/theinstituteofcancerresearch
Making the discoveries that defeat cancer

[cid:image001.gif@01CE053D.51D3C4E0]

On 21 Jul 2014, at 04:28, Greg Landrum 
greg.land...@gmail.commailto:greg.land...@gmail.com wrote:


On Thu, Jul 17, 2014 at 10:04 AM, Nicholas Firth 
nicholas.fi...@icr.ac.ukmailto:nicholas.fi...@icr.ac.uk wrote:
Thanks Greg,

That's exactly what I needed.

Excellent.

I now have a question though, using modulo arithmetic means each environment 
only sets one bit in the FP (checking the code this looks true). Is there a 
reason why we only set a single bit with each environment? I mean we in the 
greater sense, has anyone ever looked at denser Morgan FP's (with a fixed 
radius)?

I've never tried it. What would be the motivation for doing so? This would, in 
general, increase similarity values for molecules, but it will also likely 
leads to more bit collisions in the fingerprints.

-greg



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.--
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] Unhashed info in hashed fingerprint

2014-07-17 Thread Nicholas Firth
Thanks Greg,

That's exactly what I needed.

I now have a question though, using modulo arithmetic means each environment 
only sets one bit in the FP (checking the code this looks true). Is there a 
reason why we only set a single bit with each environment? I mean we in the 
greater sense, has anyone ever looked at denser Morgan FP's (with a fixed 
radius)?

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


From: Greg Landrum [greg.land...@gmail.com]
Sent: 17 July 2014 05:52
To: Nicholas Firth
Cc: RDKit Discuss
Subject: Re: [Rdkit-discuss] Unhashed info in hashed fingerprint

On Wed, Jul 16, 2014 at 6:40 PM, Nicholas Firth 
nicholas.fi...@icr.ac.ukmailto:nicholas.fi...@icr.ac.uk wrote:
Hi RDKitters,

I might be being stupid here, but I'm trying to marry up the bitinfo from a 
hashed fingerprint to the actual fingerprint and I can't seem to do it.


from rdkit import Chem, DataStructs
from rdkit.Chem import rdMolDescriptors as rdMD
info = {}
mol = Chem.MolFromSmiles('C')
print rdMD.GetHashedMorganFingerprint(mol, radius=2, nBits = 1024, bitInfo = 
info).GetNonzeroElements()
print '\n',info



{33: 2, 294: 2, 591: 2, 80: 3, 887: 1, 794: 2, 381: 1}

{2246728737: ((0, 0), (4, 0)), 3542456614: ((0, 1), (4, 1)), 1685248591: ((1, 
2), (3, 2)), 2245384272: ((1, 0), (2, 0), (3, 0)), 1510461303: ((2, 1),), 
1173125914: ((1, 1), (3, 1)), 2738269565: ((2, 2),)}



The indices on the bitinfo appear to be the unhashed values. What I'd expect to 
see it something similar to the bit vector version of this code

Sure enough, that's a bug.

The values are the indices for the non-hashed (really non-folded, but it's too 
late to rename that function now) version of the fingerprint:

In [7]: info = {}

In [8]: print rdMD.GetMorganFingerprint(mol, radius=2, bitInfo = 
info).GetNonzeroElements()
{2246728737: 2, 3542456614: 2, 1685248591: 2, 2245384272: 3, 1510461303: 1, 
1173125914: 2, 2738269565: 1}

In [9]: print '\n',info

{2246728737: ((0, 0), (4, 0)), 3542456614: ((0, 1), (4, 1)), 1685248591: ((1, 
2), (3, 2)), 2245384272: ((1, 0), (2, 0), (3, 0)), 1510461303: ((2, 1),), 
1173125914: ((1, 1), (3, 1)), 2738269565: ((2, 2),)}

Fortunately it's easy to fix this. The bits are hashed/folded into the smaller 
fingerprint using integer modulo:

In [10]: info = {}

In [11]: print rdMD.GetHashedMorganFingerprint(mol, radius=2, nBits = 1024, 
bitInfo = info).GetNonzeroElements()
{33: 2, 294: 2, 591: 2, 80: 3, 887: 1, 794: 2, 381: 1}

In [12]: for k,v in info.ithttp://info.it
info.items   info.iteritems   info.iterkeysinfo.itervalues

In [12]: for k,v in info.items(): print k%1024,v
33 ((0, 0), (4, 0))
294 ((0, 1), (4, 1))
591 ((1, 2), (3, 2))
80 ((1, 0), (2, 0), (3, 0))
887 ((2, 1),)
794 ((1, 1), (3, 1))
381 ((2, 2),)

I'll fix the bug, but this workaround should hopefully cover things in the 
short term.

-greg

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.

--
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


[Rdkit-discuss] Unhashed info in hashed fingerprint

2014-07-16 Thread Nicholas Firth
Hi RDKitters,

I might be being stupid here, but I'm trying to marry up the bitinfo from a 
hashed fingerprint to the actual fingerprint and I can't seem to do it.


from rdkit import Chem, DataStructs
from rdkit.Chem import rdMolDescriptors as rdMD
info = {}
mol = Chem.MolFromSmiles('C')
print rdMD.GetHashedMorganFingerprint(mol, radius=2, nBits = 1024, bitInfo = 
info).GetNonzeroElements()
print '\n',info



{33: 2, 294: 2, 591: 2, 80: 3, 887: 1, 794: 2, 381: 1}

{2246728737: ((0, 0), (4, 0)), 3542456614: ((0, 1), (4, 1)), 1685248591: ((1, 
2), (3, 2)), 2245384272: ((1, 0), (2, 0), (3, 0)), 1510461303: ((2, 1),), 
1173125914: ((1, 1), (3, 1)), 2738269565: ((2, 2),)}



The indices on the bitinfo appear to be the unhashed values. What I'd expect to 
see it something similar to the bit vector version of this code



info = {}
mol = Chem.MolFromSmiles('C')
print list(rdMD.GetMorganFingerprintAsBitVect(mol, radius=2, nBits = 1024, 
bitInfo = info).GetOnBits())
print '\n',info


[33, 80, 294, 381, 591, 794, 887]

{33: ((0, 0), (4, 0)), 294: ((0, 1), (4, 1)), 591: ((1, 2), (3, 2)), 80: ((1, 
0), (2, 0), (3, 0)), 887: ((2, 1),), 794: ((1, 1), (3, 1)), 381: ((2, 2),)}



I think I might be going about something the wrong way here so I'll explain 
what I'm doing. I'm using the output from GetHashedMorganFingerprint in machine 
learning and from this I'm trying to generate some of Sereina's lovely 
similarity maps. However I'm having issues hacking her code because of the 
bitInfo vectors don't match my FP's.

Thanks in advance.

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.ukmailto:nicholas.fi...@icr.ac.uk | 
W www.icr.ac.ukhttp://www.icr.ac.uk/ | Twitter 
@ICRnewshttps://twitter.com/ICRnews
Facebook 
www.facebook.com/theinstituteofcancerresearchhttp://www.facebook.com/theinstituteofcancerresearch
Making the discoveries that defeat cancer

[cid:image001.gif@01CE053D.51D3C4E0]


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.--
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] Leaky Memory?

2014-06-11 Thread Nicholas Firth


I think I have found part of the problem, I tried it on a single processor last 
night and didn't get past the second molecule. The script hangs on this 
molecule.

 from rdkit import Chem
 from rdkit.Chem import Recap
 mol = 
 Chem.MolFromSmiles('CC[C@H](C)[C@H](NC(=O)[C@H](CC(C)C)NC(=O)[C@@H](NC(=O)[C@@H](N)CCSC)[C@@H](C)O)C(=O)NCC(=O)N[C@@H](C)C(=O)N[C@@H](C)C(=O)N[C@@H](Cc1c[nH]cn1)C(=O)N[C@@H](CC(=O)N)C(=O)NCC(=O)N[C@@H](C)C(=O)N[C@@H](C)C(=O)N[C@@H](CCC(=O)N)C(=O)N[C@@H](CC(C)C)C(=O)N[C@@H](CC(C)C)C(=O)N[C@@H](CCCN=C(N)N)C(=O)N[C@@H](CCC(=O)N)C(=O)N[C@@H](CC(C)C)C(=O)N[C@@H](CCCN=C(N)N)C(=O)NCC(=O)N[C@@H](CCC(=O)N)C(=O)N[C@@H](CC(C)C)C(=O)NCC(=O)N2CCC[C@H]2C(=O)N3CCC[C@H]3C(=O)NCC(=O)N[C@@H](CO)C(=O)N[C@@H](CCCN=C(N)N)C(=O)N')
 hierarch = Recap.RecapDecompose(mol)
 ks = hierarch.GetLeaves().keys()

I imagined it would be slow for this molecule, but 8 hours might be an issue 
rather than a feature!
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.ukmailto:nicholas.fi...@icr.ac.uk | 
W www.icr.ac.ukhttp://www.icr.ac.uk/ | Twitter 
@ICRnewshttps://twitter.com/ICRnews
Facebook 
www.facebook.com/theinstituteofcancerresearchhttp://www.facebook.com/theinstituteofcancerresearch
Making the discoveries that defeat cancer

image001.gif

On 10 Jun 2014, at 20:53, Dimitri Maziuk 
dmaz...@bmrb.wisc.edumailto:dmaz...@bmrb.wisc.edu wrote:

On 06/10/2014 01:48 PM, Nicholas Firth wrote:

I still have plenty of CPU's and memory available though, so this
seems odd. Some of the processes have done nothing and the others seem
to have frozen at different times.

Yeah. Parallel processing is often not quite that straightforward.

For instance, since you say they're writing to files, how's your disk i/o?

--
Dimitri Maziuk
Programmer/sysadmin
BioMagResBank, UW-Madison -- http://www.bmrb.wisc.eduhttp://www.bmrb.wisc.edu/




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.--
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing  Easy Data Exploration
http://p.sf.net/sfu/hpccsystems___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] Leaky Memory?

2014-06-11 Thread Nicholas Firth
I want to show some numbers from a compatible fragmentation scheme to my own 
one. Which means generating all the leaves from the hierarchy and then doing 
some post processing to merge these fragments. This isn't a problem on some of 
the more drug like data sets, however with ChEMBL this is causing me some 
stress.

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.ukmailto:nicholas.fi...@icr.ac.uk | 
W www.icr.ac.ukhttp://www.icr.ac.uk/ | Twitter 
@ICRnewshttps://twitter.com/ICRnews
Facebook 
www.facebook.com/theinstituteofcancerresearchhttp://www.facebook.com/theinstituteofcancerresearch
Making the discoveries that defeat cancer

[cid:image001.gif@01CE053D.51D3C4E0]

On 11 Jun 2014, at 09:26, Greg Landrum 
greg.land...@gmail.commailto:greg.land...@gmail.com wrote:

The RECAP code currently generates a hierarchy tree for the molecule. The size 
of this tree scales very non-linearly with the number of fragments. That 
molecule has a huge number of fragments.

I don't think the RECAP code will work for you as written.

What are you trying to get out of the analysis? There may be another approach 
that will work,

-greg





On Wed, Jun 11, 2014 at 3:25 AM, Nicholas Firth 
nicholas.fi...@icr.ac.ukmailto:nicholas.fi...@icr.ac.uk wrote:


I think I have found part of the problem, I tried it on a single processor last 
night and didn't get past the second molecule. The script hangs on this 
molecule.

 from rdkit import Chem
 from rdkit.Chem import Recap
 mol = 
 Chem.MolFromSmiles('CC[C@H](C)[C@H](NC(=O)[C@H](CC(C)C)NC(=O)[C@@H](NC(=O)[C@@H](N)CCSC)[C@@H](C)O)C(=O)NCC(=O)N[C@@H](C)C(=O)N[C@@H](C)C(=O)N[C@@H](Cc1c[nH]cn1)C(=O)N[C@@H](CC(=O)N)C(=O)NCC(=O)N[C@@H](C)C(=O)N[C@@H](C)C(=O)N[C@@H](CCC(=O)N)C(=O)N[C@@H](CC(C)C)C(=O)N[C@@H](CC(C)C)C(=O)N[C@@H](CCCN=C(N)N)C(=O)N[C@@H](CCC(=O)N)C(=O)N[C@@H](CC(C)C)C(=O)N[C@@H](CCCN=C(N)N)C(=O)NCC(=O)N[C@@H](CCC(=O)N)C(=O)N[C@@H](CC(C)C)C(=O)NCC(=O)N2CCC[C@H]2C(=O)N3CCC[C@H]3C(=O)NCC(=O)N[C@@H](CO)C(=O)N[C@@H](CCCN=C(N)N)C(=O)N')
 hierarch = Recap.RecapDecompose(mol)
 ks = hierarch.GetLeaves().keys()

I imagined it would be slow for this molecule, but 8 hours might be an issue 
rather than a feature!
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.ukmailto:nicholas.fi...@icr.ac.uk | 
W www.icr.ac.ukhttp://www.icr.ac.uk/ | Twitter 
@ICRnewshttps://twitter.com/ICRnews
Facebook 
www.facebook.com/theinstituteofcancerresearchhttp://www.facebook.com/theinstituteofcancerresearch
Making the discoveries that defeat cancer

image001.gif

On 10 Jun 2014, at 20:53, Dimitri Maziuk 
dmaz...@bmrb.wisc.edumailto:dmaz...@bmrb.wisc.edu wrote:

On 06/10/2014 01:48 PM, Nicholas Firth wrote:

I still have plenty of CPU's and memory available though, so this
seems odd. Some of the processes have done nothing and the others seem
to have frozen at different times.

Yeah. Parallel processing is often not quite that straightforward.

For instance, since you say they're writing to files, how's your disk i/o?

--
Dimitri Maziuk
Programmer/sysadmin
BioMagResBank, UW-Madison -- http://www.bmrb.wisc.eduhttp://www.bmrb.wisc.edu/




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.

--
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing  Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.netmailto: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

Re: [Rdkit-discuss] Leaky Memory?

2014-06-10 Thread Nicholas Firth
I've just had a look at the files it's writing too and three of them are empty 
and some of them aren't blank however they don't seem to be being written to at 
the moment (using tail -f to check).

I still have plenty of CPU's and memory available though, so this seems odd. 
Some of the processes have done nothing and the others seem to have frozen at 
different times.

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.ukmailto:nicholas.fi...@icr.ac.uk | 
W www.icr.ac.ukhttp://www.icr.ac.uk/ | Twitter 
@ICRnewshttps://twitter.com/ICRnews
Facebook 
www.facebook.com/theinstituteofcancerresearchhttp://www.facebook.com/theinstituteofcancerresearch
Making the discoveries that defeat cancer

[cid:image001.gif@01CE053D.51D3C4E0]

On 10 Jun 2014, at 18:57, Dimitri Maziuk 
dmaz...@bmrb.wisc.edumailto:dmaz...@bmrb.wisc.edu wrote:

On 06/10/2014 11:34 AM, Nicholas Firth wrote:

... I have been running the job
for about 30 minutes and I've got one process which is using 2.43 GB of
memory (and growing) yet some of the processes don't appear to be
growing at all, static at 34.5 MB, which is what I would expect (N.B.
the chunks will be heterogeneous). I am wondering if anyone knows where
my leak might be.

Nitpick: it's only a leak if the process never terminates, otherwise
it's deferred cleanup. ;)

My first question would be are the other processes actually doing anything?

--
Dimitri Maziuk
Programmer/sysadmin
BioMagResBank, UW-Madison -- http://www.bmrb.wisc.edu

signature.asc--
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing  Easy Data Exploration
http://p.sf.net/sfu/hpccsystems___
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.--
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing  Easy Data Exploration
http://p.sf.net/sfu/hpccsystems___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


[Rdkit-discuss] No head on brew install

2014-05-27 Thread Nicholas Firth
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.ukmailto:nicholas.fi...@icr.ac.uk | 
W www.icr.ac.ukhttp://www.icr.ac.uk/ | Twitter 
@ICRnewshttps://twitter.com/ICRnews
Facebook 
www.facebook.com/theinstituteofcancerresearchhttp://www.facebook.com/theinstituteofcancerresearch
Making the discoveries that defeat cancer

[cid:image001.gif@01CE053D.51D3C4E0]


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


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

2014-05-27 Thread Nicholas Firth
Hi,

I forgot to update everything. It's been a while since I used brew!

I've got the head version now :) many thanks Matthew.

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.ukmailto:nicholas.fi...@icr.ac.uk | 
W www.icr.ac.ukhttp://www.icr.ac.uk/ | Twitter 
@ICRnewshttps://twitter.com/ICRnews
Facebook 
www.facebook.com/theinstituteofcancerresearchhttp://www.facebook.com/theinstituteofcancerresearch
Making the discoveries that defeat cancer

[cid:image001.gif@01CE053D.51D3C4E0]

On 27 May 2014, at 09:41, Matthew Swain m.sw...@me.commailto:m.sw...@me.com 
wrote:

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.ukmailto: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.ukmailto:nicholas.fi...@icr.ac.uk | 
W www.icr.ac.ukhttp://www.icr.ac.uk/ | Twitter 
@ICRnewshttps://twitter.com/ICRnews
Facebook 
www.facebook.com/theinstituteofcancerresearchhttp://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.netmailto: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.--
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


[Rdkit-discuss] PAINS SMARTS

2014-05-01 Thread Nicholas Firth
Hi RDKitters,

I have (yet another) question about the handling of SMARTS. I have a set of 
SMARTS (http://www.macinchem.org/reviews/pains/painsFilter.php) which I have 
been using to perform PAINS filters but I've just discovered some strange 
behaviour, I would expect a match to happen in the example below.

 p = Chem.MolFromSmarts('[#6]-[#6](=[#16])-[#1]')
 m = Chem.MolFromSmiles('CC=S')
 m.HasSubstructMatch(p)
False

This can be fixed using the alternative form of the SMARTS

 p2 = Chem.MolFromSmarts('[#6]-[#6H](=[#16])')
 m.HasSubstructMatch(p2)
True

Doing some research (which I can no longer find the link for) it seems that 
[#1] seems to be reserved for more 'interesting' cases of hydrogen, for example:

 m = Chem.MolFromSmiles('CC(=S)[H]')
 m.HasSubstructMatch(p)
False
 m = Chem.MolFromSmiles('CC(=S)[2H]')
 m.HasSubstructMatch(p)
True

Also this seems to be changing the examples which greg posted in 
http://sourceforge.net/p/rdkit/mailman/message/31650578/

 p1=Chem.MolFromSmarts('c2sccc2[#1]')
 mol=Chem.MolFromSmiles('Clc2sccc2[H]')
 mol.HasSubstructMatch(p1)
False

Firstly is this expected behaviour? Because it's different to what I would 
expect, and different to how Pipeline Pilot behaves with SMARTS matching. And 
secondly, does anyone know how to get the expected behaviour without rewriting 
all the SMARTS.?

Thanks in advance. Apologies for the long read.

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.ukmailto:nicholas.fi...@icr.ac.uk | 
W www.icr.ac.ukhttp://www.icr.ac.uk/ | Twitter 
@ICRnewshttps://twitter.com/ICRnews
Facebook 
www.facebook.com/theinstituteofcancerresearchhttp://www.facebook.com/theinstituteofcancerresearch
Making the discoveries that defeat cancer

[cid:image001.gif@01CE053D.51D3C4E0]


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.--
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] PAINS SMARTS

2014-05-01 Thread Nicholas Firth
Thanks Greg,

That clears up how to go about fixing that. I'm left with a bit of confusion 
though, I should be able to add explicit hydrogens to my SMILES to get the 
result, but I did a simple case and this didn't work:

 p = Chem.MolFromSmarts('[#7]-[#1]')
 m = Chem.MolFromSmiles('c1cc[nH]c1')
 m.HasSubstructMatch(p)
False
 for atom in m.GetAtoms(): print atom.GetNumExplicitHs()
...
0
0
0
1
0

Is this a distinction between the naming of hydrogens and the occurrence of an 
atom on the molecular graph?

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.ukmailto:nicholas.fi...@icr.ac.uk | 
W www.icr.ac.ukhttp://www.icr.ac.uk/ | Twitter 
@ICRnewshttps://twitter.com/ICRnews
Facebook 
www.facebook.com/theinstituteofcancerresearchhttp://www.facebook.com/theinstituteofcancerresearch
Making the discoveries that defeat cancer

[cid:image001.gif@01CE053D.51D3C4E0]

On 1 May 2014, at 14:44, Greg Landrum 
greg.land...@gmail.commailto:greg.land...@gmail.com wrote:

Hi Nick,

On Thu, May 1, 2014 at 2:07 PM, Nicholas Firth 
nicholas.fi...@icr.ac.ukmailto:nicholas.fi...@icr.ac.uk wrote:

I have (yet another) question about the handling of SMARTS. I have a set of 
SMARTS (http://www.macinchem.org/reviews/pains/painsFilter.php) which I have 
been using to perform PAINS filters but I've just discovered some strange 
behaviour, I would expect a match to happen in the example below.

 p = Chem.MolFromSmarts('[#6]-[#6](=[#16])-[#1]')
 m = Chem.MolFromSmiles('CC=S')
 m.HasSubstructMatch(p)
False

That SMARTS, as formulated and being parsed is looking for an H atom that is 
explicitly present in the molecule graph. Unless you're planning on running 
AddHs() on everything, it won't work.

You can get the behavior you expect using the mergeHs argument to 
MolFromSmarts():

In [3]: p = Chem.MolFromSmarts('[#6]-[#6](=[#16])-[#1]',mergeHs=True)
In [4]: m = Chem.MolFromSmiles('CC=S')
In [5]: m.HasSubstructMatch(p)
Out[5]: True

This removes the [#1] from the graph and adds a [!H0] query to the attached 
carbon:
In [6]: Chem.MolToSmarts(p)
Out[6]: '[#6]-[#6!H0]=[#16]'

This can be fixed using the alternative form of the SMARTS

 p2 = Chem.MolFromSmarts('[#6]-[#6H](=[#16])')
 m.HasSubstructMatch(p2)
True

This is roughly equivalent to what happens above. The difference is that it's 
querying for a C that has a single H attached. In this case that's fine.

-greg



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


[Rdkit-discuss] RECAP Problem

2014-04-25 Thread Nicholas Firth
Hi RDKitters,

When using RECAP in RDKit I want to get the smallest set of non-overlapping 
fragments using the RECAP rules, so for the example in the docs 
CCC(=O)OCCOc1c1, I would expect to get the following [*]C(CC)=O, [*]CCO[*], 
[*]OC1=CC=CC=C1.

However this isn't the case as I get the extra fragment [*]CCOc1c1. Does 
anyone know how to get the output that I'm after?

Thanks in advance.

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.ukmailto:nicholas.fi...@icr.ac.uk | 
W www.icr.ac.ukhttp://www.icr.ac.uk/ | Twitter 
@ICRnewshttps://twitter.com/ICRnews
Facebook 
www.facebook.com/theinstituteofcancerresearchhttp://www.facebook.com/theinstituteofcancerresearch
Making the discoveries that defeat cancer

[cid:image001.gif@01CE053D.51D3C4E0]


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.--
Start Your Social Network Today - Download eXo Platform
Build your Enterprise Intranet with eXo Platform Software
Java Based Open Source Intranet - Social, Extensible, Cloud Ready
Get Started Now And Turn Your Intranet Into A Collaboration Platform
http://p.sf.net/sfu/ExoPlatform___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] SMARTS behaviour

2014-03-28 Thread Nicholas Firth
Thanks Jameed and Adrian,

I will have a look at those SMARTS, I have to admit I didn't know about them 
previous so thank you very much.

The SMARTS viewer had been really helpful, though it seemed to be showing me 
what I wanted. I was using the SMARTS editor from the Rarey group before using 
a temporary license, that was a really cool tool.

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


From: Adrian Jasiński [jasinski.adr...@gmail.com]
Sent: 27 March 2014 19:30
To: Jameed Hussain
Cc: Nicholas Firth; rdkit-discuss@lists.sourceforge.net Discuss
Subject: Re: [Rdkit-discuss] SMARTS behaviour

you can allways visualise yours SMARTS by using http://www.smartsview.de/

pozdrawiam
Adrian


2014-03-27 17:44 GMT+01:00 Jameed Hussain 
jameed.x.huss...@gsk.commailto:jameed.x.huss...@gsk.com:
Try this:
[*!H0;!$(*~[#0])]

I don’t think you can do what you want without a recursive SMARTS. It’s well 
worth doing the Daylight exercises to get your head around recursive SMARTS – 
they are really useful.

Cheers
Jameed

From: Nicholas Firth 
[mailto:nicholas.fi...@icr.ac.ukmailto:nicholas.fi...@icr.ac.uk]
Sent: 27 March 2014 15:23
To: 
rdkit-discuss@lists.sourceforge.netmailto:rdkit-discuss@lists.sourceforge.net 
Discuss
Subject: [Rdkit-discuss] SMARTS behaviour

Hi RDKitters,

This isn't strictly an RDKit based issue, but I guess someone here will be able 
to help me. I'm trying to identify the index of atoms in a molecule which have 
one or more hydrogen bonded to them but are not bonded to a dummy atom ([*]).

 mol = Chem.MolFromSmiles('[*]CCC[*]')
 patt = Chem.MolFromSmarts('[*H1,H2,H3,H4]!~[#0]')
 print mol.GetSubstructMatches(patt)
()

I'd expect this to return (1). But it would appear that I'm in the wrong, as 
Pipeline Pilot give the same result. Is there a SMARTS query that will give me 
the matches that I want or do I have to go back to iterating over atoms?

Many thanks in advance.

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.ukmailto:nicholas.fi...@icr.ac.uk | 
W www.icr.ac.ukhttp://www.icr.ac.uk/ | Twitter 
@ICRnewshttps://twitter.com/ICRnews
Facebook 
www.facebook.com/theinstituteofcancerresearchhttp://www.facebook.com/theinstituteofcancerresearch
Making the discoveries that defeat cancer

[cid:image001.gif@01CF49DB.251F0890]


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.



This e-mail was sent by GlaxoSmithKline Services Unlimited
(registered in England and Wales No. 1047315), which is a
member of the GlaxoSmithKline group of companies. The
registered address of GlaxoSmithKline Services Unlimited
is 980 Great West Road, Brentford, Middlesex TW8 9GS.

--

___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.netmailto: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] SMARTS behaviour

2014-03-27 Thread Nicholas Firth
Hi RDKitters,

This isn't strictly an RDKit based issue, but I guess someone here will be able 
to help me. I'm trying to identify the index of atoms in a molecule which have 
one or more hydrogen bonded to them but are not bonded to a dummy atom ([*]).

 mol = Chem.MolFromSmiles('[*]CCC[*]')
 patt = Chem.MolFromSmarts('[*H1,H2,H3,H4]!~[#0]')
 print mol.GetSubstructMatches(patt)
()

I'd expect this to return (1). But it would appear that I'm in the wrong, as 
Pipeline Pilot give the same result. Is there a SMARTS query that will give me 
the matches that I want or do I have to go back to iterating over atoms?

Many thanks in advance.

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.ukmailto:nicholas.fi...@icr.ac.uk | 
W www.icr.ac.ukhttp://www.icr.ac.uk/ | Twitter 
@ICRnewshttps://twitter.com/ICRnews
Facebook 
www.facebook.com/theinstituteofcancerresearchhttp://www.facebook.com/theinstituteofcancerresearch
Making the discoveries that defeat cancer

[cid:image001.gif@01CE053D.51D3C4E0]


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.inline: image001.gif--
___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] Joining Fragments

2013-12-02 Thread Nicholas Firth
Thanks for the replies.

I was looking for the combine molecules function. I use the reaction based 
joining for ordered connections I want to make. I was looking for something a 
bit more basic though.

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.ukmailto:nicholas.fi...@icr.ac.uk | 
W www.icr.ac.ukhttp://www.icr.ac.uk/ | Twitter 
@ICRnewshttps://twitter.com/ICRnews
Facebook 
www.facebook.com/theinstituteofcancerresearchhttp://www.facebook.com/theinstituteofcancerresearch
Making the discoveries that defeat cancer

[cid:image001.gif@01CE053D.51D3C4E0]

On 1 Dec 2013, at 04:40, Greg Landrum 
greg.land...@gmail.commailto:greg.land...@gmail.com wrote:

This is the approach I would use. It allows you to skip the SMILES generation 
and parsing steps.



On Fri, Nov 29, 2013 at 5:31 PM, Markus Hartenfeller 
markus.hartenfel...@molecularhealth.commailto:markus.hartenfel...@molecularhealth.com
 wrote:
Hi Nick,

I'm not 100% sure, but this might do what you are looking for:

Chem.CombineMols(molFrags[i], molFrags[i+1])

Best,
Markus


On 11/29/2013 05:03 PM, Nicholas Firth wrote:
 Hi RDKitters,

 This may be a silly question, but I'm wondering if there's any functionality 
 in RDKit to add two molecules together? I've been writing to SMILES and 
 joining with a '.' and then reading back in. This feels very cludgy.

 Basically I have two fragments of molecules and I want to add them into one 
 EditableMol and join these fragments to construct a single molecule.

 Thanks in advance.

 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.ukmailto:nicholas.fi...@icr.ac.uk 
 | W www.icr.ac.ukhttp://www.icr.ac.uk/ | Twitter @ICRnews

 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.

 --
 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=84349351iu=/4140/ostg.clktrk
 ___
 Rdkit-discuss mailing list
 Rdkit-discuss@lists.sourceforge.netmailto:Rdkit-discuss@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

 The information contained in this transmission may contain privileged and 
 confidential information, including patient information protected by federal 
 and state privacy laws. It is intended only for the use of the person(s) 
 named above. If you are not the intended recipient, you are hereby notified 
 that any review, dissemination, distribution, or duplication of this 
 communication is strictly prohibited. If you are not the intended recipient, 
 please contact the sender by reply email and destroy all copies of the 
 original message.


The information contained in this transmission may contain privileged and 
confidential information, including patient information protected by federal 
and state privacy laws. It is intended only for the use of the person(s) named 
above. If you are not the intended recipient, you are hereby notified that any 
review, dissemination, distribution, or duplication of this communication is 
strictly prohibited. If you are not the intended recipient, please contact the 
sender by reply email and destroy all copies of the original message.

--
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=84349351iu=/4140/ostg.clktrk
___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.netmailto:Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

--
Rapidly troubleshoot problems before they affect

[Rdkit-discuss] Joining Fragments

2013-11-29 Thread Nicholas Firth
Hi RDKitters,

This may be a silly question, but I'm wondering if there's any functionality in 
RDKit to add two molecules together? I've been writing to SMILES and joining 
with a '.' and then reading back in. This feels very cludgy.

Basically I have two fragments of molecules and I want to add them into one 
EditableMol and join these fragments to construct a single molecule. 

Thanks in advance.

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

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.

--
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=84349351iu=/4140/ostg.clktrk
___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


[Rdkit-discuss] Odd behaviour

2013-10-28 Thread Nicholas Firth
Hi RDKitters,

I am seeing some weird behaviour from the adding an atom and a bond to an 
EditableMol. It works fine in most cases however for this particular fragment 
I'm getting an extra hydrogen being added on for some reason.

 mol = Chem.MolFromSmiles('O=C1NC2=C(N1)C(=O)NC(=O)N2')
 Chem.Kekulize(mol, clearAromaticFlags = True)
 tempMol = Chem.EditableMol(mol)
 firstIdx = tempMol.AddAtom(dumAtom)
 tempMol.AddBond(8, firstIdx, Chem.BondType.SINGLE)
14
 print Chem.MolToSmiles(tempMol.GetMol())
[*][NH]1C(=O)NC2=C(NC(=O)N2)C1=O

So this molecule is not RDKit friendly, I don't really know why this is 
happening. I guess some form of conversion of an implicit hydrogen to an 
explicit hydrogen... 

Is there any way of stopping the magic hydrogen from appearing? Or away of 
easily getting rid of it after it's appeared?


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

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.

--
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=60135991iu=/4140/ostg.clktrk
___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] ambiguous detail

2013-10-03 Thread Nicholas Firth
Oops, I didn't change the subject on this... Wrong thread. Sorry RDKitters.
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


From: Nicholas Firth
Sent: 03 October 2013 16:13
To: Greg Landrum
Cc: rdkit-discuss@lists.sourceforge.net
Subject: RE: [Rdkit-discuss] ambiguous detail

Hi Greg,

As you were so worried about about the size of the RDKit dist due to the 
addition of the SA score, I thought I might be able to help you out. I've done 
a bit of optimisation to Peter's code, and changed the format of the .pkl.gz 
file. This has meant a reduction in the size of the file from 4.76 MB to 3.85 
MB (almost a 20% drop!) and also it has weirdly sped up the function 
readFragmentScores. I have attached the new .pkl.gz and the I have copied and 
pasted my version of the function below. I hope this helps you sleep better at 
night.


def readFragmentScoresFirth(name='myZip'):
import cPickle,gzip
global _fscores
_fscores = cPickle.load(gzip.open('%s.pkl.gz'%name))
outDict = {}
for i in _fscores:
for j in range(1,len(i)):
outDict[i[j]] = float(i[0])
_fscores = outDict

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


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.

--
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=60134791iu=/4140/ostg.clktrk
___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] molecular descriptors in C++

2013-08-27 Thread Nicholas Firth
Also to add to my previous email, when I started out with C++ RDKit I found it 
really useful to dig into the source code. Especially look through the code 
written to test the descriptors, more often than not you can adapt what Greg 
and co. have done already to do what you want.

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.ukmailto:nicholas.fi...@icr.ac.uk | 
W www.icr.ac.ukhttp://www.icr.ac.uk/ | Twitter 
@ICRnewshttps://twitter.com/ICRnews
Facebook 
www.facebook.com/theinstituteofcancerresearchhttp://www.facebook.com/theinstituteofcancerresearch
Making the discoveries that defeat cancer

[cid:image001.gif@01CE053D.51D3C4E0]

On 27 Aug 2013, at 15:05, Gonzalo Colmenarejo-Sanchez 
gonzalo.2.colmenar...@gsk.commailto:gonzalo.2.colmenar...@gsk.com wrote:

Hi,

I’m trying to calculate molecular descriptors in C++ with the RDKit. Does 
anyone have a code example that could help in this case?

Thanks a lot,

Gonzalo Colmenarejo

--
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=48897511iu=/4140/ostg.clktrk___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.netmailto: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.inline: image001.gif--
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=48897511iu=/4140/ostg.clktrk___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] molecular descriptors in C++

2013-08-27 Thread Nicholas Firth
Hi Gonzalo,

I shamelessly only have an example using PBF. Forgive the slightly dirty C++ 
coding, but you can get the idea of descriptor calculation.

using namespace std;
using namespace RDKit;

int main(int argc, char *argv[]){



string fileName = argv[1];
SDMolSupplier reader(fileName,false, false);
fileName = fileName.substr(0,fileName.size()-4);
fileName += _Scored_PBF.sdf;
SDWriter *writer = new SDWriter(fileName);
while(!reader.atEnd()){
ROMol *m=reader.next();
//MolOps::removeHs(*m);
if(!m) continue;
double dpbf=PBFRD(*m);
m-setProp(PBF_Score, dpbf);
writer-write(*m);
delete m;
}
writer-flush();
writer-close();



return 0;
}



I hope that is helpful.

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.ukmailto:nicholas.fi...@icr.ac.uk | 
W www.icr.ac.ukhttp://www.icr.ac.uk/ | Twitter 
@ICRnewshttps://twitter.com/ICRnews
Facebook 
www.facebook.com/theinstituteofcancerresearchhttp://www.facebook.com/theinstituteofcancerresearch
Making the discoveries that defeat cancer

[cid:image001.gif@01CE053D.51D3C4E0]

On 27 Aug 2013, at 15:05, Gonzalo Colmenarejo-Sanchez 
gonzalo.2.colmenar...@gsk.commailto:gonzalo.2.colmenar...@gsk.com wrote:

Hi,

I’m trying to calculate molecular descriptors in C++ with the RDKit. Does 
anyone have a code example that could help in this case?

Thanks a lot,

Gonzalo Colmenarejo

--
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=48897511iu=/4140/ostg.clktrk___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.netmailto: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.inline: image001.gif--
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=48897511iu=/4140/ostg.clktrk___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] Fwd: PostGres cartridge

2013-05-15 Thread Nicholas Firth
Hi Greg,

This is probably pretty straightforward.

You were correct there!

In order to build the cartridge you need to have $RDBASE pointing to the 
directory containing the RDKit source distribution 
(/usr/local/Cellar/rdkit/2012.03.1 in the example above from Hans). You're 
looking for the directory that contains the RDKit's Code directory. You don't 
have to change this globally or in your .bashrc file; you can just set the 
appropriate value of RDBASE in the shell where you want to build the cartridge 
and then try running make.

I couldn't get it to work by playing with RDBASE but instead I altered the 
Makefile so that all the -L${RDKIT}/lib were changed to -L/usr/local/lib and 
similarly with -I${RDKIT}/Code to -I/usr/local/include/rdkit.

Thanks for the help.

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.ukmailto:nicholas.fi...@icr.ac.uk | 
W www.icr.ac.ukhttp://www.icr.ac.uk/ | Twitter 
@ICRnewshttps://twitter.com/ICRnews
Facebook 
www.facebook.com/theinstituteofcancerresearchhttp://www.facebook.com/theinstituteofcancerresearch
Making the discoveries that defeat cancer

[cid:image001.gif@01CE053D.51D3C4E0]

On 15 May 2013, at 05:10, Greg Landrum 
greg.land...@gmail.commailto:greg.land...@gmail.com wrote:

Hi Nick,

On Tue, May 14, 2013 at 12:19 PM, Nicholas Firth 
nicholas.fi...@icr.ac.ukmailto:nicholas.fi...@icr.ac.uk wrote:
Hi RDKitters (in particular Hans),

I have an issue with the installation of the RDKit postgres cartridge using the 
brewed version of RDKit. I got an email from Eddie yesterday (below) with some 
instruction from Hans about how to do it. However I'm experiencing some 
problems.

My issue starts at step 2) (it's worth noting that I'm doing this with the 
latest release of RDKit). I started by following the instructions as they were 
but when I got to the make stage I get the error below,

adapter.cpp:32:10: fatal error: 'GraphMol/RDKitBase.h' file not found
#include GraphMol/RDKitBase.h

So I then went back and checked a few things and it seems that my $RDBASE 
variable is in a different place to the instructions mine is 
/usr/local/share/RDKit
I then created the link from the source to this RDBASE and I get the same error 
when I try to make.

This is about where my knowledge of UNIX runs out, so I thought I should ask 
the forum before I end up breaking it all!

This is probably pretty straightforward.

The cartridge is built, as you've seen, with a separate makefile - it does not 
use the cmake environment that the rest of the rdkit build does.
That makefile uses the value of the environment variable $RDBASE to tell the 
compiler where to find the rdkit's header files.
In order to build the cartridge you need to have $RDBASE pointing to the 
directory containing the RDKit source distribution 
(/usr/local/Cellar/rdkit/2012.03.1 in the example above from Hans). You're 
looking for the directory that contains the RDKit's Code directory. You don't 
have to change this globally or in your .bashrc file; you can just set the 
appropriate value of RDBASE in the shell where you want to build the cartridge 
and then try running make.

Hope this helps,
-greg



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.inline: image001.gif--
AlienVault Unified Security Management (USM) platform delivers complete
security visibility with the essential security capabilities. Easily and
efficiently configure, manage, and operate all of your security controls
from a single console and one unified framework. Download a free trial.
http://p.sf.net/sfu/alienvault_d2d___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


[Rdkit-discuss] PAINS

2013-04-25 Thread Nicholas Firth
Hi RDKitters,

I've just been made aware that the PAINS filters have been nicely put into 
SMARTS (http://www.macinchem.org/reviews/pains/painsFilter.php), my question is 
how do people think would be the most efficient way to implement this in RDKit?

I don't have much experience with SMARTS matching in RDKit, but I thought I 
could create a list of molecules from SMARTS and iterate over these using the 
'HasSubstructMatch()' function to show any failures. Does this sound sensible 
or is there a more efficient way?

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.ukmailto:nicholas.fi...@icr.ac.uk | 
W www.icr.ac.ukhttp://www.icr.ac.uk/ | Twitter 
@ICRnewshttps://twitter.com/ICRnews
Facebook 
www.facebook.com/theinstituteofcancerresearchhttp://www.facebook.com/theinstituteofcancerresearch
Making the discoveries that defeat cancer

[cid:image001.gif@01CE053D.51D3C4E0]


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.inline: image001.gif--
Try New Relic Now  We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service 
that delivers powerful full stack analytics. Optimize and monitor your
browser, app,  servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_apr___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


[Rdkit-discuss] SMILES and atom indexing

2013-03-19 Thread Nicholas Firth
Hi RDKitters,

I'm sure this must of been covered somewhere else but I can't find it in the 
forum or the source.

I am manipulating SMILES strings and wonder whether I can use RDKit as a 
shortcut, so my question is does the order of occurrence in a SMILES string of 
an atom match the atom index that is given by RDKit. It seems to me that it 
does but I'd like to know for all cases. For example

 from rdkit import Chem
 mol=Chem.MolFromSmiles('CSNOC')
 for atom in mol.GetAtoms(): print atom.GetAtomicNum(),atom.GetIdx()
...
6 0
16 1
7 2
8 3
6 4

This is what I would expect, but is there a case when this order might not be 
conserved?


If the order isn't always conserved, how does the indexing cope with RDKit 
canonical smiles?

Thanks in advance.

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.ukmailto:nicholas.fi...@icr.ac.uk | 
W www.icr.ac.ukhttp://www.icr.ac.uk/ | Twitter 
@ICRnewshttps://twitter.com/ICRnews
Facebook 
www.facebook.com/theinstituteofcancerresearchhttp://www.facebook.com/theinstituteofcancerresearch
Making the discoveries that defeat cancer

[cid:image001.gif@01CE053D.51D3C4E0]


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.inline: image001.gif--
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


[Rdkit-discuss] PyMol

2013-01-25 Thread Nicholas Firth
Hi RDKitters,

I've been looking at using RDKit to view molecules in PyMol as Greg showed at 
the UGM. I found the test file in the source and started firstly to replicate 
this, which threw and error so I then tried to run the test python 
Code/RDKit/RDKit_2012_06_1/rdkit/Chem/Subshape/testCombined.py and this also 
threw the same error which is below


Traceback (most recent call last):
  File testCombined.py, line 30, in module
v = MolViewer()
  File /usr/local/lib/python2.7/site-packages/rdkit/Chem/PyMol.py, line 29, 
in __init__
serv.ping()
  File 
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xmlrpclib.py,
 line 1224, in __call__
return self.__send(self.__name, args)
  File 
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xmlrpclib.py,
 line 1575, in __request
verbose=self.__verbose
  File 
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xmlrpclib.py,
 line 1264, in request
return self.single_request(host, handler, request_body, verbose)
  File 
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xmlrpclib.py,
 line 1292, in single_request
self.send_content(h, request_body)
  File 
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xmlrpclib.py,
 line 1439, in send_content
connection.endheaders(request_body)
  File 
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py,
 line 951, in endheaders
self._send_output(message_body)
  File 
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py,
 line 811, in _send_output
self.send(msg)
  File 
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py,
 line 773, in send
self.connect()
  File 
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py,
 line 754, in connect
self.timeout, self.source_address)
  File 
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/socket.py,
 line 571, in create_connection
raise err

So first question is, can anyone help me to get this working? Second question, 
is there a way to push RDKit molecules from C++ programs into PyMol?

Also while I'm bothering you Greg (as I assume you will read this), currently 
the smiles reader will read dummy atoms if they are [*] however neither [R] or 
[A]. Is there anyway the smiles reader can read [R] molecules? It's pretty 
simple to work round, but I thought it might be nice to go in RDKit

Thanks in advance.

Best,
Nick


Nicholas Firth, Ph.D. Student
Ph.D. Student
Institute of Cancer Research
15 Cotswold Road
Belmont
Surrey
SM2 5NG
[http://upload.wikimedia.org/wikipedia/en/c/c5/Institute_of_Cancer_Research_logo.jpg]http://icr.ac.uk
 [http://www.wordtracker.com/attachments/LinkedIn-Logo.png] 
http://uk.linkedin.com/pub/nicholas-firth/41/538/34b





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.--
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnnow-d2d___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


[Rdkit-discuss] Sanitize Mol Error

2012-11-14 Thread Nicholas Firth
Hi RDKiters,

I have encountered an issue with constructing a molecule from a graph 
representation, it's a particularly nasty molecule but all the charges and 
valencies are correct.

Then when trying to sanitise the molecule I get the error 'could not find a 
ring for the bond between atoms ** and **' (where stars are numbers), that 
would be fine if I could work round the error, however it seems to get caught 
in an infinite loop of these error messages, which I can't seem to get around.

Any ideas greatly appreciated.

Best,
Nick


Nicholas Firth, Ph.D. Student
Ph.D. Student
Institute of Cancer Research
15 Cotswold Road
Belmont
Surrey
SM2 5NG
[http://upload.wikimedia.org/wikipedia/en/c/c5/Institute_of_Cancer_Research_logo.jpg]http://icr.ac.uk
 [http://www.wordtracker.com/attachments/LinkedIn-Logo.png] 
http://uk.linkedin.com/pub/nicholas-firth/41/538/34b





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.--
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


[Rdkit-discuss] PBF Code

2012-10-29 Thread Nicholas Firth
Hi Guys,
I have managed to be allowed to open source the code from my paper. Greg I 
couldn't work if I was supposed to add this to the contrib or if you do it, so 
I've just attached it to the email. The code is a 'working' implementation 
although the error handling is not my finest work.
Best,
Nick


Nicholas Firth, Ph.D. Student
Ph.D. Student
Institute of Cancer Research
15 Cotswold Road
Belmont
Surrey
SM2 5NG
[http://upload.wikimedia.org/wikipedia/en/c/c5/Institute_of_Cancer_Research_logo.jpg]http://icr.ac.uk
 [http://www.wordtracker.com/attachments/LinkedIn-Logo.png] 
http://uk.linkedin.com/pub/nicholas-firth/41/538/34b




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.

PBFRDKit.cpp
Description: PBFRDKit.cpp


bestfit.cpp
Description: bestfit.cpp


PBFRDKit.h
Description: PBFRDKit.h


bestfit.h
Description: bestfit.h
--
The Windows 8 Center - In partnership with Sourceforge
Your idea - your app - 30 days.
Get started!
http://windows8center.sourceforge.net/
what-html-developers-need-to-know-about-coding-windows-8-metro-style-apps/___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


[Rdkit-discuss] RECAP on big Molecules

2012-10-24 Thread Nicholas Firth
Good Morning RDKiters,

I've been running a RECAP analysis on some molecules, I wanted to run it on 
ChEMBL and there are some sizeable molecules in it which appear to be causing 
problems for RECAP. For instance the molecule :

 
CC(=O)NCCC(=O)N[C@@H](Cc1ccc(F)cc1)C(=O)N2Cc3c3CC2C(=O)N4CC5C5C4C(=O)NCCC(=O)N[C@@H](CN)C(=O)N6Cc7c7CC6C(=O)N8CC9C9C8C(=O)NCCC(=O)N[C@@H](Cc%10ccc(F)cc%10)C(=O)N%11Cc%12c%12CC%11C(=O)N%13CC%14C%14C%13C(=O)NCCC(=O)N[C@@H](CN)C(=O)N%15Cc%16c%16CC%15C(=O)N[C@@H](CN)C(=O)N[C@@H](CN)C(=O)N[C@@H](CN)C(=O)N[C@@H](CN)C(=O)N

has some issues, the decompose works (although it takes quite some time), 
however the GetLeaves().keys() function seems to get stuck. I wondered if 
anyone had experienced this and has a fix/workround?

Best,
Nick


Nicholas Firth, Ph.D. Student
Ph.D. Student
Institute of Cancer Research
15 Cotswold Road
Belmont
Surrey
SM2 5NG
[http://upload.wikimedia.org/wikipedia/en/c/c5/Institute_of_Cancer_Research_logo.jpg]http://icr.ac.uk
 [http://www.wordtracker.com/attachments/LinkedIn-Logo.png] 
http://uk.linkedin.com/pub/nicholas-firth/41/538/34b





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.--
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_sfd2d_oct___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] Multiple Conformations SD Reader

2012-10-05 Thread Nicholas Firth
I assumed they would be in that order but got a seg fault when I tried, but 
that would be because I was deleting the pointer. Richard gets no errors when 
he compiles on his machine so I will check that when I get to work and then 
hopefully it should be ok to use.

I've also almost finished an RDKit implementation of the PBF score 
(http://pubs.acs.org/doi/abs/10.1021/ci300293f) so I will be adding that to the 
contributions asap. Also I'd like to apologise because although we've mentioned 
RDKit in the paper we somehow forgot to reference you, personally I'm blaming 
Nathan for this mistake, so Greg you can direct all hate mail to him.

Best,
Nick

From: Greg Landrum [greg.land...@gmail.com]
Sent: 05 October 2012 05:19
To: Nicholas Firth
Cc: rdkit-discuss@lists.sourceforge.net
Subject: Re: [Rdkit-discuss] Multiple Conformations SD Reader

On Thu, Oct 4, 2012 at 7:03 PM, Nicholas Firth nicholas.fi...@icr.ac.uk wrote:

 Hi everyone,
 As some one asked today about the Multiple conformations in one molecule, I 
 thought I would give it a crack, I've managed to get the conformations in to 
 one molecule (with what looks like a memory leak, that I can't seem to shift) 
 but I can't seem to write them back out again, I think the issue is with 
 conformer ids however I can't find any neat way of returning the conformer 
 ids. I has a look through the source and couldn't find too much, I had a 
 check to see if I could store them in the function, but the ids seem to be 
 the same, so I'm a little confused. Source is below...

I probably wouldn't return IDs from a function like this. You know the
conformers are going in with increasing numeric IDs (from 0-N-1).


 With regards to the memory leak, this is poor programming not an RDKit issue, 
 anyone know why I can't seem to delete the ROMol mol? The compiler throws up 
 an error when I do. Is this even a memory leak or is the memory being sucked 
 up by the conformations, because it seems like a lot.

You should be deleting the molecules (that's the likely cause of the
leak), but you shouldn't be deleting the conformer: when you call
ROMol::addConformer() the ROMol takes ownership of the pointer.

As an aside: In the C++ docs we tried to be careful about documenting
things like this, but you have to know to look for it. From the docs
for ROMol::addConformer()
[http://www.rdkit.org/docs/cppapi/classRDKit_1_1ROMol.html#a68a3402095df86b357ce5ec0366b3ea5]:

Parameters:
conf- conformation to be added to the molecule, this molecule takes
ownership of the conformer
assignId- a unique ID will be assigned to the the conformation if
true otherwise it is assumed that the conformation already has an
(unique) ID set

Best,
-greg

 It was nice to meet you all and hear some excellent talks.

 #include iostream
 #include string
 #include GraphMol/FileParsers/MolSupplier.h
 #include GraphMol/FileParsers/MolWriters.h
 #include GraphMol/RDKitBase.h
 #include GraphMol/MolOps.h
 #include GraphMol/SmilesParse/SmilesParse.h
 #include GraphMol/SmilesParse/SmilesWrite.h
 #include GraphMol/Conformer.h

 using namespace std;
 using namespace RDKit;

 ROMol *SDConfSupplier(string);

 int main(int argc, char *argv []){
 ROMol *mol;

 mol= SDConfSupplier(argv[1]); //takes first argument as the input file

 SDWriter writer(out.txt);
 cout  mol-getNumConformers()  endl;
 for(int i=0; imol-getNumConformers(); ++i){
 writer.write(*mol,i);
 }

 return 0;
 }

 ROMol* SDConfSupplier(string filename){
 SDMolSupplier suppl(filename);
 ROMol *res=0;
 res = suppl.next();

 while(!suppl.atEnd()){
 ROMol *mol;
 unsigned short resNumAtoms=res-getNumAtoms(), confNumAtoms=0;
 try{
 mol= suppl.next();
 confNumAtoms = mol-getNumAtoms();
 if(confNumAtoms!= resNumAtoms){
 cerr  Number of atoms in conformer incorrect\n;
 exit(0);
 }

 Conformer *conf = (mol-getConformer(0));
 res-addConformer(conf, true);
 delete conf;
 } catch(...){
 continue;
 }

 //delete mol;
 }
 return res;
 }




 Best,
 Nick

 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.

 --
 Don't let slow site performance ruin your business. Deploy New Relic APM
 Deploy New Relic app performance management and know exactly
 what is happening inside your Ruby, Python

[Rdkit-discuss] Multiple Conformations SD Reader

2012-10-04 Thread Nicholas Firth

Hi everyone,
As some one asked today about the Multiple conformations in one molecule, I 
thought I would give it a crack, I've managed to get the conformations in to 
one molecule (with what looks like a memory leak, that I can't seem to shift) 
but I can't seem to write them back out again, I think the issue is with 
conformer ids however I can't find any neat way of returning the conformer ids. 
I has a look through the source and couldn't find too much, I had a check to 
see if I could store them in the function, but the ids seem to be the same, so 
I'm a little confused. Source is below...

With regards to the memory leak, this is poor programming not an RDKit issue, 
anyone know why I can't seem to delete the ROMol mol? The compiler throws up an 
error when I do. Is this even a memory leak or is the memory being sucked up by 
the conformations, because it seems like a lot.

It was nice to meet you all and hear some excellent talks.

#include iostream
#include string
#include GraphMol/FileParsers/MolSupplier.h
#include GraphMol/FileParsers/MolWriters.h
#include GraphMol/RDKitBase.h
#include GraphMol/MolOps.h
#include GraphMol/SmilesParse/SmilesParse.h
#include GraphMol/SmilesParse/SmilesWrite.h
#include GraphMol/Conformer.h

using namespace std;
using namespace RDKit;

ROMol *SDConfSupplier(string);

int main(int argc, char *argv []){
ROMol *mol;

mol= SDConfSupplier(argv[1]); //takes first argument as the input file

SDWriter writer(out.txt);
cout  mol-getNumConformers()  endl;
for(int i=0; imol-getNumConformers(); ++i){
writer.write(*mol,i);
}

return 0;
}

ROMol* SDConfSupplier(string filename){
SDMolSupplier suppl(filename);
ROMol *res=0;
res = suppl.next();

while(!suppl.atEnd()){
ROMol *mol;
unsigned short resNumAtoms=res-getNumAtoms(), confNumAtoms=0;
try{
mol= suppl.next();
confNumAtoms = mol-getNumAtoms();
if(confNumAtoms!= resNumAtoms){
cerr  Number of atoms in conformer incorrect\n;
exit(0);
}

Conformer *conf = (mol-getConformer(0));
res-addConformer(conf, true);
delete conf;
} catch(...){
continue;
}

//delete mol;
}
return res;
}




Best,
Nick

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.

--
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


[Rdkit-discuss] Kekulization Problems

2012-06-06 Thread Nicholas Firth
Hi All,
I'm having some issues with getting some more 'interesting' ring systems to 
kekulize. I'm creating the molecule in RDKit by individually adding all the 
atoms and bonds from a graph. However I have found similar issue when trying to 
initialise a molecule from smiles.
Two examples of molecules which won't kekulize are:
n11
c1cccp1
however, when adding hydrogens to these smiles, so
n1n[nH]nn1
c1ccc[pH]1
These will work perfectly fine. This is a problem as the graph structure I have 
does not include any hydrogens. For a fix I have tried to addHs to my molecule, 
however I'm having issue with these functions because I'm writing in C++ and 
want to return this value, so don't have any pointers as this results in a 
memory leak.

Any help, whether it be programming advice or RDKit function advice would be 
very helpful.

Best,
Nick
Nicholas Firth, Ph.D. Student
Institute of Cancer Research
15 Cotswold Road
Belmont
Surrey
SM2 5NG
[https://cansar.icr.ac.uk/main_page/ICR_CRUK_LOGO.png]http://www.icr.ac.uk/[http://www.prlog.org/11500893-linkedin-logo.jpg]http://www.linkedin.com/profile/view?id=147633899trk=tab_pro





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


Re: [Rdkit-discuss] Kekulization Problems

2012-06-06 Thread Nicholas Firth
Paul, unfortunately because mol is an RWMol (as I have to add the heavy atoms 
from a graph) this doesn't work.
Produces the same error as before.

Greg, I'm confused as to what you mean by the EditableMol in C++, I thought 
that EditableMol was the python wrapper for RWMol?

Best,
Nick
Nicholas Firth, Ph.D. Student
Institute of Cancer Research
15 Cotswold Road
Belmont
Surrey
SM2 5NG
[https://cansar.icr.ac.uk/main_page/ICR_CRUK_LOGO.png]http://www.icr.ac.uk/[http://www.prlog.org/11500893-linkedin-logo.jpg]http://www.linkedin.com/profile/view?id=147633899trk=tab_pro




On 6 Jun 2012, at 13:33, Paul Emsley wrote:

On 06/06/12 14:06, Nicholas Firth wrote:
Well I'm not quite sure what the issue is to be honest (also not very sure if 
this fix will even work, so thought it best to ask).

The work round is:

ROMol *tempMol= static_castROMol *(new RWMol(mol));
tempMol = MolOps::addHs(*tempMol);
mol = static_castRWMol(*tempMol);



I don't think it's a matter of libraries.  Given mol is ROMol,

ROMol *mol_with_Hs = MolOps::addHs(mol);
ROMol returnable_mol(*mol_with_Hs);
return returnable_mol;

Paul.

--
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.netmailto: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.--
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


Re: [Rdkit-discuss] Fingerprinting

2012-03-08 Thread Nicholas Firth
Hi Greg.
I've run into a few more problems with Fingerprinting, I'm trying to create a 
database of these finger prints, I've tried a few different methods to write 
the fingerprints

SparseIntVectboost::uint32_t *finger;
mol=SmilesToMol(line);
finger = MorganFingerprints::getFingerprint(*mol, 2);
cout  finger.toString()  endl;

Which returns

Fingerprint.cpp:49: error: request for member ‘toString’ in ‘finger’, which is 
of non-class type ‘RDKit::SparseIntVectunsigned int*’

Then as a fix i tried intreated over the entries in the vector however firstly 
I can't use the getLength function because of the same error above, and when I 
put in an arbitrary depth and managed to get some output, however it seemed 
only to output a huge amount of zero's

Thanks,
Nick
On 8 Mar 2012, at 13:07, Greg Landrum wrote:

Hi Nick,

On Thu, Mar 8, 2012 at 1:10 PM, Nicholas Firth 
nicholas.fi...@icr.ac.ukmailto:nicholas.fi...@icr.ac.uk wrote:
Hi All,
Further to my post yesterday, I have most of my RDKit functionality back
(hooray!). Now I'm going to ask the question I should of asked yesterday
before I decided to 'fix' it myself.
I'm trying to get Morgan fingerprints of molecules, the code that I'm using
is
…
SparseIntVectboost::uint32_t *finger;
ROMol *mol;
while(!infile.eof()){
getline(infile, line);
line = line.substr(0,line.size()-2);
std::cout  line  \n;
mol=SmilesToMol(line);
finger = MorganFingerprints::getFingerprint(*mol, 2);
}
…

This does not compile, I get the error

103528cthdt:MOOPGA nfirth$  g++ Fingerprint.cpp -I/usr/local/include/rdkit
-L/usr/local/lib -lChemReactions -lFileParsers -lSmilesParse -lDepictor
-lSubstructMatch -lGraphMol -lDataStructs -lRDGeometryLib -lRDGeneral
Undefined symbols for architecture x86_64:
  RDKit::MorganFingerprints::getFingerprint(RDKit::ROMol const, unsigned
int, std::vectorunsigned int, std::allocatorunsigned int *,
std::vectorunsigned int, std::allocatorunsigned int  const*, bool, bool,
bool, std::mapunsigned int, std::vectorstd::pairunsigned int, unsigned
int, std::allocatorstd::pairunsigned int, unsigned int  ,
std::lessunsigned int, std::allocatorstd::pairunsigned int const,
std::vectorstd::pairunsigned int, unsigned int,
std::allocatorstd::pairunsigned int, unsigned int *),
referenced from:
  _main in ccezHfTZ.o
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status

Looks like that link command above is missing the fingerprinting library.
There should be a -lFingerprints in your link line.

-greg


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.--
Virtualization  Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] Linking issues

2012-02-06 Thread Nicholas Firth
Perfect, thanks so much for the help Greg. 
Best,
Nick


On 6 Feb 2012, at 12:36, Greg Landrum wrote:

 I'm not sure why it should produce this particular error, but what you
 should be doing is:
 
 -L$RDBASE/lib
 
 -greg
 
 On Mon, Feb 6, 2012 at 10:45 AM, Nicholas Firth
 nicholas.fi...@icr.ac.uk wrote:
 Dear Greg,
 I have copied it exactly from the example code,
 
 101912cthlt:Test nfirth$ g++ -o sample.out sample.cpp -I$RDBASE/Code \ 
 -L$RDBASE -lChemReactions -lFileParsers -lSmilesParse -lDepictor 
 -lSubstructMatch -lGraphMol -lDataStructs -lRDGeometryLib -lRDGeneral
 
 i686-apple-darwin11-llvm-g++-4.2:  
 -L/Users/nfirth/Code/RDKit/RdKit_2011_09_1: No such file or directory
 


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.

--
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss