Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
# "A" and "B" are translated to "C"
centering = CenteringType(
hm_symbol[0] if hm_symbol[0] not in {"A", "B"} else "C"
)
info = {
"international_symbol": dataset["international"],
"hall_symbol": dataset["hall"],
"hm_symbol": hm_symbol,
"centering": centering,
"international_number": dataset["number"],
"hall_number": dataset["hall_number"],
"international_full": spg_type["international_full"],
"pointgroup": spg_type["pointgroup_international"],
}
err_msg = get_error_message()
if err_msg != "no error":
raise RuntimeError(
"[SPGLIB] Symmetry-determination has returned the following error: {err_msg}"
)
return info
"""
dataset = get_symmetry_dataset(cell = self._spglib_cell(),
symprec = symprec,
angle_tolerance = angle_tolerance)
if dataset:
spg_type = get_spacegroup_type(dataset['hall_number'])
info = {'international_symbol': dataset['international'],
'hall_symbol' : dataset['hall'],
'international_number': dataset['number'],
'hall_number' : dataset['hall_number'],
'international_full' : spg_type['international_full'],
'pointgroup' : spg_type['pointgroup_international']}
err_msg = get_error_message()
if (err_msg != 'no error'):
raise RuntimeError('Symmetry-determination has returned the following error: {}'.format(err_msg))
return info
return None