# Path: alphafold/common/residue_constants.py
# def load_stereo_chemical_props() -> Tuple[Mapping[str, List[Bond]],
#   def make_bond_key(atom1_name, atom2_name):
# def sequence_to_onehot(
#     sequence: str,
#     mapping: Mapping[str, int],
#     map_unknown_to_x: bool = False) -> np.ndarray:
# def _make_standard_atom_mask() -> np.ndarray:
# def chi_angle_atom(atom_index: int) -> np.ndarray:
# def _make_rigid_transformation_4x4(ex, ey, translation):
# def _make_rigid_group_constants():
# def make_atom14_dists_bounds(overlap_tolerance=1.5,
#                              bond_length_tolerance_factor=15):
# HHBLITS_AA_TO_ID = {
#     'A': 0,
#     'B': 2,
#     'C': 1,
#     'D': 2,
#     'E': 3,
#     'F': 4,
#     'G': 5,
#     'H': 6,
#     'I': 7,
#     'J': 20,
#     'K': 8,
#     'L': 9,
#     'M': 10,
#     'N': 11,
#     'O': 20,
#     'P': 12,
#     'Q': 13,
#     'R': 14,
#     'S': 15,
#     'T': 16,
#     'U': 1,
#     'V': 17,
#     'W': 18,
#     'X': 20,
#     'Y': 19,
#     'Z': 3,
#     '-': 21,
# }
# ID_TO_HHBLITS_AA = {
#     0: 'A',
#     1: 'C',  # Also U.
#     2: 'D',  # Also B.
#     3: 'E',  # Also Z.
#     4: 'F',
#     5: 'G',
#     6: 'H',
#     7: 'I',
#     8: 'K',
#     9: 'L',
#     10: 'M',
#     11: 'N',
#     12: 'P',
#     13: 'Q',
#     14: 'R',
#     15: 'S',
#     16: 'T',
#     17: 'V',
#     18: 'W',
#     19: 'Y',
#     20: 'X',  # Includes J and O.
#     21: '-',
# }
# MAP_HHBLITS_AATYPE_TO_OUR_AATYPE = tuple(
#     restypes_with_x_and_gap.index(ID_TO_HHBLITS_AA[i])
#     for i in range(len(restypes_with_x_and_gap)))
# STANDARD_ATOM_MASK = _make_standard_atom_mask()


from absl.testing import absltest
from absl.testing import parameterized
from alphafold.common import residue_constants
import numpy as np
# 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.

"""Test that residue_constants generates correct values."""



class ResidueConstantsTest(parameterized.TestCase):

  @parameterized.parameters(
      ('ALA', 0),
      ('CYS', 1),
      ('HIS', 2),
      ('MET', 3),
      ('LYS', 4),
      ('ARG', 4),
  )
  def testChiAnglesAtoms(self, residue_name, chi_num):

# Path: alphafold/common/residue_constants.py
# def load_stereo_chemical_props() -> Tuple[Mapping[str, List[Bond]],
#   def make_bond_key(atom1_name, atom2_name):
# def sequence_to_onehot(
#     sequence: str,
#     mapping: Mapping[str, int],
#     map_unknown_to_x: bool = False) -> np.ndarray:
# def _make_standard_atom_mask() -> np.ndarray:
# def chi_angle_atom(atom_index: int) -> np.ndarray:
# def _make_rigid_transformation_4x4(ex, ey, translation):
# def _make_rigid_group_constants():
# def make_atom14_dists_bounds(overlap_tolerance=1.5,
#                              bond_length_tolerance_factor=15):
# HHBLITS_AA_TO_ID = {
#     'A': 0,
#     'B': 2,
#     'C': 1,
#     'D': 2,
#     'E': 3,
#     'F': 4,
#     'G': 5,
#     'H': 6,
#     'I': 7,
#     'J': 20,
#     'K': 8,
#     'L': 9,
#     'M': 10,
#     'N': 11,
#     'O': 20,
#     'P': 12,
#     'Q': 13,
#     'R': 14,
#     'S': 15,
#     'T': 16,
#     'U': 1,
#     'V': 17,
#     'W': 18,
#     'X': 20,
#     'Y': 19,
#     'Z': 3,
#     '-': 21,
# }
# ID_TO_HHBLITS_AA = {
#     0: 'A',
#     1: 'C',  # Also U.
#     2: 'D',  # Also B.
#     3: 'E',  # Also Z.
#     4: 'F',
#     5: 'G',
#     6: 'H',
#     7: 'I',
#     8: 'K',
#     9: 'L',
#     10: 'M',
#     11: 'N',
#     12: 'P',
#     13: 'Q',
#     14: 'R',
#     15: 'S',
#     16: 'T',
#     17: 'V',
#     18: 'W',
#     19: 'Y',
#     20: 'X',  # Includes J and O.
#     21: '-',
# }
# MAP_HHBLITS_AATYPE_TO_OUR_AATYPE = tuple(
#     restypes_with_x_and_gap.index(ID_TO_HHBLITS_AA[i])
#     for i in range(len(restypes_with_x_and_gap)))
# STANDARD_ATOM_MASK = _make_standard_atom_mask()


# Path: alphafold/common/residue_constants_test.py
from absl.testing import absltest
from absl.testing import parameterized
from alphafold.common import residue_constants
import numpy as np

# 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.

"""Test that residue_constants generates correct values."""



class ResidueConstantsTest(parameterized.TestCase):

  @parameterized.parameters(
      ('ALA', 0),
      ('CYS', 1),
      ('HIS', 2),
      ('MET', 3),
      ('LYS', 4),
      ('ARG', 4),
  )
  def testChiAnglesAtoms(self, residue_name, chi_num):

    chi_angles_atoms = residue_constants.chi_angles_atoms[residue_name]