Fix Hall symbol problem on double quotation

This commit is contained in:
Atsushi Togo 2018-06-06 11:13:04 +02:00
parent 83b2c8ad2b
commit 54d0f2812e
1 changed files with 4 additions and 2 deletions

View File

@ -184,8 +184,10 @@ class PhonopyYaml(object):
self._symmetry.get_dataset()['international'])
lines.append(" number: %d" %
self._symmetry.get_dataset()['number'])
lines.append(" Hall_symbol: \"%s\"" %
self._symmetry.get_dataset()['hall'])
hall_symbol = self._symmetry.get_dataset()['hall']
if "\"" in hall_symbol:
hall_symbol = hall_symbol.replace("\"", "\\\"")
lines.append(" Hall_symbol: \"%s\"" % hall_symbol)
lines.append("")
if self._primitive_matrix is not None: