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

Allow HIPNN to work with ASE Mixing Calculators #8

Merged
merged 1 commit into from
Jul 22, 2022

Conversation

MChigaev
Copy link
Contributor

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

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
@lubbersnick lubbersnick changed the base branch from main to development July 22, 2022 00:56
@lubbersnick lubbersnick merged commit 17c4f72 into lanl:development Jul 22, 2022
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.

None yet

2 participants