Re: [Rdkit-discuss] RDkit and Pubchem

2017-12-01 Thread Sundar
Hi Jason,

Thanks for the info.
That's exactly what I want. I want to download the compound in any format
(smiles/mol/sdf) for which I only have the Substance ID.

Sundar


On Fri, Dec 1, 2017 at 8:06 PM, Jason Biggs  wrote:

> Sundar,
> What you do will depend on whether you have an SID or a CID number.  Read
> https://pubchemblog.ncbi.nlm.nih.gov/2014/06/19/what-
> is-the-difference-between-a-substance-and-a-compound-in-pubchem/ for more
> info.
>
> In PubChem terminology, a *substance* is a chemical sample description
>> provided by a single source and a *compound* is a normalized chemical
>> structure representation found in one or more contributed *substances*.
>
>
> And looking at the pages for a few random substances, it doesn't list the
> same kind of information that you'll find on a compound page.  So what you
> need is to get a list of associated compounds for a given substance ID.
>
> https://pubchem.ncbi.nlm.nih.gov/rest/pug/substance/sid/
> 123061/cids/JSON?cids_type=all
>
> Leave off the cids_type=all if you only want one compound.  For the SID in
> your query, it doesn't even have a compound, so it returns a message
> stating so.
>
> Jason
>
> Jason Biggs
>
>
> On Fri, Dec 1, 2017 at 5:33 PM, Sundar  wrote:
>
>> Hi Jason,
>>
>> This is great. I would really benefit from this.
>> At present I am looking for a way to download smiles or mol data of a few
>> compound which only have SIDs and CIDs.
>> Can we do it? I failed after trying the following,
>>
>> https://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/sid/14420
>> 5334/property/CanonicalSMILES,IsomericSMILES,InChI/JSON
>>
>> Thanks,
>>
>>
>> On Fri, Dec 1, 2017 at 1:11 PM, Jason Biggs 
>> wrote:
>>
>>> Pubchem has an easy to use rest API, described here:
>>> https://pubchemdocs.ncbi.nlm.nih.gov/pug-rest
>>>
>>> If you have a compound ID, you can query properties via something
>>>
>>> https://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/cid/2244/
>>> property/CanonicalSMILES,IsomericSMILES,InChI/JSON
>>>
>>>
>>> It comes back in JSON format, but you can have it return XML or plain
>>> text.
>>>
>>> If you want an SDF file, something like
>>>
>>> https://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/cid/2244/
>>> SDF?record_type=3d
>>>
>>> setting up a python function to query this shouldn't be difficult.
>>>
>>> Jason Biggs
>>>
>>>
>>> On Fri, Dec 1, 2017 at 12:51 PM, Sundar 
>>> wrote:
>>>
 I would like to download at least SMILES (great if I can also download
 mol files).
 And the same is true for Pubchem Compound ID or using Substance ID.
 Or even download the whole data set using an assay id. Anything could
 help.

 Thanks,
 Jubi

 On Fri, Dec 1, 2017 at 11:55 AM, Tim Dudgeon 
 wrote:

> In what way? Given a single PubChem compound or substance ID you just
> want to pull the smiles or molfile into RDKit?
>
> Tim
> On 01/12/17 17:26, Sundar wrote:
>
> Hi RDkit users,
>
> I was wondering if RDkit has a means of downloading compounds from
> Pubchem.
> Also let me other ways that helps here.
>
> Thanks,
> Jubi
>
>
> --
> 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 
> listRdkit-discuss@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>
>
>
> 
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> ___
> Rdkit-discuss mailing list
> Rdkit-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>
>

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


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


Re: [Rdkit-discuss] RDkit and Pubchem

2017-12-01 Thread Jason Biggs
Sundar,
What you do will depend on whether you have an SID or a CID number.  Read
https://pubchemblog.ncbi.nlm.nih.gov/2014/06/19/what-is-the-difference-between-a-substance-and-a-compound-in-pubchem/
for more info.

In PubChem terminology, a *substance* is a chemical sample description
> provided by a single source and a *compound* is a normalized chemical
> structure representation found in one or more contributed *substances*.


And looking at the pages for a few random substances, it doesn't list the
same kind of information that you'll find on a compound page.  So what you
need is to get a list of associated compounds for a given substance ID.

https://pubchem.ncbi.nlm.nih.gov/rest/pug/substance/sid/123061/cids/JSON?cids_type=all

Leave off the cids_type=all if you only want one compound.  For the SID in
your query, it doesn't even have a compound, so it returns a message
stating so.

Jason

Jason Biggs


On Fri, Dec 1, 2017 at 5:33 PM, Sundar  wrote:

