You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
defget_element_count_in_CN(central_atom_site_label: str, cif):
# Retrieve CN connections for the given atomic site labelCN_connections=cif.CN_connections_by_min_dist_method[central_atom_site_label]
# Initialize an empty dictionary to count occurrences of each elementelement_count= {}
# Iterate over each connection tuple in CN_connectionsforconnectioninCN_connections:
# Extract the label (e.g., 'Se1', 'Li2') from the connectionconnected_atomic_label=connection[0]
# Extract only the element part (e.g., 'Se', 'Li') from the labelelement=string_parser.get_atom_type_from_label(connected_atomic_label)
# Increment the count for this element in the dictionaryifelementinelement_count:
element_count[element] +=1else:
element_count[element] =1returnelement_count
Problem
While it has been implemented manually in SAF for binary and ternary, we want to automate this for all .cif files.
The text was updated successfully, but these errors were encountered: