File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed
Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -229,16 +229,24 @@ def get_cif_content(self):
229229
230230 return content
231231
232- def get_reaxff_content (self ):
232+ def get_lmp_content (self ):
233233 """
234- Get ReaxFF data file content
234+ Get lammps data file content
235235 """
236236 content = '# Created by VASPy\n \n '
237237
238238 # Info
239239 content += '{} atoms\n {} atom types\n \n ' .format (len (self .data ),
240240 len (self .atom_types ))
241- content += '0 25.000 xlo xhi\n 0 25.000 ylo yhi\n 0 25.000 zlo zhi\n \n '
241+
242+ # Basis info
243+ x , y , z = self .bases
244+ xhi , yhi , zhi = [np .linalg .norm (i ) for i in self .bases ]
245+ content += '0 {:.9f} xlo xhi\n 0 {:.9f} ylo yhi\n 0 {:.9f} zlo zhi\n ' .format (xhi , yhi , zhi )
246+ xy = np .dot (x , y )/ np .linalg .norm (x )
247+ xz = np .dot (x , z )/ np .linalg .norm (x )
248+ yz = np .dot (y , z )/ np .linalg .norm (y )
249+ content += '{} {} {} xy xz yz\n \n ' .format (xy , xz , yz )
242250
243251 # Masses
244252 content += 'Masses\n \n '
You can’t perform that action at this time.
0 commit comments