Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
torchani
Commits
276bc75b
Unverified
Commit
276bc75b
authored
Apr 09, 2019
by
Gao, Xiang
Committed by
GitHub
Apr 09, 2019
Browse files
Tiny improvement (#205)
parent
a9df4b41
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
5 deletions
+3
-5
torchani/aev.py
torchani/aev.py
+3
-5
No files found.
torchani/aev.py
View file @
276bc75b
...
...
@@ -258,11 +258,9 @@ def triple_by_molecule(atom_index1, atom_index2):
local_index2
=
rev_indices
[
sorted_local_index2
]
# compute mapping between representation of central-other to pair
sign1
=
torch
.
where
(
local_index1
<
n
,
torch
.
ones_like
(
local_index1
),
-
torch
.
ones_like
(
local_index1
))
sign2
=
torch
.
where
(
local_index2
<
n
,
torch
.
ones_like
(
local_index2
),
-
torch
.
ones_like
(
local_index2
))
pair_index1
=
torch
.
where
(
local_index1
<
n
,
local_index1
,
local_index1
-
n
)
pair_index2
=
torch
.
where
(
local_index2
<
n
,
local_index2
,
local_index2
-
n
)
return
central_atom_index
,
pair_index1
,
pair_index2
,
sign1
,
sign2
sign1
=
((
local_index1
<
n
)
*
2
).
to
(
torch
.
long
)
-
1
sign2
=
((
local_index2
<
n
)
*
2
).
to
(
torch
.
long
)
-
1
return
central_atom_index
,
local_index1
%
n
,
local_index2
%
n
,
sign1
,
sign2
# torch.jit.script
...
...
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