> Hi Jason,
>
> This is great. I would really benefit from this.
> At present I am looking for a way to download smiles or mol data of a few
> compound which only have SIDs and CIDs.
> Can we do it? I failed after trying the following,
>
> https://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/sid/144205334/property/
> CanonicalSMILES,IsomericSMILES,InChI/JSON
>
> Thanks,
>
>
> On Fri, Dec 1, 2017 at 1:11 PM, Jason Biggs  wrote:
>
>> Pubchem has an easy to use rest API, described here:
>> https://pubchemdocs.ncbi.nlm.nih.gov/pug-rest
>>
>> If you have a compound ID, you can query properties via something
>>
>> https://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/cid/2244/
>> property/CanonicalSMILES,IsomericSMILES,InChI/JSON
>>
>>
>> It comes back in JSON format, but you can have it return XML or plain
>> text.
>>
>> If you want an SDF file, something like
>>
>> https://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/cid/2244/
>> SDF?record_type=3d
>>
>> setting up a python function to query this shouldn't be difficult.
>>
>> Jason Biggs
>>
>>
>> On Fri, Dec 1, 2017 at 12:51 PM, Sundar  wrote:
>>
>>> I would like to download at least SMILES (great if I can also download
>>> mol files).
>>> And the same is true for Pubchem Compound ID or using Substance ID.
>>> Or even download the whole data set using an assay id. Anything could
>>> help.
>>>
>>> Thanks,
>>> Jubi
>>>
>>> On Fri, Dec 1, 2017 at 11:55 AM, Tim Dudgeon 
>>> wrote:
>>>
 In what way? Given a single PubChem compound or substance ID you just
 want to pull the smiles or molfile into RDKit?

 Tim
 On 01/12/17 17:26, Sundar wrote:

 Hi RDkit users,

 I was wondering if RDkit has a means of downloading compounds from
 Pubchem.
 Also let me other ways that helps here.

 Thanks,
 Jubi


 --
 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 
 listRdkit-discuss@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/rdkit-discuss



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


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


Re: [Rdkit-discuss] RDkit and Pubchem

2017-12-01 Thread Sundar
Hi Jason,

This is great. I would really benefit from this.
At present I am looking for a way to download smiles or mol data of a few
compound which only have SIDs and CIDs.
Can we do it? I failed after trying the following,

https://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/sid/144205334/property/CanonicalSMILES,IsomericSMILES,InChI/JSON

Thanks,


On Fri, Dec 1, 2017 at 1:11 PM, Jason Biggs  wrote:

> Pubchem has an easy to use rest API, described here: https://pubchemdocs.
> ncbi.nlm.nih.gov/pug-rest
>
> If you have a compound ID, you can query properties via something
>
> https://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/cid/
> 2244/property/CanonicalSMILES,IsomericSMILES,InChI/JSON
>
>
> It comes back in JSON format, but you can have it return XML or plain text.
>
> If you want an SDF file, something like
>
> https://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/cid/
> 2244/SDF?record_type=3d
>
> setting up a python function to query this shouldn't be difficult.
>
> Jason Biggs
>
>
> On Fri, Dec 1, 2017 at 12:51 PM, Sundar  wrote:
>
>> I would like to download at least SMILES (great if I can also download
>> mol files).
>> And the same is true for Pubchem Compound ID or using Substance ID.
>> Or even download the whole data set using an assay id. Anything could
>> help.
>>
>> Thanks,
>> Jubi
>>
>> On Fri, Dec 1, 2017 at 11:55 AM, Tim Dudgeon 
>> wrote:
>>
>>> In what way? Given a single PubChem compound or substance ID you just
>>> want to pull the smiles or molfile into RDKit?
>>>
>>> Tim
>>> On 01/12/17 17:26, Sundar wrote:
>>>
>>> Hi RDkit users,
>>>
>>> I was wondering if RDkit has a means of downloading compounds from
>>> Pubchem.
>>> Also let me other ways that helps here.
>>>
>>> Thanks,
>>> Jubi
>>>
>>>
>>> --
>>> 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 
>>> listRdkit-discuss@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>>>
>>>
>>>
>>> 
>>> --
>>> Check out the vibrant tech community on one of the world's most
>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>>> ___
>>> Rdkit-discuss mailing list
>>> Rdkit-discuss@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>>>
>>>
>>
>> 
>> --
>> Check out the vibrant tech community on one of the world's most
>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>> ___
>> Rdkit-discuss mailing list
>> Rdkit-discuss@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>>
>>
>
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] RDkit and Pubchem

2017-12-01 Thread Scalfani, Vincent
Hi Jubi,

If you need the entire dataset and are not creating queries via the API, you 
can download all PubChem Data via ftp here:

ftp://ftp.ncbi.nlm.nih.gov/pubchem/

Then download the SDFs, and extract out SMILES (I’ve used regular expressions 
that match the appropriate data tag with good success).

