Skip to content

Commit

Permalink
ase plugin: add doc for virial sources
Browse files Browse the repository at this point in the history
  • Loading branch information
link89 committed May 19, 2024
1 parent 2867039 commit 451bd0d
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions dpdata/plugins/ase.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,11 @@ def from_labeled_system(self, atoms: ase.Atoms, **kwargs) -> dict:
"""Convert ase.Atoms to a LabeledSystem. Energies and forces
are calculated by the calculator.
Note that this method will try to load virials from the following sources:
- atoms.info['virial']
- atoms.info['virials']
- converted from stress tensor
Parameters
----------
atoms : ase.Atoms
Expand All @@ -79,12 +84,6 @@ def from_labeled_system(self, atoms: ase.Atoms, **kwargs) -> dict:
RuntimeError
ASE will raise RuntimeError if the atoms does not
have a calculator
Note that this method will try to load virials from the following sources:
- atoms.info['virial']
- atoms.info['virials']
- converted from stress tensor
"""
from ase.calculators.calculator import PropertyNotImplementedError

Expand Down

0 comments on commit 451bd0d

Please sign in to comment.