Re: [Rdkit-discuss] GetBestRMS and the carboxylic acid

2018-04-17 Thread Martin Watson
Update, the explicit or not charge is not relevant. that just determines
the behaviour of the AssignBondOrderstoTemplate.  The behaviour is that
GetBestRMS does not consider a carboxylate as symmetric.  Can anyone
suggest a workaround to treat as symmetric?

*Kind Regards*

Dr. Martin Watson
VP Structural Analysis
C4X Discovery Ltd

martin.wat...@c4xdiscovery.com
+44 (0)7753 434535
+44 (0)161 235 5085

*www.c4xdiscovery.com *

On 17 April 2018 at 14:21, Martin Watson 
wrote:

> Hi
>
> I'm using GetBestRMS to score conformers in an sdf relative to a pdb
> extracted sdf ligand using the snippet below. I get odd behaviour when the
> molecule includes a carboxylic acid.  depending on whether the charge is
> explicitly defined in the sdf or not I get a different RMS which seems to
> be that the symmetry of the carboxyl is not considered by GetBestRMS is
> that so?  And if not can anyone suggest a workaround.  (FWIW I have
> examples which "work" when the charge is supplied and "fail" if not as well
> as vice versa)
>
> import sys
> from rdkit import Chem
> from rdkit.Chem import AllChem, rdMolAlign
>
> # The ensemble sdf conformations with hydrogens
> suppl = Chem.SDMolSupplier(sys.argv[2],sanitize=False)
> count=0
>
> #compare them to ref pdb extract no hydrogens
> for molh in suppl:
>count=count+1
>mol1 = Chem.MolFromMolFile(sys.argv[1])
>mol = Chem.RemoveHs(molh)
>mol = AllChem.AssignBondOrdersFromTemplate(mol1, mol)
>rms = AllChem.GetBestRMS(mol1, mol)
>print(rms)
>
>
> *Thanks*
>
> Dr. Martin Watson
>
>

-- 


Confidentiality Notice: 
This email and any attachments may be 
confidential and protected by legal privilege. If you are not the intended 
recipient, be aware that any disclosure, copying, distribution or use of 
the e-mail or any attachment is prohibited. If you have received this email 
in error, please notify us immediately by replying to the sender and then 
delete this copy and the reply from your system. Thank you for your 
cooperation.

C4X Discovery Ltd Registered in England and Wales Registered 
Number: 06324250 Registered Office: Manchester One, 53 Portland Street, 
Manchester M1 3LD, UK.
--
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] GetBestRMS and the carboxylic acid

2018-04-17 Thread Martin Watson
Hi

I'm using GetBestRMS to score conformers in an sdf relative to a pdb
extracted sdf ligand using the snippet below. I get odd behaviour when the
molecule includes a carboxylic acid.  depending on whether the charge is
explicitly defined in the sdf or not I get a different RMS which seems to
be that the symmetry of the carboxyl is not considered by GetBestRMS is
that so?  And if not can anyone suggest a workaround.  (FWIW I have
examples which "work" when the charge is supplied and "fail" if not as well
as vice versa)

import sys
from rdkit import Chem
from rdkit.Chem import AllChem, rdMolAlign

# The ensemble sdf conformations with hydrogens
suppl = Chem.SDMolSupplier(sys.argv[2],sanitize=False)
count=0

#compare them to ref pdb extract no hydrogens
for molh in suppl:
   count=count+1
   mol1 = Chem.MolFromMolFile(sys.argv[1])
   mol = Chem.RemoveHs(molh)
   mol = AllChem.AssignBondOrdersFromTemplate(mol1, mol)
   rms = AllChem.GetBestRMS(mol1, mol)
   print(rms)


*Thanks*

Dr. Martin Watson

-- 


Confidentiality Notice: 
This email and any attachments may be 
confidential and protected by legal privilege. If you are not the intended 
recipient, be aware that any disclosure, copying, distribution or use of 
the e-mail or any attachment is prohibited. If you have received this email 
in error, please notify us immediately by replying to the sender and then 
delete this copy and the reply from your system. Thank you for your 
cooperation.

C4X Discovery Ltd Registered in England and Wales Registered 
Number: 06324250 Registered Office: Manchester One, 53 Portland Street, 
Manchester M1 3LD, UK.
--
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] Interrogations about how N, H and charge are handled

2018-04-17 Thread Greg Landrum
The RDKit is fairly strict in checking that the charge + valence don't
exceed reasonable values for the element, but it does not go so far as to
catch these extreme cases.

It's worth thinking about how to add this kind of sanity checking to the
RDKit itself while still allowing "reasonable" hypervalent species, but
this is unlikely to happen quickly.
In the near term it seems like something that could be reasonable for
either MolVS or the standardizer to handle.

Best,
-greg


On Mon, Apr 16, 2018 at 10:35 AM, Colin Bournez <
colin.bour...@univ-orleans.fr> wrote:

> Hello everyone,
>
> I was working with molecules generated from fragment and I saw a molecule
> not right, here is the smiles :
> 'CC1(C)CC(N)CC(C)(C)[NH2+2]1[O-]'
> I tried to 'clean it' with Cleanup, Sanitize, molsvs or standardizer but I
> could not change the N with 5 bounds.
>
> So, I also tried to create other molecule to see and you can do the same
> with this code in a notebook :
> m = Chem.MolFromSmiles('CC1(C)CC(N)CC(C)(C)[NH15+15]1(CCC)')
> m=Chem.AddHs(m)
> m
>
> It seems that there is no problem for RDKit if you add Hs to N with charge
> (if you try m = Chem.MolFromSmiles('CC1(C)CC(N)CC(C)(C)[NH15]1(CCC)') it
> won't work. Also, if you have less charge than H it won't work.
>
> Any idea how to avoid that?
> Rdkit version is 2017.09.3
>
> --
> *Colin Bournez*
> PhD Student, Structural Bioinformatics & Chemoinformatics
> Institut de Chimie Organique et Analytique (ICOA), UMR CNRS-Université
> d'Orléans 7311
> Rue de Chartres, 45067 Orléans, France
> T. +33 238 494 577
>
> 
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> ___
> Rdkit-discuss mailing list
> Rdkit-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>
>
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] issue during parsing a smile

2018-04-17 Thread Greg Landrum
smiview is just so cool. Thanks (again) Andrew!

On Mon, Apr 16, 2018 at 4:22 PM, Andrew Dalke 
wrote:

> If you try this out with my smiview package, available from
> https://bitbucket.org/dalke/smiview/downloads/ , it reports:
>
>
> % smiview 'C\(C(C)C)=N/O'
> Cannot parse --smiles: Unexpected term
>   C\(C(C)C)=N/O
> ^ Tokenizing stopped here
> A bond must be followed by an atom, closure.
>
> That is, the bond symbol '\' may not be followed by a branch. (And I
> should improve that error message so it's more explicit.)
>
> I think you are looking for the SMILES "C(\C(C)C)=N/O".
>
> Andrew
> da...@dalkescientific.com
>
>
>
>
>
> > On Apr 16, 2018, at 16:15, Guillaume GODIN <
> guillaume.go...@firmenich.com> wrote:
> >
> > Dear All,
> >
> > Anyone know why this smile is not parse correctly ?
> >
> > C\(C(C)C)=N/O
> >
> > Best regards,
> >
> > Guillaume
> > 
> ***
> > DISCLAIMER
> > This email and any files transmitted with it, including replies and
> forwarded copies (which may contain alterations) subsequently transmitted
> from Firmenich, are confidential and solely for the use of the intended
> recipient. The contents do not represent the opinion of Firmenich except to
> the extent that it relates to their official business.
> > 
> ***
> > 
> --
> > Check out the vibrant tech community on one of the world's most
> > engaging tech sites, Slashdot.org! http://sdm.link/slashdot__
> _
> > Rdkit-discuss mailing list
> > Rdkit-discuss@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>
>
>
> 
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> ___
> Rdkit-discuss mailing list
> Rdkit-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] seg fault when importing Chem on OS-X 10.12

2018-04-17 Thread Greg Landrum
yeah, there are a ton of moving parts here and the RDKit builds on the Mac
got caught between a couple of them.[1]

