Re: [Rdkit-discuss] Announce: RDKit for Excel.

2017-06-19 Thread Jan Holst Jensen

Hi Curt,

The add-in is based on COM automation services, so it is Windows-only to 
the best of my knowledge. We chose to implement it as a COM service 
since the Python code was then extremely simple and very easy to extend.


I don't have access to a Mac so I am having a hard time figuring out if 
MS Office on Mac implements enough of the COM subsystem to support COM 
automation servers. It might be that both Mac and Windows could be 
supported if the add-in was written in C++ as an XLL. My gut feeling is 
that it would then be harder to extend dynamically, but I could be 
wrong. One thing I do know is that it would be more complex to write.


To support both Windows and Mac you can also take the approach that 
xlwings has taken where a DLL is loaded by VBA code and talks to the 
Python code:

https://www.xlwings.org/

We initially tried to base our add-in on xlwings but got into trouble 
sharing Excel worksheets with User Defined Functions. The UDFs in 
xlwings are made available to Excel through VBA auto-generated from the 
Python code. Smart concept, but gets us into trouble using UDFs in 
sheets that are passed around or copied.


Python 3 - yes, we should go there. If the COM support that the add-in 
relies on is available in Python 3 it should be straightforward (famous 
last words :-) ). Hopefully I will have some time to check this out over 
the summer.


Cheers
-- Jan

On 2017-06-19 18:40, Curt Fischer wrote:

This is great!  Thanks Jan.

I haven't tried it yet, but based on the GitHub README it looks like 
this is only for Excel on a Windows box.  Is that right, or can Mac 
versions of Excel also work?  And since it's come up on the mailing 
list recently, is there a plan to expand to/move to Python 3 at any 
point soon?


Curt

On Sun, Jun 18, 2017 at 11:06 AM, Jan Holst Jensen 
> wrote:


Hi RDKitters,

I am happy to announce an open source Excel add-in that gives easy
access to the RDKit Python API. The add-in is BSD-licensed like RDKit.
https://github.com/janholstjensen/rdkit4excel


Screenshot of the add-in running in Excel 2016 (note: molecule
rendering requires additional 3rd party software):


The add-in is easily extendable via pure Python scripting. A new
Excel function is added by adding a function to the CRDKitXL
Python class and annotating the new function's input/output
parameter types through structured comments. For example, adding
an "rdkit_SmilesToMolBlock()" function that has a single "smiles"
string input parameter:

#RDKITXL: in:smiles:str, out:str
def rdkit_SmilesToMolBlock(self, smiles):
# Python function implementation follows here...


Many thanks to Esben Jannik Bjerrum who did the implementation of
this first version.

Cheers
-- Jan Holst Jensen


--
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] The RDKit and Python3

2017-06-19 Thread Greg Landrum
Yep, Andrew is exactly right: the RDKit currently supports both Python 3 and 
Python 2 and has since the 2014.09 release. Riccardo and others invested a fair 
amount of work in getting us here, but it was effort that was very well spent.

-greg


From: Andrew Dalke 
Sent: Monday, June 19, 2017 5:57:18 PM
To: RDKit Discuss
Subject: Re: [Rdkit-discuss] The RDKit and Python3

On Jun 19, 2017, at 17:39, Dan Wandschneider 
 wrote:
> Greg-
> Is the RDKit currently compatible with Python3? If not, when do you expect I 
> could start migrating a code base that depends on the RDKit?

I'm not Greg, but I can answer that question.

The RDKit has been available for both Python 2 and Python 3 since at least 2015.

http://www.rdkit.org/docs/Overview.html says:
  • Python (2.x and 3.x) wrapper generated using Boost.Python

See also a 2015 version of the page at
  
https://web.archive.org/web/20151118050031/http://www.rdkit.org/docs/Overview.html

Cheers,

Andrew
da...@dalkescientific.com



--
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] Announce: RDKit for Excel.

2017-06-19 Thread Curt Fischer
This is great!  Thanks Jan.

I haven't tried it yet, but based on the GitHub README it looks like this
is only for Excel on a Windows box.  Is that right, or can Mac versions of
Excel also work?  And since it's come up on the mailing list recently, is
there a plan to expand to/move to Python 3 at any point soon?

Curt

On Sun, Jun 18, 2017 at 11:06 AM, Jan Holst Jensen 
wrote:

