1616"""This module defines class Structure.
1717"""
1818
19- import copy
19+ import copy as copymod
2020import numpy
2121import codecs
2222import six
@@ -95,9 +95,9 @@ def __init__(self, atoms=None, lattice=None, title=None,
9595
9696
9797 def copy (self ):
98- '''Return a deep copy of this Structure object.
98+ '''Return a copy of this Structure object.
9999 '''
100- return copy .copy (self )
100+ return copymod .copy (self )
101101
102102
103103 def __copy__ (self , target = None ):
@@ -116,7 +116,7 @@ def __copy__(self, target=None):
116116 # copy attributes as appropriate:
117117 target .title = self .title
118118 target .lattice = Lattice (self .lattice )
119- target .pdffit = copy .deepcopy (self .pdffit )
119+ target .pdffit = copymod .deepcopy (self .pdffit )
120120 # copy all atoms to the target
121121 target [:] = self
122122 return target
@@ -332,7 +332,7 @@ def insert(self, idx, a, copy=True):
332332
333333 No return value.
334334 """
335- adup = copy and Atom (a ) or a
335+ adup = copy and copymod . copy (a ) or a
336336 adup .lattice = self .lattice
337337 super (Structure , self ).insert (idx , adup )
338338 return
@@ -464,7 +464,7 @@ def __add__(self, other):
464464
465465 Return new Structure with a copy of Atom instances.
466466 '''
467- rv = copy .copy (self )
467+ rv = copymod .copy (self )
468468 rv += other
469469 return rv
470470
@@ -489,7 +489,7 @@ def __sub__(self, other):
489489 '''
490490 otherset = set (other )
491491 keepindices = [i for i , a in enumerate (self ) if not a in otherset ]
492- rv = copy .copy (self [keepindices ])
492+ rv = copymod .copy (self [keepindices ])
493493 return rv
494494
495495
@@ -513,7 +513,7 @@ def __mul__(self, n):
513513
514514 Return new Structure.
515515 '''
516- rv = copy .copy (self [:0 ])
516+ rv = copymod .copy (self [:0 ])
517517 rv += n * self .tolist ()
518518 return rv
519519
0 commit comments