The build of the beta that Brian mentions should work for everyone who's
using python 3.6 and an up-to-date conda installation. If it doesn't,
please, please let us know.


-greg
[1] how's that for an abused analogy?

On Mon, Apr 16, 2018 at 7:57 PM, Brian Cole  wrote:

> Pat, the beta for 2018.03 seems to work fine:
>
> conda install -c rdkit/label/beta rdkit
>
> My current guess is that there is a boost python dependency problem with
> RDKit 2017 for Python 3. I've twiddled between a few different boost
> versions in the conda environment, but to no success in getting 2017
> working.
>
> -Brian
>
>
> On Mon, Apr 16, 2018 at 1:20 PM, Brian Cole  wrote:
>
>> I can reproduce the problem, and the issue does appear to be different
>> than the previous issue. Reproducible with the following on OSX:
>>
>> $ conda create -c rdkit -n rdkit_2017 rdkit python=3.5
>> $ source activate rdkit_2017
>> $ python -c 'import rdkit.rdBase'
>> Segmentation fault: 11
>>
>> $ lldb -- python -c 'import rdkit.rdBase'
>> (lldb) target create "python"
>> Current executable set to 'python' (x86_64).
>> (lldb) settings set -- target.run-args  "-c" "import rdkit.rdBase"
>> (lldb) run
>> Process 14929 launched: '/Users/coleb/anaconda2/envs/rdkit_2017/bin/python'
>> (x86_64)
>> Process 14929 stopped
>> * thread #1, queue = 'com.apple.main-thread', stop reason =
>> EXC_BAD_ACCESS (code=1, address=0xa9)
>> frame #0: 0x0001001c301d python`visit_decref + 13
>> python`visit_decref:
>> ->  0x1001c301d <+13>: testb  $0x40, 0xa9(%rax)
>> 0x1001c3024 <+20>: jne0x1001c302f   ; <+31>
>> 0x1001c3026 <+22>: xorl   %eax, %eax
>> 0x1001c3028 <+24>: addq   $0x8, %rsp
>> Target 0: (python) stopped.
>> (lldb) bt
>> * thread #1, queue = 'com.apple.main-thread', stop reason =
>> EXC_BAD_ACCESS (code=1, address=0xa9)
>>   * frame #0: 0x0001001c301d python`visit_decref + 13
>> frame #1: 0x0001000a07a7 python`tupletraverse + 55
>> frame #2: 0x0001001c1eb3 python`collect + 291
>> frame #3: 0x000100196972 python`Py_Finalize + 226
>> frame #4: 0x0001001bfbc8 python`Py_Main + 3096
>> frame #5: 0x00011301 python`main + 497
>> frame #6: 0x7fff5fe23015 libdyld.dylib`start + 1
>> frame #7: 0x7fff5fe23015 libdyld.dylib`start + 1
>> (lldb) info threads
>>
>>
>>
>> On Mon, Apr 16, 2018 at 1:11 PM, Brian Cole  wrote:
>>
>>> An issue like this was fixed in the past: https://github.com/rdkit
>>> /rdkit/commit/009dd580527caa662de8bac5ad0c60f1e9bc90cd
>>>
>>> Will see if I can reproduce this.
>>>
>>> -Brian
>>>
>>> On Mon, Apr 16, 2018 at 12:09 PM, Patrick Walters 
>>> wrote:
>>>
 Hi All,

 I installed the latest RDKit using conda

 conda create -c rdkit -n rdkit_2017 rdkit

 When I import Chem I get a seg fault

 ➜  ~ source activate rdkit_2017
 (rdkit_2017) ➜  ~ python
 Python 3.5.5 |Anaconda, Inc.| (default, Mar 12 2018, 16:25:05)
 [GCC 4.2.1 Compatible Clang 4.0.1 (tags/RELEASE_401/final)] on darwin
 Type "help", "copyright", "credits" or "license" for more information.
 >>> from rdkit import Chem
 [1]85097 segmentation fault  python

 Has anyone else encountered this?

 Thanks,

 Pat


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


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