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
b8c2aa92
Unverified
Commit
b8c2aa92
authored
Oct 16, 2019
by
Farhad Ramezanghorbani
Committed by
GitHub
Oct 16, 2019
Browse files
Fix bug in discarding outlier energy conformers (#334)
parent
10c723b1
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
2 deletions
+1
-2
torchani/data/__init__.py
torchani/data/__init__.py
+1
-2
No files found.
torchani/data/__init__.py
View file @
b8c2aa92
...
...
@@ -310,13 +310,12 @@ def load_ani_dataset(path, species_tensor_converter, batch_size, shuffle=True,
atomic_properties_
,
properties_
=
t
(
atomic_properties_
,
properties_
)
if
rm_outlier
:
# This is how NeuroChem discard the outliers
transformed_energies
=
properties_
[
'energies'
]
num_atoms
=
(
atomic_properties_
[
'species'
]
>=
0
).
to
(
transformed_energies
.
dtype
).
sum
(
dim
=
1
)
scaled_diff
=
transformed_energies
/
num_atoms
.
sqrt
()
mean
=
scaled_diff
[
torch
.
abs
(
scaled_diff
)
<
15.0
].
mean
()
std
=
torch
.
abs
(
scaled_diff
[
torch
.
abs
(
scaled_diff
)
<
15.0
]
)
.
std
()
std
=
scaled_diff
[
torch
.
abs
(
scaled_diff
)
<
15.0
].
std
()
# -15 * std + mean < scaled_diff < +11 * std + mean
tol
=
13.0
*
std
+
mean
...
...
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