Skip to content

Commit

Permalink
Convert outputs to double precision
Browse files Browse the repository at this point in the history
  • Loading branch information
ceriottm committed Aug 21, 2023
1 parent 264cdd7 commit 10b19c0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions drivers/py/pes/pet.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ def __call__(self, cell, pos):

# Do the actual calculation
pot, force = self.pet_calc.forward(pet_structure)
pot_ipi = unit_to_internal("energy", "electronvolt", pot)
force_ipi = unit_to_internal("force", "ev/ang", force)
pot_ipi = np.asarray(unit_to_internal("energy", "electronvolt", pot), np.float64)
force_ipi = np.asarray(unit_to_internal("force", "ev/ang", force), np.float64)
# The rascal stress is normalized by the cell volume (in rascal units)
vir_pet = 0*np.eye(3) #-1 * stress * det_ut3x3(cell_pet)
vir_ipi = unit_to_internal("energy", "electronvolt", vir_pet.T)
Expand Down
5 changes: 3 additions & 2 deletions ipi/interfaces/sockets.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,9 @@ def recvall(self, dest):
ntimeout += 1
if ntimeout > NTIMEOUT:
warning(
" @SOCKET: Couldn't receive within %5d attempts. Time to give up!"
% (NTIMEOUT),
""" @SOCKET: Couldn't receive within %5d attempts. Time to give up!
@SOCKET: Current data stream: %d / %d - %s """
% (NTIMEOUT, bpos, blen, self._buf),
verbosity.low,
)
raise Disconnected()
Expand Down

0 comments on commit 10b19c0

Please sign in to comment.