Skip to content

Commit

Permalink
Return a float instead of an array of a single float.
Browse files Browse the repository at this point in the history
Currently, if the total energy is, say, -2.2, array(-2.2) is returned.
Instead, let's simply return the float -2.2. This is in better agreement
with Lammps interactive, and appears to be also in better agreement with
Vasp interactive.
  • Loading branch information
liamhuber committed Dec 13, 2019
1 parent 491f665 commit fc0679a
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions pyiron/sphinx/interactive.py
Expand Up @@ -69,9 +69,7 @@ def interactive_energy_tot_getter(self):

def interactive_energy_pot_getter(self):
self._interactive_pipe_write("get energy")
return np.array(
float(self._interactive_library_read.readline()) * HARTREE_TO_EV
)
return float(self._interactive_library_read.readline()) * HARTREE_TO_EV

def interactive_forces_getter(self):
self._interactive_pipe_write("get forces")
Expand Down

0 comments on commit fc0679a

Please sign in to comment.