Skip to content

Commit

Permalink
Write QE POS file at the end of abiml md
Browse files Browse the repository at this point in the history
  • Loading branch information
gmatteo committed Oct 10, 2023
1 parent e3d3776 commit 36887d9
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion abipy/ml/aseml.py
Original file line number Diff line number Diff line change
Expand Up @@ -1763,6 +1763,12 @@ def run(self) -> None:

md.run(steps=self.steps)

# Convert ASE trajectory file to QE POS file.
write_qe_pos = True
if write_qe_pos:
pos_filepath = self.get_path("md.pos", "QE POS file")
traj_to_qepos(traj_file, pos_filepath)

#trajectory = read(traj_file, index=":")
#write_vasp_xdatcar(workdir / "XDATCAR", trajectory,
# label=f"xdatcar with relaxation generated by {self.__class__.__name__}")
Expand Down Expand Up @@ -2589,7 +2595,7 @@ def traj_to_qepos(traj_filepath: str, pos_filepath: str) -> None:
traj_filepath: Name of ASE trajectory file
pos_filepath: Name of output POS file.
"""
traj = Trajectory(traj_filepath)
traj = Trajectory(str(traj_filepath))
nStepsTraj = len(traj)
nAtoms = len(traj[0])
#print(nStepsTraj)
Expand Down

0 comments on commit 36887d9

Please sign in to comment.