> Hi RDKitters,
>
> I am happy to announce an open source Excel add-in that gives easy access
> to the RDKit Python API. The add-in is BSD-licensed like RDKit.
> https://github.com/janholstjensen/rdkit4excel
>
> Screenshot of the add-in running in Excel 2016 (note: molecule rendering
> requires additional 3rd party software):
>
>
> The add-in is easily extendable via pure Python scripting. A new Excel
> function is added by adding a function to the CRDKitXL Python class and
> annotating the new function's input/output parameter types through
> structured comments. For example, adding an "rdkit_SmilesToMolBlock()"
> function that has a single "smiles" string input parameter:
>
> #RDKITXL: in:smiles:str, out:str
> def rdkit_SmilesToMolBlock(self, smiles):
> # Python function implementation follows here...
>
>
> Many thanks to Esben Jannik Bjerrum who did the implementation of this
> first version.
>
> Cheers
> -- Jan Holst Jensen
>
> 
> --
> 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] The RDKit and Python3

2017-06-19 Thread Andrew Dalke
On Jun 19, 2017, at 17:39, Dan Wandschneider 
 wrote:
> Greg-
> Is the RDKit currently compatible with Python3? If not, when do you expect I 
> could start migrating a code base that depends on the RDKit?

I'm not Greg, but I can answer that question.

The RDKit has been available for both Python 2 and Python 3 since at least 2015.

http://www.rdkit.org/docs/Overview.html says:
  • Python (2.x and 3.x) wrapper generated using Boost.Python

See also a 2015 version of the page at
  
https://web.archive.org/web/20151118050031/http://www.rdkit.org/docs/Overview.html

Cheers,

Andrew
da...@dalkescientific.com



--
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] The RDKit and Python3

2017-06-19 Thread Dan Wandschneider
Greg-
Is the RDKit currently compatible with Python3? If not, when do you expect
I could start migrating a code base that depends on the RDKit?

- dan wandschneider

(soon to be "dan *neal*schneider")

Senior Developer
Schr*ö*dinger, Inc
Portland, OR


On Sat, Jun 17, 2017 at 3:25 AM, Greg Landrum 
wrote:

> Dear all,
>
> As many of you are no doubt aware, the Python community plans to
> discontinue support for Python 2 in 2020. A growing number of projects in
> the Scientific Python stack are making the same transition and have made
> that explicit here:
> http://www.python3statement.org/
>
> I will be adding the RDKit to this list. The RDKit will switch to support
> only Python 3 by 2020. At some point between now and then - likely during
> the 2018.09 release cycle - we will create a maintenance branch for Python
> 2 that will continue to get bug fixes but will no longer have new Python
> features added. This branch will be maintained, and we will keep doing
> Python 2 builds, until 2020 when official Python 2 support ends.
>
> Additionally, starting during the 2018.03 release cycle we will accept
> contributions for new features that are not compatible with Python 2 as
> long as those features are implemented in such a way that they don't break
> existing Python 2 code (more on this later). This will allow members of the
> RDKit community who have made the switch to Python 3 to start making use of
> the new features of the language in their RDKit contributions.
>
> If you have not made the switch yet to Python 3: please read the web page
> I link to above and take a look at the list of projects that have committed
> to transition. The switch from Python 2 to Python 3 isn't always easy, but
> it's not getting any easier with time and you have a few years to complete
> it. There are a lot of online resources available to help.
>
> Best Regards,
> -greg
>
>
>
> 
> --
> 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] difference in VdW radii between Open Babel 2.3.2 and rdkit 201503

2017-06-19 Thread Greg Landrum
Francois,

There is not a direct unambiguous physical observable that one can point to
that defines a van der Waals radius; they are looked up in tables.
The RDKit and OpenBabel are clearly using different tables.

As to which to use: there isn't really an answer to the question; it comes
down to what you're trying to do and which table you choose to use. If you
just want a vdW radius (and don't care about a vdW distance for a
particular pair of atoms) you can just use a single tabulated value like
what you give below. Given that I no longer remember where the RDKit value
in atomic_data.cpp comes from and the OpenBabel one likely has a reference
attached to it: I'd take the OpenBabel one.

If you care more about what a particular vdW contact length should be,
you're probably better off using a more sophisticated approach. Paolo has
some information on that in this thread:
https://sourceforge.net/p/rdkit/mailman/message/35428577/

-greg



On Mon, Jun 19, 2017 at 7:49 AM, Francois BERENGER <
beren...@bioreg.kyushu-u.ac.jp> wrote:

