Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
tbgl
tools
mrdna
Commits
e64fadf3
Commit
e64fadf3
authored
Sep 26, 2019
by
cmaffeo2
Browse files
Ingore invalid argument to arccos when finding stack in segmentmodel_from_lists
parent
74d1ddf7
Changes
1
Hide whitespace changes
Inline
Side-by-side
mrdna/readers/segmentmodel_from_lists.py
View file @
e64fadf3
...
...
@@ -67,7 +67,8 @@ def find_stacks(centers, transforms):
_z
=
np
.
array
((
0
,
0
,
1
))
for
i
in
np
.
unique
(
idx1
):
js
=
idx2
[
idx1
==
i
]
angles
=
[
np
.
arccos
(
transforms
[
j
].
T
.
dot
(
transforms
[
i
].
dot
(
_z
)
).
dot
(
_z
)
)
for
j
in
js
]
with
np
.
errstate
(
divide
=
'ignore'
,
invalid
=
'ignore'
):
angles
=
[
np
.
arccos
(
transforms
[
j
].
T
.
dot
(
transforms
[
i
].
dot
(
_z
)
).
dot
(
_z
)
)
for
j
in
js
]
angles
=
np
.
array
(
angles
)
tmp
=
np
.
argmin
(
dists
[
i
][
js
]
+
1.0
*
angles
)
j
=
js
[
tmp
]
...
...
Write
Preview
Supports
Markdown
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