diff --git a/atomrdf/structure.py b/atomrdf/structure.py index f88d18a..ede152a 100644 --- a/atomrdf/structure.py +++ b/atomrdf/structure.py @@ -936,6 +936,7 @@ def repeat(self, repetitions): new_system._structure_dict = {} new_system._structure_dict["repetitions"] = repetitions new_system.to_graph() + new_system.copy_defects(self.sample) return new_system def delete(self, ids=None, indices=None, condition=None, selection=False, copy_structure=False): @@ -968,6 +969,7 @@ def delete(self, ids=None, indices=None, condition=None, selection=False, copy_s sys = self.duplicate() #and add this new structure to the graph sys.to_graph() + sys.copy_defects(self.sample) else: sys = self @@ -1184,6 +1186,7 @@ def substitute_atoms( sys = self.duplicate() #and add this new structure to the graph sys.to_graph() + sys.copy_defects(self.sample) else: sys = self @@ -1386,6 +1389,7 @@ def add_interstitial_impurities( #sys = self.duplicate() sys = System(source=sys.add_atoms({"positions": randpos, "species": element})) sys.to_graph() + sys.copy_defects(self.sample) else: #sys = self.duplicate() sys = System(source=self.add_atoms({"positions": randpos, "species": element})) @@ -2410,6 +2414,7 @@ def rotate(self, rotation_vectors, graph=None, label=None): else: output_structure.label = self.label output_structure.to_graph() + output_structure.copy_defects(self.sample) if output_structure.graph is not None: self.add_rotation_triples(rotation_vectors, output_structure.sample) return output_structure @@ -2467,6 +2472,7 @@ def translate(self, translation_vector, sys = self.duplicate() #and add this new structure to the graph sys.to_graph() + sys.copy_defects(self.sample) else: sys = self @@ -2518,6 +2524,7 @@ def shear(self, shear_vector, sys = self.duplicate() #and add this new structure to the graph sys.to_graph() + sys.copy_defects(self.sample) else: sys = self