vantami 0.4.3__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.
- vantami-0.4.3/LICENSE +28 -0
- vantami-0.4.3/PKG-INFO +143 -0
- vantami-0.4.3/README.md +103 -0
- vantami-0.4.3/pyproject.toml +3 -0
- vantami-0.4.3/setup.cfg +4 -0
- vantami-0.4.3/setup.py +50 -0
- vantami-0.4.3/vantami/__init__.py +12 -0
- vantami-0.4.3/vantami/api/__init__.py +0 -0
- vantami-0.4.3/vantami/api/convert.py +45 -0
- vantami-0.4.3/vantami/api/resolve.py +290 -0
- vantami-0.4.3/vantami/cache.py +14 -0
- vantami-0.4.3/vantami/chemistry/__init__.py +0 -0
- vantami-0.4.3/vantami/chemistry/molecule.py +273 -0
- vantami-0.4.3/vantami/cli/CDDD.py +63 -0
- vantami-0.4.3/vantami/cli/CIR.py +185 -0
- vantami-0.4.3/vantami/cli/Dock.py +215 -0
- vantami-0.4.3/vantami/cli/MolStandardizer.py +635 -0
- vantami-0.4.3/vantami/cli/Mordred.py +76 -0
- vantami-0.4.3/vantami/cli/OptunaOptimization.py +151 -0
- vantami-0.4.3/vantami/cli/__init__.py +0 -0
- vantami-0.4.3/vantami/data/__init__.py +0 -0
- vantami-0.4.3/vantami/data/cluster.py +230 -0
- vantami-0.4.3/vantami/data/descriptors.py +1076 -0
- vantami-0.4.3/vantami/data/distance.py +539 -0
- vantami-0.4.3/vantami/data/filter.py +69 -0
- vantami-0.4.3/vantami/data/manager.py +309 -0
- vantami-0.4.3/vantami/data/manipulate.py +94 -0
- vantami-0.4.3/vantami/data/partition.py +659 -0
- vantami-0.4.3/vantami/data/transform.py +606 -0
- vantami-0.4.3/vantami/deep/__init__.py +5 -0
- vantami-0.4.3/vantami/deep/dataset.py +252 -0
- vantami-0.4.3/vantami/deep/loader.py +172 -0
- vantami-0.4.3/vantami/deep/models.py +625 -0
- vantami-0.4.3/vantami/deep/modules.py +704 -0
- vantami-0.4.3/vantami/deep/utils.py +28 -0
- vantami-0.4.3/vantami/deep/vectorizer.py +389 -0
- vantami-0.4.3/vantami/io/__init__.py +2 -0
- vantami-0.4.3/vantami/io/database.py +303 -0
- vantami-0.4.3/vantami/io/file.py +99 -0
- vantami-0.4.3/vantami/metrics/__init__.py +0 -0
- vantami-0.4.3/vantami/metrics/modellability.py +30 -0
- vantami-0.4.3/vantami/ml/__init__.py +0 -0
- vantami-0.4.3/vantami/ml/augood.py +227 -0
- vantami-0.4.3/vantami/ml/evaluate.py +151 -0
- vantami-0.4.3/vantami/ml/models.py +617 -0
- vantami-0.4.3/vantami/ml/optimize.py +319 -0
- vantami-0.4.3/vantami/ml/params.py +331 -0
- vantami-0.4.3/vantami/ml/score.py +170 -0
- vantami-0.4.3/vantami/ml/select.py +150 -0
- vantami-0.4.3/vantami/ml/utils.py +125 -0
- vantami-0.4.3/vantami/nlp/__init__.py +0 -0
- vantami-0.4.3/vantami/nlp/article.py +197 -0
- vantami-0.4.3/vantami/nlp/cluster.py +32 -0
- vantami-0.4.3/vantami/nlp/tokenize.py +60 -0
- vantami-0.4.3/vantami/standardize/__init__.py +0 -0
- vantami-0.4.3/vantami/standardize/clean.py +853 -0
- vantami-0.4.3/vantami/standardize/duplicates.py +338 -0
- vantami-0.4.3/vantami/standardize/filter.py +699 -0
- vantami-0.4.3/vantami/standardize/validate.py +105 -0
- vantami-0.4.3/vantami/stats/__init__.py +0 -0
- vantami-0.4.3/vantami/stats/tests.py +111 -0
- vantami-0.4.3/vantami/stats/utils.py +15 -0
- vantami-0.4.3/vantami/visualize/__init__.py +0 -0
- vantami-0.4.3/vantami/visualize/ecdf.py +79 -0
- vantami-0.4.3/vantami/visualize/embedding.py +93 -0
- vantami-0.4.3/vantami/visualize/performance.py +26 -0
- vantami-0.4.3/vantami/visualize/predictions.py +352 -0
- vantami-0.4.3/vantami/visualize/properties.py +322 -0
- vantami-0.4.3/vantami/visualize/utils.py +241 -0
- vantami-0.4.3/vantami.egg-info/PKG-INFO +143 -0
- vantami-0.4.3/vantami.egg-info/SOURCES.txt +72 -0
- vantami-0.4.3/vantami.egg-info/dependency_links.txt +1 -0
- vantami-0.4.3/vantami.egg-info/requires.txt +11 -0
- vantami-0.4.3/vantami.egg-info/top_level.txt +1 -0
vantami-0.4.3/LICENSE
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
BSD 3-Clause License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025, Mateusz Iwan
|
|
4
|
+
|
|
5
|
+
Redistribution and use in source and binary forms, with or without
|
|
6
|
+
modification, are permitted provided that the following conditions are met:
|
|
7
|
+
|
|
8
|
+
1. Redistributions of source code must retain the above copyright notice, this
|
|
9
|
+
list of conditions and the following disclaimer.
|
|
10
|
+
|
|
11
|
+
2. Redistributions in binary form must reproduce the above copyright notice,
|
|
12
|
+
this list of conditions and the following disclaimer in the documentation
|
|
13
|
+
and/or other materials provided with the distribution.
|
|
14
|
+
|
|
15
|
+
3. Neither the name of the copyright holder nor the names of its
|
|
16
|
+
contributors may be used to endorse or promote products derived from
|
|
17
|
+
this software without specific prior written permission.
|
|
18
|
+
|
|
19
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
20
|
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
21
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
22
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
23
|
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
24
|
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
25
|
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
26
|
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
27
|
+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
28
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
vantami-0.4.3/PKG-INFO
ADDED
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: vantami
|
|
3
|
+
Version: 0.4.3
|
|
4
|
+
Summary: A collection of ML/AI tools for chemistry applications.
|
|
5
|
+
Home-page: https://github.com/MateuszIwan/VantaMI
|
|
6
|
+
Author: Mateusz Iwan
|
|
7
|
+
Author-email: mateusz.iwan@hotmail.com
|
|
8
|
+
Project-URL: Source, https://github.com/M-Iwan/VantaMI
|
|
9
|
+
Project-URL: Bug Tracker, https://github.com/M-Iwan/VantaMI/issues
|
|
10
|
+
Classifier: Programming Language :: Python :: 3
|
|
11
|
+
Classifier: Operating System :: OS Independent
|
|
12
|
+
Classifier: Intended Audience :: Science/Research
|
|
13
|
+
Classifier: Topic :: Scientific/Engineering :: Chemistry
|
|
14
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
15
|
+
Requires-Python: >=3.13
|
|
16
|
+
Description-Content-Type: text/markdown
|
|
17
|
+
License-File: LICENSE
|
|
18
|
+
Requires-Dist: numpy>=2.4
|
|
19
|
+
Requires-Dist: pandas>=3.0
|
|
20
|
+
Requires-Dist: polars>=1.40
|
|
21
|
+
Requires-Dist: matplotlib>=3.10
|
|
22
|
+
Requires-Dist: seaborn>=0.13
|
|
23
|
+
Requires-Dist: scipy>=1.17
|
|
24
|
+
Provides-Extra: full
|
|
25
|
+
Requires-Dist: scikit-learn>=1.8; extra == "full"
|
|
26
|
+
Requires-Dist: rdkit>=2026.03; extra == "full"
|
|
27
|
+
Requires-Dist: transformers>=5.5; extra == "full"
|
|
28
|
+
Dynamic: author
|
|
29
|
+
Dynamic: author-email
|
|
30
|
+
Dynamic: classifier
|
|
31
|
+
Dynamic: description
|
|
32
|
+
Dynamic: description-content-type
|
|
33
|
+
Dynamic: home-page
|
|
34
|
+
Dynamic: license-file
|
|
35
|
+
Dynamic: project-url
|
|
36
|
+
Dynamic: provides-extra
|
|
37
|
+
Dynamic: requires-dist
|
|
38
|
+
Dynamic: requires-python
|
|
39
|
+
Dynamic: summary
|
|
40
|
+
|
|
41
|
+