Vin
University of Alabama






From: Jason Biggs [mailto:jasondbi...@gmail.com]
Sent: Friday, December 1, 2017 1:12 PM
To: Sundar 
Cc: RDKit Discuss 
Subject: Re: [Rdkit-discuss] RDkit and Pubchem

Pubchem has an easy to use rest API, described here: 
https://pubchemdocs.ncbi.nlm.nih.gov/pug-rest

If you have a compound ID, you can query properties via something

https://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/cid/2244/property/CanonicalSMILES,IsomericSMILES,InChI/JSON

It comes back in JSON format, but you can have it return XML or plain text.

If you want an SDF file, something like
https://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/cid/2244/SDF?record_type=3d

setting up a python function to query this shouldn't be difficult.

Jason Biggs

On Fri, Dec 1, 2017 at 12:51 PM, Sundar 
> wrote:
I would like to download at least SMILES (great if I can also download mol 
files).
And the same is true for Pubchem Compound ID or using Substance ID.
Or even download the whole data set using an assay id. Anything could help.
Thanks,
Jubi

On Fri, Dec 1, 2017 at 11:55 AM, Tim Dudgeon 
> wrote:

In what way? Given a single PubChem compound or substance ID you just want to 
pull the smiles or molfile into RDKit?

Tim
On 01/12/17 17:26, Sundar wrote:
Hi RDkit users,
I was wondering if RDkit has a means of downloading compounds from Pubchem.
Also let me other ways that helps here.
Thanks,
Jubi


--

Check out the vibrant tech community on one of the world's most

engaging tech sites, Slashdot.org! http://sdm.link/slashdot


___

Rdkit-discuss mailing list

Rdkit-discuss@lists.sourceforge.net

https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


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


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

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


Re: [Rdkit-discuss] RDkit and Pubchem

2017-12-01 Thread Jason Biggs
Pubchem has an easy to use rest API, described here:
https://pubchemdocs.ncbi.nlm.nih.gov/pug-rest

If you have a compound ID, you can query properties via something

https://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/cid/2244/property/CanonicalSMILES,IsomericSMILES,InChI/JSON


It comes back in JSON format, but you can have it return XML or plain text.

If you want an SDF file, something like

https://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/cid/2244/SDF?record_type=3d


setting up a python function to query this shouldn't be difficult.

Jason Biggs


On Fri, Dec 1, 2017 at 12:51 PM, Sundar  wrote:

> I would like to download at least SMILES (great if I can also download mol
> files).
> And the same is true for Pubchem Compound ID or using Substance ID.
> Or even download the whole data set using an assay id. Anything could help.
>
> Thanks,
> Jubi
>
> On Fri, Dec 1, 2017 at 11:55 AM, Tim Dudgeon 
> wrote:
>
>> In what way? Given a single PubChem compound or substance ID you just
>> want to pull the smiles or molfile into RDKit?
>>
>> Tim
>> On 01/12/17 17:26, Sundar wrote:
>>
>> Hi RDkit users,
>>
>> I was wondering if RDkit has a means of downloading compounds from
>> Pubchem.
>> Also let me other ways that helps here.
>>
>> Thanks,
>> Jubi
>>
>>
>> --
>> 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 
>> listRdkit-discuss@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>>
>>
>>
>> 
>> --
>> Check out the vibrant tech community on one of the world's most
>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>> ___
>> Rdkit-discuss mailing list
>> Rdkit-discuss@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>>
>>
>
> 
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> ___
> Rdkit-discuss mailing list
> Rdkit-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>
>
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] RDkit and Pubchem

2017-12-01 Thread Michał Nowotka
Hi,

If you would like get compounds from ChEMBL instead of PubChem you can
use this Python client:
https://github.com/chembl/chembl_webresource_client
and get access to 1.7M+ unique compounds as molfiles, smiles, inchis,
inch keys and images.

Cheers,
Michał

On Fri, Dec 1, 2017 at 6:51 PM, Sundar  wrote:
> I would like to download at least SMILES (great if I can also download mol
> files).
> And the same is true for Pubchem Compound ID or using Substance ID.
> Or even download the whole data set using an assay id. Anything could help.
>
> Thanks,
> Jubi
>
> On Fri, Dec 1, 2017 at 11:55 AM, Tim Dudgeon  wrote:
>>
>> In what way? Given a single PubChem compound or substance ID you just want
>> to pull the smiles or molfile into RDKit?
>>
>> Tim
>>
>> On 01/12/17 17:26, Sundar wrote:
>>
>> Hi RDkit users,
>>
>> I was wondering if RDkit has a means of downloading compounds from
>> Pubchem.
>> Also let me other ways that helps here.
>>
>> Thanks,
>> Jubi
>>
>>
>>
>> --
>> Check out the vibrant tech community on one of the world's most
>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>>
>>
>>
>> ___
>> Rdkit-discuss mailing list
>> Rdkit-discuss@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>>
>>
>>
>>
>> --
>> Check out the vibrant tech community on one of the world's most
>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>> ___
>> Rdkit-discuss mailing list
>> Rdkit-discuss@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>>
>
>
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> ___
> Rdkit-discuss mailing list
> Rdkit-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>

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


Re: [Rdkit-discuss] RDkit and Pubchem

2017-12-01 Thread Sundar
I would like to download at least SMILES (great if I can also download mol
files).
And the same is true for Pubchem Compound ID or using Substance ID.
Or even download the whole data set using an assay id. Anything could help.

Thanks,
Jubi

On Fri, Dec 1, 2017 at 11:55 AM, Tim Dudgeon  wrote:

> In what way? Given a single PubChem compound or substance ID you just want
> to pull the smiles or molfile into RDKit?
>
> Tim
> On 01/12/17 17:26, Sundar wrote:
>
> Hi RDkit users,
>
> I was wondering if RDkit has a means of downloading compounds from Pubchem.
> Also let me other ways that helps here.
>
> Thanks,
> Jubi
>
>
> --
> 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 
> listRdkit-discuss@lists.sourceforge.nethttps://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] RDkit and Pubchem

2017-12-01 Thread Dimitri Maziuk
On 12/01/2017 11:55 AM, Tim Dudgeon wrote:
> In what way? Given a single PubChem compound or substance ID you just
> want to pull the smiles or molfile into RDKit?

Furthermore what's your definition of "a compound"? If it includes
stereochemistry, pubchem usually has 3d mol files, except where it doesn't.

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



signature.asc
Description: OpenPGP digital signature
--
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] Cartridge upgrades

2017-12-01 Thread Tim Dudgeon
If upgrading PostgreSQL to a new version of the RDKit cartridge is any 
maintenance needed?


Either rebuild the indexes or regenerate the fingerprints and rebuild 
the indexes?



--
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] RDkit and Pubchem

2017-12-01 Thread Tim Dudgeon
In what way? Given a single PubChem compound or substance ID you just 
want to pull the smiles or molfile into RDKit?


Tim

On 01/12/17 17:26, Sundar wrote:

Hi RDkit users,

I was wondering if RDkit has a means of downloading compounds from 
Pubchem.

Also let me other ways that helps here.

Thanks,
Jubi


--
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] RPM distros

2017-12-01 Thread Tim Dudgeon
Read back to the top of this thread for all the details, but the key bit 
is this:



In the bugtracker, there is an issue about the .deb:

https://github.com/rdkit/rdkit/issues/911

and there is a pull request by Patrick Avery
to fix them:

https://github.com/rdkit/rdkit/pull/1580


Tim



On 01/12/17 17:51, Gianluca Sforna wrote:

On Fri, Dec 1, 2017 at 6:04 PM, Tim Dudgeon  wrote:

Maciek

The 'cpack -G RPM' command does not seem to create a rdkit_package_file.rpm.
The ones that are created are:

RDKit-2018.03.1.dev1-Linux-Development.rpm
RDKit-2018.03.1.dev1-Linux-Extras.rpm
RDKit-2018.03.1.dev1-Linux-Python.rpm
RDKit-2018.03.1.dev1-Linux-Runtime.rpm


Sorry guys, I got back on the list mid-thread so I really need to ask:
is there a reason why you are trying to use cpack to build RPMs,
instead of the standard rpmbuild tools?







--
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] RPM distros

2017-12-01 Thread Gianluca Sforna
On Fri, Dec 1, 2017 at 6:04 PM, Tim Dudgeon  wrote:
> Maciek
>
> The 'cpack -G RPM' command does not seem to create a rdkit_package_file.rpm.
> The ones that are created are:
>
> RDKit-2018.03.1.dev1-Linux-Development.rpm
> RDKit-2018.03.1.dev1-Linux-Extras.rpm
> RDKit-2018.03.1.dev1-Linux-Python.rpm
> RDKit-2018.03.1.dev1-Linux-Runtime.rpm


Sorry guys, I got back on the list mid-thread so I really need to ask:
is there a reason why you are trying to use cpack to build RPMs,
instead of the standard rpmbuild tools?




-- 
Gianluca Sforna

http://plus.google.com/+gianlucasforna - http://twitter.com/giallu
Tinker Garage - http://tinkergarage.it

--
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] RDkit and Pubchem

2017-12-01 Thread Sundar
Hi RDkit users,

I was wondering if RDkit has a means of downloading compounds from Pubchem.
Also let me other ways that helps here.

