Skip to content

Commit

Permalink
clean up TXT presentation
Browse files Browse the repository at this point in the history
  • Loading branch information
gianmarco-terrones committed Apr 27, 2023
1 parent 43a31b4 commit 67c06f2
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions molSimplify/Informatics/MOF/MOF_descriptors.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,8 +285,9 @@ def make_MOF_SBU_RACs(SBUlist, SBU_subgraph, molcif, depth, name, cell, anchorin
sbu_index_connection_indices = []
for item in global_connection_indices:
if item in SBU:
sbu_index_connection_indices.append(str(SBU.index(item)))
sbu_index_connection_indices.sort()
sbu_index_connection_indices.append(SBU.index(item))
sbu_index_connection_indices = list(np.sort(sbu_index_connection_indices)) # Sort in ascending order
sbu_index_connection_indices = [str(item) for item in sbu_index_connection_indices]
with open(f'{sbupath}/{name}_connection_indices_sbu_{i}.txt', 'w') as f:
f.write(' '.join(sbu_index_connection_indices))

Check warning on line 292 in molSimplify/Informatics/MOF/MOF_descriptors.py

View check run for this annotation

Codecov / codecov/patch

molSimplify/Informatics/MOF/MOF_descriptors.py#L285-L292

Added lines #L285 - L292 were not covered by tests

Expand Down Expand Up @@ -383,8 +384,9 @@ def make_MOF_linker_RACs(linkerlist, linker_subgraphlist, molcif, depth, name, c
linker_index_connection_indices = []
for item in global_connection_indices:
if item in linker:
linker_index_connection_indices.append(str(linker.index(item)))
linker_index_connection_indices.sort()
linker_index_connection_indices.append(linker.index(item))
linker_index_connection_indices = list(np.sort(linker_index_connection_indices)) # Sort in ascending order
linker_index_connection_indices = [str(item) for item in linker_index_connection_indices]
with open(f'{linkerpath}/{name}_connection_indices_linker_{i}.txt', 'w') as f:
f.write(' '.join(linker_index_connection_indices))

Check warning on line 391 in molSimplify/Informatics/MOF/MOF_descriptors.py

View check run for this annotation

Codecov / codecov/patch

molSimplify/Informatics/MOF/MOF_descriptors.py#L384-L391

Added lines #L384 - L391 were not covered by tests

Expand Down

0 comments on commit 67c06f2

Please sign in to comment.