"lib/vscode:/vscode.git/clone" did not exist on "e159e53fe6127330e62efe855b3c310da9e4183b"
Commit de07730f authored by Gustaf Ahdritz's avatar Gustaf Ahdritz
Browse files

Restore missing license notices

parent 5497655c
# Copyright 2021 AlQuraishi Laboratory
# Copyright 2021 DeepMind Technologies Limited
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import os import os
import datetime import datetime
from typing import Mapping, Optional, Sequence, Any
import numpy as np import numpy as np
from typing import Mapping, Optional, Sequence, Any
from openfold.features import templates, parsers, mmcif_parsing from openfold.data import templates, parsers, mmcif_parsing
from openfold.features.np import jackhmmer, hhblits, hhsearch from openfold.data.tools import jackhmmer, hhblits, hhsearch
from openfold.features.np.utils import to_date from openfold.data.tools.utils import to_date
from openfold.np import residue_constants from openfold.np import residue_constants
...@@ -286,7 +301,7 @@ class DataPipeline: ...@@ -286,7 +301,7 @@ class DataPipeline:
alignments['mgnify_deletion_matrix'] alignments['mgnify_deletion_matrix']
) )
) )
return {**sequence_features, **msa_features, **templates_result.features} return {**sequence_features, **msa_features, **templates_result.data}
def process_mmcif(self, def process_mmcif(self,
mmcif: mmcif_parsing.MmcifObject, # parsing is expensive, so no path mmcif: mmcif_parsing.MmcifObject, # parsing is expensive, so no path
...@@ -333,4 +348,4 @@ class DataPipeline: ...@@ -333,4 +348,4 @@ class DataPipeline:
) )
) )
return {**mmcif_feats, **templates_result.features, **msa_features} return {**mmcif_feats, **templates_result.data, **msa_features}
# Copyright 2021 AlQuraishi Laboratory
# Copyright 2021 DeepMind Technologies Limited
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import itertools import itertools
from functools import reduce from functools import reduce
from operator import add
import numpy as np import numpy as np
import torch import torch
from operator import add
from openfold.config import NUM_RES, NUM_EXTRA_SEQ, NUM_TEMPLATES, NUM_MSA_SEQ from openfold.config import NUM_RES, NUM_EXTRA_SEQ, NUM_TEMPLATES, NUM_MSA_SEQ
from openfold.np import residue_constants as rc from openfold.tools import residue_constants as rc
from openfold.utils.affine_utils import T from openfold.utils.affine_utils import T
from openfold.utils.tensor_utils import tree_map, tensor_tree_map, batched_gather from openfold.utils.tensor_utils import tree_map, tensor_tree_map, batched_gather
......
# Copyright 2021 AlQuraishi Laboratory
# Copyright 2021 DeepMind Technologies Limited
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import copy import copy
from typing import Mapping, Tuple, List, Optional, Dict, Sequence
import ml_collections import ml_collections
import torch
from typing import Mapping, Tuple, List, Optional, Dict, Sequence
import numpy as np import numpy as np
import torch
from openfold.data import input_pipeline
from openfold.features import input_pipeline
FeatureDict = Mapping[str, np.ndarray] FeatureDict = Mapping[str, np.ndarray]
TensorDict = Dict[str, torch.Tensor] TensorDict = Dict[str, torch.Tensor]
def np_to_tensor_dict( def np_to_tensor_dict(
np_example: Mapping[str, np.ndarray], np_example: Mapping[str, np.ndarray],
features: Sequence[str], features: Sequence[str],
......
# Copyright 2021 AlQuraishi Laboratory
# Copyright 2021 DeepMind Technologies Limited
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from functools import partial from functools import partial
import torch import torch
from openfold.features import data_transforms from openfold.data import data_transforms
def nonensembled_transform_fns(common_cfg, mode_cfg): def nonensembled_transform_fns(common_cfg, mode_cfg):
......
# Copyright 2021 AlQuraishi Laboratory
# Copyright 2021 DeepMind Technologies Limited
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Parses the mmCIF file format.""" """Parses the mmCIF file format."""
import collections import collections
import dataclasses import dataclasses
......
# Copyright 2021 AlQuraishi Laboratory
# Copyright 2021 DeepMind Technologies Limited
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Functions for parsing various file formats.""" """Functions for parsing various file formats."""
import collections import collections
import dataclasses import dataclasses
...@@ -5,8 +20,8 @@ import re ...@@ -5,8 +20,8 @@ import re
import string import string
from typing import Dict, Iterable, List, Optional, Sequence, Tuple from typing import Dict, Iterable, List, Optional, Sequence, Tuple
DeletionMatrix = Sequence[Sequence[int]]
DeletionMatrix = Sequence[Sequence[int]]
@dataclasses.dataclass(frozen=True) @dataclasses.dataclass(frozen=True)
class TemplateHit: class TemplateHit:
......
# Copyright 2021 AlQuraishi Laboratory
# Copyright 2021 DeepMind Technologies Limited
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Functions for getting templates and calculating template features.""" """Functions for getting templates and calculating template features."""
import dataclasses import dataclasses
import datetime import datetime
...@@ -10,9 +25,9 @@ from typing import Any, Dict, Mapping, Optional, Sequence, Tuple ...@@ -10,9 +25,9 @@ from typing import Any, Dict, Mapping, Optional, Sequence, Tuple
import numpy as np import numpy as np
from openfold.features import parsers, mmcif_parsing from openfold.data import parsers, mmcif_parsing
from openfold.features.np import kalign from openfold.data.tools import kalign
from openfold.features.np.utils import to_date from openfold.data.tools.utils import to_date
from openfold.np import residue_constants from openfold.np import residue_constants
......
"""Library to run HHblits from Python.""" # Copyright 2021 AlQuraishi Laboratory
# Copyright 2021 DeepMind Technologies Limited
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Library to run HHblits from Python."""
import glob import glob
import logging
import os import os
import subprocess import subprocess
from typing import Any, Mapping, Optional, Sequence from typing import Any, Mapping, Optional, Sequence
from absl import logging from openfold.data.tools import utils
from openfold.features.np import utils
_HHBLITS_DEFAULT_P = 20 _HHBLITS_DEFAULT_P = 20
_HHBLITS_DEFAULT_Z = 500 _HHBLITS_DEFAULT_Z = 500
......
"""Library to run HHsearch from Python.""" # Copyright 2021 AlQuraishi Laboratory
# Copyright 2021 DeepMind Technologies Limited
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Library to run HHsearch from Python."""
import glob import glob
import logging
import os import os
import subprocess import subprocess
from typing import Sequence from typing import Sequence
from absl import logging from openfold.data.np import utils
from openfold.features.np import utils
class HHSearch: class HHSearch:
......
# Copyright 2021 AlQuraishi Laboratory
# Copyright 2021 DeepMind Technologies Limited
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Library to run Jackhmmer from Python.""" """Library to run Jackhmmer from Python."""
...@@ -9,7 +23,7 @@ import subprocess ...@@ -9,7 +23,7 @@ import subprocess
from typing import Any, Callable, Mapping, Optional, Sequence from typing import Any, Callable, Mapping, Optional, Sequence
from urllib import request from urllib import request
from openfold.features.np import utils from openfold.data.tools import utils
class Jackhmmer: class Jackhmmer:
......
# Copyright 2021 AlQuraishi Laboratory
# Copyright 2021 DeepMind Technologies Limited
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""A Python wrapper for Kalign.""" """A Python wrapper for Kalign."""
import os import os
...@@ -6,7 +20,7 @@ from typing import Sequence ...@@ -6,7 +20,7 @@ from typing import Sequence
from absl import logging from absl import logging
from openfold.features.np import utils from openfold.data.tools import utils
def _to_a3m(sequences: Sequence[str]) -> str: def _to_a3m(sequences: Sequence[str]) -> str:
......
# Copyright 2021 AlQuraishi Laboratory
# Copyright 2021 DeepMind Technologies Limited
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Common utilities for data pipeline tools.""" """Common utilities for data pipeline tools."""
import contextlib import contextlib
import datetime import datetime
import logging
import shutil import shutil
import tempfile import tempfile
import time import time
from typing import Optional from typing import Optional
from absl import logging
@contextlib.contextmanager @contextlib.contextmanager
def tmpdir_manager(base_dir: Optional[str] = None): def tmpdir_manager(base_dir: Optional[str] = None):
......
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
import argparse import argparse
from datetime import date from datetime import date
import logging import logging
import numpy as np
import os import os
# A hack to get OpenMM and PyTorch to peacefully coexist # A hack to get OpenMM and PyTorch to peacefully coexist
...@@ -24,15 +25,11 @@ os.environ["OPENMM_DEFAULT_PLATFORM"] = "OpenCL" ...@@ -24,15 +25,11 @@ os.environ["OPENMM_DEFAULT_PLATFORM"] = "OpenCL"
import pickle import pickle
import random import random
import sys import sys
from openfold.features import templates, feature_pipeline, data_pipeline
import time import time
import numpy as np
import torch import torch
from openfold.config import model_config from openfold.config import model_config
from openfold.data import templates, feature_pipeline, data_pipeline
from openfold.model.model import AlphaFold from openfold.model.model import AlphaFold
from openfold.np import residue_constants, protein from openfold.np import residue_constants, protein
import openfold.np.relax.relax as relax import openfold.np.relax.relax as relax
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment