"troublesome" atom tokens (three cations and three anions) that consistently invalidated downstream SMILES strings (Table ). Formal charge and neighboring atoms enforced valences on them exceeding maximum permissions, raising RDKit flags. Conveniently, the SELFIES module allows users to set customized constraints using a specific function (set semantic constraints()). The module dynamically builds its derivation rules incorporating the custom constraints, which set the maximum permissible number of bonds each atom can form in a molecule. We used this capability to set custom valence constraints for the six troublesome atom tokens, resolving four cases. However, this "Modified Constraints" customization failed to solve valence errors for the remaining two atom tokens -designated as our filtered troublesome token set (Figure and Figure ).