> Hello,
>
> Sometimes, as a computer scientist, I am quite worried by chemical
> software libraries:
>
> $ cat data/ethanol.pqr
> COMPNDethanol
> AUTHORGENERATED BY OPEN BABEL 2.3.2
> HETATM1  C   LIG 1  -0.017  -0.601   0.000  0.04138432 1.700  C
> HETATM2  C   LIG 1   1.247   0.248  -0.000 -0.04182526 1.700  C
> HETATM3  H   LIG 1   1.285   0.894  -0.888  0.02516417 1.100  H
> HETATM4  H   LIG 1   1.270   0.916   0.872  0.02516417 1.100  H
> HETATM5  H   LIG 1   2.150  -0.369   0.015  0.02516417 1.100  H
> HETATM6  H   LIG 1  -0.096  -1.231  -0.903  0.05542120 1.100  H
> HETATM7  H   LIG 1  -0.096  -1.231   0.903  0.05542120 1.100  H
> HETATM8  O   LIG 1  -1.086   0.337   0.000 -0.39527743 1.520  O
> HETATM9  H   LIG 1  -1.944  -0.125  -0.003  0.20938346 1.100  H
> CONECT18726
> CONECT1
> CONECT21543
> CONECT2
> CONECT32
> CONECT42
> CONECT52
> CONECT61
> CONECT71
> CONECT819
> CONECT98
> MASTER000000009090
> END
>
> # cat data/ethanol.plr
> COMPND ethanol
> -0.016600 -0.601400 0.00 -0.203500 1.95
> 1.247400 0.248500 -0.000100 0.144100 1.95
> 1.285200 0.894300 -0.887700 0.123000 1.20
> 1.270100 0.915700 0.872200 0.123000 1.20
> 2.149700 -0.369300 0.015500 0.123000 1.20
> -0.095800 -1.230700 -0.903200 0.123000 1.20
> -0.095700 -1.230800 0.903400 0.123000 1.20
> -1.085800 0.337100 0.000300 -0.289300 1.70
> -1.944300 -0.124700 -0.003200 -0.267700 1.20
> END
>
> The .plr file was generated with rdkit.
> The .pqr file with obabel.
>
> Maybe I'm out of luck, or I don't understand something, but the two files
> don't agree
> on any single VdW radius (5th column in the .plr file; 10th column in the
> .pqr
> file for HETATM lines).
>
> Here is the code I used for rdkit:
> ---
> periodic_table = Chem.GetPeriodicTable()
>
> def get_radius(atom):
> return periodic_table.GetRvdw(atom.GetAtomicNum())
>
> [...]
> atoms = mol.GetAtoms()
> [...]
> radius = get_radius(atom)
> [...]
> ---
>
> Am I doing something wrong?
>
> Isn't there a more direct way to access the VdW radius of an atom
> when iterating over the atoms of a molecule?
>
> Who should I trust? obabel? rdkit? the nearest real-world chemist?
>
> Thanks,
> F.
>
> 
> --
> 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] Installation woes: Ubuntu 16.04, Boost 1.61, and RDKit not living so peacefully together after all ...

2017-06-19 Thread JP
Hi Greg !

Unfortunately that didn't help (I delete everything in my build directory,
then):

cmake -DRDK_BUILD_INCHI_SUPPORT=ON -DBOOST_ROOT=/opt/boost_1_61_0/
-DBoost_NO_SYSTEM_PATHS=ON ..

and make as usual.

[ 62%] Linking CXX executable testReaction
../../../lib/libRDKitChemReactions.so.1.2017.03.2: undefined reference to
`boost::archive::text_iarchive_impl::load_override(boost::archive::class_name_type&)'
../../../lib/libRDKitChemReactions.so.1.2017.03.2: undefined reference to
`boost::archive::archive_exception::archive_exception(boost::archive::archive_exception
const&)'
collect2: error: ld returned 1 exit status
Code/GraphMol/ChemReactions/CMakeFiles/testReaction.dir/build.make:116:
recipe for target 'Code/GraphMol/ChemReactions/testReaction' failed
make[2]: *** [Code/GraphMol/ChemReactions/testReaction] Error 1
CMakeFiles/Makefile2:4157: recipe for target
'Code/GraphMol/ChemReactions/CMakeFiles/testReaction.dir/all' failed
make[1]: *** [Code/GraphMol/ChemReactions/CMakeFiles/testReaction.dir/all]
Error 2
Makefile:160: recipe for target 'all' failed
make: *** [all] Error 2

Perhaps this isn't related to the system vs user-install, boost after all?


On 19 June 2017 at 10:38, Greg Landrum  wrote:

