lanl / hippynn

python library for atomistic machine learning
https://lanl.github.io/hippynn/
Other
59 stars 22 forks source link

Allow HIPNN to work with ASE Mixing Calculators #8

Closed MChigaev closed 1 year ago

MChigaev commented 2 years ago

Four additions: Imported Calculator from ase.calculators.calculator (base Calculator class for ASE). Made HippynnCalculator inherit Calculator. Strangely, although HippynnCalculator already inherits interface.Calculator, this appears to be the incorrect class, and when running a LinearCombinationCalculator for example, it will say it must inherit Calculator as defined in ase.calculators.calculator. In the init function for HippynnCalculator, manually added the property "energy" to self.implemented_properties In the calculate function in HippynnCalculator, add key in self.results, "energy", and set it equal to self.results["potential_energy"]

Added comments on each line added stating that each change is required for using ASE Mixing Calculators