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
19fe90b2
Commit
19fe90b2
authored
Jul 11, 2023
by
Geoffrey Yu
Browse files
remove manual processing. now use feature_pipeline instead
parent
55cfb825
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
8 deletions
+6
-8
openfold/data/data_modules.py
openfold/data/data_modules.py
+6
-8
No files found.
openfold/data/data_modules.py
View file @
19fe90b2
...
@@ -180,7 +180,7 @@ class OpenFoldSingleDataset(torch.utils.data.Dataset):
...
@@ -180,7 +180,7 @@ class OpenFoldSingleDataset(torch.utils.data.Dataset):
)
)
if
(
not
self
.
_output_raw
):
if
(
not
self
.
_output_raw
):
self
.
feature_pipeline
=
feature_pipeline
.
FeaturePipeline
(
config
)
self
.
feature_pipeline
=
feature_pipeline
.
FeaturePipeline
(
config
)
def
_parse_mmcif
(
self
,
path
,
file_id
,
chain_id
,
alignment_dir
,
alignment_index
):
def
_parse_mmcif
(
self
,
path
,
file_id
,
chain_id
,
alignment_dir
,
alignment_index
):
with
open
(
path
,
'r'
)
as
f
:
with
open
(
path
,
'r'
)
as
f
:
...
@@ -435,8 +435,7 @@ class OpenFoldSingleMultimerDataset(torch.utils.data.Dataset):
...
@@ -435,8 +435,7 @@ class OpenFoldSingleMultimerDataset(torch.utils.data.Dataset):
monomer_data_pipeline
=
self
.
data_pipeline
monomer_data_pipeline
=
self
.
data_pipeline
)
)
if
(
not
self
.
_output_raw
):
self
.
feature_pipeline
=
feature_pipeline
.
FeaturePipeline
(
config
)
self
.
feature_pipeline
=
feature_pipeline
.
FeaturePipeline
(
config
)
def
_parse_mmcif
(
self
,
path
,
file_id
,
chain_id
,
alignment_dir
,
alignment_index
):
def
_parse_mmcif
(
self
,
path
,
file_id
,
chain_id
,
alignment_dir
,
alignment_index
):
with
open
(
path
,
'r'
)
as
f
:
with
open
(
path
,
'r'
)
as
f
:
...
@@ -477,12 +476,11 @@ class OpenFoldSingleMultimerDataset(torch.utils.data.Dataset):
...
@@ -477,12 +476,11 @@ class OpenFoldSingleMultimerDataset(torch.utils.data.Dataset):
fasta_str
+=
f
">
{
mmcif_id
}
_
{
c
}
\n
{
s
}
\n
"
fasta_str
+=
f
">
{
mmcif_id
}
_
{
c
}
\n
{
s
}
\n
"
with
temp_fasta_file
(
fasta_str
)
as
fasta_file
:
with
temp_fasta_file
(
fasta_str
)
as
fasta_file
:
all_chain_features
=
self
.
multimer_data_pipeline
.
process_fasta
(
fasta_file
,
self
.
alignment_dir
)
all_chain_features
=
self
.
multimer_data_pipeline
.
process_fasta
(
fasta_file
,
self
.
alignment_dir
)
for
k
,
v
in
all_chain_features
.
items
():
all_chain_features
[
k
]
=
torch
.
tensor
(
v
)
move_to_cuda
=
lambda
t
:
t
.
to
(
'cuda'
)
# process all_chain_features
## move all_chain_features to gpu
all_chain_features
=
self
.
feature_pipeline
.
process_features
(
all_chain_features
,
all_chain_features
=
tensor_tree_map
(
move_to_cuda
,
all_chain_features
)
mode
=
self
.
mode
,
is_multimer
=
True
)
alignment_index
=
None
alignment_index
=
None
ground_truth
=
[]
ground_truth
=
[]
...
...
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