> If you have a system boost install that you do not want to use, you should
> be sure to add "-D Boost_NO_SYSTEM_PATHS=ON" to the cmake arguments. This
> will (well, should) disable any usage of the system boost.
>
> -greg
>
>
> On Mon, Jun 19, 2017 at 9:39 AM, JP  wrote:
>
>> HI Paul,
>>
>> Funny you should mention that.  I have boost 1.61 (installed manually in
>> /opt) and system boost I installed via sudo apt-get install
>>
>> /opt/rdkit/rdkit-Release_2017_03_2/build$ dpkg -s libboost-dev | grep
>> 'Version'
>> Version: 1.58.0.1ubuntu1
>>
>> However I pass the BOOST path to cmake via:
>>
>> cmake -DRDK_BUILD_INCHI_SUPPORT=ON -DBOOST_ROOT=/opt/boost_1_61_0/  ..
>>
>> (I also have the $BOOST_ROOT env variable set, so I think that is
>> redundant.  Whatever).  cmake output clearly shows it is finding/using
>> boost 1.61
>>
>> Using make VERBOSE=1 I get:
>>
>> [ 62%] Linking CXX executable testReaction
>> cd /opt/rdkit/rdkit-Release_2017_03_2/build/Code/GraphMol/ChemReactions
>> && /usr/bin/cmake -E cmake_link_script CMakeFiles/testReaction.dir/link.txt
>> --verbose=1
>> /usr/bin/c++-mpopcnt -Wno-deprecated -Wno-unused-function
>> -fno-strict-aliasing -fPIC -Wall -Wextra -O3 -DNDEBUG
>> CMakeFiles/testReaction.dir/testReaction.cpp.o  -o testReaction
>> -rdynamic ../../../lib/libRDKitChemReactions.so.1.2017.03.2
>> ../../../lib/libRDKitChemTransforms.so.1.2017.03.2
>> ../../../lib/libRDKitDescriptors.so.1.2017.03.2
>> ../../../lib/libRDKitFingerprints.so.1.2017.03.2
>> ../../../lib/libRDKitDepictor.so.1.2017.03.2
>> ../../../lib/libRDKitFileParsers.so.1.2017.03.2 -lboost_serialization
>> ../../../lib/libRDKitPartialCharges.so.1.2017.03.2
>> ../../../lib/libRDKitMolTransforms.so.1.2017.03.2
>> ../../../lib/libRDKitEigenSolvers.so.1.2017.03.2
>> ../../../lib/libRDKitFilterCatalog.so.1.2017.03.2
>> ../../../lib/libRDKitSubgraphs.so.1.2017.03.2
>> ../../../lib/libRDKitSmilesParse.so.1.2017.03.2
>> ../../../lib/libRDKitSubstructMatch.so.1.2017.03.2
>> ../../../lib/libRDKitGraphMol.so.1.2017.03.2
>> ../../../lib/libRDKitRDGeometryLib.so.1.2017.03.2
>> ../../../lib/libRDKitDataStructs.so.1.2017.03.2 -lboost_serialization
>> ../../../lib/libRDKitCatalogs.so.1.2017.03.2
>> ../../../lib/libRDKitRDGeneral.so.1.2017.03.2 -lboost_thread
>> -lboost_system -lpthread -Wl,-rpath,/opt/rdkit/rdkit-Re
>> lease_2017_03_2/build/lib
>> ../../../lib/libRDKitChemReactions.so.1.2017.03.2: undefined reference
>> to `boost::archive::text_iarchive_impl> iarchive>::load_override(boost::archive::class_name_type&)'
>> ../../../lib/libRDKitChemReactions.so.1.2017.03.2: undefined reference
>> to 
>> `boost::archive::archive_exception::archive_exception(boost::archive::archive_exception
>> const&)'
>> collect2: error: ld returned 1 exit status
>> Code/GraphMol/ChemReactions/CMakeFiles/testReaction.dir/build.make:116:
>> recipe for target 'Code/GraphMol/ChemReactions/testReaction' failed
>> make[2]: *** [Code/GraphMol/ChemReactions/testReaction] Error 1
>> make[2]: Leaving directory '/opt/rdkit/rdkit-Release_2017_03_2/build'
>> CMakeFiles/Makefile2:4157: recipe for target
>> 'Code/GraphMol/ChemReactions/CMakeFiles/testReaction.dir/all' failed
>> make[1]: *** [Code/GraphMol/ChemReactions/CMakeFiles/testReaction.dir/all]
>> Error 2
>> make[1]: Leaving directory '/opt/rdkit/rdkit-Release_2017_03_2/build'
>> Makefile:160: recipe for target 'all' failed
>> make: *** [all] Error 2
>>
>> /opt/boost_1_61_0/lib is also the first path in LD_LIBRARY_PATH.
>>
>> Thanks for your help and time.  I really appreciate it.
>>
>> Cheers
>>
>> On 16 June 2017 at 14:12, Paul Emsley  wrote:
>>
>>> On 16/06/2017 12:08, JP wrote:
>>>
 Hi Folks,

 Must have been eons 

Re: [Rdkit-discuss] SMILES, explicit H and chirality

2017-06-19 Thread Jean-Marc Nuzillard

Dear Greg,

When I read that you did not reproduce the problem,
I updated from rdkit-2016-03.1 to rdkit-2017-03.1
and this solved the problem.

Thank you !

Jean-Marc


Le 19/06/2017 à 11:04, Greg Landrum a écrit :

Hi Jean-Marc,

I can't reproduce that:

In [2]: m = Chem.MolFromSmiles('CN1CCC[C@H]1c1cccnc1')

In [3]: Chem.MolToSmiles(m,isomericSmiles=True)
Out[3]: 'CN1CCC[C@H]1c1cccnc1'

In [4]: Chem.MolToSmiles(m,isomericSmiles=True,allHsExplicit=True)
Out[4]: '[CH3][N]1[CH2][CH2][CH2][C@H]1[c]1[cH][cH][cH][n][cH]1'


Can you send some sample code that shows the problem?

-greg


On Mon, Jun 19, 2017 at 10:59 AM, Jean-Marc Nuzillard 
> wrote:


Dear All,

Chem.MolToSmiles(m, isomericSmiles=True, allHsExplicit=False) with
m being nicotine downloaded from PubChem returns
CN1CCC[C@H]1c1cccnc1 , which is consistent with the structure of
nicotine.
Chem.MolToSmiles(m, isomericSmiles=True, allHsExplicit=True) returns
[CH3][N]1[CH2][CH2][CH2][CH]1[c]1[cH][cH][cH][n][cH]1 in which
chirality has disappeared.
Would it be possible to get H count and chirality?

All the best,

Jean-Marc

-- 
Jean-Marc Nuzillard

Directeur de Recherches au CNRS

Institut de Chimie Moléculaire de Reims
CNRS UMR 7312
Moulin de la Housse
CPCBAI, Bâtiment 18
BP 1039
51687 REIMS Cedex 2
France

Tel : 03 26 91 82 10
Fax : 03 26 91 31 66
http://www.univ-reims.fr/ICMR
http://eos.univ-reims.fr/LSD/ISgroup.html


http://www.univ-reims.fr/LSD/
http://www.univ-reims.fr/LSD/JmnSoft/




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





--
Jean-Marc Nuzillard
Directeur de Recherches au CNRS

Institut de Chimie Moléculaire de Reims
CNRS UMR 7312
Moulin de la Housse
CPCBAI, Bâtiment 18
BP 1039
51687 REIMS Cedex 2
France

Tel : 03 26 91 82 10
Fax : 03 26 91 31 66
http://www.univ-reims.fr/ICMR
http://eos.univ-reims.fr/LSD/ISgroup.html

http://www.univ-reims.fr/LSD/
http://www.univ-reims.fr/LSD/JmnSoft/

--
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] SMILES, explicit H and chirality

2017-06-19 Thread Greg Landrum
Hi Jean-Marc,

I can't reproduce that:

In [2]: m = Chem.MolFromSmiles('CN1CCC[C@H]1c1cccnc1')

In [3]: Chem.MolToSmiles(m,isomericSmiles=True)
Out[3]: 'CN1CCC[C@H]1c1cccnc1'

In [4]: Chem.MolToSmiles(m,isomericSmiles=True,allHsExplicit=True)
Out[4]: '[CH3][N]1[CH2][CH2][CH2][C@H]1[c]1[cH][cH][cH][n][cH]1'


Can you send some sample code that shows the problem?

-greg


On Mon, Jun 19, 2017 at 10:59 AM, Jean-Marc Nuzillard <
jm.nuzill...@univ-reims.fr> wrote:

> Dear All,
>
> Chem.MolToSmiles(m, isomericSmiles=True, allHsExplicit=False) with m being
> nicotine downloaded from PubChem returns
> CN1CCC[C@H]1c1cccnc1 , which is consistent with the structure of nicotine.
> Chem.MolToSmiles(m, isomericSmiles=True, allHsExplicit=True) returns
> [CH3][N]1[CH2][CH2][CH2][CH]1[c]1[cH][cH][cH][n][cH]1 in which chirality
> has disappeared.
> Would it be possible to get H count and chirality?
>
> All the best,
>
> Jean-Marc
>
> --
> Jean-Marc Nuzillard
> Directeur de Recherches au CNRS
>
> Institut de Chimie Moléculaire de Reims
> CNRS UMR 7312
> Moulin de la Housse
> CPCBAI, Bâtiment 18
> BP 1039
> 51687 REIMS Cedex 2
> France
>
> Tel : 03 26 91 82 10
> Fax : 03 26 91 31 66
> http://www.univ-reims.fr/ICMR
> http://eos.univ-reims.fr/LSD/ISgroup.html
>
> http://www.univ-reims.fr/LSD/
> http://www.univ-reims.fr/LSD/JmnSoft/
>
>
> 
> --
> 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] SMILES, explicit H and chirality

2017-06-19 Thread Jean-Marc Nuzillard

Dear All,

Chem.MolToSmiles(m, isomericSmiles=True, allHsExplicit=False) with m 
being nicotine downloaded from PubChem returns

CN1CCC[C@H]1c1cccnc1 , which is consistent with the structure of nicotine.
Chem.MolToSmiles(m, isomericSmiles=True, allHsExplicit=True) returns
[CH3][N]1[CH2][CH2][CH2][CH]1[c]1[cH][cH][cH][n][cH]1 in which chirality 
has disappeared.

Would it be possible to get H count and chirality?

All the best,

Jean-Marc

--
Jean-Marc Nuzillard
Directeur de Recherches au CNRS

Institut de Chimie Moléculaire de Reims
CNRS UMR 7312
Moulin de la Housse
CPCBAI, Bâtiment 18
BP 1039
51687 REIMS Cedex 2
France

Tel : 03 26 91 82 10
Fax : 03 26 91 31 66
http://www.univ-reims.fr/ICMR
http://eos.univ-reims.fr/LSD/ISgroup.html

http://www.univ-reims.fr/LSD/
http://www.univ-reims.fr/LSD/JmnSoft/


--
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] Installation woes: Ubuntu 16.04, Boost 1.61, and RDKit not living so peacefully together after all ...

2017-06-19 Thread Greg Landrum
If you have a system boost install that you do not want to use, you should
be sure to add "-D Boost_NO_SYSTEM_PATHS=ON" to the cmake arguments. This
will (well, should) disable any usage of the system boost.

-greg


On Mon, Jun 19, 2017 at 9:39 AM, JP  wrote:

> HI Paul,
>
> Funny you should mention that.  I have boost 1.61 (installed manually in
> /opt) and system boost I installed via sudo apt-get install
>
> /opt/rdkit/rdkit-Release_2017_03_2/build$ dpkg -s libboost-dev | grep
> 'Version'
> Version: 1.58.0.1ubuntu1
>
> However I pass the BOOST path to cmake via:
>
> cmake -DRDK_BUILD_INCHI_SUPPORT=ON -DBOOST_ROOT=/opt/boost_1_61_0/  ..
>
> (I also have the $BOOST_ROOT env variable set, so I think that is
> redundant.  Whatever).  cmake output clearly shows it is finding/using
> boost 1.61
>
> Using make VERBOSE=1 I get:
>
> [ 62%] Linking CXX executable testReaction
> cd /opt/rdkit/rdkit-Release_2017_03_2/build/Code/GraphMol/ChemReactions
> && /usr/bin/cmake -E cmake_link_script CMakeFiles/testReaction.dir/link.txt
> --verbose=1
> /usr/bin/c++-mpopcnt -Wno-deprecated -Wno-unused-function
> -fno-strict-aliasing -fPIC -Wall -Wextra -O3 -DNDEBUG
> CMakeFiles/testReaction.dir/testReaction.cpp.o  -o testReaction -rdynamic
> ../../../lib/libRDKitChemReactions.so.1.2017.03.2 ../../../lib/
> libRDKitChemTransforms.so.1.2017.03.2 ../../../lib/
> libRDKitDescriptors.so.1.2017.03.2 
> ../../../lib/libRDKitFingerprints.so.1.2017.03.2
> ../../../lib/libRDKitDepictor.so.1.2017.03.2 ../../../lib/
> libRDKitFileParsers.so.1.2017.03.2 -lboost_serialization ../../../lib/
> libRDKitPartialCharges.so.1.2017.03.2 ../../../lib/
> libRDKitMolTransforms.so.1.2017.03.2 ../../../lib/
> libRDKitEigenSolvers.so.1.2017.03.2 ../../../lib/
> libRDKitFilterCatalog.so.1.2017.03.2 ../../../lib/
> libRDKitSubgraphs.so.1.2017.03.2 ../../../lib/
> libRDKitSmilesParse.so.1.2017.03.2 ../../../lib/
> libRDKitSubstructMatch.so.1.2017.03.2 
> ../../../lib/libRDKitGraphMol.so.1.2017.03.2
> ../../../lib/libRDKitRDGeometryLib.so.1.2017.03.2 ../../../lib/
> libRDKitDataStructs.so.1.2017.03.2 -lboost_serialization
> ../../../lib/libRDKitCatalogs.so.1.2017.03.2 ../../../lib/
> libRDKitRDGeneral.so.1.2017.03.2 -lboost_thread -lboost_system -lpthread
> -Wl,-rpath,/opt/rdkit/rdkit-Release_2017_03_2/build/lib
> ../../../lib/libRDKitChemReactions.so.1.2017.03.2: undefined reference to
> `boost::archive::text_iarchive_impl text_iarchive>::load_override(boost::archive::class_name_type&)'
> ../../../lib/libRDKitChemReactions.so.1.2017.03.2: undefined reference to
> `boost::archive::archive_exception::archive_exception(
> boost::archive::archive_exception const&)'
> collect2: error: ld returned 1 exit status
> Code/GraphMol/ChemReactions/CMakeFiles/testReaction.dir/build.make:116:
> recipe for target 'Code/GraphMol/ChemReactions/testReaction' failed
> make[2]: *** [Code/GraphMol/ChemReactions/testReaction] Error 1
> make[2]: Leaving directory '/opt/rdkit/rdkit-Release_2017_03_2/build'
> CMakeFiles/Makefile2:4157: recipe for target 'Code/GraphMol/ChemReactions/
> CMakeFiles/testReaction.dir/all' failed
> make[1]: *** [Code/GraphMol/ChemReactions/CMakeFiles/testReaction.dir/all]
> Error 2
> make[1]: Leaving directory '/opt/rdkit/rdkit-Release_2017_03_2/build'
> Makefile:160: recipe for target 'all' failed
> make: *** [all] Error 2
>
> /opt/boost_1_61_0/lib is also the first path in LD_LIBRARY_PATH.
>
> Thanks for your help and time.  I really appreciate it.
>
> Cheers
>
> On 16 June 2017 at 14:12, Paul Emsley  wrote:
>
>> On 16/06/2017 12:08, JP wrote:
>>
>>> Hi Folks,
>>>
>>> Must have been eons ago last time I posted to this mailing list.  The
>>> italians have a saying "chi non muore si rivede".
>>>
>>> I am trying to install the RDKit (release 2017_03_2) from source,
>>> without conda, and I thought this will be a breeze.  But I am getting an
>>> error.  I am pretty sure this is because of the boost version I am using
>>> (1.61).
>>>
>>> The error is:
>>>
>>> [ 62%] Linking CXX executable testReaction
>>> ../../../lib/libRDKitChemReactions.so.1.2017.03.2: undefined
>>> reference to
>>> `boost::archive::text_iarchive_impl>> chive>::load_override(boost::archive::class_name_type&)'
>>> ../../../lib/libRDKitChemReactions.so.1.2017.03.2: undefined
>>> reference to
>>> `boost::archive::archive_exception::archive_exception(boost:
>>> :archive::archive_exception
>>> const&)'
>>> collect2: error: ld returned 1 exit status
>>> Code/GraphMol/ChemReactions/CMakeFiles/testReaction.dir/build.make:116:
>>> recipe for
>>> target 'Code/GraphMol/ChemReactions/testReaction' failed
>>> make[2]: *** [Code/GraphMol/ChemReactions/testReaction] Error 1
>>> CMakeFiles/Makefile2:4157: recipe for target
>>> 'Code/GraphMol/ChemReactions/CMakeFiles/testReaction.dir/all' failed
>>> make[1]: *** [Code/GraphMol/ChemReactions/C
>>> MakeFiles/testReaction.dir/all] Error 2
>>>

