molcraft 0.1.0a2__tar.gz → 0.1.0a3__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.
Potentially problematic release.
This version of molcraft might be problematic. Click here for more details.
- {molcraft-0.1.0a2 → molcraft-0.1.0a3}/PKG-INFO +1 -1
- {molcraft-0.1.0a2 → molcraft-0.1.0a3}/molcraft/__init__.py +2 -1
- {molcraft-0.1.0a2 → molcraft-0.1.0a3}/molcraft/features.py +5 -3
- {molcraft-0.1.0a2 → molcraft-0.1.0a3}/molcraft/featurizers.py +2 -1
- {molcraft-0.1.0a2 → molcraft-0.1.0a3}/molcraft/layers.py +560 -108
- {molcraft-0.1.0a2 → molcraft-0.1.0a3}/molcraft/models.py +34 -3
- {molcraft-0.1.0a2 → molcraft-0.1.0a3}/molcraft.egg-info/PKG-INFO +1 -1
- molcraft-0.1.0a3/tests/test_layers.py +268 -0
- molcraft-0.1.0a2/tests/test_layers.py +0 -143
- {molcraft-0.1.0a2 → molcraft-0.1.0a3}/LICENSE +0 -0
- {molcraft-0.1.0a2 → molcraft-0.1.0a3}/README.md +0 -0
- {molcraft-0.1.0a2 → molcraft-0.1.0a3}/molcraft/callbacks.py +0 -0
- {molcraft-0.1.0a2 → molcraft-0.1.0a3}/molcraft/chem.py +0 -0
- {molcraft-0.1.0a2 → molcraft-0.1.0a3}/molcraft/conformers.py +0 -0
- {molcraft-0.1.0a2 → molcraft-0.1.0a3}/molcraft/datasets.py +0 -0
- {molcraft-0.1.0a2 → molcraft-0.1.0a3}/molcraft/descriptors.py +0 -0
- {molcraft-0.1.0a2 → molcraft-0.1.0a3}/molcraft/experimental/__init__.py +0 -0
- {molcraft-0.1.0a2 → molcraft-0.1.0a3}/molcraft/experimental/peptides.py +0 -0
- {molcraft-0.1.0a2 → molcraft-0.1.0a3}/molcraft/ops.py +0 -0
- {molcraft-0.1.0a2 → molcraft-0.1.0a3}/molcraft/records.py +0 -0
- {molcraft-0.1.0a2 → molcraft-0.1.0a3}/molcraft/tensors.py +0 -0
- {molcraft-0.1.0a2 → molcraft-0.1.0a3}/molcraft.egg-info/SOURCES.txt +0 -0
- {molcraft-0.1.0a2 → molcraft-0.1.0a3}/molcraft.egg-info/dependency_links.txt +0 -0
- {molcraft-0.1.0a2 → molcraft-0.1.0a3}/molcraft.egg-info/requires.txt +0 -0
- {molcraft-0.1.0a2 → molcraft-0.1.0a3}/molcraft.egg-info/top_level.txt +0 -0
- {molcraft-0.1.0a2 → molcraft-0.1.0a3}/pyproject.toml +0 -0
- {molcraft-0.1.0a2 → molcraft-0.1.0a3}/setup.cfg +0 -0
- {molcraft-0.1.0a2 → molcraft-0.1.0a3}/tests/test_chem.py +0 -0
- {molcraft-0.1.0a2 → molcraft-0.1.0a3}/tests/test_featurizers.py +0 -0
- {molcraft-0.1.0a2 → molcraft-0.1.0a3}/tests/test_models.py +0 -0
- {molcraft-0.1.0a2 → molcraft-0.1.0a3}/tests/test_tensors.py +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
__version__ = '0.1.
|
|
1
|
+
__version__ = '0.1.0a3'
|
|
2
2
|
|
|
3
3
|
import os
|
|
4
4
|
os.environ["TF_CPP_MIN_LOG_LEVEL"] = "3"
|
|
@@ -14,3 +14,4 @@ from molcraft import ops
|
|
|
14
14
|
from molcraft import records
|
|
15
15
|
from molcraft import tensors
|
|
16
16
|
from molcraft import callbacks
|
|
17
|
+
from molcraft import datasets
|
|
@@ -155,9 +155,11 @@ class Distance(EdgeFeature):
|
|
|
155
155
|
encode_oov: bool = True,
|
|
156
156
|
**kwargs,
|
|
157
157
|
) -> None:
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
158
|
+
vocab = kwargs.pop('vocab', None)
|
|
159
|
+
if not vocab:
|
|
160
|
+
if max_distance is None:
|
|
161
|
+
max_distance = 20
|
|
162
|
+
vocab = list(range(max_distance + 1))
|
|
161
163
|
super().__init__(
|
|
162
164
|
vocab=vocab,
|
|
163
165
|
allow_oov=allow_oov,
|
|
@@ -402,6 +402,7 @@ class MolGraphFeaturizer(Featurizer):
|
|
|
402
402
|
return cls(**config)
|
|
403
403
|
|
|
404
404
|
|
|
405
|
+
@keras.saving.register_keras_serializable(package='molcraft')
|
|
405
406
|
class MolGraphFeaturizer3D(MolGraphFeaturizer):
|
|
406
407
|
|
|
407
408
|
"""Molecular 3d-graph featurizer.
|
|
@@ -627,7 +628,7 @@ class MolGraphFeaturizer3D(MolGraphFeaturizer):
|
|
|
627
628
|
config['conformer_generator'] = keras.saving.deserialize_keras_object(
|
|
628
629
|
config['conformer_generator']
|
|
629
630
|
)
|
|
630
|
-
return super().from_config(
|
|
631
|
+
return super().from_config(config)
|
|
631
632
|
|
|
632
633
|
|
|
633
634
|
def save_featurizer(
|