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
9eda0b43
Commit
9eda0b43
authored
Oct 09, 2021
by
Gustaf Ahdritz
Browse files
Fix incorrect types in data pipeline
parent
05e08750
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
openfold/features/data_transforms.py
openfold/features/data_transforms.py
+3
-3
openfold/features/templates.py
openfold/features/templates.py
+1
-1
No files found.
openfold/features/data_transforms.py
View file @
9eda0b43
...
...
@@ -60,7 +60,7 @@ def fix_templates_aatype(protein):
# Map hhsearch-aatype to our aatype.
new_order_list
=
residue_constants
.
MAP_HHBLITS_AATYPE_TO_OUR_AATYPE
new_order
=
torch
.
tensor
(
new_order_list
,
dtype
=
torch
.
int
32
new_order_list
,
dtype
=
torch
.
int
64
).
expand
(
num_templates
,
-
1
)
protein
[
'template_aatype'
]
=
torch
.
gather
(
new_order
,
1
,
index
=
protein
[
'template_aatype'
]
...
...
@@ -512,13 +512,13 @@ def make_atom14_masks(protein):
)
protein
[
'atom14_atom_exists'
]
=
residx_atom14_mask
protein
[
'residx_atom14_to_atom37'
]
=
residx_atom14_to_atom37
protein
[
'residx_atom14_to_atom37'
]
=
residx_atom14_to_atom37
.
long
()
# create the gather indices for mapping back
residx_atom37_to_atom14
=
torch
.
index_select
(
restype_atom37_to_atom14
,
0
,
protein
[
'aatype'
]
)
protein
[
'residx_atom37_to_atom14'
]
=
residx_atom37_to_atom14
protein
[
'residx_atom37_to_atom14'
]
=
residx_atom37_to_atom14
.
long
()
# create the corresponding mask
restype_atom37_mask
=
torch
.
zeros
([
21
,
37
],
dtype
=
torch
.
float32
)
...
...
openfold/features/templates.py
View file @
9eda0b43
...
...
@@ -73,7 +73,7 @@ class LengthError(PrefilterError):
TEMPLATE_FEATURES
=
{
'template_aatype'
:
np
.
float32
,
'template_aatype'
:
np
.
int64
,
'template_all_atom_masks'
:
np
.
float32
,
'template_all_atom_positions'
:
np
.
float32
,
'template_domain_names'
:
np
.
object
,
...
...
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