@@ -117,9 +117,9 @@ def append_transformation(self, transformation, extend_collection=False, clear_r
117
117
with Pool (self .ncores ) as p :
118
118
# need to condense arguments into single tuple to use map
119
119
z = ((x , transformation , extend_collection , clear_redo ) for x in self .transformed_structures )
120
- new_tstructs = p .map (_apply_transformation , z , 1 )
120
+ nrafo_ew_tstructs = p .map (_apply_transformation , z , 1 )
121
121
self .transformed_structures = []
122
- for ts in new_tstructs :
122
+ for ts in nrafo_ew_tstructs :
123
123
self .transformed_structures .extend (ts )
124
124
else :
125
125
new_structures = []
@@ -188,21 +188,21 @@ def __str__(self):
188
188
output .append (str (x .final_structure ))
189
189
return "\n " .join (output )
190
190
191
- def append_transformed_structures (self , tstructs_or_transmuter ):
191
+ def append_transformed_structures (self , trafo_structs_or_transmuter ):
192
192
"""Method is overloaded to accept either a list of transformed structures
193
193
or transmuter, it which case it appends the second transmuter"s
194
194
structures.
195
195
196
196
Args:
197
- tstructs_or_transmuter : A list of transformed structures or a
197
+ trafo_structs_or_transmuter : A list of transformed structures or a
198
198
transmuter.
199
199
"""
200
- if isinstance (tstructs_or_transmuter , self .__class__ ):
201
- self .transformed_structures .extend (tstructs_or_transmuter .transformed_structures )
200
+ if isinstance (trafo_structs_or_transmuter , self .__class__ ):
201
+ self .transformed_structures .extend (trafo_structs_or_transmuter .transformed_structures )
202
202
else :
203
- for ts in tstructs_or_transmuter :
203
+ for ts in trafo_structs_or_transmuter :
204
204
assert isinstance (ts , TransformedStructure )
205
- self .transformed_structures .extend (tstructs_or_transmuter )
205
+ self .transformed_structures .extend (trafo_structs_or_transmuter )
206
206
207
207
@staticmethod
208
208
def from_structures (structures , transformations = None , extend_collection = 0 ):
@@ -221,8 +221,8 @@ def from_structures(structures, transformations=None, extend_collection=0):
221
221
Returns:
222
222
StandardTransmuter
223
223
"""
224
- tstruct = [TransformedStructure (s , []) for s in structures ]
225
- return StandardTransmuter (tstruct , transformations , extend_collection )
224
+ trafo_struct = [TransformedStructure (s , []) for s in structures ]
225
+ return StandardTransmuter (trafo_struct , transformations , extend_collection )
226
226
227
227
228
228
class CifTransmuter (StandardTransmuter ):
@@ -255,8 +255,8 @@ def __init__(self, cif_string, transformations=None, primitive=True, extend_coll
255
255
if read_data :
256
256
structure_data [- 1 ].append (line )
257
257
for data in structure_data :
258
- tstruct = TransformedStructure .from_cif_string ("\n " .join (data ), [], primitive )
259
- transformed_structures .append (tstruct )
258
+ trafo_struct = TransformedStructure .from_cif_string ("\n " .join (data ), [], primitive )
259
+ transformed_structures .append (trafo_struct )
260
260
super ().__init__ (transformed_structures , transformations , extend_collection )
261
261
262
262
@staticmethod
@@ -295,8 +295,8 @@ def __init__(self, poscar_string, transformations=None, extend_collection=False)
295
295
extend_collection: Whether to use more than one output structure
296
296
from one-to-many transformations.
297
297
"""
298
- tstruct = TransformedStructure .from_poscar_string (poscar_string , [])
299
- super ().__init__ ([tstruct ], transformations , extend_collection = extend_collection )
298
+ trafo_struct = TransformedStructure .from_poscar_string (poscar_string , [])
299
+ super ().__init__ ([trafo_struct ], transformations , extend_collection = extend_collection )
300
300
301
301
@staticmethod
302
302
def from_filenames (poscar_filenames , transformations = None , extend_collection = False ):
@@ -310,11 +310,11 @@ def from_filenames(poscar_filenames, transformations=None, extend_collection=Fal
310
310
extend_collection:
311
311
Same meaning as in __init__.
312
312
"""
313
- tstructs = []
313
+ trafo_structs = []
314
314
for filename in poscar_filenames :
315
315
with open (filename ) as f :
316
- tstructs .append (TransformedStructure .from_poscar_string (f .read (), []))
317
- return StandardTransmuter (tstructs , transformations , extend_collection = extend_collection )
316
+ trafo_structs .append (TransformedStructure .from_poscar_string (f .read (), []))
317
+ return StandardTransmuter (trafo_structs , transformations , extend_collection = extend_collection )
318
318
319
319
320
320
def batch_write_vasp_input (
0 commit comments