Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
torchani
Commits
abcb1217
Unverified
Commit
abcb1217
authored
Jun 03, 2019
by
Gao, Xiang
Committed by
GitHub
Jun 03, 2019
Browse files
Rename input->input_ to avoid name clash (#242)
parent
14a62dc4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
torchani/aev.py
torchani/aev.py
+6
-6
No files found.
torchani/aev.py
View file @
abcb1217
...
@@ -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
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment