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
OpenFold
Commits
45a98436
Commit
45a98436
authored
Oct 29, 2021
by
Marta
Browse files
center coordinates at 0
parent
1c4d2c71
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
openfold/data/mmcif_parsing.py
openfold/data/mmcif_parsing.py
+6
-1
No files found.
openfold/data/mmcif_parsing.py
View file @
45a98436
...
...
@@ -429,7 +429,7 @@ def _is_set(data: str) -> bool:
def
get_atom_coords
(
mmcif_object
:
MmcifObject
,
chain_id
:
str
mmcif_object
:
MmcifObject
,
chain_id
:
str
,
zero_center
:
bool
=
True
)
->
Tuple
[
np
.
ndarray
,
np
.
ndarray
]:
# Locate the right chain
chains
=
list
(
mmcif_object
.
structure
.
get_chains
())
...
...
@@ -474,4 +474,9 @@ def get_atom_coords(
all_atom_positions
[
res_index
]
=
pos
all_atom_mask
[
res_index
]
=
mask
if
zero_center
:
binary_mask
=
all_atom_mask
.
astype
(
np
.
bool
)
translation_vec
=
all_atom_positions
[
binary_mask
].
mean
(
axis
=
0
)
all_atom_positions
[
binary_mask
]
-=
translation_vec
return
all_atom_positions
,
all_atom_mask
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