helmkit 0.5.1__tar.gz → 0.5.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.
- {helmkit-0.5.1 → helmkit-0.5.3}/PKG-INFO +1 -1
- {helmkit-0.5.1 → helmkit-0.5.3}/pyproject.toml +1 -1
- {helmkit-0.5.1 → helmkit-0.5.3}/src/helmkit/data/monomers.sdf +6 -6
- {helmkit-0.5.1 → helmkit-0.5.3}/src/helmkit/molecule.py +23 -2
- {helmkit-0.5.1 → helmkit-0.5.3}/uv.lock +1 -1
- {helmkit-0.5.1 → helmkit-0.5.3}/.gitignore +0 -0
- {helmkit-0.5.1 → helmkit-0.5.3}/.python-version +0 -0
- {helmkit-0.5.1 → helmkit-0.5.3}/LICENSE +0 -0
- {helmkit-0.5.1 → helmkit-0.5.3}/README.md +0 -0
- {helmkit-0.5.1 → helmkit-0.5.3}/src/helmkit/__init__.py +0 -0
- {helmkit-0.5.1 → helmkit-0.5.3}/src/helmkit/py.typed +0 -0
|
@@ -32960,8 +32960,8 @@ MolEngine07221613482D
|
|
|
32960
32960
|
4 5 1 0 0 0 0
|
|
32961
32961
|
5 1 1 0 0 0 0
|
|
32962
32962
|
2 6 1 6 0 0 0
|
|
32963
|
-
1 7 1
|
|
32964
|
-
4 8 1
|
|
32963
|
+
1 7 1 0 0 0 0
|
|
32964
|
+
4 8 1 0 0 0 0
|
|
32965
32965
|
7 9 1 0 0 0 0
|
|
32966
32966
|
9 10 1 0 0 0 0
|
|
32967
32967
|
6 11 1 0 0 0 0
|
|
@@ -37330,8 +37330,8 @@ MolEngine07221613482D
|
|
|
37330
37330
|
4 5 1 0 0 0 0
|
|
37331
37331
|
5 1 1 0 0 0 0
|
|
37332
37332
|
2 6 1 6 0 0 0
|
|
37333
|
-
1 7 1
|
|
37334
|
-
4 8 1
|
|
37333
|
+
1 7 1 0 0 0 0
|
|
37334
|
+
4 8 1 0 0 0 0
|
|
37335
37335
|
7 9 1 0 0 0 0
|
|
37336
37336
|
9 10 1 0 0 0 0
|
|
37337
37337
|
6 11 1 0 0 0 0
|
|
@@ -37960,8 +37960,8 @@ MolEngine07221613482D
|
|
|
37960
37960
|
4 5 1 0 0 0 0
|
|
37961
37961
|
5 1 1 0 0 0 0
|
|
37962
37962
|
2 6 1 6 0 0 0
|
|
37963
|
-
1 7 1
|
|
37964
|
-
4 8 1
|
|
37963
|
+
1 7 1 0 0 0 0
|
|
37964
|
+
4 8 1 0 0 0 0
|
|
37965
37965
|
7 9 1 0 0 0 0
|
|
37966
37966
|
9 10 1 0 0 0 0
|
|
37967
37967
|
6 11 1 0 0 0 0
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import bisect
|
|
1
2
|
import multiprocessing
|
|
2
3
|
import re
|
|
3
4
|
import warnings
|
|
@@ -739,11 +740,24 @@ class Molecule:
|
|
|
739
740
|
matches = self.mol.GetSubstructMatches(pattern)
|
|
740
741
|
atoms_to_delete = sorted({idx for match in matches for idx in match})
|
|
741
742
|
self.mol = Chem.DeleteSubstructs(self.mol, pattern)
|
|
743
|
+
|
|
744
|
+
def correction(offset: int, idx: int) -> int:
|
|
745
|
+
return bisect.bisect_left(atoms_to_delete, idx) - bisect.bisect_left(
|
|
746
|
+
atoms_to_delete, offset
|
|
747
|
+
)
|
|
748
|
+
|
|
749
|
+
for i, (m1, a1, m2, a2) in enumerate(self.bondlist):
|
|
750
|
+
offset1 = self.offset[m1]
|
|
751
|
+
offset2 = self.offset[m2]
|
|
752
|
+
self.bondlist[i][1] -= correction(offset1, offset1 + a1)
|
|
753
|
+
self.bondlist[i][3] -= correction(offset2, offset2 + a2)
|
|
754
|
+
|
|
742
755
|
self.offset = [
|
|
743
|
-
offset - sum(d
|
|
756
|
+
offset - sum(d < offset for d in atoms_to_delete) for offset in self.offset
|
|
744
757
|
]
|
|
745
758
|
|
|
746
|
-
|
|
759
|
+
@property
|
|
760
|
+
def bond_indices(self) -> List[int]:
|
|
747
761
|
return [
|
|
748
762
|
self.mol.GetBondBetweenAtoms(
|
|
749
763
|
self.offset[monomer1_idx] + atom1_idx,
|
|
@@ -752,6 +766,13 @@ class Molecule:
|
|
|
752
766
|
for monomer1_idx, atom1_idx, monomer2_idx, atom2_idx in self.bondlist
|
|
753
767
|
]
|
|
754
768
|
|
|
769
|
+
@property
|
|
770
|
+
def monomer_indices(self) -> List[int]:
|
|
771
|
+
return [
|
|
772
|
+
bisect.bisect_right(self.offset, i) - 1
|
|
773
|
+
for i in range(self.mol.GetNumAtoms())
|
|
774
|
+
]
|
|
775
|
+
|
|
755
776
|
|
|
756
777
|
def _init_pool(monomer_df: MonomerLibrary):
|
|
757
778
|
global _monomer_df
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|