Thanks,
Jubi
--
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] RPM distros

2017-12-01 Thread Tim Dudgeon

Francois,

I'm assuming you are meaning to install those packages on the debian 
system prior to installing the RDKit-2018.03.1.dev1-Linux-*.deb files.


Unfortunately that didn't help.

Tim

On 27/11/2017 23:50, Francois BERENGER wrote:

On 11/28/2017 12:42 AM, Tim Dudgeon wrote:

I see exactly the same when I build with those cmake args.

Maybe you are missing some of the dependencies.
I don't think the packages we create have all the dependency information:

fonts-freefont-ttf,
libboost-python1.58.0,
libboost-regex1.58.0,
libboost-system1.58.0,
libboost-thread1.58.0,
libc6 (>= 2.14),
libgcc1 (>= 1:4.1.1),
libpython2.7 (>= 2.7),
libstdc++6 (>= 5.2),
python (<< 2.8),
python (>= 2.7~)

You should install the ones you are missing and test again.


On 27/11/2017 09:11, Francois BERENGER wrote:

On 11/27/2017 06:01 PM, Tim Dudgeon wrote:

I did:

cmake -DRDK_BUILD_INCHI_SUPPORT=ON -DRDK_INSTALL_INTREE=OFF
-DCMAKE_INSTALL_PREFIX=/usr/ ..

Try this instead, just for the cmake part:

cmake -Wno-dev \
  -DRDK_INSTALL_INTREE=OFF \
  -DRDK_BUILD_INCHI_SUPPORT=ON \
  -DRDK_BUILD_AVALON_SUPPORT=ON \
  -DRDK_BUILD_PYTHON_WRAPPERS=ON \
  -DCMAKE_INSTALL_PREFIX=/usr \
  -DRDKit_VERSION=`date +%Y.%m` \
  ../

then do the rest (cpack ...) and test again
after an install of the freshly created package.

I advise to wipe out any prior rdkit install from your machine
before installing the new packages (so that we test what we intend to
test).

On a Debian-like:
sudo apt-get remove $(dpkg -l | grep rdkit | awk '{print $2}')


cpack -G DEB
cpack -G RPM


On 27/11/2017 00:05, Francois BERENGER wrote:

Hello,

What are the exact commands you used to configure and compile rdkit?

The script in there is my best attempt:

https://github.com/rdkit/rdkit/pull/1655

Regards,
F.

On 11/25/2017 12:50 AM, Tim Dudgeon wrote:

I got round to testing the debs and rpms but without success.

For the debs the following were built:

RDKit-2018.03.1.dev1-Linux-Development.deb
RDKit-2018.03.1.dev1-Linux-Extras.deb
RDKit-2018.03.1.dev1-Linux-Python.deb
RDKit-2018.03.1.dev1-Linux-Runtime.deb

On a clean Ubuntu Xenial system, with just python added (apt-get -y
install python) the packages installed fine:

# dpkg -i *.deb
Selecting previously unselected package rdkit-development.
(Reading database ... 5666 files and directories currently installed.)
Preparing to unpack RDKit-2018.03.1.dev1-Linux-Development.deb ...
Unpacking rdkit-development (2018.03.1.dev1) ...
Selecting previously unselected package rdkit-extras.
Preparing to unpack RDKit-2018.03.1.dev1-Linux-Extras.deb ...
Unpacking rdkit-extras (2018.03.1.dev1) ...
Selecting previously unselected package rdkit-python.
Preparing to unpack RDKit-2018.03.1.dev1-Linux-Python.deb ...
Unpacking rdkit-python (2018.03.1.dev1) ...
Selecting previously unselected package rdkit-runtime.
Preparing to unpack RDKit-2018.03.1.dev1-Linux-Runtime.deb ...
Unpacking rdkit-runtime (2018.03.1.dev1) ...
Setting up rdkit-development (2018.03.1.dev1) ...
Setting up rdkit-extras (2018.03.1.dev1) ...
Setting up rdkit-python (2018.03.1.dev1) ...
Setting up rdkit-runtime (2018.03.1.dev1) ...

There seem to be header files in /usr/include/rdkit and the RDKit
installation (.py and .so files) in
/usr/lib/python2.7/dist-packages/rdkit

But RDKit doesn't work from Python:

# python
Python 2.7.12 (default, Nov 19 2016, 06:48:10)
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.

import rdkit

Traceback (most recent call last):
     File "", line 1, in 
     File "/usr/lib/python2.7/dist-packages/rdkit/__init__.py", line
2, in

   from .rdBase import rdkitVersion as __version__
ImportError: libpython2.7.so.1.0: cannot open shared object file: No
such file or directory

