rdworks 0.40.1__py3-none-any.whl → 0.41.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
rdworks/__init__.py CHANGED
@@ -1,4 +1,4 @@
1
- __version__ = '0.40.1'
1
+ __version__ = '0.41.1'
2
2
 
3
3
  from rdworks.conf import Conf
4
4
  from rdworks.mol import Mol
rdworks/conf.py CHANGED
@@ -27,12 +27,17 @@ from rdworks.display import render_png, render_svg
27
27
  class Conf:
28
28
  """Container for 3D conformers."""
29
29
 
30
- def __init__(self, molecule: str | Chem.Mol | None = None, name: str='') -> None:
30
+ def __init__(self,
31
+ molecule: str | Chem.Mol | None = None,
32
+ name: str = '',
33
+ compressed: bool = False) -> None:
31
34
  """Initialize.
32
35
 
33
36
  Args:
34
37
  molecule (Chem.Mol | MolBlock string): Molecule for 3D conformer.
35
38
  name (str): Name prefix of the generated conformers. Defaults to ''.
39
+ compressed (bool): whether the MolBlock string is compressed or not.
40
+ Defaults to False.
36
41
 
37
42
  Raises:
38
43
  ValueError: if `molecule` is not rdkit.Chem.Mol object.
@@ -59,8 +64,13 @@ class Conf:
59
64
  return
60
65
 
61
66
  if isinstance(molecule, str): # 3-D MolBLock string
67
+ if compressed:
68
+ molecule = decompress_string(molecule)
62
69
  try:
63
- self.rdmol = Chem.MolFromMolBlock(molecule)
70
+ self.rdmol = Chem.MolFromMolBlock(molecule,
71
+ sanitize=False,
72
+ removeHs=False,
73
+ strictParsing=True)
64
74
  except:
65
75
  ValueError(f'Conf() Error: invalid MolBlock string')
66
76
 
@@ -1,7 +1,7 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: rdworks
3
- Version: 0.40.1
4
- Summary: Frequently used tasks built on RDKit and other tools
3
+ Version: 0.41.1
4
+ Summary: Routine tasks built on RDKit and other tools
5
5
  Author-email: Sung-Hun Bae <sunghun.bae@gmail.com>
6
6
  Maintainer-email: Sung-Hun Bae <sunghun.bae@gmail.com>
7
7
  License-Expression: MIT
@@ -10,7 +10,7 @@ Project-URL: Repository, https://github.com/sunghunbae/rdworks.git
10
10
  Project-URL: Issues, https://github.com/sunghunbae/rdworks/issues
11
11
  Project-URL: Changelog, https://github.com/sunghunbae/rdworks/blob/master/CHANGELOG.md
12
12
  Project-URL: Documentation, https://sunghunbae.github.io/rdworks/
13
- Keywords: cheminformatics,rdkit
13
+ Keywords: cheminformatics,rdkit,cdpkit
14
14
  Classifier: Development Status :: 3 - Alpha
15
15
  Classifier: Intended Audience :: Developers
16
16
  Classifier: Programming Language :: Python :: 3
@@ -30,5 +30,45 @@ Requires-Dist: bitarray
30
30
  Requires-Dist: pytest
31
31
  Dynamic: license-file
32
32
 
33
- # rdworks
34
- Higher level wrapper using RDKit
33
+ # Rdworks - routine tasks made easy
34
+
35
+ Rdworks is designed to perform routine cheminformatics tasks easily. It is built on RDKit and other tools.
36
+
37
+ ## Install
38
+
39
+ ```sh
40
+ $ pip install rdworks
41
+ ```
42
+
43
+ OR
44
+
45
+ ```sh
46
+ $ pip install git+https://github.com/sunghunbae/rdworks.git
47
+ ```
48
+
49
+ ## Getting started
50
+
51
+ ```py
52
+ from rdworks import Mol
53
+
54
+ version = rdworks.__version__
55
+
56
+ mol = Mol('CC(=O)Nc1ccc(O)cc1', 'acetaminophen')
57
+
58
+ mol = mol.make_confs(n=5)
59
+ mol.to_sdf('acetaminophen.sdf')
60
+
61
+ torsion_dict = mol.torsion_atoms()
62
+ # torsion_dict = {0: (5,4,3,1)}
63
+
64
+ mol = mol.torsion_energies(calculator='MMFF94', simplify=True)
65
+
66
+ mol.plot_torsion_energies(0, figsize=(6,4))
67
+
68
+ mol.to_png(300, 300, atom_index=True, highlight_atoms=torsion_dict.get(0))
69
+
70
+ serialized = mol.serialize(compress=True)
71
+ mol2 = Mol().deserialize(serialized, compress=True)
72
+
73
+ mol3 = mol.copy()
74
+ ```
@@ -1,5 +1,5 @@
1
- rdworks/__init__.py,sha256=u0oNboUCvBT6mkw6z5qRQiMVr-aglMbFITjb7Ut-DEM,1368
2
- rdworks/conf.py,sha256=vMKVaHKvlPQ87CNfROodzwZ7l9h-tFCs8MGwon6_sJU,30823
1
+ rdworks/__init__.py,sha256=peU479Cq6wwRIRlgq5oXG-OkjglPAzoBFl2m0syn3jg,1368
2
+ rdworks/conf.py,sha256=y4fuAOSTOm8sMPxP6rKktKQY9b5SRJ5wjTshrwIyRrw,31318
3
3
  rdworks/descriptor.py,sha256=34T_dQ6g8v3u-ym8TLKbQtxIIV5TEo-d3pdedq3o-cg,2106
4
4
  rdworks/display.py,sha256=JR0gR26UpH-JCxVOaqXZCUj2MiGZSrx9Me87FncspVI,13469
5
5
  rdworks/ionized.py,sha256=5oIjMRpkX792RIpEEE2Ir96icfFaN_h21mSihhfQPAw,6713
@@ -66,8 +66,8 @@ rdworks/predefined/misc/reactive-part-3.xml,sha256=LgWHSEbRTVmgBoIO45xbTo1xQJs0X
66
66
  rdworks/predefined/misc/reactive.xml,sha256=syedoQ6VYUfRLnxy99ObuDniJ_a_WhrWAJbTKFfJ6VY,11248
67
67
  rdworks/xtb/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
68
68
  rdworks/xtb/wrapper.py,sha256=I0nW89vlJZ5Za5pCjIpjsEOFbTm7HpeNGiPgssheWn8,11350
69
- rdworks-0.40.1.dist-info/licenses/LICENSE,sha256=UOkJSBqYyQUvtCp7a-vdCANeEcLE2dnTie_eB1By5SY,1074
70
- rdworks-0.40.1.dist-info/METADATA,sha256=ksYcRcoRSez6WZGRR-0mEMLWk0aO_A3fvK3QVHcHEpw,1183
71
- rdworks-0.40.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
72
- rdworks-0.40.1.dist-info/top_level.txt,sha256=05C98HbvBK2axUBogC_hAT_CdpOeQYGnQ6vRAgawr8s,8
73
- rdworks-0.40.1.dist-info/RECORD,,
69
+ rdworks-0.41.1.dist-info/licenses/LICENSE,sha256=UOkJSBqYyQUvtCp7a-vdCANeEcLE2dnTie_eB1By5SY,1074
70
+ rdworks-0.41.1.dist-info/METADATA,sha256=_t5_Rn30kucD0VBt08335lotOO7QtN0pyAwaJot7gac,1967
71
+ rdworks-0.41.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
72
+ rdworks-0.41.1.dist-info/top_level.txt,sha256=05C98HbvBK2axUBogC_hAT_CdpOeQYGnQ6vRAgawr8s,8
73
+ rdworks-0.41.1.dist-info/RECORD,,