File size: 388 Bytes
64c992d | 1 2 3 4 5 6 7 8 9 | """Helpers for parsing the experimental spreadsheets' conventions."""
def site_atom_indices(atom_numbers):
"""0-based atom indices for a site from a spreadsheet's 1-based comma-separated atom_numbers
(e.g. "17,19" or "21"), the convention used by both the delta-22 and applications experimental
spreadsheets."""
return [int(x) - 1 for x in str(atom_numbers).split(",")]
|