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
56eba454
You need to sign in or sign up before continuing.
Unverified
Commit
56eba454
authored
Mar 04, 2019
by
Gao, Xiang
Committed by
GitHub
Mar 04, 2019
Browse files
Code cleanups (#174)
parent
21fcd8f4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
4 deletions
+3
-4
torchani/aev.py
torchani/aev.py
+3
-4
No files found.
torchani/aev.py
View file @
56eba454
...
...
@@ -214,7 +214,7 @@ class AEVComputer(torch.nn.Module):
n
=
tensor
.
shape
[
dim
]
if
n
==
0
:
return
tensor
,
tensor
r
=
torch
.
arange
(
n
,
dtype
=
torch
.
long
,
device
=
tensor
.
device
)
r
=
torch
.
arange
(
n
,
device
=
tensor
.
device
)
index1
,
index2
=
torch
.
combinations
(
r
).
unbind
(
-
1
)
return
tensor
.
index_select
(
dim
,
index1
),
\
tensor
.
index_select
(
dim
,
index2
)
...
...
@@ -268,9 +268,8 @@ class AEVComputer(torch.nn.Module):
rev_indices
=
{
present_species
[
i
].
item
():
i
for
i
in
range
(
len
(
present_species
))}
angular_aevs
=
[]
zero_angular_subaev
=
torch
.
zeros
(
conformations
,
atoms
,
self
.
angular_sublength
(),
dtype
=
self
.
EtaR
.
dtype
,
device
=
self
.
EtaR
.
device
)
zero_angular_subaev
=
self
.
EtaR
.
new_zeros
(
conformations
,
atoms
,
self
.
angular_sublength
())
for
s1
,
s2
in
itertools
.
combinations_with_replacement
(
range
(
self
.
num_species
),
2
):
if
s1
in
rev_indices
and
s2
in
rev_indices
:
...
...
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