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

AnalyseProcessAtoms : Allow custom reference #254

Open
PythonFZ opened this issue Jan 4, 2024 · 0 comments
Open

AnalyseProcessAtoms : Allow custom reference #254

PythonFZ opened this issue Jan 4, 2024 · 0 comments

Comments

@PythonFZ
Copy link
Member

PythonFZ commented Jan 4, 2024

class AnalyseProcessAtoms(IPSNode):
"""Analyse the output of a ProcessAtoms Node."""
data: ProcessAtoms = zntrack.deps()
reference: ProcessAtoms = zntrack.deps(None)
def get_data(self) -> typing.Tuple[list[ase.Atoms], list[ase.Atoms]]:
if self.reference is None:
self.data.update_data() # otherwise, data might not be available
return self.data.data, self.data.atoms
else:
# TODO: support both, Nodes and Connections
return self.reference, self.data

currently, nodes that do AnalyseProcessAtoms have a somehow hard coded reference, this should be changed to allow e.g. predictionmetrics from two different calculators more easily

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant