@@ -77,12 +77,12 @@ def lattice_bravais(self):
7777 """
7878 return {
7979 "type" : self ._lattice_type (),
80- "a" : self .structure .lattice .a ,
81- "b" : self .structure .lattice .b ,
82- "c" : self .structure .lattice .c ,
83- "alpha" : self .structure .lattice .alpha ,
84- "beta" : self .structure .lattice .beta ,
85- "gamma" : self .structure .lattice .gamma ,
80+ "a" : self ._round ( self . structure .lattice .a ) ,
81+ "b" : self ._round ( self . structure .lattice .b ) ,
82+ "c" : self ._round ( self . structure .lattice .c ) ,
83+ "alpha" : self ._round ( self . structure .lattice .alpha ) ,
84+ "beta" : self ._round ( self . structure .lattice .beta ) ,
85+ "gamma" : self ._round ( self . structure .lattice .gamma ) ,
8686 "units" : {"length" : "angstrom" , "angle" : "degree" },
8787 }
8888
@@ -159,7 +159,9 @@ def basis(self):
159159 return {
160160 "units" : "crystal" ,
161161 "elements" : [{"id" : i , "value" : v .species_string } for i , v in enumerate (self .structure .sites )],
162- "coordinates" : [{"id" : i , "value" : v .frac_coords .tolist ()} for i , v in enumerate (self .structure .sites )],
162+ "coordinates" : [
163+ {"id" : i , "value" : self ._round (v .frac_coords .tolist ())} for i , v in enumerate (self .structure .sites )
164+ ],
163165 }
164166
165167 def space_group_symbol (self ):
0 commit comments