Coverage for encodermap/_typing.py: 100%
8 statements
« prev ^ index » next coverage.py v7.4.1, created at 2024-12-31 16:54 +0100
« prev ^ index » next coverage.py v7.4.1, created at 2024-12-31 16:54 +0100
1# -*- coding: utf-8 -*-
2# encodermap/_typing.py
3################################################################################
4# EncoderMap: A python library for dimensionality reduction.
5#
6# Copyright 2019-2024 University of Konstanz and the Authors
7#
8# Authors:
9# Kevin Sawade, Tobias Lemke
10#
11# Encodermap is free software: you can redistribute it and/or modify
12# it under the terms of the GNU Lesser General Public License as
13# published by the Free Software Foundation, either version 2.1
14# of the License, or (at your option) any later version.
15# This package is distributed in the hope that it will be useful to other
16# researches. IT DOES NOT COME WITH ANY WARRANTY WHATSOEVER; without even the
17# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18# See the GNU Lesser General Public License for more details.
19#
20# See <http://www.gnu.org/licenses/>.
21################################################################################
22"""Typing for the encodermap package"""
25# Standard Library Imports
26import typing
27from collections.abc import Sequence
28from typing import Literal, Union
30# Third Party Imports
31import numpy as np
34################################################################################
35# Type Defs
36################################################################################
39CanBeIndex = Union[int, Sequence[int], Sequence[np.ndarray], slice]
42DihedralOrBondDict = dict[
43 Literal[
44 "bonds",
45 "optional_bonds",
46 "delete_bonds",
47 "optional_delete_bonds",
48 "PHI",
49 "PSI",
50 "OMEGA",
51 "not_PHI",
52 "not_PSI",
53 "not_OMEGA",
54 "CHI1",
55 "CHI2",
56 "CHI3",
57 "CHI4",
58 "CHI5",
59 ],
60 Union[list[str], list[tuple[Union[str, int], Union[str, int]]]],
61]
64CustomAAsDict = dict[
65 Union[str, tuple[str, str]],
66 Union[
67 None,
68 tuple[str, None],
69 tuple[
70 str,
71 DihedralOrBondDict,
72 ],
73 ],
74]