@@ -56,7 +56,7 @@ def parse_oxi_state():
56
56
data [el ]["Common oxidation states" ] = common_oxi
57
57
else :
58
58
print (el )
59
- with open ("periodic_table2.yaml" , "w" ) as file :
59
+ with open ("periodic_table2.yaml" , mode = "w" ) as file :
60
60
yaml .dump (data , file )
61
61
62
62
@@ -87,7 +87,7 @@ def parse_ionic_radii():
87
87
data [el ]["Ionic_radii" ] = ionic_radii
88
88
else :
89
89
print (el )
90
- with open ("periodic_table2.yaml" , "w" ) as file :
90
+ with open ("periodic_table2.yaml" , mode = "w" ) as file :
91
91
yaml .dump (data , file )
92
92
93
93
@@ -121,9 +121,9 @@ def parse_radii():
121
121
data [el ]["Van der waals radius" ] = vdw_radii
122
122
else :
123
123
print (el )
124
- with open ("periodic_table2.yaml" , "w" ) as file :
124
+ with open ("periodic_table2.yaml" , mode = "w" ) as file :
125
125
yaml .dump (data , file )
126
- with open ("../pymatgen/core/periodic_table.json" , "w" ) as file :
126
+ with open ("../pymatgen/core/periodic_table.json" , mode = "w" ) as file :
127
127
json .dump (data , file )
128
128
129
129
@@ -140,9 +140,9 @@ def update_ionic_radii():
140
140
if "Ionic_radii_ls" in d :
141
141
d ["Ionic radii ls" ] = {k : v / 100 for k , v in d ["Ionic_radii_ls" ].items ()}
142
142
del d ["Ionic_radii_ls" ]
143
- with open ("periodic_table2.yaml" , "w" ) as file :
143
+ with open ("periodic_table2.yaml" , mode = "w" ) as file :
144
144
yaml .dump (data , file )
145
- with open ("../pymatgen/core/periodic_table.json" , "w" ) as file :
145
+ with open ("../pymatgen/core/periodic_table.json" , mode = "w" ) as file :
146
146
json .dump (data , file )
147
147
148
148
@@ -180,14 +180,14 @@ def parse_shannon_radii():
180
180
data [el ]["Shannon radii" ] = dict (radii [el ])
181
181
182
182
dumpfn (data , ptable_yaml_path )
183
- with open ("../pymatgen/core/periodic_table.json" , "w" ) as file :
183
+ with open ("../pymatgen/core/periodic_table.json" , mode = "w" ) as file :
184
184
json .dump (data , file )
185
185
186
186
187
187
def gen_periodic_table ():
188
188
data = loadfn (ptable_yaml_path )
189
189
190
- with open ("../pymatgen/core/periodic_table.json" , "w" ) as file :
190
+ with open ("../pymatgen/core/periodic_table.json" , mode = "w" ) as file :
191
191
json .dump (data , file )
192
192
193
193
0 commit comments