For the rpms the story is similar. The same 4 files are built as rpms.
Installing them on a clean centos7 machine went fine and the files
seem
to get installed to the same places.
But RDKit again couldn't be used from Python, but with a different
error:

# python
Python 2.7.5 (default, Aug  4 2017, 00:39:18)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-16)] on linux2
Type "help", "copyright", "credits" or "license" for more information.

import rdkit

Traceback (most recent call last):
     File "", line 1, in 
ImportError: No module named rdkit

On 15/11/2017 20:18, David Hall wrote:

apt install rpm

should get you rpmbuild

-David

On Nov 15, 2017, at 2:59 PM, Tim Dudgeon > wrote:


OK, makes sense, but I'm building on a Debian system. So neither
'yum
install rpm-build' nor 'apt-get install rpm-build' doesn't work.

So (sorry for the stupid question) can DEBs only be built on a
Debian
based system and RPMs om a Red Hat based system?


On 15/11/2017 19:31, Paolo Tosco wrote:

Hi Tim,

It looks like you are missing the rpmbuild binary on the machine
where you are trying to build the RPM.
Issuing a

yum install rpm-build

as root should 

Re: [Rdkit-discuss] RPM distros

2017-12-01 Thread Tim Dudgeon

Maciek

The 'cpack -G RPM' command does not seem to create a rdkit_package_file.rpm.
The ones that are created are:

RDKit-2018.03.1.dev1-Linux-Development.rpm
RDKit-2018.03.1.dev1-Linux-Extras.rpm
RDKit-2018.03.1.dev1-Linux-Python.rpm
RDKit-2018.03.1.dev1-Linux-Runtime.rpm

Tim


On 28/11/2017 08:48, Maciek Wójcikowski wrote:

Hi Tim and Francois,

To fix missing dependencies use "sudo apt install -f" and use "yum 
install rdkit_package_file.rpm" to install package to have all the 
dependencies.


On Debian (based systems) I prefer to install standalone packages via 
gdebi which does this automatically.



Pozdrawiam,  |  Best regards,
Maciek Wójcikowski
mac...@wojcikowski.pl 

2017-11-28 0:50 GMT+01:00 Francois BERENGER 
>:


On 11/28/2017 12:42 AM, Tim Dudgeon wrote:
> I see exactly the same when I build with those cmake args.

Maybe you are missing some of the dependencies.
I don't think the packages we create have all the dependency
information:

fonts-freefont-ttf,
libboost-python1.58.0,
libboost-regex1.58.0,
libboost-system1.58.0,
libboost-thread1.58.0,
libc6 (>= 2.14),
libgcc1 (>= 1:4.1.1),
libpython2.7 (>= 2.7),
libstdc++6 (>= 5.2),
python (<< 2.8),
python (>= 2.7~)

You should install the ones you are missing and test again.

> On 27/11/2017 09:11, Francois BERENGER wrote:
>> On 11/27/2017 06:01 PM, Tim Dudgeon wrote:
>>> I did:
>>>
>>> cmake -DRDK_BUILD_INCHI_SUPPORT=ON -DRDK_INSTALL_INTREE=OFF
>>> -DCMAKE_INSTALL_PREFIX=/usr/ ..
>> Try this instead, just for the cmake part:
>>
>> cmake -Wno-dev \
>>  -DRDK_INSTALL_INTREE=OFF \
>>  -DRDK_BUILD_INCHI_SUPPORT=ON \
>>  -DRDK_BUILD_AVALON_SUPPORT=ON \
>>  -DRDK_BUILD_PYTHON_WRAPPERS=ON \
>>  -DCMAKE_INSTALL_PREFIX=/usr \
>>  -DRDKit_VERSION=`date +%Y.%m` \
>>  ../
>>
>> then do the rest (cpack ...) and test again
>> after an install of the freshly created package.
>>
>> I advise to wipe out any prior rdkit install from your machine
>> before installing the new packages (so that we test what we
intend to
>> test).
>>
>> On a Debian-like:
>> sudo apt-get remove $(dpkg -l | grep rdkit | awk '{print $2}')
>>
>>> cpack -G DEB
>>> cpack -G RPM
>>>
>>>
>>> On 27/11/2017 00:05, Francois BERENGER wrote:
 Hello,

 What are the exact commands you used to configure and compile
rdkit?

 The script in there is my best attempt:

 https://github.com/rdkit/rdkit/pull/1655


 Regards,
 F.

 On 11/25/2017 12:50 AM, Tim Dudgeon wrote:
> I got round to testing the debs and rpms but without success.
>
> For the debs the following were built:
>
> RDKit-2018.03.1.dev1-Linux-Development.deb
> RDKit-2018.03.1.dev1-Linux-Extras.deb
> RDKit-2018.03.1.dev1-Linux-Python.deb
> RDKit-2018.03.1.dev1-Linux-Runtime.deb
>
> On a clean Ubuntu Xenial system, with just python added
(apt-get -y
> install python) the packages installed fine:
>
> # dpkg -i *.deb
> Selecting previously unselected package rdkit-development.
> (Reading database ... 5666 files and directories currently
installed.)
> Preparing to unpack
RDKit-2018.03.1.dev1-Linux-Development.deb ...
> Unpacking rdkit-development (2018.03.1.dev1) ...
> Selecting previously unselected package rdkit-extras.
> Preparing to unpack RDKit-2018.03.1.dev1-Linux-Extras.deb ...
> Unpacking rdkit-extras (2018.03.1.dev1) ...
> Selecting previously unselected package rdkit-python.
> Preparing to unpack RDKit-2018.03.1.dev1-Linux-Python.deb ...
> Unpacking rdkit-python (2018.03.1.dev1) ...
> Selecting previously unselected package rdkit-runtime.
> Preparing to unpack RDKit-2018.03.1.dev1-Linux-Runtime.deb ...
> Unpacking rdkit-runtime (2018.03.1.dev1) ...
> Setting up rdkit-development (2018.03.1.dev1) ...
> Setting up rdkit-extras (2018.03.1.dev1) ...
> Setting up rdkit-python (2018.03.1.dev1) ...
> Setting up rdkit-runtime (2018.03.1.dev1) ...
>
> There seem to be header files in /usr/include/rdkit and the
RDKit
> installation (.py and .so files) in
> /usr/lib/python2.7/dist-packages/rdkit
>
> But RDKit doesn't work from Python:
>
> # python
> Python 2.7.12 (default, Nov 19 2016, 06:48:10)
> [GCC 5.4.0 20160609] on linux2
> Type "help", "copyright", "credits" or "license" for more
information.
 import rdkit
> 

Re: [Rdkit-discuss] bad coordinates for acetylenic hydrogens

2017-12-01 Thread Malitha Kabir
Dear Jason,
The geometry that you/me visualized in a 2D plot necessarily doesn't exist
in real world except a few planner molecules. To view 3D geometry of a
molecule, 2D representation doesn't work. Please feel free to do whatever
you want to do with your molecule while producing 2D graph. Everyone
understands that the plots are only for representation purpose. And please
consider geometry optimization/minimization of your molecule although ETKDG
produces very good quality geometry. Hope it helps! - malitha

On Sat, Dec 2, 2017 at 12:11 AM, Jason Biggs  wrote:

> Thank you Malitha,
>
> If I'm understanding the Draw code (not a given, my python ist nicht gut),
> then MolToMPL (or MolToImage) is just using the 3D conformation generated
> by EmbedMolecule.  Is it just chopping off the z-coordinate?  For
> acetylene, this works out because it gets embedded mostly in the XY plane
> by default, but it would fail if the 3D conformer were aligned along the
> z-axis.
>
> I would think GenerateDepictionMatching3DStructure is the safe way to do
> this, but it also seems to have trouble with acetylene
>
> m = Chem.MolFromSmiles('C#C')
> m2=Chem.rdmolops.AddHs(m)
> AllChem.EmbedMolecule(m2, AllChem.ETKDG())
> m3=Chem.rdmolops.AddHs(m)
> Chem.rdDepictor.GenerateDepictionMatching3DStructure(m3,m2)
> m3.GetConformer(0).GetPositions()
>
>
> array([[  1.60734892e-16,   7.5000e-01,   0.e+00],
>[ -1.14810637e-16,  -7.5000e-01,   0.e+00],
>[ -4.82204677e-16,  -7.5000e-01,   0.e+00],
>[  4.36280422e-16,   7.5000e-01,   0.e+00]])
>
>
> The above seems to happen with any terminal alkyne hydrogen.  I will file
> an issue for this
>
> Jason
>
> Jason Biggs
>
>
> On Fri, Dec 1, 2017 at 4:59 AM, Malitha Kabir 
> wrote:
>
>> Hi Jason,
>>
>> I hope the following codes will help you a little.
>>
>> from rdkit import Chem
>> from rdkit.Chem import Draw
>> from rdkit.Chem import AllChem
>> size = (120, 120)
>> m = Chem.MolFromSmiles('C#C')
>> m2=Chem.rdmolops.AddHs(m)
>> AllChem.EmbedMolecule(m2, AllChem.ETKDG())
>> Draw.MolToMPL(m2, size=size)
>>
>> *** source code link (non specific to your question though)
>> https://github.com/rdkit/rdkit
>>
>> Thanks. - malitha
>>
>>
>> On Fri, Dec 1, 2017 at 6:42 AM, Jason Biggs 
>> wrote:
>>
>>>
>>> m = Chem.MolFromSmiles('C#C')
>>>
>>>
>>> renders fine
>>>
>>> [image: Inline image 1]
>>>
>>> but adding in the hydrogens, they don't snap to a linear arrangement
>>>
>>> m2=Chem.rdmolops.AddHs(m)
>>>
>>>
>>> [image: Inline image 3]
>>>
>>>
>>> This doesn't just affect acetylene, but any terminal alkyne, like
>>> 'c1ccc(CCC#C)cc1'.
>>>
>>> I can write a hack on my end to look for this special case, but where in
>>> the drawing code does it decide where to place hydrogens?
>>>
>>> Jason Biggs
>>>
>>>
>>> 
>>> --
>>> 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] bad coordinates for acetylenic hydrogens

