rdkit-cli 0.1.0__tar.gz
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.
- rdkit_cli-0.1.0/.github/workflows/publish.yml +82 -0
- rdkit_cli-0.1.0/CHANGELOG.md +43 -0
- rdkit_cli-0.1.0/LICENSE +190 -0
- rdkit_cli-0.1.0/PKG-INFO +380 -0
- rdkit_cli-0.1.0/README.md +346 -0
- rdkit_cli-0.1.0/pyproject.toml +85 -0
- rdkit_cli-0.1.0/src/rdkit_cli/__init__.py +4 -0
- rdkit_cli-0.1.0/src/rdkit_cli/__main__.py +6 -0
- rdkit_cli-0.1.0/src/rdkit_cli/cli.py +162 -0
- rdkit_cli-0.1.0/src/rdkit_cli/commands/__init__.py +1 -0
- rdkit_cli-0.1.0/src/rdkit_cli/commands/conformers.py +220 -0
- rdkit_cli-0.1.0/src/rdkit_cli/commands/convert.py +162 -0
- rdkit_cli-0.1.0/src/rdkit_cli/commands/depict.py +311 -0
- rdkit_cli-0.1.0/src/rdkit_cli/commands/descriptors.py +251 -0
- rdkit_cli-0.1.0/src/rdkit_cli/commands/diversity.py +232 -0
- rdkit_cli-0.1.0/src/rdkit_cli/commands/enumerate.py +229 -0
- rdkit_cli-0.1.0/src/rdkit_cli/commands/filter.py +384 -0
- rdkit_cli-0.1.0/src/rdkit_cli/commands/fingerprints.py +179 -0
- rdkit_cli-0.1.0/src/rdkit_cli/commands/fragment.py +284 -0
- rdkit_cli-0.1.0/src/rdkit_cli/commands/mcs.py +162 -0
- rdkit_cli-0.1.0/src/rdkit_cli/commands/reactions.py +191 -0
- rdkit_cli-0.1.0/src/rdkit_cli/commands/scaffold.py +243 -0
- rdkit_cli-0.1.0/src/rdkit_cli/commands/similarity.py +359 -0
- rdkit_cli-0.1.0/src/rdkit_cli/commands/standardize.py +138 -0
- rdkit_cli-0.1.0/src/rdkit_cli/core/__init__.py +1 -0
- rdkit_cli-0.1.0/src/rdkit_cli/core/conformers.py +197 -0
- rdkit_cli-0.1.0/src/rdkit_cli/core/depict.py +241 -0
- rdkit_cli-0.1.0/src/rdkit_cli/core/descriptors.py +248 -0
- rdkit_cli-0.1.0/src/rdkit_cli/core/diversity.py +174 -0
- rdkit_cli-0.1.0/src/rdkit_cli/core/enumerate.py +190 -0
- rdkit_cli-0.1.0/src/rdkit_cli/core/filters.py +443 -0
- rdkit_cli-0.1.0/src/rdkit_cli/core/fingerprints.py +265 -0
- rdkit_cli-0.1.0/src/rdkit_cli/core/fragment.py +237 -0
- rdkit_cli-0.1.0/src/rdkit_cli/core/mcs.py +128 -0
- rdkit_cli-0.1.0/src/rdkit_cli/core/reactions.py +159 -0
- rdkit_cli-0.1.0/src/rdkit_cli/core/scaffold.py +174 -0
- rdkit_cli-0.1.0/src/rdkit_cli/core/similarity.py +206 -0
- rdkit_cli-0.1.0/src/rdkit_cli/core/standardizer.py +141 -0
- rdkit_cli-0.1.0/src/rdkit_cli/io/__init__.py +7 -0
- rdkit_cli-0.1.0/src/rdkit_cli/io/formats.py +109 -0
- rdkit_cli-0.1.0/src/rdkit_cli/io/readers.py +352 -0
- rdkit_cli-0.1.0/src/rdkit_cli/io/writers.py +275 -0
- rdkit_cli-0.1.0/src/rdkit_cli/parallel/__init__.py +5 -0
- rdkit_cli-0.1.0/src/rdkit_cli/parallel/batch.py +181 -0
- rdkit_cli-0.1.0/src/rdkit_cli/parallel/executor.py +180 -0
- rdkit_cli-0.1.0/src/rdkit_cli/progress/__init__.py +5 -0
- rdkit_cli-0.1.0/src/rdkit_cli/progress/ninja.py +195 -0
- rdkit_cli-0.1.0/src/rdkit_cli/utils/__init__.py +1 -0
- rdkit_cli-0.1.0/tests/__init__.py +1 -0
- rdkit_cli-0.1.0/tests/conftest.py +119 -0
- rdkit_cli-0.1.0/tests/fixtures/sample.csv +11 -0
- rdkit_cli-0.1.0/tests/fixtures/sample.smi +5 -0
- rdkit_cli-0.1.0/tests/integration/__init__.py +1 -0
- rdkit_cli-0.1.0/tests/integration/test_cli.py +434 -0
- rdkit_cli-0.1.0/tests/integration/test_interop.py +349 -0
- rdkit_cli-0.1.0/tests/unit/__init__.py +1 -0
- rdkit_cli-0.1.0/tests/unit/test_depict.py +155 -0
- rdkit_cli-0.1.0/tests/unit/test_descriptors.py +91 -0
- rdkit_cli-0.1.0/tests/unit/test_diversity.py +154 -0
- rdkit_cli-0.1.0/tests/unit/test_enumerate.py +153 -0
- rdkit_cli-0.1.0/tests/unit/test_filters.py +211 -0
- rdkit_cli-0.1.0/tests/unit/test_fingerprints.py +83 -0
- rdkit_cli-0.1.0/tests/unit/test_fragment.py +160 -0
- rdkit_cli-0.1.0/tests/unit/test_io.py +180 -0
- rdkit_cli-0.1.0/tests/unit/test_mcs.py +158 -0
- rdkit_cli-0.1.0/tests/unit/test_reactions.py +125 -0
- rdkit_cli-0.1.0/tests/unit/test_scaffold.py +170 -0
- rdkit_cli-0.1.0/tests/unit/test_similarity.py +195 -0
- rdkit_cli-0.1.0/tests/unit/test_standardizer.py +126 -0
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
name: Publish to PyPI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
release:
|
|
5
|
+
types: [published]
|
|
6
|
+
|
|
7
|
+
# Allow manual trigger
|
|
8
|
+
workflow_dispatch:
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
build:
|
|
12
|
+
name: Build distribution
|
|
13
|
+
runs-on: ubuntu-latest
|
|
14
|
+
|
|
15
|
+
steps:
|
|
16
|
+
- uses: actions/checkout@v4
|
|
17
|
+
|
|
18
|
+
- name: Set up Python
|
|
19
|
+
uses: actions/setup-python@v5
|
|
20
|
+
with:
|
|
21
|
+
python-version: "3.12"
|
|
22
|
+
|
|
23
|
+
- name: Install build dependencies
|
|
24
|
+
run: |
|
|
25
|
+
python -m pip install --upgrade pip
|
|
26
|
+
pip install build
|
|
27
|
+
|
|
28
|
+
- name: Build package
|
|
29
|
+
run: python -m build
|
|
30
|
+
|
|
31
|
+
- name: Store distribution packages
|
|
32
|
+
uses: actions/upload-artifact@v4
|
|
33
|
+
with:
|
|
34
|
+
name: python-package-distributions
|
|
35
|
+
path: dist/
|
|
36
|
+
|
|
37
|
+
publish-to-pypi:
|
|
38
|
+
name: Publish to PyPI
|
|
39
|
+
needs: build
|
|
40
|
+
runs-on: ubuntu-latest
|
|
41
|
+
|
|
42
|
+
environment:
|
|
43
|
+
name: pypi
|
|
44
|
+
url: https://pypi.org/p/rdkit-cli
|
|
45
|
+
|
|
46
|
+
permissions:
|
|
47
|
+
id-token: write # Required for trusted publishing
|
|
48
|
+
|
|
49
|
+
steps:
|
|
50
|
+
- name: Download distributions
|
|
51
|
+
uses: actions/download-artifact@v4
|
|
52
|
+
with:
|
|
53
|
+
name: python-package-distributions
|
|
54
|
+
path: dist/
|
|
55
|
+
|
|
56
|
+
- name: Publish to PyPI
|
|
57
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
58
|
+
|
|
59
|
+
publish-to-testpypi:
|
|
60
|
+
name: Publish to TestPyPI
|
|
61
|
+
needs: build
|
|
62
|
+
runs-on: ubuntu-latest
|
|
63
|
+
if: github.event_name == 'workflow_dispatch'
|
|
64
|
+
|
|
65
|
+
environment:
|
|
66
|
+
name: testpypi
|
|
67
|
+
url: https://test.pypi.org/p/rdkit-cli
|
|
68
|
+
|
|
69
|
+
permissions:
|
|
70
|
+
id-token: write
|
|
71
|
+
|
|
72
|
+
steps:
|
|
73
|
+
- name: Download distributions
|
|
74
|
+
uses: actions/download-artifact@v4
|
|
75
|
+
with:
|
|
76
|
+
name: python-package-distributions
|
|
77
|
+
path: dist/
|
|
78
|
+
|
|
79
|
+
- name: Publish to TestPyPI
|
|
80
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
81
|
+
with:
|
|
82
|
+
repository-url: https://test.pypi.org/legacy/
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [0.1.0] - 2026-01-06
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- Initial release with 14 command categories
|
|
13
|
+
- **descriptors**: Compute molecular descriptors (200+ available)
|
|
14
|
+
- **fingerprints**: Generate molecular fingerprints (morgan, maccs, rdkit, atompair, torsion, pattern)
|
|
15
|
+
- **filter**: Filter molecules by substructure, properties, drug-likeness (Lipinski/Veber/Ghose), PAINS
|
|
16
|
+
- **convert**: Convert between molecular file formats (CSV, TSV, SMI, SDF, Parquet)
|
|
17
|
+
- **standardize**: Standardize and canonicalize molecules
|
|
18
|
+
- **similarity**: Similarity search, matrix computation, and clustering
|
|
19
|
+
- **conformers**: Generate and optimize 3D conformers
|
|
20
|
+
- **reactions**: SMIRKS transformations and reaction enumeration
|
|
21
|
+
- **scaffold**: Murcko scaffold extraction and decomposition
|
|
22
|
+
- **enumerate**: Stereoisomer and tautomer enumeration
|
|
23
|
+
- **fragment**: BRICS/RECAP fragmentation and functional group analysis
|
|
24
|
+
- **diversity**: MaxMin diversity picking and diversity analysis
|
|
25
|
+
- **mcs**: Maximum Common Substructure finding
|
|
26
|
+
- **depict**: SVG/PNG molecular depictions (single, batch, grid)
|
|
27
|
+
|
|
28
|
+
### Features
|
|
29
|
+
|
|
30
|
+
- Multi-core parallel processing via ProcessPoolExecutor
|
|
31
|
+
- Ninja-style progress display with speed and ETA
|
|
32
|
+
- Support for multiple I/O formats (CSV, TSV, SMI, SDF, Parquet)
|
|
33
|
+
- Automatic format detection from file extensions
|
|
34
|
+
- Lazy imports for fast CLI startup (~0.08s)
|
|
35
|
+
- Comprehensive test suite (182 tests)
|
|
36
|
+
|
|
37
|
+
### Dependencies
|
|
38
|
+
|
|
39
|
+
- rdkit>=2024.3.1
|
|
40
|
+
- rich-argparse>=1.4.0
|
|
41
|
+
- pandas>=2.0.0
|
|
42
|
+
- pyarrow>=14.0.0
|
|
43
|
+
- numpy>=1.24.0
|
rdkit_cli-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to the Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
Copyright 2026 Johan HG Natter
|
|
179
|
+
|
|
180
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
181
|
+
you may not use this file except in compliance with the License.
|
|
182
|
+
You may obtain a copy of the License at
|
|
183
|
+
|
|
184
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
185
|
+
|
|
186
|
+
Unless required by applicable law or agreed to in writing, software
|
|
187
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
188
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
189
|
+
See the License for the specific language governing permissions and
|
|
190
|
+
limitations under the License.
|
rdkit_cli-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,380 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: rdkit-cli
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: A comprehensive CLI tool for RDKit cheminformatics operations
|
|
5
|
+
Project-URL: Homepage, https://github.com/vitruves/rdkit-cli
|
|
6
|
+
Project-URL: Repository, https://github.com/vitruves/rdkit-cli
|
|
7
|
+
Project-URL: Issues, https://github.com/vitruves/rdkit-cli/issues
|
|
8
|
+
Author: Vitruves
|
|
9
|
+
License-Expression: Apache-2.0
|
|
10
|
+
License-File: LICENSE
|
|
11
|
+
Keywords: cheminformatics,chemistry,cli,fingerprints,molecular-descriptors,rdkit
|
|
12
|
+
Classifier: Development Status :: 4 - Beta
|
|
13
|
+
Classifier: Environment :: Console
|
|
14
|
+
Classifier: Intended Audience :: Science/Research
|
|
15
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
16
|
+
Classifier: Operating System :: OS Independent
|
|
17
|
+
Classifier: Programming Language :: Python :: 3
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
21
|
+
Classifier: Topic :: Scientific/Engineering :: Chemistry
|
|
22
|
+
Requires-Python: >=3.10
|
|
23
|
+
Requires-Dist: numpy>=1.24.0
|
|
24
|
+
Requires-Dist: pandas>=2.0.0
|
|
25
|
+
Requires-Dist: pyarrow>=14.0.0
|
|
26
|
+
Requires-Dist: rdkit>=2024.3.1
|
|
27
|
+
Requires-Dist: rich-argparse>=1.4.0
|
|
28
|
+
Provides-Extra: dev
|
|
29
|
+
Requires-Dist: mypy>=1.0.0; extra == 'dev'
|
|
30
|
+
Requires-Dist: pytest-cov>=4.0.0; extra == 'dev'
|
|
31
|
+
Requires-Dist: pytest>=7.0.0; extra == 'dev'
|
|
32
|
+
Requires-Dist: ruff>=0.1.0; extra == 'dev'
|
|
33
|
+
Description-Content-Type: text/markdown
|
|
34
|
+
|
|
35
|
+
# rdkit-cli
|
|
36
|
+
|
|
37
|
+
A comprehensive, high-performance CLI tool wrapping RDKit functionality for cheminformatics workflows.
|
|
38
|
+
|
|
39
|
+
## Features
|
|
40
|
+
|
|
41
|
+
- **14 Command Categories**: descriptors, fingerprints, filter, convert, standardize, similarity, conformers, reactions, scaffold, enumerate, fragment, diversity, mcs, depict
|
|
42
|
+
- **Multiple Input/Output Formats**: CSV, TSV, SMI, SDF, Parquet
|
|
43
|
+
- **Parallel Processing**: Efficient multi-core support via ProcessPoolExecutor
|
|
44
|
+
- **Ninja-style Progress**: Real-time progress display with speed and ETA
|
|
45
|
+
|
|
46
|
+
## Installation
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
pip install rdkit-cli
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Or with uv:
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
uv add rdkit-cli
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## Quick Start
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
# Compute molecular descriptors
|
|
62
|
+
rdkit-cli descriptors compute -i molecules.csv -o descriptors.csv -d MolWt,MolLogP,TPSA
|
|
63
|
+
|
|
64
|
+
# Generate fingerprints
|
|
65
|
+
rdkit-cli fingerprints compute -i molecules.csv -o fingerprints.csv --type morgan
|
|
66
|
+
|
|
67
|
+
# Filter by drug-likeness
|
|
68
|
+
rdkit-cli filter druglike -i molecules.csv -o filtered.csv --rule lipinski
|
|
69
|
+
|
|
70
|
+
# Standardize molecules
|
|
71
|
+
rdkit-cli standardize -i molecules.csv -o standardized.csv --cleanup --neutralize
|
|
72
|
+
|
|
73
|
+
# Similarity search
|
|
74
|
+
rdkit-cli similarity search -i library.csv -o hits.csv --query "c1ccccc1" --threshold 0.7
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
## Commands
|
|
78
|
+
|
|
79
|
+
### descriptors
|
|
80
|
+
|
|
81
|
+
Compute molecular descriptors.
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
# List available descriptors
|
|
85
|
+
rdkit-cli descriptors list
|
|
86
|
+
rdkit-cli descriptors list --all
|
|
87
|
+
|
|
88
|
+
# Compute specific descriptors
|
|
89
|
+
rdkit-cli descriptors compute -i input.csv -o output.csv -d MolWt,MolLogP,TPSA
|
|
90
|
+
|
|
91
|
+
# Compute all descriptors
|
|
92
|
+
rdkit-cli descriptors compute -i input.csv -o output.csv --all
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
### fingerprints
|
|
96
|
+
|
|
97
|
+
Generate molecular fingerprints.
|
|
98
|
+
|
|
99
|
+
```bash
|
|
100
|
+
# List available fingerprint types
|
|
101
|
+
rdkit-cli fingerprints list
|
|
102
|
+
|
|
103
|
+
# Compute Morgan fingerprints (default)
|
|
104
|
+
rdkit-cli fingerprints compute -i input.csv -o output.csv --type morgan
|
|
105
|
+
|
|
106
|
+
# With options
|
|
107
|
+
rdkit-cli fingerprints compute -i input.csv -o output.csv \
|
|
108
|
+
--type morgan --radius 3 --bits 4096 --use-chirality
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
Supported types: morgan, maccs, rdkit, atompair, torsion, pattern
|
|
112
|
+
|
|
113
|
+
### filter
|
|
114
|
+
|
|
115
|
+
Filter molecules by various criteria.
|
|
116
|
+
|
|
117
|
+
```bash
|
|
118
|
+
# Substructure filter
|
|
119
|
+
rdkit-cli filter substructure -i input.csv -o output.csv --smarts "c1ccccc1"
|
|
120
|
+
rdkit-cli filter substructure -i input.csv -o output.csv --smarts "c1ccccc1" --exclude
|
|
121
|
+
|
|
122
|
+
# Property filter
|
|
123
|
+
rdkit-cli filter property -i input.csv -o output.csv --rule "MolWt < 500"
|
|
124
|
+
|
|
125
|
+
# Drug-likeness filters
|
|
126
|
+
rdkit-cli filter druglike -i input.csv -o output.csv --rule lipinski
|
|
127
|
+
rdkit-cli filter druglike -i input.csv -o output.csv --rule veber
|
|
128
|
+
rdkit-cli filter druglike -i input.csv -o output.csv --rule ghose
|
|
129
|
+
|
|
130
|
+
# PAINS filter
|
|
131
|
+
rdkit-cli filter pains -i input.csv -o output.csv
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
### convert
|
|
135
|
+
|
|
136
|
+
Convert between molecular file formats.
|
|
137
|
+
|
|
138
|
+
```bash
|
|
139
|
+
# Auto-detect formats from extensions
|
|
140
|
+
rdkit-cli convert -i molecules.csv -o molecules.sdf
|
|
141
|
+
|
|
142
|
+
# Explicit format specification
|
|
143
|
+
rdkit-cli convert -i molecules.csv -o molecules.smi --out-format smi
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
Supported formats: csv, tsv, smi, sdf, parquet
|
|
147
|
+
|
|
148
|
+
### standardize
|
|
149
|
+
|
|
150
|
+
Standardize and canonicalize molecules.
|
|
151
|
+
|
|
152
|
+
```bash
|
|
153
|
+
# Basic standardization
|
|
154
|
+
rdkit-cli standardize -i input.csv -o output.csv
|
|
155
|
+
|
|
156
|
+
# With options
|
|
157
|
+
rdkit-cli standardize -i input.csv -o output.csv \
|
|
158
|
+
--cleanup --neutralize --fragment-parent
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
### similarity
|
|
162
|
+
|
|
163
|
+
Compute molecular similarity.
|
|
164
|
+
|
|
165
|
+
```bash
|
|
166
|
+
# Similarity search
|
|
167
|
+
rdkit-cli similarity search -i library.csv -o hits.csv \
|
|
168
|
+
--query "CCO" --threshold 0.7
|
|
169
|
+
|
|
170
|
+
# Similarity matrix
|
|
171
|
+
rdkit-cli similarity matrix -i molecules.csv -o matrix.csv \
|
|
172
|
+
--metric tanimoto
|
|
173
|
+
|
|
174
|
+
# Clustering
|
|
175
|
+
rdkit-cli similarity cluster -i molecules.csv -o clustered.csv \
|
|
176
|
+
--cutoff 0.5
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
### conformers
|
|
180
|
+
|
|
181
|
+
Generate and optimize 3D conformers.
|
|
182
|
+
|
|
183
|
+
```bash
|
|
184
|
+
# Generate conformers
|
|
185
|
+
rdkit-cli conformers generate -i input.csv -o output.sdf --num 10
|
|
186
|
+
|
|
187
|
+
# Optimize conformers
|
|
188
|
+
rdkit-cli conformers optimize -i input.sdf -o optimized.sdf --force-field mmff
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
### reactions
|
|
192
|
+
|
|
193
|
+
Apply chemical reactions and transformations.
|
|
194
|
+
|
|
195
|
+
```bash
|
|
196
|
+
# SMIRKS transformation
|
|
197
|
+
rdkit-cli reactions transform -i input.csv -o output.csv \
|
|
198
|
+
--smirks "[OH:1]>>[O-:1]"
|
|
199
|
+
|
|
200
|
+
# Reaction enumeration
|
|
201
|
+
rdkit-cli reactions enumerate -i reactants.csv -o products.csv \
|
|
202
|
+
--template "reaction.rxn"
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
### scaffold
|
|
206
|
+
|
|
207
|
+
Extract molecular scaffolds.
|
|
208
|
+
|
|
209
|
+
```bash
|
|
210
|
+
# Murcko scaffolds
|
|
211
|
+
rdkit-cli scaffold murcko -i input.csv -o scaffolds.csv
|
|
212
|
+
|
|
213
|
+
# Generic scaffolds
|
|
214
|
+
rdkit-cli scaffold murcko -i input.csv -o scaffolds.csv --generic
|
|
215
|
+
|
|
216
|
+
# Scaffold decomposition
|
|
217
|
+
rdkit-cli scaffold decompose -i input.csv -o decomposed.csv
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
### enumerate
|
|
221
|
+
|
|
222
|
+
Enumerate molecular variants.
|
|
223
|
+
|
|
224
|
+
```bash
|
|
225
|
+
# Stereoisomers
|
|
226
|
+
rdkit-cli enumerate stereoisomers -i input.csv -o isomers.csv --max-isomers 32
|
|
227
|
+
|
|
228
|
+
# Tautomers
|
|
229
|
+
rdkit-cli enumerate tautomers -i input.csv -o tautomers.csv --max-tautomers 50
|
|
230
|
+
|
|
231
|
+
# Canonical tautomer
|
|
232
|
+
rdkit-cli enumerate canonical-tautomer -i input.csv -o canonical.csv
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
### fragment
|
|
236
|
+
|
|
237
|
+
Fragment molecules.
|
|
238
|
+
|
|
239
|
+
```bash
|
|
240
|
+
# BRICS fragmentation
|
|
241
|
+
rdkit-cli fragment brics -i input.csv -o fragments.csv
|
|
242
|
+
|
|
243
|
+
# RECAP fragmentation
|
|
244
|
+
rdkit-cli fragment recap -i input.csv -o fragments.csv
|
|
245
|
+
|
|
246
|
+
# Functional group extraction
|
|
247
|
+
rdkit-cli fragment functional-groups -i input.csv -o groups.csv
|
|
248
|
+
|
|
249
|
+
# Fragment frequency analysis
|
|
250
|
+
rdkit-cli fragment analyze -i fragments.csv -o analysis.csv
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
### diversity
|
|
254
|
+
|
|
255
|
+
Analyze and select diverse molecules.
|
|
256
|
+
|
|
257
|
+
```bash
|
|
258
|
+
# Pick diverse subset
|
|
259
|
+
rdkit-cli diversity pick -i input.csv -o diverse.csv -k 100
|
|
260
|
+
|
|
261
|
+
# Analyze diversity
|
|
262
|
+
rdkit-cli diversity analyze -i input.csv
|
|
263
|
+
```
|
|
264
|
+
|
|
265
|
+
### mcs
|
|
266
|
+
|
|
267
|
+
Find Maximum Common Substructure.
|
|
268
|
+
|
|
269
|
+
```bash
|
|
270
|
+
# Find MCS across molecules
|
|
271
|
+
rdkit-cli mcs -i molecules.csv -o mcs_result.csv
|
|
272
|
+
|
|
273
|
+
# With options
|
|
274
|
+
rdkit-cli mcs -i molecules.csv -o mcs_result.csv \
|
|
275
|
+
--timeout 60 --atom-compare elements
|
|
276
|
+
```
|
|
277
|
+
|
|
278
|
+
### depict
|
|
279
|
+
|
|
280
|
+
Generate molecular depictions.
|
|
281
|
+
|
|
282
|
+
```bash
|
|
283
|
+
# Single molecule
|
|
284
|
+
rdkit-cli depict single --smiles "c1ccccc1" -o benzene.svg
|
|
285
|
+
|
|
286
|
+
# Batch depiction
|
|
287
|
+
rdkit-cli depict batch -i molecules.csv -o images/ -f svg
|
|
288
|
+
|
|
289
|
+
# Grid image
|
|
290
|
+
rdkit-cli depict grid -i molecules.csv -o grid.svg --mols-per-row 4
|
|
291
|
+
```
|
|
292
|
+
|
|
293
|
+
## Global Options
|
|
294
|
+
|
|
295
|
+
| Option | Description |
|
|
296
|
+
|--------|-------------|
|
|
297
|
+
| `-n, --ncpu N` | Number of CPUs (-1 = all, default: -1) |
|
|
298
|
+
| `-i, --input FILE` | Input file |
|
|
299
|
+
| `-o, --output FILE` | Output file |
|
|
300
|
+
| `--smiles-column COL` | SMILES column name (default: "smiles") |
|
|
301
|
+
| `--name-column COL` | Name column (optional) |
|
|
302
|
+
| `--no-header` | Input has no header row |
|
|
303
|
+
| `-q, --quiet` | Suppress progress output |
|
|
304
|
+
| `-V, --version` | Show version |
|
|
305
|
+
| `-h, --help` | Show help |
|
|
306
|
+
|
|
307
|
+
## Input/Output Formats
|
|
308
|
+
|
|
309
|
+
| Format | Extension | Notes |
|
|
310
|
+
|--------|-----------|-------|
|
|
311
|
+
| CSV | .csv | Comma-separated, with header |
|
|
312
|
+
| TSV | .tsv | Tab-separated, with header |
|
|
313
|
+
| SMI | .smi | SMILES format, space-separated |
|
|
314
|
+
| SDF | .sdf | Structure-Data File |
|
|
315
|
+
| Parquet | .parquet | Apache Parquet format |
|
|
316
|
+
|
|
317
|
+
## Examples
|
|
318
|
+
|
|
319
|
+
### Cheminformatics Pipeline
|
|
320
|
+
|
|
321
|
+
```bash
|
|
322
|
+
# 1. Standardize input molecules
|
|
323
|
+
rdkit-cli standardize -i raw.csv -o std.csv --cleanup --neutralize
|
|
324
|
+
|
|
325
|
+
# 2. Filter by drug-likeness
|
|
326
|
+
rdkit-cli filter druglike -i std.csv -o druglike.csv --rule lipinski
|
|
327
|
+
|
|
328
|
+
# 3. Compute descriptors
|
|
329
|
+
rdkit-cli descriptors compute -i druglike.csv -o desc.csv -d MolWt,MolLogP,TPSA,HBD,HBA
|
|
330
|
+
|
|
331
|
+
# 4. Select diverse subset
|
|
332
|
+
rdkit-cli diversity pick -i druglike.csv -o diverse.csv -k 500
|
|
333
|
+
|
|
334
|
+
# 5. Generate depictions
|
|
335
|
+
rdkit-cli depict grid -i diverse.csv -o library.svg --mols-per-row 10
|
|
336
|
+
```
|
|
337
|
+
|
|
338
|
+
### Similarity Screening
|
|
339
|
+
|
|
340
|
+
```bash
|
|
341
|
+
# Search for similar compounds
|
|
342
|
+
rdkit-cli similarity search -i library.csv -o hits.csv \
|
|
343
|
+
--query "CC(=O)Oc1ccccc1C(=O)O" \
|
|
344
|
+
--threshold 0.6 \
|
|
345
|
+
--type morgan
|
|
346
|
+
|
|
347
|
+
# Cluster results
|
|
348
|
+
rdkit-cli similarity cluster -i hits.csv -o clustered.csv --cutoff 0.4
|
|
349
|
+
```
|
|
350
|
+
|
|
351
|
+
### Scaffold Analysis
|
|
352
|
+
|
|
353
|
+
```bash
|
|
354
|
+
# Extract scaffolds
|
|
355
|
+
rdkit-cli scaffold murcko -i library.csv -o scaffolds.csv
|
|
356
|
+
|
|
357
|
+
# Analyze scaffold diversity
|
|
358
|
+
rdkit-cli diversity analyze -i scaffolds.csv --smiles-column scaffold
|
|
359
|
+
```
|
|
360
|
+
|
|
361
|
+
## Development
|
|
362
|
+
|
|
363
|
+
```bash
|
|
364
|
+
# Clone repository
|
|
365
|
+
git clone https://github.com/vitruves/rdkit-cli
|
|
366
|
+
cd rdkit-cli
|
|
367
|
+
|
|
368
|
+
# Install with dev dependencies
|
|
369
|
+
uv sync --dev
|
|
370
|
+
|
|
371
|
+
# Run tests
|
|
372
|
+
uv run pytest
|
|
373
|
+
|
|
374
|
+
# Run with coverage
|
|
375
|
+
uv run pytest --cov=rdkit_cli
|
|
376
|
+
```
|
|
377
|
+
|
|
378
|
+
## License
|
|
379
|
+
|
|
380
|
+
Apache 2.0
|