Re: [Rdkit-discuss] Installation woes: Ubuntu 16.04, Boost 1.61, and RDKit not living so peacefully together after all ...

2017-06-19 Thread JP
HI Paul,

Funny you should mention that.  I have boost 1.61 (installed manually in
/opt) and system boost I installed via sudo apt-get install

/opt/rdkit/rdkit-Release_2017_03_2/build$ dpkg -s libboost-dev | grep
'Version'
Version: 1.58.0.1ubuntu1

However I pass the BOOST path to cmake via:

cmake -DRDK_BUILD_INCHI_SUPPORT=ON -DBOOST_ROOT=/opt/boost_1_61_0/  ..

(I also have the $BOOST_ROOT env variable set, so I think that is
redundant.  Whatever).  cmake output clearly shows it is finding/using
boost 1.61

Using make VERBOSE=1 I get:

[ 62%] Linking CXX executable testReaction
cd /opt/rdkit/rdkit-Release_2017_03_2/build/Code/GraphMol/ChemReactions &&
/usr/bin/cmake -E cmake_link_script CMakeFiles/testReaction.dir/link.txt
--verbose=1
/usr/bin/c++-mpopcnt -Wno-deprecated -Wno-unused-function
-fno-strict-aliasing -fPIC -Wall -Wextra -O3 -DNDEBUG
CMakeFiles/testReaction.dir/testReaction.cpp.o  -o testReaction -rdynamic
../../../lib/libRDKitChemReactions.so.1.2017.03.2
../../../lib/libRDKitChemTransforms.so.1.2017.03.2
../../../lib/libRDKitDescriptors.so.1.2017.03.2
../../../lib/libRDKitFingerprints.so.1.2017.03.2
../../../lib/libRDKitDepictor.so.1.2017.03.2
../../../lib/libRDKitFileParsers.so.1.2017.03.2 -lboost_serialization
../../../lib/libRDKitPartialCharges.so.1.2017.03.2
../../../lib/libRDKitMolTransforms.so.1.2017.03.2
../../../lib/libRDKitEigenSolvers.so.1.2017.03.2
../../../lib/libRDKitFilterCatalog.so.1.2017.03.2
../../../lib/libRDKitSubgraphs.so.1.2017.03.2
../../../lib/libRDKitSmilesParse.so.1.2017.03.2
../../../lib/libRDKitSubstructMatch.so.1.2017.03.2
../../../lib/libRDKitGraphMol.so.1.2017.03.2
../../../lib/libRDKitRDGeometryLib.so.1.2017.03.2
../../../lib/libRDKitDataStructs.so.1.2017.03.2 -lboost_serialization
../../../lib/libRDKitCatalogs.so.1.2017.03.2
../../../lib/libRDKitRDGeneral.so.1.2017.03.2 -lboost_thread -lboost_system
-lpthread -Wl,-rpath,/opt/rdkit/rdkit-Release_2017_03_2/build/lib
../../../lib/libRDKitChemReactions.so.1.2017.03.2: undefined reference to
`boost::archive::text_iarchive_impl::load_override(boost::archive::class_name_type&)'
../../../lib/libRDKitChemReactions.so.1.2017.03.2: undefined reference to
`boost::archive::archive_exception::archive_exception(boost::archive::archive_exception
const&)'
collect2: error: ld returned 1 exit status
Code/GraphMol/ChemReactions/CMakeFiles/testReaction.dir/build.make:116:
recipe for target 'Code/GraphMol/ChemReactions/testReaction' failed
make[2]: *** [Code/GraphMol/ChemReactions/testReaction] Error 1
make[2]: Leaving directory '/opt/rdkit/rdkit-Release_2017_03_2/build'
CMakeFiles/Makefile2:4157: recipe for target
'Code/GraphMol/ChemReactions/CMakeFiles/testReaction.dir/all' failed
make[1]: *** [Code/GraphMol/ChemReactions/CMakeFiles/testReaction.dir/all]
Error 2
make[1]: Leaving directory '/opt/rdkit/rdkit-Release_2017_03_2/build'
Makefile:160: recipe for target 'all' failed
make: *** [all] Error 2

