-
Notifications
You must be signed in to change notification settings - Fork 261
Closed
Description
Hi
I'd like to suggest new asym chain naming rule while saving predicted structure as mmcif files.
In current version, asym chain is named as like;
Line 911 in 9e7777a
| i + 1: chr(i + 65) for i in range(len(feature_context.chains)) |
The problem occurs when the number of entity is over 26, the number of alphabet.
For 27th to 32th entities, the name of the given chain is special characters such like [ \ ] ^ _ ` instead of lowercase alphabet letters.
I think it's not what you intended.
So I want to suggest to change the chain naming part as below;
import string
import itertools
def alphabet_generator():
N = 1
while True:
for case in ["upper", "lower"]:
letters = (
string.ascii_uppercase if case == "upper" else string.ascii_lowercase
)
for chars in itertools.product(letters, repeat=N):
yield "".join(chars)
N += 1
...
generator = alphabet_generator()
asym_entity_names={i + 1: next(generator) for i in range(len(feature_context.chains))}Thank you
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels