Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get_structure() for sphinx jobs gives error #1378

Open
skatnagallu opened this issue Apr 12, 2024 · 6 comments · Fixed by #1379
Open

get_structure() for sphinx jobs gives error #1378

skatnagallu opened this issue Apr 12, 2024 · 6 comments · Fixed by #1379
Assignees
Labels
bug Something isn't working

Comments

@skatnagallu
Copy link
Contributor

Summary

running get_structure() for sphinx job gives error (IndexError: ('cell at step ', 25, ' not found')). Sphinx Job is a DFT relaxation job. and cell typically doesn't change for each step.

job = pr.load('sphinx_job')
job.get_structure(i) # i>0 gives the error.
@skatnagallu skatnagallu added the bug Something isn't working label Apr 12, 2024
@samwaseda
Copy link
Member

I should open a PR or are you going to work on it?

@skatnagallu
Copy link
Contributor Author

@samwaseda
I wanted to confirm before I made any changes. The only part in sphinx base, where cells are written to output is here

        if "cells" not in self.generic.list_nodes():
            self.generic.cells = np.array([self._job.structure.cell.tolist()])

So as you said changing this line to

        if "cells" not in self.generic.list_nodes():
            self.generic.cells = np.tile(np.array([self._job.structure.cell.tolist()]),(len(self.generic.energy_tot),1,1))

should work?

@samwaseda
Copy link
Member

Yeah I guess this would work. But this has to be implemented in SPHInX base

@skatnagallu
Copy link
Contributor Author

But sphinx base output class has no property of cells. should I then create it?

@samwaseda
Copy link
Member

Yes

@skatnagallu
Copy link
Contributor Author

The issue still exists. As @freyso and I discussed today, the get_structure() method tries to get the cell information from the output level, where as the modifications we did work on output.generic level. So I guess we could debate at which level the methods should access the data? And how do we fix this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants