Skip to content

Commit

Permalink
Merge pull request #946 from pyiron/revert-945-remove_job_reconsituti…
Browse files Browse the repository at this point in the history
…on_on_pyiron_table_structure_get

Revert "Don't reconstitute job object in pyiron table func"
  • Loading branch information
ligerzero-ai authored Jan 27, 2023
2 parents 322ca2e + 57f296f commit e780020
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions pyiron_atomistics/table/funct.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,8 +238,7 @@ def get_equilibrium_parameters(job):


def get_structure(job):
atoms = Atoms().from_hdf(job["output"])
# I don't understand why any of this is needed?
atoms = pyiron_to_ase(job.to_object().get_structure())
atoms_dict = {
"symbols": atoms.get_chemical_symbols(),
"positions": atoms.get_positions().tolist(),
Expand All @@ -253,10 +252,8 @@ def get_structure(job):
atoms_dict["masses"] = atoms.get_masses().tolist()
if atoms.has("momenta"):
atoms_dict["momenta"] = atoms.get_momenta().tolist()
# is this wrong? why are we setting magmoms to be initial magmoms?
if atoms.has("initial_magmoms"):
atoms_dict["magmoms"] = atoms.get_initial_magnetic_moments().tolist()
# is this wrong? why are we setting charge to be initial charge?
if atoms.has("initial_charges"):
atoms_dict["charges"] = atoms.get_initial_charges().tolist()
if not atoms.__dict__["_calc"] == None:
Expand Down

0 comments on commit e780020

Please sign in to comment.