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
06a6f381
Unverified
Commit
06a6f381
authored
Jan 11, 2019
by
Gao, Xiang
Committed by
GitHub
Jan 11, 2019
Browse files
Some fixes on Windows (#161)
parent
36672712
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
6 deletions
+8
-6
torchani/ase.py
torchani/ase.py
+8
-6
No files found.
torchani/ase.py
View file @
06a6f381
...
...
@@ -51,13 +51,15 @@ class NeighborList:
# NB: The absolute distance and distance vectors computed by
# `neighbor_list`can not be used since it does not preserve
# gradient information
idx1
=
torch
.
from_numpy
(
idx1
).
to
(
coordinates
.
device
)
idx2
=
torch
.
from_numpy
(
idx2
).
to
(
coordinates
.
device
)
idx1
=
torch
.
tensor
(
idx1
,
device
=
coordinates
.
device
,
dtype
=
torch
.
long
)
idx2
=
torch
.
tensor
(
idx2
,
device
=
coordinates
.
device
,
dtype
=
torch
.
long
)
D
=
c
.
index_select
(
0
,
idx2
)
-
c
.
index_select
(
0
,
idx1
)
shift
=
torch
.
from_numpy
(
shift
).
to
(
coordinates
.
device
)
\
.
to
(
coordinates
.
dtype
)
cell
=
torch
.
from_numpy
(
self
.
cell
).
to
(
coordinates
.
device
)
\
.
to
(
coordinates
.
dtype
)
shift
=
torch
.
tensor
(
shift
,
device
=
coordinates
.
device
,
dtype
=
coordinates
.
dtype
)
cell
=
torch
.
tensor
(
self
.
cell
,
device
=
coordinates
.
device
,
dtype
=
coordinates
.
dtype
)
D
+=
shift
@
cell
d
=
D
.
norm
(
2
,
-
1
)
neighbor_species1
=
[]
...
...
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