Unverified Commit abcb1217 authored by Gao, Xiang's avatar Gao, Xiang Committed by GitHub
Browse files

Rename input->input_ to avoid name clash (#242)

parent 14a62dc4
...@@ -376,11 +376,11 @@ class AEVComputer(torch.nn.Module): ...@@ -376,11 +376,11 @@ class AEVComputer(torch.nn.Module):
return self.Rcr, self.EtaR, self.ShfR, self.Rca, self.ShfZ, self.EtaA, self.Zeta, self.ShfA return self.Rcr, self.EtaR, self.ShfR, self.Rca, self.ShfZ, self.EtaA, self.Zeta, self.ShfA
# @torch.jit.script_method # @torch.jit.script_method
def forward(self, input): def forward(self, input_):
"""Compute AEVs """Compute AEVs
Arguments: Arguments:
input (tuple): Can be one of the following two cases: input_ (tuple): Can be one of the following two cases:
If you don't care about periodic boundary conditions at all, If you don't care about periodic boundary conditions at all,
then input can be a tuple of two tensors: species and coordinates. then input can be a tuple of two tensors: species and coordinates.
...@@ -407,13 +407,13 @@ class AEVComputer(torch.nn.Module): ...@@ -407,13 +407,13 @@ class AEVComputer(torch.nn.Module):
unchanged, and AEVs is a tensor of shape unchanged, and AEVs is a tensor of shape
``(C, A, self.aev_length())`` ``(C, A, self.aev_length())``
""" """
if len(input) == 2: if len(input_) == 2:
species, coordinates = input species, coordinates = input_
cell = self.default_cell cell = self.default_cell
shifts = self.default_shifts shifts = self.default_shifts
else: else:
assert len(input) == 4 assert len(input_) == 4
species, coordinates, cell, pbc = input species, coordinates, cell, pbc = input_
cutoff = max(self.Rcr, self.Rca) cutoff = max(self.Rcr, self.Rca)
shifts = compute_shifts(cell, pbc, cutoff) shifts = compute_shifts(cell, pbc, cutoff)
return species, compute_aev(species, coordinates, cell, shifts, self.triu_index, self.constants(), self.sizes) return species, compute_aev(species, coordinates, cell, shifts, self.triu_index, self.constants(), self.sizes)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment