AndreiVoicuT commited on
Commit
5e169de
1 Parent(s): dee850d

Update interface_connection/latmatcher_interface.py

Browse files
interface_connection/latmatcher_interface.py CHANGED
@@ -92,8 +92,13 @@ def compute_supercell_a(file_material_a, file_material_b, file_source_a, file_so
92
  separator=', ',
93
  max_line_width=np.inf).replace("\n"," "))+"}\n\n"
94
 
95
- xyz_content += f"{len(super_xyz)}\n\n"
96
- xyz_content += "\n".join([f"{atom[0]} {' '.join(map(str, atom[1]))}" for atom in super_xyz])
 
 
 
 
 
97
 
98
  # Write the content to a file
99
  with open(file12, 'w') as file:
 
92
  separator=', ',
93
  max_line_width=np.inf).replace("\n"," "))+"}\n\n"
94
 
95
+
96
+
97
+ xyz_content = f"{len(super_xyz)}\n\n"
98
+ xyz_content +="Lattice=\"{}\"".format(np.array2string(min_supercel.get_new_structure()['lattice_vectors'],
99
+ separator=', ',
100
+ max_line_width=np.inf).replace("\n"," ").replace("[","").replace("]","").replace(",",""))+" pbc=\"T T F\""+"\n"
101
+
102
 
103
  # Write the content to a file
104
  with open(file12, 'w') as file: