[Rdkit-discuss] 2020.03.1 RDKit Release

2020-03-29 Thread Greg Landrum
Dear all,

I'm pleased to announce that the next version of the RDKit - 2020.03 - is
released. This time we even managed to get it out during the correct month!
:-) The release notes are below.

The release files are on the github release page:
https://github.com/rdkit/rdkit/releases/tag/Release_2020_03_1

Binaries have been uploaded to anaconda.org (https://anaconda.org/rdkit).
The available conda binaries for this release are:
Linux 64bit: python 3.6, 3.7
Mac OS 64bit: python 3.6, 3.7
Windows 64bit: python 3.6, 3.7

Conda builds of the PostgreSQL cartridge are also available:
Linux 64bit: postgresql 9.6, 10, 11
Mac OS 64bit: postgresql 9.6, 10, 11

The PR is in to switch conda-forge to the new version as well. There are
currently some non-RDKit-related build problems with conda-forge, but
hopefully that will be updated soon as well.

The online version of the documentation at rdkit.org (
http://rdkit.org/docs/index.html) has been updated.

Some things that will be finished over the next couple of days:
- The conda build scripts will be updated to reflect the new version
- The homebrew script

Thanks to everyone who submitted code, bug reports, and suggestions for
this release!

Please let me know if you find any problems with the release or have
suggestions for the next one, which is scheduled for September/October 2020.

Best Regards,
-greg

# Release_2020.03.1
(Changes relative to Release_2019.09.1)

## Backwards incompatible changes
- Searches for equal molecules (i.e. `mol1 @= mol2`) in the PostgreSQL
cartridge
  now use the `do_chiral_sss` option. So if `do_chiral_sss` is false (the
  default), the molecules `CC(F)Cl` and `C[C@H](F)Cl` will be considered to
be equal.
  Previously these molecules were always considered to be different.
- Attempting to create a MolSupplier from a filename pointing to an empty
file,
  a file that does not exist or sometihing that is not a standard file (i.e.
  something like a directory) now generates an exception.
- The cmake option `RDK_OPTIMIZE_NATIVE` has been renamed to
`RDK_OPTIMIZE_POPCNT`

# Highlights:
- The drawings generated by the MolDraw2D objects are now significantly
improved
  and can include simple atom and bond annotations (#2931 and #3010)
- An initial implementation of a modified scaffold network algorithm is now
  available (#2911)
- A few new descriptor/fingerprint types are available - BCUTs (#2957),
Morse
  atom fingerprints (#1773), Coulomb matrices (#2993), and MHFP and SECFP
  fingerprints (#2643)
- There is a new, and greatly improved, version of the RDKit Cookbook
(#2884)
- There is a new version (v3) of the ETKDG conformer generator along with
  optional new terms for handling small rings and macrocyles (
http://doi.org/dqnh) (#2999)


## Acknowledgements:
Marcel Baltruschat, Jason Biggs, Eliane Briand, Ben Cornett, David Cosgrove,
Andrew Dalke, Tim Dudgeon, Zhenting Gao, Guillaume Godin, Manan Goel, Gareth
Jones, Zachary Kaplan, Eisuke Kawashima, Steven Kearnes, Brian Kelley, Maxim
Koltsov, Franziska Kruger, Mieszko Manijak, Dan Nealschneider, Daniil
Polykovskiy, Daniel Probst, Sereina Riniker, Matthew Robinson, Steve
Roughley,
Kevin Ryan, Vincent F. Scalfani, Ricardo Rodriguez Schmidt, Rim
Shayakhmetov,
Aryan Shrey, Nik Stiefl, Matt Swain, Paolo Tosco, Wiep van der Toorn,
Riccardo
Vianello, Shuzhe Wang, Piotr Wawrzyniak, Hsiao Yi, 'jasad1',
'luancarvalhomartins'


## Bug Fixes:
  - Mol rendering within DataFrames in a Jupyter Notebook is broken with
Pandas 0.25.1
 (github issue #2673 from mrcblt)
  - Removed RDKIT_SIMDIVPICKERS_EXPORT
 (github pull #2740 from ptosco)
  - - enable building RDKitRingDecomposerLib.dll under Windows
 (github pull #2742 from ptosco)
  - Do a windows DLL build as part of the Azure DevOps setup
 (github pull #2743 from greglandrum)
  - Fix data race in sascorer.py
 (github pull #2744 from skearnes)
  - Uncharger not properly setting explicit/implicit H count
 (github issue #2749 from greglandrum)
  - MSVC compile error: MolHash scoped enum cannot be redeclared as unscoped
 (github issue #2752 from mcs07)
  - Molecules whose Y size is very small won't display as SVG
 (github issue #2762 from ptosco)
  - Make the cartridge tests work with PostgreSQL 12
 (github pull #2767 from greglandrum)
  - Salt stripper should consider bond matches as well as atom matches
 (github pull #2768 from greglandrum)
  - Bismuth should count as an early element
 (github issue #2775 from greglandrum)
  - addHs() fails on atoms with "bad" valences
 (github issue #2782 from greglandrum)
  - Element symbol lookup for some transuranics returns incorrect results
 (github issue #2784 from LeanAndMean)
  - [cartridge] molecular equality should use do_chiral_sss setting
 (github issue #2790 from greglandrum)
  - uncharger removes Hs from carbocations instead of adding them
 (github issue #2792 from greglandrum)
  - Fix build without boost serialization library
 (github pull #2796 from maksbotan)
  - Using `SetBoundsMat` significantly slows do

Re: [Rdkit-discuss] Closing a file opened by Chem.SDMolSupplier?

2020-03-29 Thread Jean-Marc Nuzillard

Ok Paulo,

with open(tempfn, 'rb') as reader:
    fsuppl = Chem.ForwardSDMolSupplier(reader)
    for m2 in fsuppl:
        print(m2.GetProp('_Name'))

works fine for what I want to do.

Best,

Jean-Marc


Le 29/03/2020 à 16:35, Jean-Marc Nuzillard a écrit :

Hi Paolo,

neither tempfn (a string)  nor reader (a SDMolSupplier) have a close() 
method.


I am not sure about what you wrote about the "with" statement.

Attempting:
with Chem.SDMolSupplier(tempfn) as reader:
    m2 = reader[0]
    print(m2.GetProp('_Name'))

resulted in:
    with Chem.SDMolSupplier(tempfn) as reader:
AttributeError: __enter__

Best,

Jean-Marc


Le 29/03/2020 à 15:51, Paolo Tosco a écrit :

Hi Jean-Marc,

tempfn.close() should allow you to delete the file.
A better alternative would be using using

with temp file.TemporaryFile as tempfn
 ...

As the file will be automatically closed and deleted for you as soon 
as it goes out of scope at the end of the context manager block.


Cheers,
p.

On 29 Mar 2020, at 13:44, Jean-Marc Nuzillard 
 wrote:


Dear all,

The following code:
__
from rdkit import Chem
import os
import tempfile

# create temp .sdf file with a benzene molecule inside
m1 = Chem.MolFromSmiles('c1c1')
m1.SetProp('_Name', 'benzene')
tempfn = tempfile.mktemp('.sdf')
writer = Chem.SDWriter(tempfn)
writer.write(m1)
writer.close()

# read the molecule from temp .sdf file and print compound name
reader = Chem.SDMolSupplier(tempfn)
m2 = reader[0]
print(m2.GetProp('_Name'))

# unlik temp file
os.unlink(tempfn)
__

running it in windows gives:

benzene
Traceback (most recent call last):
   File "rdclose.py", line 21, in 
 os.unlink(tempfn)
PermissionError: [WinError 32] The process cannot access the file 
because it is being used by another process:

'C:\\Users\\jmn\\AppData\\Local\\Temp\\tmpojn1j4nb.sdf'

I suspect the reason is that reader file is not closed.
Trying reader.close() results in a message saying that reader has no 
close() method.


Thank you in advance for helping me to get rid of the temp file.

Take care,

Jean-Marc Nuzillard

--
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/CSNteam.html

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



___
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/CSNteam.html

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



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


Re: [Rdkit-discuss] Closing a file opened by Chem.SDMolSupplier?

2020-03-29 Thread Jean-Marc Nuzillard

Hi Paolo,

neither tempfn (a string)  nor reader (a SDMolSupplier) have a close() 
method.


I am not sure about what you wrote about the "with" statement.

Attempting:
with Chem.SDMolSupplier(tempfn) as reader:
    m2 = reader[0]
    print(m2.GetProp('_Name'))

resulted in:
    with Chem.SDMolSupplier(tempfn) as reader:
AttributeError: __enter__

Best,

Jean-Marc


Le 29/03/2020 à 15:51, Paolo Tosco a écrit :

Hi Jean-Marc,

tempfn.close() should allow you to delete the file.
A better alternative would be using using

with temp file.TemporaryFile as tempfn
 ...

As the file will be automatically closed and deleted for you as soon as it goes 
out of scope at the end of the context manager block.

Cheers,
p.


On 29 Mar 2020, at 13:44, Jean-Marc Nuzillard  
wrote:

Dear all,

The following code:
__
from rdkit import Chem
import os
import tempfile

# create temp .sdf file with a benzene molecule inside
m1 = Chem.MolFromSmiles('c1c1')
m1.SetProp('_Name', 'benzene')
tempfn = tempfile.mktemp('.sdf')
writer = Chem.SDWriter(tempfn)
writer.write(m1)
writer.close()

# read the molecule from temp .sdf file and print compound name
reader = Chem.SDMolSupplier(tempfn)
m2 = reader[0]
print(m2.GetProp('_Name'))

# unlik temp file
os.unlink(tempfn)
__

running it in windows gives:

benzene
Traceback (most recent call last):
   File "rdclose.py", line 21, in 
 os.unlink(tempfn)
PermissionError: [WinError 32] The process cannot access the file because it is 
being used by another process:
'C:\\Users\\jmn\\AppData\\Local\\Temp\\tmpojn1j4nb.sdf'

I suspect the reason is that reader file is not closed.
Trying reader.close() results in a message saying that reader has no close() 
method.

Thank you in advance for helping me to get rid of the temp file.

Take care,

Jean-Marc Nuzillard

--
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/CSNteam.html

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



___
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/CSNteam.html

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



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


Re: [Rdkit-discuss] Closing a file opened by Chem.SDMolSupplier?

2020-03-29 Thread Paolo Tosco
Hi Jean-Marc,

tempfn.close() should allow you to delete the file.
A better alternative would be using using

with temp file.TemporaryFile as tempfn
...

As the file will be automatically closed and deleted for you as soon as it goes 
out of scope at the end of the context manager block.

Cheers,
p.

> On 29 Mar 2020, at 13:44, Jean-Marc Nuzillard  
> wrote:
> 
> Dear all,
> 
> The following code:
> __
> from rdkit import Chem
> import os
> import tempfile
> 
> # create temp .sdf file with a benzene molecule inside
> m1 = Chem.MolFromSmiles('c1c1')
> m1.SetProp('_Name', 'benzene')
> tempfn = tempfile.mktemp('.sdf')
> writer = Chem.SDWriter(tempfn)
> writer.write(m1)
> writer.close()
> 
> # read the molecule from temp .sdf file and print compound name
> reader = Chem.SDMolSupplier(tempfn)
> m2 = reader[0]
> print(m2.GetProp('_Name'))
> 
> # unlik temp file
> os.unlink(tempfn)
> __
> 
> running it in windows gives:
> 
> benzene
> Traceback (most recent call last):
>   File "rdclose.py", line 21, in 
> os.unlink(tempfn)
> PermissionError: [WinError 32] The process cannot access the file because it 
> is being used by another process:
> 'C:\\Users\\jmn\\AppData\\Local\\Temp\\tmpojn1j4nb.sdf'
> 
> I suspect the reason is that reader file is not closed.
> Trying reader.close() results in a message saying that reader has no close() 
> method.
> 
> Thank you in advance for helping me to get rid of the temp file.
> 
> Take care,
> 
> Jean-Marc Nuzillard
> 
> -- 
> 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/CSNteam.html
> 
> http://www.univ-reims.fr/LSD/
> http://www.univ-reims.fr/LSD/JmnSoft/
> 
> 
> 
> ___
> 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] Closing a file opened by Chem.SDMolSupplier?

2020-03-29 Thread Jean-Marc Nuzillard

Dear all,

The following code:
__
from rdkit import Chem
import os
import tempfile

# create temp .sdf file with a benzene molecule inside
m1 = Chem.MolFromSmiles('c1c1')
m1.SetProp('_Name', 'benzene')
tempfn = tempfile.mktemp('.sdf')
writer = Chem.SDWriter(tempfn)
writer.write(m1)
writer.close()

# read the molecule from temp .sdf file and print compound name
reader = Chem.SDMolSupplier(tempfn)
m2 = reader[0]
print(m2.GetProp('_Name'))

# unlik temp file
os.unlink(tempfn)
__

running it in windows gives:

benzene
Traceback (most recent call last):
  File "rdclose.py", line 21, in 
    os.unlink(tempfn)
PermissionError: [WinError 32] The process cannot access the file 
because it is being used by another process:

'C:\\Users\\jmn\\AppData\\Local\\Temp\\tmpojn1j4nb.sdf'

I suspect the reason is that reader file is not closed.
Trying reader.close() results in a message saying that reader has no 
close() method.


Thank you in advance for helping me to get rid of the temp file.

Take care,

Jean-Marc Nuzillard

--
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/CSNteam.html

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



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