Skip to content

Conversation

PythonFZ
Copy link
Member

@PythonFZ PythonFZ commented May 9, 2025

  • CP2kModel
  • Orca
  • xTBModel

This new way of defining calculators allows for a setup like

import ipsuite as ips

project = ips.Project()

cp2k = ips.GenericASECalculator(
    module="ase.calculators.cp2k",
    class_name="CP2K",
    file_paths=[
        "GTH_BASIS_SETS",
        "GTH_POTENTIALS",
    ],
    parameter_paths="cp2k.yaml",
)

with project:
    data = None
    ips.ApplyCalculator(
        data=data,
        model=cp2k,
    )

project.build()
  • tests
  • requires new zntrack release
  • documentation
  • deprecate old code
  • laufband

This does not work with e.g. a calculator like Plumed that uses zntrack.deps to depend on another calculator. But due to the fact that zntrack.deps accepts on and off graph nodes, this won't be an issue.

@PythonFZ PythonFZ linked an issue May 9, 2025 that may be closed by this pull request
@PythonFZ PythonFZ force-pushed the 402-refactor-calculator-design branch from 3c4ea31 to 36f87a9 Compare May 15, 2025 14:06
calc = self.model.get_calculator(directory=self.model_outs)
io = znh5md.IO(self.frames_path)

# TODO: use laufband
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will do in a later PR

@PythonFZ PythonFZ merged commit 9b3aaad into main May 15, 2025
2 checks passed
@PythonFZ PythonFZ deleted the 402-refactor-calculator-design branch May 15, 2025 15:50
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

Successfully merging this pull request may close these issues.

Refactor calculator design
2 participants