This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import random | |
| from typing import List, Tuple | |
| from scipy.spatial import distance | |
| def formula(atoms: list): | |
| SUB = str.maketrans("0123456789", "₀₁₂₃₄₅₆₇₈₉") | |
| set_atoms = list(set(atoms)) | |
| max_i = set_atoms[1] if atoms.count(set_atoms[1]) > 1 else set_atoms[0] |