Skip to content

Commit 39384f6

Browse files
authored
geometry_to_xyz (#382)
1 parent 1ecbfb4 commit 39384f6

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/tequila/quantumchemistry/chemistry_tools.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -442,7 +442,14 @@ def read_xyz_from_file(filename):
442442
for i in range(natoms):
443443
coord += content[2 + i]
444444
return coord, comment
445-
445+
def get_xyz(self)->str:
446+
geom = self.parameters.get_geometry()
447+
f = ''
448+
f += f'{len(geom)}\n'
449+
f += f'{self.parameters.name}\n'
450+
for at in geom:
451+
f += f'{at[0]} {at[1][0]} {at[1][1]} {at[1][2]}\n'
452+
return f
446453

447454
@dataclass
448455
class ClosedShellAmplitudes:

0 commit comments

Comments
 (0)