Separate molecule nucleus string into fields.


label (str) – Conveys at least element and ghostedness and possibly isotope, mass, and user info in accordance with qcelemental.molparse.regex.NUCLEUS.


A, Z, E, mass, real, user – Field breakdown of label.

Return type

int or None, int or None, str or None, float or None, bool, str or None


qcelemental.ValidationError – If label does not match NUCLEUS.


>>> parse_nucleus_label('@ca_miNe')
None, None, 'ca', None False, '_miNe'
>>> parse_nucleus_label('Gh(Ca_mine)')
None, None, 'Ca', None '_mine', False
>>> parse_nucleus_label('@Ca_mine@1.07')
None, None, 'Ca', 1.07 False, '_mine'
>>> parse_nucleus_label('Gh(cA_MINE@1.07)')
None, None, 'cA', 1.07 False, '_MINE'
>>> parse_nucleus_label('@40Ca_mine@1.07')
40, None, 'Ca', 1.07 False, '_mine'
>>> parse_nucleus_label('Gh(40Ca_mine@1.07)')
40, None, 'Ca', 1.07 False, '_mine'
>>> parse_nucleus_label('444lu333@4.0')
444, None, 'lu', 4.0 True, '333'
>>> parse_nucleus_label('@444lu333@4.4')
444, None, 'lu', 4.4 False, '333'
>>> parse_nucleus_label('8i')
8, None, 'i', None True, None
>>> parse_nucleus_label('53_mI4')
None, 53, None, None True, '_mI4'
>>> parse_nucleus_label('@5_MINEs3@4.4')
None, 5, None, 4.4 False, '_MINEs3'
>>> parse_nucleus_label('Gh(555_mines3@0.1)')
None, 555, None, 0.1 False, '_mines3'