Loading csl_generator.py +0 −22 Changes for csl_generator.py: 0 added lines, 22 removed lines. Original line number Diff line number Diff line Loading @@ -5,21 +5,13 @@ This module is a collection of functions that produce CSL properties. When run from the terminal, the code runs in two modes. First mode: <<<<<<< HEAD 'python CSLgenerator.py axis(u v w) [limit]' -----> Where the u v w are the ======= 'python CSLgenerator.py u v w [limit]' -----> Where the u v w are the >>>>>>> development indices of the rotation axis such as 1 0 0, 1 1 1, 1 1 0 and so on. The limit is the maximum Sigma of interest. (the limit by default: 100) Second mode: <<<<<<< HEAD 'python CSLgenerator.py axis(u v w) basis sigma [limit]' -----> Where basis is ======= 'python CSLgenerator.py u v w basis sigma [limit]' -----> Where basis is >>>>>>> development either fcc, bcc, diamond or sc. You read the sigma of interest from the first mode run. The limit here refers to CSL GB inclinations. The bigger the limit, the higher the indices of CSL planes. Loading Loading @@ -134,11 +126,7 @@ def ang(a, b): def CommonDivisor(a): """ <<<<<<< HEAD returns the reduced vector and the common factor of vector a. ======= returns the common factor of vector a and the reduced vector. >>>>>>> development """ CommFac = [] a = np.array(a) Loading Loading @@ -212,13 +200,8 @@ def Tilt_Twist_comp(v1, uvw, m, n): twist = 2 * acos(cos(theta / 2) / cos(radians(tilt / 2))) print("Tilt component: {0:<6.2f} Twist component: {1:6.2f}" .format(tilt, twist)) <<<<<<< HEAD ======= >>>>>>> development def Create_Possible_GB_Plane_List(uvw, m=5, n=1, lim=5): """ generate GB planes and specifies the character. Loading Loading @@ -666,13 +649,8 @@ def Write_to_io(axis, m, n, basis): f.write('# CSL plane of interest that you read from the output of ' 'csl_generator as GB1 \n') f.write(list(my_dict.keys())[0] + ': ' + list(my_dict.values())[0] + <<<<<<< HEAD '\n') f.write('# lattice parameter in Angstrom \n \n') ======= '\n\n') f.write('# lattice parameter in Angstrom \n') >>>>>>> development f.write(list(my_dict.keys())[1] + ': ' + list(my_dict.values())[1] + '\n\n') f.write('# atoms that are closer than this fraction of the lattice ' Loading gb_generator.py +0 −22 Changes for gb_generator.py: 0 added lines, 22 removed lines. Original line number Diff line number Diff line Loading @@ -83,13 +83,6 @@ class GB_character: print("Sorry! For now only works for cubic lattices ... ") sys.exit() <<<<<<< HEAD def WriteGB(self, *args): """ parses the arguments and writes the final structure to the file. """ self.overD = float(args[0]) ======= def WriteGB(self, overlap=0.0, rigid=False, dim1=1, dim2=1, dim3=1, file='LAMMPS', **kwargs): Loading @@ -102,7 +95,6 @@ class GB_character: self.trans = rigid self.dim = np.array([int(dim1), int(dim2), int(dim3)]) self.File = file >>>>>>> development if self.overD > 0: try: self.whichG = kwargs['whichG'] Loading Loading @@ -160,13 +152,6 @@ class GB_character: self.Translate(a, b) else: <<<<<<< HEAD if len(args) != 5: print('Make sure the input arguments are right!') sys.exit() self.dim = np.array([int(args[2]), int(args[3]), int(args[4])]) ======= >>>>>>> development self.Expand_Super_cell() count = 0 print ("<<------ 1 GB structure is being created! ------>>") Loading Loading @@ -315,12 +300,8 @@ class GB_character: def Translate(self, a, b ): """ <<<<<<< HEAD translates the GB on a mesh created by a, b integers and writes to LAMMPS. ======= translates the GB on a mesh created by a, b integers and writes to LAMMPS or VASP. >>>>>>> development """ tol = 0.001 if (1 - cslgen.ang(self.gbplane, self.axis) < tol): Loading Loading @@ -373,8 +354,6 @@ class GB_character: else: print("The output file must be either LAMMPS or VASP!") <<<<<<< HEAD ======= def Write_to_Vasp(self, trans): """ write a single GB without translations to POSCAR. Loading Loading @@ -416,7 +395,6 @@ class GB_character: np.savetxt(f, Wf, fmt='%.8f %.8f %.8f') f.close() >>>>>>> development def Write_to_Lammps(self, trans): """ write a single GB without translations to LAMMPS. Loading Loading
csl_generator.py +0 −22 Changes for csl_generator.py: 0 added lines, 22 removed lines. Original line number Diff line number Diff line Loading @@ -5,21 +5,13 @@ This module is a collection of functions that produce CSL properties. When run from the terminal, the code runs in two modes. First mode: <<<<<<< HEAD 'python CSLgenerator.py axis(u v w) [limit]' -----> Where the u v w are the ======= 'python CSLgenerator.py u v w [limit]' -----> Where the u v w are the >>>>>>> development indices of the rotation axis such as 1 0 0, 1 1 1, 1 1 0 and so on. The limit is the maximum Sigma of interest. (the limit by default: 100) Second mode: <<<<<<< HEAD 'python CSLgenerator.py axis(u v w) basis sigma [limit]' -----> Where basis is ======= 'python CSLgenerator.py u v w basis sigma [limit]' -----> Where basis is >>>>>>> development either fcc, bcc, diamond or sc. You read the sigma of interest from the first mode run. The limit here refers to CSL GB inclinations. The bigger the limit, the higher the indices of CSL planes. Loading Loading @@ -134,11 +126,7 @@ def ang(a, b): def CommonDivisor(a): """ <<<<<<< HEAD returns the reduced vector and the common factor of vector a. ======= returns the common factor of vector a and the reduced vector. >>>>>>> development """ CommFac = [] a = np.array(a) Loading Loading @@ -212,13 +200,8 @@ def Tilt_Twist_comp(v1, uvw, m, n): twist = 2 * acos(cos(theta / 2) / cos(radians(tilt / 2))) print("Tilt component: {0:<6.2f} Twist component: {1:6.2f}" .format(tilt, twist)) <<<<<<< HEAD ======= >>>>>>> development def Create_Possible_GB_Plane_List(uvw, m=5, n=1, lim=5): """ generate GB planes and specifies the character. Loading Loading @@ -666,13 +649,8 @@ def Write_to_io(axis, m, n, basis): f.write('# CSL plane of interest that you read from the output of ' 'csl_generator as GB1 \n') f.write(list(my_dict.keys())[0] + ': ' + list(my_dict.values())[0] + <<<<<<< HEAD '\n') f.write('# lattice parameter in Angstrom \n \n') ======= '\n\n') f.write('# lattice parameter in Angstrom \n') >>>>>>> development f.write(list(my_dict.keys())[1] + ': ' + list(my_dict.values())[1] + '\n\n') f.write('# atoms that are closer than this fraction of the lattice ' Loading
gb_generator.py +0 −22 Changes for gb_generator.py: 0 added lines, 22 removed lines. Original line number Diff line number Diff line Loading @@ -83,13 +83,6 @@ class GB_character: print("Sorry! For now only works for cubic lattices ... ") sys.exit() <<<<<<< HEAD def WriteGB(self, *args): """ parses the arguments and writes the final structure to the file. """ self.overD = float(args[0]) ======= def WriteGB(self, overlap=0.0, rigid=False, dim1=1, dim2=1, dim3=1, file='LAMMPS', **kwargs): Loading @@ -102,7 +95,6 @@ class GB_character: self.trans = rigid self.dim = np.array([int(dim1), int(dim2), int(dim3)]) self.File = file >>>>>>> development if self.overD > 0: try: self.whichG = kwargs['whichG'] Loading Loading @@ -160,13 +152,6 @@ class GB_character: self.Translate(a, b) else: <<<<<<< HEAD if len(args) != 5: print('Make sure the input arguments are right!') sys.exit() self.dim = np.array([int(args[2]), int(args[3]), int(args[4])]) ======= >>>>>>> development self.Expand_Super_cell() count = 0 print ("<<------ 1 GB structure is being created! ------>>") Loading Loading @@ -315,12 +300,8 @@ class GB_character: def Translate(self, a, b ): """ <<<<<<< HEAD translates the GB on a mesh created by a, b integers and writes to LAMMPS. ======= translates the GB on a mesh created by a, b integers and writes to LAMMPS or VASP. >>>>>>> development """ tol = 0.001 if (1 - cslgen.ang(self.gbplane, self.axis) < tol): Loading Loading @@ -373,8 +354,6 @@ class GB_character: else: print("The output file must be either LAMMPS or VASP!") <<<<<<< HEAD ======= def Write_to_Vasp(self, trans): """ write a single GB without translations to POSCAR. Loading Loading @@ -416,7 +395,6 @@ class GB_character: np.savetxt(f, Wf, fmt='%.8f %.8f %.8f') f.close() >>>>>>> development def Write_to_Lammps(self, trans): """ write a single GB without translations to LAMMPS. Loading