Skip to content

Commit 89cb52a

Browse files
authored
Merge pull request #71 from rdkit/mmpdb-3.1.2-dev
mmpdb 3.1.2 dev
2 parents 0510f75 + d595e95 commit 89cb52a

File tree

12 files changed

+117
-119
lines changed

12 files changed

+117
-119
lines changed

PKG-INFO

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Metadata-Version: 1.1
22
Name: mmpdb
3-
Version: 2.2
3+
Version: 3.1.2
44
Summary: A package to identify matched molecular pairs and use them to predict property changes
55
Home-page: file://README.md
66
Author: Andrew Dalke

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# mmpdb 3.1.1 - matched molecular pair database generation and analysis
1+
# mmpdb 3.1.2 - matched molecular pair database generation and analysis
22

33

44
## Synopsis
@@ -12,7 +12,7 @@ property changes and generate new molecular structures.
1212

1313
## Installation
1414

15-
mmpdb 3.1.1 must be installed before use. (Earlier versions of mmpdb
15+
mmpdb 3.1.2 must be installed before use. (Earlier versions of mmpdb
1616
could be run in-place, in the top-level directory.) This will also
1717
ensure that the SciPy, peewee, and click packages are installed.
1818

mmpdblib/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "3.1.1"
1+
__version__ = "3.1.2"

mmpdblib/rgroup2smarts.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,8 @@ def rgroup_mol_to_smarts(mol):
130130
# is a string like '[0,1,2,3,4,5,6,7,8,13,9,10,11,12,]' which maps
131131
# between the atom order in the molecule and the output order
132132
output_order_str = mol.GetProp("_smilesAtomOutputOrder")
133-
assert output_order_str[0] == "[" and output_order_str[-2:] == ",]", output_order_str
134-
output_order_map = map(int, output_order_str[1:-2].split(","))
133+
assert output_order_str[0] == "[" and output_order_str[-1:] == "]", output_order_str
134+
output_order_map = map(int, output_order_str[1:-1].split(","))
135135
invert_order = dict(enumerate(output_order_map))
136136

137137
## print(converted_smi)

setup.cfg

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
[metadata]
22
name = mmpdb
3-
version = 3.1
3+
version = 3.1.2
44
description = A package to identify matched molecular pairs and use them to predict property changes
55
author = Andrew Dalke
66
author_email = [email protected]
7-
maintainer = Christian Kramer
7+
maintainer = Jerome (chem-bio)
88
maintainer_email = [email protected]
99

1010
long_description = file: README.md
@@ -32,6 +32,7 @@ install_requires =
3232
click
3333
peewee >= 3.0
3434
scipy
35+
rdkit >= 2024
3536

3637
[options.package_data]
3738
mmpdblib = schema.sql, create_index.sql, drop_index.sql, fragment_schema.sql, fragment_create_index.sql

tests/cached.fragdb

4 KB
Binary file not shown.

tests/support.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,7 @@ def get_filename(filename):
3535
return os.path.join(os.path.dirname(__file__), filename)
3636

3737

38-
def create_testdir_and_filename(test_case, filename):
39-
dirname = tempfile.mkdtemp(prefix="mmpdb_test")
40-
test_case.addCleanup(shutil.rmtree, dirname)
41-
return dirname, os.path.join(dirname, filename)
42-
43-
4438
def create_test_filename(test_case, filename):
45-
dirname = tempfile.mkdtemp(prefix="mmpdb_test")
39+
dirname = tempfile.mkdtemp(prefix="mmpdb_test_")
4640
test_case.addCleanup(shutil.rmtree, dirname)
4741
return os.path.join(dirname, filename)

tests/test_data.fragdb

4 KB
Binary file not shown.

tests/test_data_2019.mmpdb

1.71 MB
Binary file not shown.

tests/test_fragment.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -533,7 +533,7 @@ def _test_cache(self, cache_filename):
533533
records = list(db)
534534
self._check_record(records[1], "entry", "Nc1ccccc1C")
535535
# This is a fake record to check that the value came from the cache.
536-
self.assertIn("P", records[1].fragmentations[0].constant_smiles)
536+
self.assertIn("*N", records[1].fragmentations[0].constant_smiles)
537537

538538
# This doesn't come from the cache.
539539
self._check_record(records[2], "item", "Nc1cc(S)ccc1C")
@@ -577,11 +577,11 @@ def test_phenol(self):
577577

578578
def test_max_heavies(self):
579579
errmsg = smifrag_fail("c1ccccc1O", "--max-heavies", "5")
580-
self.assertIn("Cannot parse smiles: too many heavy atoms", errmsg)
580+
self.assertIn("Cannot process SMILES: too many heavy atoms", errmsg)
581581

582582
def test_rotatable_bonds(self):
583583
errmsg = smifrag_fail("c1ccccc1O", "--max-rotatable-bonds", "3", "--rotatable-smarts", "**")
584-
self.assertIn("Cannot parse smiles: too many rotatable bonds", errmsg)
584+
self.assertIn("Cannot process SMILES: too many rotatable bonds", errmsg)
585585

586586
def test_cut_smarts_using_cut_AlkylChains(self):
587587
result = smifrag("CCCC")

0 commit comments

Comments
 (0)