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

Update to ASE interface and SchNetPack ASE calculator #418

Merged
merged 15 commits into from
Jun 30, 2022
Merged

Conversation

mgastegger
Copy link
Collaborator

Updated the SpkCalculator and ASEInterface to follow the input conventions of the MD calculators. Changes to both include:

  • Instead of an instance of an AtomsConverter a neighbor list is passed. This allows better consistency when handing device and precision options
  • Instead of passing units for all properties (energy, forces and stress) only units for energy and positions are required, the rest is derived automatically
  • Updated shapes of PBCs and cell in the AtomsConverter
  • Stress computation is now handled properly by the SpkCalculator

Moved the utility function _activate_stress from the SchNetPack MD calculator to md/utils/activate_model_stress and updated to account for changes in overall model structure and derivative handling.

Updated tutorials 2 and 3 to reflect the changes in the ASE interface.

@mgastegger mgastegger requested a review from ktschuett June 20, 2022 12:07
stress: str = "stress",
model_file: str,
neighbor_list: schnetpack.transform.Transform,
energy_label: str = "energy",
Copy link
Contributor

Choose a reason for hiding this comment

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

i called this "_key" instead of "_label" in other modules. should be consistent one or they other

Copy link
Collaborator

Choose a reason for hiding this comment

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

I also use "_key" in the gschnet code, I think it is more precise than "_label"

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Changed energy_label, force_label and stress_label to energy_key, force_key and stress_key, as well as position_units and energy_units to position_unit and energy_unit. Now everything is consistent with the atomistic module. The changes affect the ASE and MD calculators, as well as the MD configs.

@ktschuett ktschuett merged commit 6fe78ef into dev Jun 30, 2022
@ktschuett ktschuett deleted the mg/ase_interface branch June 30, 2022 13:33
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

3 participants