Skip to content

Commit 451bd0d

Browse files
committed
ase plugin: add doc for virial sources
1 parent 2867039 commit 451bd0d

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

dpdata/plugins/ase.py

+5-6
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,11 @@ def from_labeled_system(self, atoms: ase.Atoms, **kwargs) -> dict:
6262
"""Convert ase.Atoms to a LabeledSystem. Energies and forces
6363
are calculated by the calculator.
6464
65+
Note that this method will try to load virials from the following sources:
66+
- atoms.info['virial']
67+
- atoms.info['virials']
68+
- converted from stress tensor
69+
6570
Parameters
6671
----------
6772
atoms : ase.Atoms
@@ -79,12 +84,6 @@ def from_labeled_system(self, atoms: ase.Atoms, **kwargs) -> dict:
7984
RuntimeError
8085
ASE will raise RuntimeError if the atoms does not
8186
have a calculator
82-
83-
84-
Note that this method will try to load virials from the following sources:
85-
- atoms.info['virial']
86-
- atoms.info['virials']
87-
- converted from stress tensor
8887
"""
8988
from ase.calculators.calculator import PropertyNotImplementedError
9089

0 commit comments

Comments
 (0)