Skip to content

Commit

Permalink
Merge pull request pfnet-research#14 from mwata/refactor_230602
Browse files Browse the repository at this point in the history
renamed edisp_triu to edisp; refine comment
  • Loading branch information
masakiwatanabe authored and GitHub Enterprise committed Jun 5, 2023
2 parents 5870c9c + 53b39a9 commit a437a3a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions torch_dftd_static/nn/dftd3_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
from ase.units import Bohr
from torch import Tensor
from torch_dftd.functions.dftd3 import d3_autoang, d3_autoev
from torch_dftd_static.functions.dftd3 import edisp as edisp_triu
from torch_dftd_static.functions.dftd3 import edisp


"""
Check that c6ab array (shape = (95,95,5,5,3)) has the following structure,
as assumed in edisp function:
as assumed in the edisp implementation (not in the original torch-dftd).
- c6ab[..., 1] is constant along axes 1 (Z of second atom) and 3 (cn of second atom),
except for Z=0 which does not represent valid atom.
Second condition in torch.all(...) below exists because there can be
Expand Down Expand Up @@ -94,7 +94,7 @@ def calc_energy(

# TODO: add interface for force and stress

E_disp = d3_autoev * edisp_triu(
E_disp = d3_autoev * edisp(
Z,
pos = pos / d3_autoang,
shift_vecs = shift_vecs / d3_autoang,
Expand Down

0 comments on commit a437a3a

Please sign in to comment.