Re: [Rdkit-discuss] Docs intentionally broken?

2018-11-13 Thread Greg Landrum
Ok, things should be better now:
https://rdkit.org/docs/source/rdkit.Geometry.rdGeometry.html#rdkit.Geometry.rdGeometry.Point3D
https://rdkit.org/docs/source/rdkit.SimDivFilters.rdSimDivPickers.html#rdkit.SimDivFilters.rdSimDivPickers.MaxMinPicker

I have no doubt that there are still some things that need to be adjusted,
particularly with the redirects that I've added to make old links work, so
please let me know if you find anything.

-greg


On Fri, Nov 9, 2018 at 12:41 PM Greg Landrum  wrote:

> I think the doc-generation system is now fixed - that was this PR:
> https://github.com/rdkit/rdkit/pull/2161 - but I still need to
> re-generate the documentation on the website. This is unlikely to happen
> before I get back to Basel next week, but we'll see...
>
> On Mon, Nov 5, 2018 at 6:04 PM Greg Landrum 
> wrote:
>
>> The change from epydoc to sphinx/autodoc for the python documentation led
>> to some URL changes (most of which I fixed with redirects) and some missing
>> modules. Looks like the rdGeometry module is missing. I will see if I can
>> add it back, but this may take a bit since I'm traveling this week and the
>> beginning of next.
>>
>>
>> -greg
>>
>>
>> On Mon, Nov 5, 2018 at 1:23 PM Brian Cole  wrote:
>>
>>> My google search for 'rdkit python point3d' yielded the following as the
>>> top result:
>>>
>>> https://rdkit.org/docs/api/rdkit.Geometry.rdGeometry-module.html
>>>
>>> Which unfortunately now has a 404, page not found.
>>>
>>> Was this an intentional reorganization of the documentation?
>>>
>>> -Brian
>>> ___
>>> Rdkit-discuss mailing list
>>> Rdkit-discuss@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>>>
>>
___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] install rdkit with pipenv

2018-11-13 Thread Greg Landrum
Hi Ali,

At the moment there are no pypi packages for the RDKit and it can only be
installed using conda

-greg


On Tue, Nov 13, 2018 at 11:40 PM Ali Eftekhari 
wrote:

> This  open issue try to
> address if rdkit can be installed by pip.  I was wondering if rdkit can be
> installed by pipenv?
>
> Thanks,
> Ali
> ___
> Rdkit-discuss mailing list
> Rdkit-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>
___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] How to encode atomic contributions to logP (hydrophobicity) in MOL2 formatted charge slot?

2018-11-13 Thread Francois Berenger

On 14/11/2018 02:42, James T. Metz via Rdkit-discuss wrote:

RDkit Discussion Group,

 Given a set of small molecules as a SDF file, I would like to
generate a MOL2

file where the atomic contributions to logP (hydrophobicity) from each
atom including
hydrogens have been calculated and are now encoded in the partial
atomic charge
"slot" in a MOL2 file. Is this possible using RDkit?

 I have found code that calculates the atomic contributions for the
Crippen

logP model and then generates a colorized 2D plot:


from rdkit.Chem import rdMolDescriptors
contribs = rdMolDescriptors._CalcCrippenContribs(mol)
fig = SimilarityMaps.GetSimilarityMapFromWeights(mol,[x for x,y in

contribs], ˓→colorMap='jet', contourLines=10)

 However, I would like to encode the atomic contributions as partial
atomic charges so

that this information can be written out in a MOL2 file for each atom.


 Does anyone have PYTHON/RDkit code to do this? Thank you.


Hello,

I have this script that does part of the job:

---
#!/usr/bin/env python

from __future__ import print_function

import sys

import rdkit
from rdkit import Chem
from rdkit.Chem import rdMolDescriptors

if len(sys.argv) != 3:
print("usage: %s input.sdf output.pl" % sys.argv[0])
sys.exit(1)

sdf_input = sys.argv[1]
pl_output = sys.argv[2]

output = open(pl_output, 'w')

ok_count = 0
failed_count = 0

for mol in Chem.SDMolSupplier(sdf_input, removeHs = False):
if mol: # not null test
name = mol.GetProp("_Name")
cLogPcontribs = [x for x,y in 
rdMolDescriptors._CalcCrippenContribs(mol)]

output.write("COMPND %s\n" % name)
conf = mol.GetConformer()
# atoms = mol.GetAtoms()
for i, contrib in enumerate(cLogPcontribs):
pos = conf.GetAtomPosition(i)
output.write("%f %f %f %f\n" % (pos.x, pos.y, pos.z, 
contrib))

output.write("END\n")
ok_count += 1
else:
failed_count += 1

output.close()
print ("OK: %d - failed: %d\n" % (ok_count, failed_count))
---

Regards,
F.


 Regards,

 Jim Metz


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




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


[Rdkit-discuss] install rdkit with pipenv

2018-11-13 Thread Ali Eftekhari
Hello,

This  Is it possible to install rdkit with pipenv?

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


[Rdkit-discuss] GetReactingAtoms getting everything

2018-11-13 Thread James Conroy via Rdkit-discuss
Hi,I have been using rdkit (thank you for creating this!) to get reacting atoms 
from an rxn but it isn't behaving as I thought it would work. As a test case I 
have tried this:
tsmi='[cH:1]1[cH:2][c:3]([F:4])[n:5][cH:6][cH:7]1>>[cH:1]1[cH:2][c:3]([Cl:4])[n:5][cH:6][cH:7]1'
rxn2 = AllChem.ReactionFromSmarts(tsmi)
rdChemReactions.ChemicalReaction.Initialize(rxn2)
reacts2=rdChemReactions.ChemicalReaction.GetReactingAtoms(rxn2,mappedAtomsOnly=True)
reacts2
((0, 1, 2, 3, 4, 5, 6),)
which is not what I had anticipated. I imagined I would get indices for the F 
atom and c atom to which it is bonded but they all are returned
Googling led me to this https://github.com/rdkit/rdkit/issues/2031 but there 
the problem was different Kekule forms while the atoms are defined as aromatic 
in this case. Putting the reactant and product strings into a viewer looks OK.
why does it not give indices (2,3)?
thanks,James___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


[Rdkit-discuss] How to encode atomic contributions to logP (hydrophobicity) in MOL2 formatted charge slot?

2018-11-13 Thread James T. Metz via Rdkit-discuss
RDkit Discussion Group,
    Given a set of small molecules as a SDF file, I would like to generate a 
MOL2
file where the atomic contributions to logP (hydrophobicity) from each atom 
including hydrogens have been calculated and are now encoded in the partial 
atomic charge"slot" in a MOL2 file.  Is this possible using RDkit?
    I have found code that calculates the atomic contributions for the Crippen
logP model and then generates a colorized 2D plot:
>>> from rdkit.Chem import rdMolDescriptors >>> contribs = 
>>> rdMolDescriptors._CalcCrippenContribs(mol) >>> fig = 
>>> SimilarityMaps.GetSimilarityMapFromWeights(mol,[x for x,y in 
>>> contribs],˓→colorMap='jet', contourLines=10) 

    However, I would like to encode the atomic contributions as partial atomic 
charges so
that this information can be written out in a MOL2 file for each atom.
    Does anyone have PYTHON/RDkit code to do this?  Thank you.

    Regards,
    Jim Metz



    


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


Re: [Rdkit-discuss] RDKit and organometallics

2018-11-13 Thread Henrique Castro
Thank you for the tips.
In a lng and dumb workflow, I was able to load a sample molecule.

  *   Downloaded a sample .cif structure from CCDC 
https://www.ccdc.cam.ac.uk/structures/search?id=doi:10.5517/ccdc.csd.cc1m9hgw=DataCite
  *   Used OpenBabel to convert my .cif to .mol V3000 (the converted .mol fails 
to load in RDKit)
  *   I was only able to load the molecule getting the .mol2 file provided in 
the same CCDC link and converting such .mol2 to .mol V3000 using OpenBabel (the 
.mol2 itself wasn't read by RDKit).

Attached is my converted .mol V3000

--
Henrique C. S. Junior


From: Michal Krompiec 
Sent: Tuesday, November 13, 2018 11:16
To: malgorzata.wer...@molecularhealth.com
Cc: henrique...@outlook.com; RDKit Discuss
Subject: Re: [Rdkit-discuss] RDKit and organometallics

Isn't this patch already incorporated in the master branch?

On Tue, 13 Nov 2018 at 12:35, Malgorzata Werner 
mailto:malgorzata.wer...@molecularhealth.com>>
 wrote:

Hi Henrique,

You could try using v3000 sd files.

Here's a blog about this: 
https://www.wildcardconsulting.dk/useful-information/how-to-solve-problems-with-coordinate-bonds-in-rdkit/



Best,

Malgorzata



From: Henrique Castro mailto:henrique...@outlook.com>>
Sent: 13 November 2018 11:57:34
To: 
rdkit-discuss@lists.sourceforge.net
Subject: [Rdkit-discuss] RDKit and organometallics

Dear colleagues,
I know that this is probably a dumb question, but since my searches showed no 
clarifying results I'm asking here anyway.
I'm planning to use RDKit on my Ph.D. thesis, but my field of research is 
inorganic chemistry and molecular magnetism. That means that I'm dealing with 
organometallics (transition metals, lanthanides, actinides...). So far I was 
unable to import even a single structure to my RDKit test with different error 
messages like those (they are all the same structure, that is attached here):

m = Chem.MolFromMolFile('st1.pdb')
RDKit WARNING: [08:36:40] CTAB version string invalid at line 4

m = Chem.MolFromMolFile('st1.sdf')
RDKit ERROR: [08:51:30] Explicit valence for atom # 1 N, 4, is greater than 
permitted

m = Chem.MolFromMolFile('st1.mol2')
RDKit WARNING: [08:52:15] Counts line too short: 'SMALL' on line4

Based on this, I'd like to as for hints on how to deal with molecules with 
"unusual" valences like the ones we deal in inorganic chemistry.

Thanks in advance


--
Henrique C. S. Junior

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


Re: [Rdkit-discuss] RDKit and organometallics

2018-11-13 Thread Michal Krompiec
Isn't this patch already incorporated in the master branch?

On Tue, 13 Nov 2018 at 12:35, Malgorzata Werner <
malgorzata.wer...@molecularhealth.com> wrote:

> Hi Henrique,
>
> You could try using v3000 sd files.
>
> Here's a blog about this:
> https://www.wildcardconsulting.dk/useful-information/how-to-solve-problems-with-coordinate-bonds-in-rdkit/
>
>
>
> Best,
>
> Malgorzata
>
> --
> *From:* Henrique Castro 
> *Sent:* 13 November 2018 11:57:34
> *To:* rdkit-discuss@lists.sourceforge.net
> *Subject:* [Rdkit-discuss] RDKit and organometallics
>
> Dear colleagues,
> I know that this is probably a dumb question, but since my searches showed
> no clarifying results I'm asking here anyway.
> I'm planning to use RDKit on my Ph.D. thesis, but my field of research is
> inorganic chemistry and molecular magnetism. That means that I'm dealing
> with organometallics (transition metals, lanthanides, actinides...). So far
> I was unable to import even a single structure to my RDKit test with
> different error messages like those (they are all the same structure, that
> is attached here):
>
> m = Chem.MolFromMolFile('st1.pdb')
> RDKit WARNING: [08:36:40] CTAB version string invalid at line 4
>
> m = Chem.MolFromMolFile('st1.sdf')
> RDKit ERROR: [08:51:30] Explicit valence for atom # 1 N, 4, is greater
> than permitted
>
> m = Chem.MolFromMolFile('st1.mol2')
> RDKit WARNING: [08:52:15] Counts line too short: 'SMALL' on line4
>
> Based on this, I'd like to as for hints on how to deal with molecules with
> "unusual" valences like the ones we deal in inorganic chemistry.
>
> Thanks in advance
>
>
> --
> Henrique C. S. Junior
>
> ___
> Rdkit-discuss mailing list
> Rdkit-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>
___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] RDKit and organometallics

2018-11-13 Thread Malgorzata Werner
Hi Henrique,

You could try using v3000 sd files.

Here's a blog about this: 
https://www.wildcardconsulting.dk/useful-information/how-to-solve-problems-with-coordinate-bonds-in-rdkit/



Best,

Malgorzata



From: Henrique Castro 
Sent: 13 November 2018 11:57:34
To: rdkit-discuss@lists.sourceforge.net
Subject: [Rdkit-discuss] RDKit and organometallics

Dear colleagues,
I know that this is probably a dumb question, but since my searches showed no 
clarifying results I'm asking here anyway.
I'm planning to use RDKit on my Ph.D. thesis, but my field of research is 
inorganic chemistry and molecular magnetism. That means that I'm dealing with 
organometallics (transition metals, lanthanides, actinides...). So far I was 
unable to import even a single structure to my RDKit test with different error 
messages like those (they are all the same structure, that is attached here):

m = Chem.MolFromMolFile('st1.pdb')
RDKit WARNING: [08:36:40] CTAB version string invalid at line 4

m = Chem.MolFromMolFile('st1.sdf')
RDKit ERROR: [08:51:30] Explicit valence for atom # 1 N, 4, is greater than 
permitted

m = Chem.MolFromMolFile('st1.mol2')
RDKit WARNING: [08:52:15] Counts line too short: 'SMALL' on line4

Based on this, I'd like to as for hints on how to deal with molecules with 
"unusual" valences like the ones we deal in inorganic chemistry.

Thanks in advance


--
Henrique C. S. Junior

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


[Rdkit-discuss] RDKit and organometallics

2018-11-13 Thread Henrique Castro
Dear colleagues,
I know that this is probably a dumb question, but since my searches showed no 
clarifying results I'm asking here anyway.
I'm planning to use RDKit on my Ph.D. thesis, but my field of research is 
inorganic chemistry and molecular magnetism. That means that I'm dealing with 
organometallics (transition metals, lanthanides, actinides...). So far I was 
unable to import even a single structure to my RDKit test with different error 
messages like those (they are all the same structure, that is attached here):

m = Chem.MolFromMolFile('st1.pdb')
RDKit WARNING: [08:36:40] CTAB version string invalid at line 4

m = Chem.MolFromMolFile('st1.sdf')
RDKit ERROR: [08:51:30] Explicit valence for atom # 1 N, 4, is greater than 
permitted

m = Chem.MolFromMolFile('st1.mol2')
RDKit WARNING: [08:52:15] Counts line too short: 'SMALL' on line4

Based on this, I'd like to as for hints on how to deal with molecules with 
"unusual" valences like the ones we deal in inorganic chemistry.

Thanks in advance


--
Henrique C. S. Junior



st1.mol
Description: st1.mol


st1.mol2
Description: st1.mol2


st1.pdb
Description: st1.pdb


st1.sdf
Description: st1.sdf


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