|
|
42
|
+
|
|
43
|
+
### What is this repository?
|
|
44
|
+
A collection of ML/AI code for chemistry applications developed during my PhD.
|
|
45
|
+
|
|
46
|
+
If you find the repo or its parts useful, it can be installed using:
|
|
47
|
+
`pip install vantami`
|
|
48
|
+
|
|
49
|
+
Full install:
|
|
50
|
+
|
|
51
|
+
`pip install "vantami[full]"`
|
|
52
|
+
|
|
53
|
+
The usual versioning conventions are followed loosely, with minor version bumps usually meaning a substantial update to a specific module.
|
|
54
|
+
|
|
55
|
+
### Repository Structure
|
|
56
|
+
Last updated on version: 0.4.3
|
|
57
|
+
|
|
58
|
+
```
|
|
59
|
+
vantami/
|
|
60
|
+
├── deprecated/ Old code kept because it might be useful one day (incl. MMMTGNN in deep/mmmtgnn.py)
|
|
61
|
+
├── dev/ New stuff I'm working on
|
|
62
|
+
├── dist/ PyPI distribution files
|
|
63
|
+
├── environments/ Environments for special-need code (CDDD, Mordred)
|
|
64
|
+
├── vantami/
|
|
65
|
+
│ ├── cache.py Functions for caching required data
|
|
66
|
+
│ ├── api/
|
|
67
|
+
│ │ ├── convert.py Conversion from IUPAC names to SMILES using OPSIN
|
|
68
|
+
│ │ └── resolve.py Get SMILES from name using PubChem, CIR, or (WIP) CAS
|
|
69
|
+
│ ├── chemistry/
|
|
70
|
+
│ │ └── molecule.py Standardize molecule, embed it in 3D, and dock using SMINA
|
|
71
|
+
│ ├── cli/
|
|
72
|
+
│ │ ├── CDDD.py CLI wrapper for CDDD descriptors
|
|
73
|
+
│ │ ├── CIR.py CLI wrapper of CIR name resolver
|
|
74
|
+
│ │ ├── Dock.py Wrapper for molecule.py
|
|
75
|
+
│ │ ├── MolStandardizer.py Molecule standardization using RDKit
|
|
76
|
+
│ │ ├── Mordred.py CLI wrapper for Mordred descriptors
|
|
77
|
+
│ │ └── OptunaOptimization.py Old code for Optuna optimization.
|
|
78
|
+
│ ├── data/
|
|
79
|
+
│ │ ├── cluster.py Clustering using Butina/Murcko/Connected Components algorithms
|
|
80
|
+
│ │ ├── descriptors.py Descriptor calculations: ECFP, MACCS, Klek, CDDD, RDKit, Mordred, ChemBERTa, MAPC
|
|
81
|
+
│ │ ├── filter.py Filter outliers based on molecular parameters
|
|
82
|
+
│ │ ├── manager.py Main class for managing data during training and inference
|
|
83
|
+
│ │ ├── manipulate.py Helper functions for checks/data manipulation
|
|
84
|
+
│ │ ├── partition.py Partitioning algoriths; convenience wrappers around scikit-learn and cluster.py
|
|
85
|
+
│ │ ├── similarity.py Parallel distance matrix / k-neighbors calculations
|
|
86
|
+
│ │ └── transform.py Main class for normalizing/processing data before training
|
|
87
|
+
│ ├── deep/ PyTorch stack: MMTUnit + MMDataset + MMLoader (legacy MMMTGNN under deprecated/deep/)
|
|
88
|
+
│ │ ├── dataset.py MMDataset / MMBatch for multi-modal Polars-backed samples
|
|
89
|
+
│ │ ├── loader.py MMLoader (collate → MMBatch)
|
|
90
|
+
│ │ ├── models.py MMTUnit base class and concrete units (e.g. TestModel)
|
|
91
|
+
│ │ ├── modules.py GNN/CNN/RNN/linear builders used by units
|
|
92
|
+
│ │ ├── utils.py Activations and small helpers
|
|
93
|
+
│ │ └── vectorizer.py GraphVectorizer, StringVectorizer (legacy MMGV → deprecated.deep.mmgv)
|
|
94
|
+
│ ├── io/
|
|
95
|
+
│ │ ├── database.py Preprocessing of ChEMBL and BindingDB files
|
|
96
|
+
│ │ └── file.py IO functions for several formats I'm using; works with Pandas/Polars DFs
|
|
97
|
+
│ ├── metrics/
|
|
98
|
+
│ │ └── modellability.py MODI index
|
|
99
|
+
│ ├── ml/
|
|
100
|
+
│ │ ├── augood.py AU-GOOD framework for model's performance evaluation
|
|
101
|
+
│ │ ├── evaluate.py Code for simple unit/ensemble evaluations
|
|
102
|
+
│ │ ├── models.py Self-contained, sklearn-compatibile models and ensembles; I'm very happy with this one :)
|
|
103
|
+
│ │ ├── optimize.py Hyperparameter optimization; functions at the top of the file are outdated
|
|
104
|
+
│ │ ├── params.py Pre-defined parameters for Optuna
|
|
105
|
+
│ │ ├── score.py Functions for scoring models; Outdated, now included with Unit and Ensemble classes
|
|
106
|
+
│ │ ├── select.py Sequential feature selection; Outdated
|
|
107
|
+
│ │ └── utils.p Helper functions for building Units from just names of models and descriptors
|
|
108
|
+
│ ├── nlp/
|
|
109
|
+
│ │ ├── article.py Article class for retrieving metadata based on DOI/Names
|
|
110
|
+
│ │ ├── cluster.py Latent Dirichlet Allocation for abstract-based clustering
|
|
111
|
+
│ │ └── tokenize.py Word and document tokenizers
|
|
112
|
+
│ ├── standardize/
|
|
113
|
+
│ │ ├── clean.py Wrappers around RDKit functions for standaradizing SMILES
|
|
114
|
+
│ │ ├── duplicates.py Duplicate processing based on Median Absolute Deviation
|
|
115
|
+
│ │ ├── filter.py Filter based on selected features
|
|
116
|
+
│ │ └── validate.py Structure validation and error finding
|
|
117
|
+
│ ├── stats/
|
|
118
|
+
│ │ ├── tests.py Statistical tests
|
|
119
|
+
│ │ └── utils.py Helper functions
|
|
120
|
+
│ └── visualize/
|
|
121
|
+
│ ├── ecdf.py Emprical Cumulative Distribution Function of molecular inter-distance
|
|
122
|
+
│ ├── embedding.py t-SNE and UMAP
|
|
123
|
+
│ ├── performance.py WIP: AU-GOOD framework-related plots
|
|
124
|
+
│ ├── predictions.py Bunch of plots for assessing model performance; currently only Regression
|
|
125
|
+
│ ├── properties.py Plot and compare molecular properties between datasets
|
|
126
|
+
│ └── utils.py Helper functions and my custom palette
|
|
127
|
+
├── vantami-r/
|
|
128
|
+
│ └── R/
|
|
129
|
+
│ └── lmm.R Linear Mixed Models code
|
|
130
|
+
├── projects/
|
|
131
|
+
│ ├── cddd_setup Files for setting up CDDD environment anywhere
|
|
132
|
+
│ ├── osmordred_setup WIP: Corrected Mordred descriptors
|
|
133
|
+
│ └── qcg_template Template for QCG PilotJob training on bigger scale (one node)
|
|
134
|
+
├── temp/ Storage for temporary files
|
|
135
|
+
├── tests/ Whatever I'm developing at the moment
|
|
136
|
+
├── .gitignore
|
|
137
|
+
├── CHANGELOG.md List of more important changes between versions
|
|
138
|
+
├── code_dev.ipynb Currently tested/developed additions
|
|
139
|
+
├── LICENSE
|
|
140
|
+
├── pyproject.toml
|
|
141
|
+
├── README.md This file!
|
|
142
|
+
└── setup.py Most of required libraries, some day I *might* add specific versions.
|
|
143
|
+
```
|
vantami-0.4.3/README.md
ADDED
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+

