aromatools 0.2.6__tar.gz → 0.2.7__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 aromatools might be problematic. Click here for more details.
- {aromatools-0.2.6 → aromatools-0.2.7}/PKG-INFO +1 -1
- {aromatools-0.2.6 → aromatools-0.2.7}/aromatools/arogeometric/arogeometric.py +41 -25
- {aromatools-0.2.6 → aromatools-0.2.7}/aromatools/arogeometric/reporter.py +3 -3
- {aromatools-0.2.6 → aromatools-0.2.7}/aromatools.egg-info/PKG-INFO +1 -1
- {aromatools-0.2.6 → aromatools-0.2.7}/setup.py +1 -1
- {aromatools-0.2.6 → aromatools-0.2.7}/LICENSE +0 -0
- {aromatools-0.2.6 → aromatools-0.2.7}/README.md +0 -0
- {aromatools-0.2.6 → aromatools-0.2.7}/aromatools/__init__.py +0 -0
- {aromatools-0.2.6 → aromatools-0.2.7}/aromatools/arogeometric/__init__.py +0 -0
- {aromatools-0.2.6 → aromatools-0.2.7}/aromatools/arogeometric/__main__.py +0 -0
- {aromatools-0.2.6 → aromatools-0.2.7}/aromatools/aromagnetic/__init__.py +0 -0
- {aromatools-0.2.6 → aromatools-0.2.7}/aromatools/aromagnetic/__main__.py +0 -0
- {aromatools-0.2.6 → aromatools-0.2.7}/aromatools/aromagnetic/amg_read_input.py +0 -0
- {aromatools-0.2.6 → aromatools-0.2.7}/aromatools/aromagnetic/amg_write_inputs.py +0 -0
- {aromatools-0.2.6 → aromatools-0.2.7}/aromatools/aromagnetic/aromagnetic.py +0 -0
- {aromatools-0.2.6 → aromatools-0.2.7}/aromatools/aromagnetic/check_out.py +0 -0
- {aromatools-0.2.6 → aromatools-0.2.7}/aromatools/aromagnetic/cube_to_vtk.py +0 -0
- {aromatools-0.2.6 → aromatools-0.2.7}/aromatools/aromagnetic/extrac_values.py +0 -0
- {aromatools-0.2.6 → aromatools-0.2.7}/aromatools/aromagnetic/get_cube.py +0 -0
- {aromatools-0.2.6 → aromatools-0.2.7}/aromatools/aromagnetic/get_grid.py +0 -0
- {aromatools-0.2.6 → aromatools-0.2.7}/aromatools/aromagnetic/get_integral.py +0 -0
- {aromatools-0.2.6 → aromatools-0.2.7}/aromatools/aromagnetic/get_mo.py +0 -0
- {aromatools-0.2.6 → aromatools-0.2.7}/aromatools/aromagnetic/get_nics_scan.py +0 -0
- {aromatools-0.2.6 → aromatools-0.2.7}/aromatools/aromagnetic/get_profile.py +0 -0
- {aromatools-0.2.6 → aromatools-0.2.7}/aromatools/aromagnetic/insert_basis.py +0 -0
- {aromatools-0.2.6 → aromatools-0.2.7}/aromatools/aromagnetic/make_input.py +0 -0
- {aromatools-0.2.6 → aromatools-0.2.7}/aromatools/aromagnetic/nics_scan.py +0 -0
- {aromatools-0.2.6 → aromatools-0.2.7}/aromatools/aromagnetic/parser_mo.py +0 -0
- {aromatools-0.2.6 → aromatools-0.2.7}/aromatools/aromagnetic/pseudo_pi.py +0 -0
- {aromatools-0.2.6 → aromatools-0.2.7}/aromatools/aromagnetic/reset_calc.py +0 -0
- {aromatools-0.2.6 → aromatools-0.2.7}/aromatools/aromagnetic/sum_rest.py +0 -0
- {aromatools-0.2.6 → aromatools-0.2.7}/aromatools/aromagnetic/tools.py +0 -0
- {aromatools-0.2.6 → aromatools-0.2.7}/aromatools.egg-info/SOURCES.txt +0 -0
- {aromatools-0.2.6 → aromatools-0.2.7}/aromatools.egg-info/dependency_links.txt +0 -0
- {aromatools-0.2.6 → aromatools-0.2.7}/aromatools.egg-info/entry_points.txt +0 -0
- {aromatools-0.2.6 → aromatools-0.2.7}/aromatools.egg-info/requires.txt +0 -0
- {aromatools-0.2.6 → aromatools-0.2.7}/aromatools.egg-info/top_level.txt +0 -0
- {aromatools-0.2.6 → aromatools-0.2.7}/pyproject.toml +0 -0
- {aromatools-0.2.6 → aromatools-0.2.7}/setup.cfg +0 -0
|
@@ -76,52 +76,68 @@ def build_graph(atoms, tol=0.45):
|
|
|
76
76
|
G.add_edge(i, j, length=dist, bond_type=bond_type)
|
|
77
77
|
return G
|
|
78
78
|
|
|
79
|
-
def find_rings_by_size(G, sizes=
|
|
80
|
-
from itertools import combinations
|
|
79
|
+
def find_rings_by_size(G, sizes=None):
|
|
81
80
|
rings = set()
|
|
82
81
|
|
|
82
|
+
if sizes is None:
|
|
83
|
+
sizes = tuple(range(3, len(G.nodes()) + 1))
|
|
84
|
+
|
|
85
|
+
if isinstance(sizes, int):
|
|
86
|
+
sizes = (sizes,)
|
|
87
|
+
elif isinstance(sizes, range):
|
|
88
|
+
sizes = tuple(sizes)
|
|
89
|
+
|
|
90
|
+
max_size = max(sizes)
|
|
91
|
+
|
|
92
|
+
def canon_ring(path):
|
|
93
|
+
seq1 = list(path)
|
|
94
|
+
seq2 = list(reversed(path))
|
|
95
|
+
|
|
96
|
+
def normalize(seq):
|
|
97
|
+
m = min(seq)
|
|
98
|
+
i = seq.index(m)
|
|
99
|
+
return tuple(seq[i:] + seq[:i])
|
|
100
|
+
|
|
101
|
+
return min(normalize(seq1), normalize(seq2))
|
|
102
|
+
|
|
83
103
|
def dfs(path, depth):
|
|
84
104
|
current = path[-1]
|
|
105
|
+
|
|
85
106
|
if len(set(path)) != len(path):
|
|
86
107
|
return
|
|
87
108
|
|
|
88
|
-
if depth >
|
|
109
|
+
if depth > max_size:
|
|
89
110
|
return
|
|
90
111
|
|
|
91
112
|
for neighbor in G.neighbors(current):
|
|
92
113
|
if neighbor == path[0] and len(path) in sizes:
|
|
93
|
-
|
|
94
|
-
if all(G.has_edge(cycle[i], cycle[i + 1]) for i in range(len(path))):
|
|
95
|
-
rings.add(tuple(sorted(path)))
|
|
114
|
+
rings.add(canon_ring(path))
|
|
96
115
|
elif neighbor not in path:
|
|
97
116
|
dfs(path + [neighbor], depth + 1)
|
|
98
117
|
|
|
99
118
|
for start in G.nodes():
|
|
100
119
|
dfs([start], 1)
|
|
101
120
|
|
|
102
|
-
|
|
103
|
-
for ring in rings:
|
|
104
|
-
ring = list(ring)
|
|
105
|
-
min_idx = ring.index(min(ring))
|
|
106
|
-
rotated = ring[min_idx:] + ring[:min_idx]
|
|
107
|
-
unique_rings.add(tuple(rotated))
|
|
108
|
-
|
|
109
|
-
return [list(r) for r in unique_rings]
|
|
121
|
+
return [list(r) for r in rings]
|
|
110
122
|
|
|
111
123
|
def order_ring_nodes(G, ring):
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
124
|
+
ordered = [ring[0]]
|
|
125
|
+
used = set(ordered)
|
|
126
|
+
|
|
127
|
+
while len(ordered) < len(ring):
|
|
128
|
+
current = ordered[-1]
|
|
129
|
+
for neighbor in G.neighbors(current):
|
|
130
|
+
if neighbor in ring and neighbor not in used:
|
|
131
|
+
ordered.append(neighbor)
|
|
132
|
+
used.add(neighbor)
|
|
133
|
+
break
|
|
134
|
+
else:
|
|
135
|
+
raise ValueError(f"Could not consistently order ring nodes: {ring}")
|
|
136
|
+
|
|
137
|
+
return ordered
|
|
122
138
|
|
|
123
139
|
def compute_index(G, atoms, index_type):
|
|
124
|
-
rings = find_rings_by_size(G
|
|
140
|
+
rings = find_rings_by_size(G)
|
|
125
141
|
ring_data = []
|
|
126
142
|
bond_rows = []
|
|
127
143
|
coords = {i: (x, y, z) for i, (_, x, y, z) in enumerate(atoms)}
|
|
@@ -17,12 +17,12 @@ class AtomsReporter:
|
|
|
17
17
|
|
|
18
18
|
self._graph = build_graph(atoms_list)
|
|
19
19
|
|
|
20
|
-
# Ahora compute_index devuelve dos DataFrames
|
|
21
20
|
rings, ring_indices_list, df_index, df_bonds = compute_index(
|
|
22
|
-
self._graph,
|
|
21
|
+
self._graph,
|
|
22
|
+
atoms_list,
|
|
23
|
+
self.index_type
|
|
23
24
|
)
|
|
24
25
|
|
|
25
|
-
# Selección de columnas según tipo de índice
|
|
26
26
|
if self.index_type == "HOMA":
|
|
27
27
|
self._df_main = df_index[["Ring", "HOMA93", "HOMAC", "BLA"]]
|
|
28
28
|
elif self.index_type == "HOMER":
|
|
@@ -6,7 +6,7 @@ long_description = (this_directory / "README.md").read_text(encoding="utf-8")
|
|
|
6
6
|
|
|
7
7
|
setup(
|
|
8
8
|
name="aromatools",
|
|
9
|
-
version="0.2.
|
|
9
|
+
version="0.2.7",
|
|
10
10
|
packages=find_packages(),
|
|
11
11
|
description="Python tools for aromaticity analysis using geometric and magnetic criteria",
|
|
12
12
|
long_description=long_description,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|