def atoms(self): """ Returns ase.atoms.Atoms object. """ atoms = Atoms(cell=self.cell, pbc=self.pbc, info=self.info, celldisp=self._celldisp.copy()) atoms.arrays = {} for name, a in self.arrays.items(): atoms.arrays[name] = a.copy() atoms.constraints = copy.deepcopy(self.constraints) self._atoms = atoms return self._atoms
def copy(self): """Return a copy.""" atoms = Atoms(cell=self.cell, pbc=self.pbc, info=self.info, celldisp=self._celldisp.copy()) atoms.arrays = {} for name, a in self.arrays.items(): atoms.arrays[name] = a.copy() atoms.constraints = copy.deepcopy(self.constraints) strc = self.__class__(atoms) return strc