|
|
2
|
+
|
|
3
|
+
### What is this repository?
|
|
4
|
+
A collection of ML/AI code for chemistry applications developed during my PhD.
|
|
5
|
+
|
|
6
|
+
If you find the repo or its parts useful, it can be installed using:
|
|
7
|
+
`pip install vantami`
|
|
8
|
+
|
|
9
|
+
Full install:
|
|
10
|
+
|
|
11
|
+
`pip install "vantami[full]"`
|
|
12
|
+
|
|
13
|
+
The usual versioning conventions are followed loosely, with minor version bumps usually meaning a substantial update to a specific module.
|
|
14
|
+
|
|
15
|
+
### Repository Structure
|
|
16
|
+
Last updated on version: 0.4.3
|
|
17
|
+
|
|
18
|
+
```
|
|
19
|
+
vantami/
|
|
20
|
+
├── deprecated/ Old code kept because it might be useful one day (incl. MMMTGNN in deep/mmmtgnn.py)
|
|
21
|
+
├── dev/ New stuff I'm working on
|
|
22
|
+
├── dist/ PyPI distribution files
|
|
23
|
+
├── environments/ Environments for special-need code (CDDD, Mordred)
|
|
24
|
+
├── vantami/
|
|
25
|
+
│ ├── cache.py Functions for caching required data
|
|
26
|
+
│ ├── api/
|
|
27
|
+
│ │ ├── convert.py Conversion from IUPAC names to SMILES using OPSIN
|
|
28
|
+
│ │ └── resolve.py Get SMILES from name using PubChem, CIR, or (WIP) CAS
|
|
29
|
+
│ ├── chemistry/
|
|
30
|
+
│ │ └── molecule.py Standardize molecule, embed it in 3D, and dock using SMINA
|
|
31
|
+
│ ├── cli/
|
|
32
|
+
│ │ ├── CDDD.py CLI wrapper for CDDD descriptors
|
|
33
|
+
│ │ ├── CIR.py CLI wrapper of CIR name resolver
|
|
34
|
+
│ │ ├── Dock.py Wrapper for molecule.py
|
|
35
|
+
│ │ ├── MolStandardizer.py Molecule standardization using RDKit
|
|
36
|
+
│ │ ├── Mordred.py CLI wrapper for Mordred descriptors
|
|
37
|
+
│ │ └── OptunaOptimization.py Old code for Optuna optimization.
|
|
38
|
+
│ ├── data/
|
|
39
|
+
│ │ ├── cluster.py Clustering using Butina/Murcko/Connected Components algorithms
|
|
40
|
+
│ │ ├── descriptors.py Descriptor calculations: ECFP, MACCS, Klek, CDDD, RDKit, Mordred, ChemBERTa, MAPC
|
|
41
|
+
│ │ ├── filter.py Filter outliers based on molecular parameters
|
|
42
|
+
│ │ ├── manager.py Main class for managing data during training and inference
|
|
43
|
+
│ │ ├── manipulate.py Helper functions for checks/data manipulation
|
|
44
|
+
│ │ ├── partition.py Partitioning algoriths; convenience wrappers around scikit-learn and cluster.py
|
|
45
|
+
│ │ ├── similarity.py Parallel distance matrix / k-neighbors calculations
|
|
46
|
+
│ │ └── transform.py Main class for normalizing/processing data before training
|
|
47
|
+
│ ├── deep/ PyTorch stack: MMTUnit + MMDataset + MMLoader (legacy MMMTGNN under deprecated/deep/)
|
|
48
|
+
│ │ ├── dataset.py MMDataset / MMBatch for multi-modal Polars-backed samples
|
|
49
|
+
│ │ ├── loader.py MMLoader (collate → MMBatch)
|
|
50
|
+
│ │ ├── models.py MMTUnit base class and concrete units (e.g. TestModel)
|
|
51
|
+
│ │ ├── modules.py GNN/CNN/RNN/linear builders used by units
|
|
52
|
+
│ │ ├── utils.py Activations and small helpers
|
|
53
|
+
│ │ └── vectorizer.py GraphVectorizer, StringVectorizer (legacy MMGV → deprecated.deep.mmgv)
|
|
54
|
+
│ ├── io/
|
|
55
|
+
│ │ ├── database.py Preprocessing of ChEMBL and BindingDB files
|
|
56
|
+
│ │ └── file.py IO functions for several formats I'm using; works with Pandas/Polars DFs
|
|
57
|
+
│ ├── metrics/
|
|
58
|
+
│ │ └── modellability.py MODI index
|
|
59
|
+
│ ├── ml/
|
|
60
|
+
│ │ ├── augood.py AU-GOOD framework for model's performance evaluation
|
|
61
|
+
│ │ ├── evaluate.py Code for simple unit/ensemble evaluations
|
|
62
|
+
│ │ ├── models.py Self-contained, sklearn-compatibile models and ensembles; I'm very happy with this one :)
|
|
63
|
+
│ │ ├── optimize.py Hyperparameter optimization; functions at the top of the file are outdated
|
|
64
|
+
│ │ ├── params.py Pre-defined parameters for Optuna
|
|
65
|
+
│ │ ├── score.py Functions for scoring models; Outdated, now included with Unit and Ensemble classes
|
|
66
|
+
│ │ ├── select.py Sequential feature selection; Outdated
|
|
67
|
+
│ │ └── utils.p Helper functions for building Units from just names of models and descriptors
|
|
68
|
+
│ ├── nlp/
|
|
69
|
+
│ │ ├── article.py Article class for retrieving metadata based on DOI/Names
|
|
70
|
+
│ │ ├── cluster.py Latent Dirichlet Allocation for abstract-based clustering
|
|
71
|
+
│ │ └── tokenize.py Word and document tokenizers
|
|
72
|
+
│ ├── standardize/
|
|
73
|
+
│ │ ├── clean.py Wrappers around RDKit functions for standaradizing SMILES
|
|
74
|
+
│ │ ├── duplicates.py Duplicate processing based on Median Absolute Deviation
|
|
75
|
+
│ │ ├── filter.py Filter based on selected features
|
|
76
|
+
│ │ └── validate.py Structure validation and error finding
|
|
77
|
+
│ ├── stats/
|
|
78
|
+
│ │ ├── tests.py Statistical tests
|
|
79
|
+
│ │ └── utils.py Helper functions
|
|
80
|
+
│ └── visualize/
|
|
81
|
+
│ ├── ecdf.py Emprical Cumulative Distribution Function of molecular inter-distance
|
|
82
|
+
│ ├── embedding.py t-SNE and UMAP
|
|
83
|
+
│ ├── performance.py WIP: AU-GOOD framework-related plots
|
|
84
|
+
│ ├── predictions.py Bunch of plots for assessing model performance; currently only Regression
|
|
85
|
+
│ ├── properties.py Plot and compare molecular properties between datasets
|
|
86
|
+
│ └── utils.py Helper functions and my custom palette
|
|
87
|
+
├── vantami-r/
|
|
88
|
+
│ └── R/
|
|
89
|
+
│ └── lmm.R Linear Mixed Models code
|
|
90
|
+
├── projects/
|
|
91
|
+
│ ├── cddd_setup Files for setting up CDDD environment anywhere
|
|
92
|
+
│ ├── osmordred_setup WIP: Corrected Mordred descriptors
|
|
93
|
+
│ └── qcg_template Template for QCG PilotJob training on bigger scale (one node)
|
|
94
|
+
├── temp/ Storage for temporary files
|
|
95
|
+
├── tests/ Whatever I'm developing at the moment
|
|
96
|
+
├── .gitignore
|
|
97
|
+
├── CHANGELOG.md List of more important changes between versions
|
|
98
|
+
├── code_dev.ipynb Currently tested/developed additions
|
|
99
|
+
├── LICENSE
|
|
100
|
+
├── pyproject.toml
|
|
101
|
+
├── README.md This file!
|
|
102
|
+
└── setup.py Most of required libraries, some day I *might* add specific versions.
|
|
103
|
+
```
|
vantami-0.4.3/setup.cfg
ADDED
vantami-0.4.3/setup.py
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
from pathlib import Path
|
|
2
|
+
from setuptools import setup, find_packages
|
|
3
|
+
|
|
4
|
+
ROOT = Path(__file__).parent
|
|
5
|
+
README = ROOT / "README.md"
|
|
6
|
+
|
|
7
|
+
package_data: dict[str, list[str]] = {
|
|
8
|
+
"novami": ["files/klekota_roth.joblib"],
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
setup(
|
|
12
|
+
name="vantami",
|
|
13
|
+
version="0.4.3",
|
|
14
|
+
author="Mateusz Iwan",
|
|
15
|
+
author_email="mateusz.iwan@hotmail.com",
|
|
16
|
+
description="A collection of ML/AI tools for chemistry applications.",
|
|
17
|
+
long_description=README.read_text(encoding="utf-8"),
|
|
18
|
+
long_description_content_type="text/markdown",
|
|
19
|
+
url="https://github.com/MateuszIwan/VantaMI",
|
|
20
|
+
project_urls={
|
|
21
|
+
"Source": "https://github.com/M-Iwan/VantaMI",
|
|
22
|
+
"Bug Tracker": "https://github.com/M-Iwan/VantaMI/issues",
|
|
23
|
+
},
|
|
24
|
+
packages=find_packages(),
|
|
25
|
+
include_package_data=False,
|
|
26
|
+
package_data=package_data,
|
|
27
|
+
install_requires=[
|
|
28
|
+
"numpy >= 2.4",
|
|
29
|
+
"pandas >= 3.0",
|
|
30
|
+
"polars >= 1.40",
|
|
31
|
+
"matplotlib >= 3.10",
|
|
32
|
+
"seaborn >= 0.13",
|
|
33
|
+
"scipy >= 1.17",
|
|
34
|
+
],
|
|
35
|
+
extras_require={
|
|
36
|
+
"full": [
|
|
37
|
+
"scikit-learn >= 1.8",
|
|
38
|
+
"rdkit >= 2026.03",
|
|
39
|
+
"transformers >= 5.5",
|
|
40
|
+
],
|
|
41
|
+
},
|
|
42
|
+
python_requires=">=3.13",
|
|
43
|
+
classifiers=[
|
|
44
|
+
"Programming Language :: Python :: 3",
|
|
45
|
+
"Operating System :: OS Independent",
|
|
46
|
+
"Intended Audience :: Science/Research",
|
|
47
|
+
"Topic :: Scientific/Engineering :: Chemistry",
|
|
48
|
+
"Topic :: Scientific/Engineering :: Artificial Intelligence",
|
|
49
|
+
]
|
|
50
|
+
)
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
from vantami import api
|
|
2
|
+
from vantami import chemistry
|
|
3
|
+
from vantami import cli
|
|
4
|
+
from vantami import data
|
|
5
|
+
from vantami import deep
|
|
6
|
+
from vantami import io
|
|
7
|
+
from vantami import metrics
|
|
8
|
+
from vantami import nlp
|
|
9
|
+
from vantami import standardize
|
|
10
|
+
from vantami import ml
|
|
11
|
+
from vantami import stats
|
|
12
|
+
from vantami import visualize
|
|
File without changes
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import os
|
|
2
|
+
import json
|
|
3
|
+
|
|
4
|
+
import polars as pl
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
def opsin_convert(df: pl.DataFrame, opsin_paths: str, name_col: str = 'Name', out_col: str = 'SMILES'):
|
|
8
|
+
"""
|
|
9
|
+
Convert IUPAC names to SMILES
|
|
10
|
+
|
|
11
|
+
Parameters
|
|
12
|
+
----------
|
|
13
|
+
|
|
14
|
+
df: pl.DataFrame
|
|
15
|
+
A polars DataFrame
|
|
16
|
+
opsin_paths: str
|
|
17
|
+
Path to a JSON file containing paths for OPSIN-related files. Must contain path to opsin .jar file ['opsin']
|
|
18
|
+
and to a directory with read/write permission ['io']
|
|
19
|
+
name_col: str
|
|
20
|
+
Name of the column with IUPAC names of chemicals
|
|
21
|
+
out_col: str
|
|
22
|
+
Name of the column for output
|
|
23
|
+
"""
|
|
24
|
+
|
|
25
|
+
with open(opsin_paths, 'r') as file:
|
|
26
|
+
paths = json.load(file)
|
|
27
|
+
|
|
28
|
+
in_path = os.path.join(paths['io'], 'names_in.txt')
|
|
29
|
+
out_path = os.path.join(paths['io'], 'names_out.txt')
|
|
30
|
+
|
|
31
|
+
names = df[name_col].to_list()
|
|
32
|
+
|
|
33
|
+
with open(in_path, 'w') as f:
|
|
34
|
+
for name in names:
|
|
35
|
+
f.write(name + '\n')
|
|
36
|
+
|
|
37
|
+
open(out_path, 'w')
|
|
38
|
+
|
|
39
|
+
command = f"java -jar {paths['opsin']} -osmi {in_path} {out_path}"
|
|
40
|
+
os.system(command)
|
|
41
|
+
|
|
42
|
+
smiles = open(out_path, 'r').readlines()
|
|
43
|
+
|
|
44
|
+
df = df.with_columns(pl.Series(out_col, smiles))
|
|
45
|
+
return df
|