2017-12-01 Thread Jason Biggs
Thank you Malitha,

If I'm understanding the Draw code (not a given, my python ist nicht gut),
then MolToMPL (or MolToImage) is just using the 3D conformation generated
by EmbedMolecule.  Is it just chopping off the z-coordinate?  For
acetylene, this works out because it gets embedded mostly in the XY plane
by default, but it would fail if the 3D conformer were aligned along the
z-axis.

I would think GenerateDepictionMatching3DStructure is the safe way to do
this, but it also seems to have trouble with acetylene

m = Chem.MolFromSmiles('C#C')
m2=Chem.rdmolops.AddHs(m)
AllChem.EmbedMolecule(m2, AllChem.ETKDG())
m3=Chem.rdmolops.AddHs(m)
Chem.rdDepictor.GenerateDepictionMatching3DStructure(m3,m2)
m3.GetConformer(0).GetPositions()


array([[  1.60734892e-16,   7.5000e-01,   0.e+00],
   [ -1.14810637e-16,  -7.5000e-01,   0.e+00],
   [ -4.82204677e-16,  -7.5000e-01,   0.e+00],
   [  4.36280422e-16,   7.5000e-01,   0.e+00]])


The above seems to happen with any terminal alkyne hydrogen.  I will file
an issue for this

Jason

Jason Biggs


On Fri, Dec 1, 2017 at 4:59 AM, Malitha Kabir 
wrote:

> Hi Jason,
>
> I hope the following codes will help you a little.
>
> from rdkit import Chem
> from rdkit.Chem import Draw
> from rdkit.Chem import AllChem
> size = (120, 120)
> m = Chem.MolFromSmiles('C#C')
> m2=Chem.rdmolops.AddHs(m)
> AllChem.EmbedMolecule(m2, AllChem.ETKDG())
> Draw.MolToMPL(m2, size=size)
>
> *** source code link (non specific to your question though)
> https://github.com/rdkit/rdkit
>
> Thanks. - malitha
>
>
> On Fri, Dec 1, 2017 at 6:42 AM, Jason Biggs  wrote:
>
>>
>> m = Chem.MolFromSmiles('C#C')
>>
>>
>> renders fine
>>
>> [image: Inline image 1]
>>
>> but adding in the hydrogens, they don't snap to a linear arrangement
>>
>> m2=Chem.rdmolops.AddHs(m)
>>
>>
>> [image: Inline image 3]
>>
>>
>> This doesn't just affect acetylene, but any terminal alkyne, like
>> 'c1ccc(CCC#C)cc1'.
>>
>> I can write a hack on my end to look for this special case, but where in
>> the drawing code does it decide where to place hydrogens?
>>
>> Jason Biggs
>>
>>
>> 
>> --
>> 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] bad coordinates for acetylenic hydrogens

2017-12-01 Thread Malitha Kabir
Hi Jason,

I hope the following codes will help you a little.

from rdkit import Chem
from rdkit.Chem import Draw
from rdkit.Chem import AllChem
size = (120, 120)
m = Chem.MolFromSmiles('C#C')
m2=Chem.rdmolops.AddHs(m)
AllChem.EmbedMolecule(m2, AllChem.ETKDG())
Draw.MolToMPL(m2, size=size)

*** source code link (non specific to your question though)
https://github.com/rdkit/rdkit

Thanks. - malitha


On Fri, Dec 1, 2017 at 6:42 AM, Jason Biggs  wrote:

>
> m = Chem.MolFromSmiles('C#C')
>
>
> renders fine
>
> [image: Inline image 1]
>
> but adding in the hydrogens, they don't snap to a linear arrangement
>
> m2=Chem.rdmolops.AddHs(m)
>
>
> [image: Inline image 3]
>
>
> This doesn't just affect acetylene, but any terminal alkyne, like
> 'c1ccc(CCC#C)cc1'.
>
> I can write a hack on my end to look for this special case, but where in
> the drawing code does it decide where to place hydrogens?
>
> Jason Biggs
>
>
> 
> --
> 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