/opt/boost_1_61_0/lib is also the first path in LD_LIBRARY_PATH.

Thanks for your help and time.  I really appreciate it.

Cheers

On 16 June 2017 at 14:12, Paul Emsley  wrote:

> On 16/06/2017 12:08, JP wrote:
>
>> Hi Folks,
>>
>> Must have been eons ago last time I posted to this mailing list.  The
>> italians have a saying "chi non muore si rivede".
>>
>> I am trying to install the RDKit (release 2017_03_2) from source, without
>> conda, and I thought this will be a breeze.  But I am getting an error.  I
>> am pretty sure this is because of the boost version I am using (1.61).
>>
>> The error is:
>>
>> [ 62%] Linking CXX executable testReaction
>> ../../../lib/libRDKitChemReactions.so.1.2017.03.2: undefined
>> reference to
>> `boost::archive::text_iarchive_impl> iarchive>::load_override(boost::archive::class_name_type&)'
>> ../../../lib/libRDKitChemReactions.so.1.2017.03.2: undefined
>> reference to
>> `boost::archive::archive_exception::archive_exception(boost:
>> :archive::archive_exception
>> const&)'
>> collect2: error: ld returned 1 exit status
>> Code/GraphMol/ChemReactions/CMakeFiles/testReaction.dir/build.make:116:
>> recipe for
>> target 'Code/GraphMol/ChemReactions/testReaction' failed
>> make[2]: *** [Code/GraphMol/ChemReactions/testReaction] Error 1
>> CMakeFiles/Makefile2:4157: recipe for target
>> 'Code/GraphMol/ChemReactions/CMakeFiles/testReaction.dir/all' failed
>> make[1]: *** [Code/GraphMol/ChemReactions/C
>> MakeFiles/testReaction.dir/all] Error 2
>> Makefile:160: recipe for target 'all' failed
>> make: *** [all] Error 2
>>
>
> If you are using an outdated version of boost, this is not the most
> elegant way for RDKit to tell you so.
>
> But I don't think that that's the case. I think that you are not linking
> with the correct boost libraries. Hard to say at the moment.
>
> $ make  VERBOSE=1
>
>>
>> As I side note, but this is just a deprecation warning, I do get a ton of
>> these,
>>