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
21c794a8
Unverified
Commit
21c794a8
authored
Feb 20, 2020
by
Ignacio Pickering
Committed by
GitHub
Feb 20, 2020
Browse files
slight improvement in performance of AEV (#419)
parent
51d76c98
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
torchani/aev.py
torchani/aev.py
+3
-1
No files found.
torchani/aev.py
View file @
21c794a8
...
...
@@ -139,7 +139,9 @@ def neighbor_pairs(padding_mask: Tensor, coordinates: Tensor, cell: Tensor,
all_atoms
=
torch
.
arange
(
num_atoms
,
device
=
cell
.
device
)
# Step 2: center cell
p1_center
,
p2_center
=
torch
.
combinations
(
all_atoms
).
unbind
(
-
1
)
# torch.triu_indices is faster than combinations
p1_center
,
p2_center
=
torch
.
triu_indices
(
num_atoms
,
num_atoms
,
1
,
device
=
cell
.
device
).
unbind
(
0
)
shifts_center
=
shifts
.
new_zeros
((
p1_center
.
shape
[
0
],
3
))
# Step 3: cells with shifts
...
...
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