base
DEFAULT_SS_COIL_IDENTIFIER
module-attribute
DEFAULT_SS_COIL_IDENTIFIER = 'C'
Secondary structure identifier mapping Stride B/b:Isolated bridge E:Strand/Extended conformation G:3-10 helix H:Alpha helix I:PI-helix T:Turn C:Coil (none of the above) SS_TURN_IDENTIFIERS = 'T' SS_DISORDER_IDENTIFIERS = 'C'
DSSP B:beta bridge E:strand/beta bulge G:310 helix H:α helix I:π helix T:turns S:high curvature (where the angle between i-2, i, and i+2 is at least 70°) " "(space):loop SS_DISORDER_IDENTIFIERS = ' ' SS_TURN_IDENTIFIERS = 'TS'
alpha_helix_15_atoms
module-attribute
alpha_helix_15_atoms = Atoms([Atom(0, 1, 'N', ' ', 'ALA', 'A', 1, ' ', 27.128, 20.897, 37.943, 1.0, 0.0, 'N', ''), Atom(1, 2, 'CA', ' ', 'ALA', 'A', 1, ' ', 27.933, 21.94, 38.546, 1.0, 0.0, 'C', ''), Atom(2, 3, 'C', ' ', 'ALA', 'A', 1, ' ', 28.402, 22.92, 37.481, 1.0, 0.0, 'C', ''), Atom(3, 4, 'O', ' ', 'ALA', 'A', 1, ' ', 28.303, 24.132, 37.663, 1.0, 0.0, 'O', ''), Atom(4, 5, 'CB', ' ', 'ALA', 'A', 1, ' ', 29.162, 21.356, 39.234, 1.0, 0.0, 'C', ''), Atom(5, 6, 'N', ' ', 'ALA', 'A', 2, ' ', 28.914, 22.392, 36.367, 1.0, 0.0, 'N', ''), Atom(6, 7, 'CA', ' ', 'ALA', 'A', 2, ' ', 29.395, 23.219, 35.278, 1.0, 0.0, 'C', ''), Atom(7, 8, 'C', ' ', 'ALA', 'A', 2, ' ', 28.286, 24.142, 34.793, 1.0, 0.0, 'C', ''), Atom(8, 9, 'O', ' ', 'ALA', 'A', 2, ' ', 28.508, 25.337, 34.61, 1.0, 0.0, 'O', ''), Atom(9, 10, 'CB', ' ', 'ALA', 'A', 2, ' ', 29.857, 22.365, 34.102, 1.0, 0.0, 'C', ''), Atom(10, 11, 'N', ' ', 'ALA', 'A', 3, ' ', 27.092, 23.583, 34.584, 1.0, 0.0, 'N', ''), Atom(11, 12, 'CA', ' ', 'ALA', 'A', 3, ' ', 25.956, 24.355, 34.121, 1.0, 0.0, 'C', ''), Atom(12, 13, 'C', ' ', 'ALA', 'A', 3, ' ', 25.681, 25.505, 35.079, 1.0, 0.0, 'C', ''), Atom(13, 14, 'O', ' ', 'ALA', 'A', 3, ' ', 25.488, 26.639, 34.648, 1.0, 0.0, 'O', ''), Atom(14, 15, 'CB', ' ', 'ALA', 'A', 3, ' ', 24.703, 23.49, 34.038, 1.0, 0.0, 'C', ''), Atom(15, 16, 'N', ' ', 'ALA', 'A', 4, ' ', 25.662, 25.208, 36.38, 1.0, 0.0, 'N', ''), Atom(16, 17, 'CA', ' ', 'ALA', 'A', 4, ' ', 25.411, 26.214, 37.393, 1.0, 0.0, 'C', ''), Atom(17, 18, 'C', ' ', 'ALA', 'A', 4, ' ', 26.424, 27.344, 37.27, 1.0, 0.0, 'C', ''), Atom(18, 19, 'O', ' ', 'ALA', 'A', 4, ' ', 26.055, 28.516, 37.29, 1.0, 0.0, 'O', ''), Atom(19, 20, 'CB', ' ', 'ALA', 'A', 4, ' ', 25.519, 25.624, 38.794, 1.0, 0.0, 'C', ''), Atom(20, 21, 'N', ' ', 'ALA', 'A', 5, ' ', 27.704, 26.987, 37.142, 1.0, 0.0, 'N', ''), Atom(21, 22, 'CA', ' ', 'ALA', 'A', 5, ' ', 28.764, 27.968, 37.016, 1.0, 0.0, 'C', ''), Atom(22, 23, 'C', ' ', 'ALA', 'A', 5, ' ', 28.497, 28.876, 35.825, 1.0, 0.0, 'C', ''), Atom(23, 24, 'O', ' ', 'ALA', 'A', 5, ' ', 28.602, 30.096, 35.937, 1.0, 0.0, 'O', ''), Atom(24, 25, 'CB', ' ', 'ALA', 'A', 5, ' ', 30.115, 27.292, 36.812, 1.0, 0.0, 'C', ''), Atom(25, 26, 'N', ' ', 'ALA', 'A', 6, ' ', 28.151, 28.278, 34.682, 1.0, 0.0, 'N', ''), Atom(26, 27, 'CA', ' ', 'ALA', 'A', 6, ' ', 27.871, 29.032, 33.478, 1.0, 0.0, 'C', ''), Atom(27, 28, 'C', ' ', 'ALA', 'A', 6, ' ', 26.759, 30.04, 33.737, 1.0, 0.0, 'C', ''), Atom(28, 29, 'O', ' ', 'ALA', 'A', 6, ' ', 26.876, 31.205, 33.367, 1.0, 0.0, 'O', ''), Atom(29, 30, 'CB', ' ', 'ALA', 'A', 6, ' ', 27.429, 28.113, 32.344, 1.0, 0.0, 'C', ''), Atom(30, 31, 'N', ' ', 'ALA', 'A', 7, ' ', 25.678, 29.586, 34.376, 1.0, 0.0, 'N', ''), Atom(31, 32, 'CA', ' ', 'ALA', 'A', 7, ' ', 24.552, 30.444, 34.682, 1.0, 0.0, 'C', ''), Atom(32, 33, 'C', ' ', 'ALA', 'A', 7, ' ', 25.013, 31.637, 35.507, 1.0, 0.0, 'C', ''), Atom(33, 34, 'O', ' ', 'ALA', 'A', 7, ' ', 24.652, 32.773, 35.212, 1.0, 0.0, 'O', ''), Atom(34, 35, 'CB', ' ', 'ALA', 'A', 7, ' ', 23.489, 29.693, 35.478, 1.0, 0.0, 'C', ''), Atom(35, 36, 'N', ' ', 'ALA', 'A', 8, ' ', 25.814, 31.374, 36.543, 1.0, 0.0, 'N', ''), Atom(36, 37, 'CA', ' ', 'ALA', 'A', 8, ' ', 26.321, 32.423, 37.405, 1.0, 0.0, 'C', ''), Atom(37, 38, 'C', ' ', 'ALA', 'A', 8, ' ', 27.081, 33.454, 36.583, 1.0, 0.0, 'C', ''), Atom(38, 39, 'O', ' ', 'ALA', 'A', 8, ' ', 26.874, 34.654, 36.745, 1.0, 0.0, 'O', ''), Atom(39, 40, 'CB', ' ', 'ALA', 'A', 8, ' ', 27.193, 31.773, 38.487, 1.0, 0.0, 'C', ''), Atom(40, 41, 'N', ' ', 'ALA', 'A', 9, ' ', 27.963, 32.98, 35.7, 1.0, 0.0, 'N', ''), Atom(41, 42, 'CA', ' ', 'ALA', 'A', 9, ' ', 28.75, 33.859, 34.858, 1.0, 0.0, 'C', ''), Atom(42, 43, 'C', ' ', 'ALA', 'A', 9, ' ', 27.834, 34.759, 34.042, 1.0, 0.0, 'C', ''), Atom(43, 44, 'O', ' ', 'ALA', 'A', 9, ' ', 28.052, 35.967, 33.969, 1.0, 0.0, 'O', ''), Atom(44, 45, 'CB', ' ', 'ALA', 'A', 9, ' ', 29.621, 33.061, 33.894, 1.0, 0.0, 'C', ''), Atom(45, 46, 'N', ' ', 'ALA', 'A', 10, ' ', 26.807, 34.168, 33.427, 1.0, 0.0, 'N', ''), Atom(46, 47, 'CA', ' ', 'ALA', 'A', 10, ' ', 25.864, 34.915, 32.62, 1.0, 0.0, 'C', ''), Atom(47, 48, 'C', ' ', 'ALA', 'A', 10, ' ', 25.23, 36.024, 33.448, 1.0, 0.0, 'C', ''), Atom(48, 49, 'O', ' ', 'ALA', 'A', 10, ' ', 25.146, 37.165, 33.001, 1.0, 0.0, 'O', ''), Atom(49, 50, 'CB', ' ', 'ALA', 'A', 10, ' ', 24.752, 34.012, 32.097, 1.0, 0.0, 'C', ''), Atom(50, 51, 'N', ' ', 'ALA', 'A', 11, ' ', 24.783, 35.683, 34.66, 1.0, 0.0, 'N', ''), Atom(51, 52, 'CA', ' ', 'ALA', 'A', 11, ' ', 24.16, 36.646, 35.544, 1.0, 0.0, 'C', ''), Atom(52, 53, 'C', ' ', 'ALA', 'A', 11, ' ', 25.104, 37.812, 35.797, 1.0, 0.0, 'C', ''), Atom(53, 54, 'O', ' ', 'ALA', 'A', 11, ' ', 24.699, 38.97, 35.714, 1.0, 0.0, 'O', ''), Atom(54, 55, 'CB', ' ', 'ALA', 'A', 11, ' ', 23.81, 36.012, 36.887, 1.0, 0.0, 'C', ''), Atom(55, 56, 'N', ' ', 'ALA', 'A', 12, ' ', 26.365, 37.503, 36.107, 1.0, 0.0, 'N', ''), Atom(56, 57, 'CA', ' ', 'ALA', 'A', 12, ' ', 27.361, 38.522, 36.37, 1.0, 0.0, 'C', ''), Atom(57, 58, 'C', ' ', 'ALA', 'A', 12, ' ', 27.477, 39.461, 35.177, 1.0, 0.0, 'C', ''), Atom(58, 59, 'O', ' ', 'ALA', 'A', 12, ' ', 27.485, 40.679, 35.342, 1.0, 0.0, 'O', ''), Atom(59, 60, 'CB', ' ', 'ALA', 'A', 12, ' ', 28.73, 37.9, 36.625, 1.0, 0.0, 'C', ''), Atom(60, 61, 'N', ' ', 'ALA', 'A', 13, ' ', 27.566, 38.89, 33.974, 1.0, 0.0, 'N', ''), Atom(61, 62, 'CA', ' ', 'ALA', 'A', 13, ' ', 27.68, 39.674, 32.761, 1.0, 0.0, 'C', ''), Atom(62, 63, 'C', ' ', 'ALA', 'A', 13, ' ', 26.504, 40.634, 32.645, 1.0, 0.0, 'C', ''), Atom(63, 64, 'O', ' ', 'ALA', 'A', 13, ' ', 26.69, 41.815, 32.36, 1.0, 0.0, 'O', ''), Atom(64, 65, 'CB', ' ', 'ALA', 'A', 13, ' ', 27.69, 38.779, 31.527, 1.0, 0.0, 'C', ''), Atom(65, 66, 'N', ' ', 'ALA', 'A', 14, ' ', 25.291, 40.121, 32.868, 1.0, 0.0, 'N', ''), Atom(66, 67, 'CA', ' ', 'ALA', 'A', 14, ' ', 24.093, 40.932, 32.789, 1.0, 0.0, 'C', ''), Atom(67, 68, 'C', ' ', 'ALA', 'A', 14, ' ', 24.193, 42.112, 33.745, 1.0, 0.0, 'C', ''), Atom(68, 69, 'O', ' ', 'ALA', 'A', 14, ' ', 23.905, 43.245, 33.367, 1.0, 0.0, 'O', ''), Atom(69, 70, 'CB', ' ', 'ALA', 'A', 14, ' ', 22.856, 40.12, 33.158, 1.0, 0.0, 'C', ''), Atom(70, 71, 'N', ' ', 'ALA', 'A', 15, ' ', 24.604, 41.841, 34.986, 1.0, 0.0, 'N', ''), Atom(71, 72, 'CA', ' ', 'ALA', 'A', 15, ' ', 24.742, 42.878, 35.989, 1.0, 0.0, 'C', ''), Atom(72, 73, 'C', ' ', 'ALA', 'A', 15, ' ', 25.691, 43.96, 35.497, 1.0, 0.0, 'C', ''), Atom(73, 74, 'O', ' ', 'ALA', 'A', 15, ' ', 25.39, 45.147, 35.602, 1.0, 0.0, 'O', ''), Atom(74, 75, 'CB', ' ', 'ALA', 'A', 15, ' ', 24.418, 41.969, 34.808, 1.0, 0.0, 'C', '')])
Caution. After the first time this helix is created as a Structure, the alpha_helix_15_atoms Atom instances will have their .coords set to the alpha_helix_15 'parent' Structure instance. Transformation of this Structure causes the starting coordinates in each Atom instance in alpha_helix_15_atoms to be transformed as well. Making new structures from this Atoms container is sufficient to detach them, but the coordinates are moved from program start after usage the first time. This behavior isn't ideal, but a consequence of construction of Atom instances from the singular attribute basis with the intention to be reused
ArrayIndexer
module-attribute
ArrayIndexer = Type[Union[Sequence[int], Sequence[bool], slice, None]]
Where integers, slices :
, ellipsis ...
, None and integer or boolean arrays are valid indices
Log
Log(log: Logger | None = logging.getLogger('null'))
Responsible for StructureBase logging operations
Parameters:
-
log
(Logger | None
, default:getLogger('null')
) –The logging.Logger to handle StructureBase logging. If None is passed a Logger with NullHandler is used
Source code in symdesign/structure/base.py
762 763 764 765 766 767 768 |
|
SymmetryBase
SymmetryBase(rotation_matrices: ndarray = None, translation_matrices: ndarray = None, **kwargs)
Bases: ABC
Adds functionality for symmetric manipulation of Structure instances
Collects known keyword arguments for all derived classes to protect object
. Should always be the last class
in the method resolution order of derived classes.
Source code in symdesign/structure/base.py
793 794 795 796 797 798 799 800 801 |
|
symmetry
property
writable
symmetry: str | None
The symmetry of the Structure described by its Schönflies notation
symmetric_dependents
property
writable
symmetric_dependents: list[StructureBase] | list
Access the symmetrically dependent Structure instances
reset_symmetry_state
reset_symmetry_state() -> None
Remove any state variable associated with the instance
Source code in symdesign/structure/base.py
825 826 827 828 829 830 831 832 |
|
is_symmetric
is_symmetric() -> bool
Query whether the Structure is symmetric. Returns True if self.symmetry is not None
Source code in symdesign/structure/base.py
834 835 836 |
|
has_symmetric_dependents
has_symmetric_dependents() -> bool
Evaluates to True if the Structure has symmetrically dependent children
Source code in symdesign/structure/base.py
838 839 840 |
|
StructureMetadata
StructureMetadata(biological_assembly: str | int = None, cryst_record: str = None, entity_info: dict[str, dict[dict | list | str]] = None, file_path: AnyStr = None, reference_sequence: str | dict[str, str] = None, resolution: float = None, **kwargs)
Contains all metadata available from structure file parsing
Parameters:
-
biological_assembly
(str | int
, default:None
) –The integer of the biological assembly (as indicated by PDB AssemblyID format)
-
cryst_record
(str
, default:None
) –The string specifying how the molecule is situated in a lattice
-
entity_info
(dict[str, dict[dict | list | str]]
, default:None
) –A mapping of the metadata to their distinct molecular identifiers
-
file_path
(AnyStr
, default:None
) –The location on disk where the file was accessed
-
reference_sequence
(str | dict[str, str]
, default:None
) –The reference sequence (according to expression sequence or reference database)
-
resolution
(float
, default:None
) –The level of detail available from an experimental dataset contributing to the sharpness with which structural data can contribute towards building a model
Source code in symdesign/structure/base.py
871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 |
|
CoordinateOpsMixin
Bases: ABC
coords
abstractmethod
property
writable
coords
distance_from_reference
distance_from_reference(reference: ndarray = utils.symmetry.origin, measure: str = 'mean', **kwargs) -> float
From a Structure, find the furthest coordinate from the origin (default) or from a reference.
Parameters:
-
reference
(ndarray
, default:origin
) –The reference where the point should be measured from. Default is origin
-
measure
(str
, default:'mean'
) –The measurement to take with respect to the reference. Could be 'mean', 'min', 'max', or any numpy function to describe computed distance scalars
Returns:
-
float
–The distance from the reference point to the furthest point
Source code in symdesign/structure/base.py
918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 |
|
translate
translate(translation: list[float] | ndarray, **kwargs) -> None
Perform a translation to the Structure ensuring only the Structure container of interest is translated ensuring the underlying coords are not modified
Parameters:
-
translation
(list[float] | ndarray
) –The first translation to apply, expected array shape (3,)
Source code in symdesign/structure/base.py
936 937 938 939 940 941 942 943 944 945 |
|
rotate
rotate(rotation: list[list[float]] | ndarray, **kwargs) -> None
Perform a rotation to the Structure ensuring only the Structure container of interest is rotated ensuring the underlying coords are not modified
Parameters:
-
rotation
(list[list[float]] | ndarray
) –The first rotation to apply, expected array shape (3, 3)
Source code in symdesign/structure/base.py
947 948 949 950 951 952 953 954 955 956 957 |
|
transform
transform(rotation: list[list[float]] | ndarray = None, translation: list[float] | ndarray = None, rotation2: list[list[float]] | ndarray = None, translation2: list[float] | ndarray = None, **kwargs) -> None
Perform a specific transformation to the Structure ensuring only the Structure container of interest is transformed ensuring the underlying coords are not modified
Transformation proceeds by matrix multiplication and vector addition with the order of operations as: rotation, translation, rotation2, translation2
Parameters:
-
rotation
(list[list[float]] | ndarray
, default:None
) –The first rotation to apply, expected array shape (3, 3)
-
translation
(list[float] | ndarray
, default:None
) –The first translation to apply, expected array shape (3,)
-
rotation2
(list[list[float]] | ndarray
, default:None
) –The second rotation to apply, expected array shape (3, 3)
-
translation2
(list[float] | ndarray
, default:None
) –The second translation to apply, expected array shape (3,)
Source code in symdesign/structure/base.py
959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 |
|
copy
abstractmethod
copy()
Source code in symdesign/structure/base.py
995 996 997 |
|
get_transformed_copy
get_transformed_copy(rotation: list[list[float]] | ndarray = None, translation: list[float] | ndarray = None, rotation2: list[list[float]] | ndarray = None, translation2: list[float] | ndarray = None) -> StructureBase
Make a semi-deep copy of the Structure object with the coordinates transformed in cartesian space
Transformation proceeds by matrix multiplication and vector addition with the order of operations as: rotation, translation, rotation2, translation2
Parameters:
-
rotation
(list[list[float]] | ndarray
, default:None
) –The first rotation to apply, expected array shape (3, 3)
-
translation
(list[float] | ndarray
, default:None
) –The first translation to apply, expected array shape (3,)
-
rotation2
(list[list[float]] | ndarray
, default:None
) –The second rotation to apply, expected array shape (3, 3)
-
translation2
(list[float] | ndarray
, default:None
) –The second translation to apply, expected array shape (3,)
Returns:
-
StructureBase
–A transformed copy of the original object
Source code in symdesign/structure/base.py
999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 |
|
StructureBase
StructureBase(parent: StructureBase = None, log: Log | Logger | bool = True, coords: ndarray | Coordinates | list[list[float]] = None, name: str = None, file_path: AnyStr = None, biological_assembly: str | int = None, cryst_record: str = None, resolution: float = None, entity_info: dict[str, dict[dict | list | str]] = None, reference_sequence: str | dict[str, str] = None, **kwargs)
Bases: SymmetryBase
, CoordinateOpsMixin
, ABC
Manipulates Coordinates and Log instances as well as the .atom_indices.
Additionally. sorts through parent Structure and dependent Structure hierarchies during Structure subclass creation.
Parameters:
-
parent
(StructureBase
, default:None
) –If another Structure object created this Structure instance, pass the 'parent' instance. Will take ownership over Structure containers (coords, atoms, residues) for dependent Structures
-
log
(Log | Logger | bool
, default:True
) –The Log or Logger instance, or the name for the logger to handle parent Structure logging. None or False prevents logging while any True assignment enables it
-
coords
(ndarray | Coordinates | list[list[float]]
, default:None
) –When setting up a parent Structure instance, the coordinates of that Structure
-
name
(str
, default:None
) –The identifier for the Structure instance
Source code in symdesign/structure/base.py
1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 |
|
parent
property
parent: StructureBase | None
Return the instance's 'parent' StructureBase which is responsible for manipulation of Structure containers
log
property
writable
log: Logger
The StructureBase Logger
coords
property
writable
coords: ndarray
The coordinates for the Atoms in the StructureBase object
is_dependent
is_dependent() -> bool
Is this instance a dependent on a parent StructureBase?
Source code in symdesign/structure/base.py
1140 1141 1142 |
|
is_parent
is_parent() -> bool
Is this instance a parent?
Source code in symdesign/structure/base.py
1144 1145 1146 |
|
make_parent
make_parent()
Remove this instance from its parent, making it a parent in the process
Source code in symdesign/structure/base.py
1196 1197 1198 1199 1200 1201 |
|
reset_state
reset_state()
Removes attributes that are valid for the current state. Additionally, resets the symmetry state if symmetric
This is useful for transfer of ownership, or changes in the state that should be overwritten
Source code in symdesign/structure/base.py
1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 |
|
Atom
Atom(index: int = None, number: int = None, atom_type: str = None, alt_location: str = ' ', residue_type: str = None, chain_id: str = None, residue_number: int = None, code_for_insertion: str = ' ', x: float = None, y: float = None, z: float = None, occupancy: float = None, b_factor: float = None, element: str = None, charge: str = None, coords: list[float] = None, **kwargs)
Bases: CoordinateOpsMixin
Contains Atom metadata and a single coordinate position
Parameters:
-
index
(int
, default:None
) –The zero-indexed number to describe this Atom instance's position in a StructureBaseContainer
-
number
(int
, default:None
) –The integer number describing this Atom instances position in comparison to others instances
-
atom_type
(str
, default:None
) –The characters describing the classification of atom via membership to a molecule
-
alt_location
(str
, default:' '
) –Whether the observation of the Atom has alternative evidences
-
residue_type
(str
, default:None
) –The characters describing the molecular unit to which this Atom belongs
-
chain_id
(str
, default:None
) –The identifier which signifies this Atom instances membership to a larger polymer
-
residue_number
(int
, default:None
) –The integer of the polymer that this Atom belongs too
-
code_for_insertion
(str
, default:' '
) –Whether the Atom is included in a residue which is inserted according to a common numbering scheme
-
x
(float
, default:None
) –The x axis value of the instances coordinate position, i.e., it's x coordinate
-
y
(float
, default:None
) –The y axis value of the instances coordinate position, i.e., it's y coordinate
-
z
(float
, default:None
) –The z axis value of the instances coordinate position, i.e., it's z coordinate
-
occupancy
(float
, default:None
) –The fraction of the time this Atom is observed in the experiment
-
b_factor
(float
, default:None
) –The thermal fluctuation for the Atom OR a value for which structural representation should account
-
element
(str
, default:None
) –The atomic symbol for the Atom
-
charge
(str
, default:None
) –The numeric value for the electronic charge of the Atom
-
coords
(list[float]
, default:None
) –The set of values of the x, y, and z coordinate position
-
**kwargs
–
Source code in symdesign/structure/base.py
1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 |
|
type
property
type: str
This can't currently be set
atom_indices
property
atom_indices: list[int]
The index of the Atom in the Atoms/Coords container
coords
property
writable
coords: ndarray
The coordinates for the Atom. Array is 1 dimensional in contrast to other .coords properties
center_of_mass
property
center_of_mass: ndarray
The center of mass (the Atom coordinates). Provided for compatibility with StructureBase API
radius
property
radius: float
The width of the Atom
x
property
writable
x: float
Access the value for the x coordinate
y
property
writable
y: float
Access the value for the y coordinate
z
property
writable
z: float
Access the value for the z coordinate
without_coordinates
classmethod
without_coordinates(idx, number, atom_type, alt_location, residue_type, chain_id, residue_number, code_for_insertion, occupancy, b_factor, element, charge)
Initialize Atom record data without coordinates. Performs all type casting
Source code in symdesign/structure/base.py
1292 1293 1294 1295 1296 1297 1298 1299 |
|
is_dependent
is_dependent() -> bool
Is this instance a dependent on a parent StructureBase?
Source code in symdesign/structure/base.py
1377 1378 1379 |
|
is_parent
is_parent() -> bool
Is this instance a parent?
Source code in symdesign/structure/base.py
1382 1383 1384 |
|
make_parent
make_parent()
Remove this instance from its parent, making it a parent in the process
Source code in symdesign/structure/base.py
1408 1409 1410 1411 1412 1413 1414 |
|
reset_state
reset_state()
Remove attributes that are valid for the current state
This is useful for transfer of ownership, or changes in the state that should be overwritten
Source code in symdesign/structure/base.py
1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 |
|
is_backbone_and_cb
is_backbone_and_cb() -> bool
Is the Atom is a backbone or CB Atom? Includes N, CA, C, O, and CB
Source code in symdesign/structure/base.py
1525 1526 1527 |
|
is_backbone
is_backbone() -> bool
Is the Atom is a backbone Atom? These include N, CA, C, and O
Source code in symdesign/structure/base.py
1529 1530 1531 |
|
is_cb
is_cb(gly_ca: bool = True) -> bool
Is the Atom a CB atom? Default returns True if Glycine and Atom is CA
Parameters:
-
gly_ca
(bool
, default:True
) –Whether to include Glycine CA in the boolean evaluation
Source code in symdesign/structure/base.py
1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 |
|
is_ca
is_ca() -> bool
Is the Atom a CA atom?
Source code in symdesign/structure/base.py
1545 1546 1547 |
|
is_heavy
is_heavy() -> bool
Is the Atom a heavy atom?
Source code in symdesign/structure/base.py
1549 1550 1551 |
|
get_atom_record
get_atom_record() -> str
Provide the Atom as an Atom record string
Returns:
-
str
–The archived .pdb formatted ATOM records for the Structure
Source code in symdesign/structure/base.py
1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 |
|
__str__
__str__() -> str
Represent Atom in PDB format
Source code in symdesign/structure/base.py
1570 1571 1572 1573 1574 1575 1576 1577 |
|
StructureBaseContainer
StructureBaseContainer(structs: Sequence[StructureBase] | ndarray = None)
Bases: Generic[_StructType]
Container for a StructureBase instances
Parameters:
-
structs
(Sequence[StructureBase] | ndarray
, default:None
) –The StructureBase instances to store. Should be a homogeneous Sequence
Source code in symdesign/structure/base.py
1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 |
|
reindex
abstractmethod
property
reindex
are_dependents
are_dependents() -> bool
Check if any of the StructureBase instances are dependents of another StructureBase
Source code in symdesign/structure/base.py
1628 1629 1630 1631 1632 1633 |
|
append
append(new_structures: list[_StructType] | ndarray)
Append additional StructureBase instances to the StructureBaseContainer
Parameters:
-
new_structures
(list[_StructType] | ndarray
) –The Structure instances to append
Source code in symdesign/structure/base.py
1635 1636 1637 1638 1639 1640 1641 |
|
delete
delete(indices: Sequence[int])
Delete StructureBase instances from the StructureBaseContainer
Parameters:
-
indices
(Sequence[int]
) –The indices to delete
Source code in symdesign/structure/base.py
1643 1644 1645 1646 1647 1648 1649 |
|
insert
insert(at: int, new_structures: list[_StructType] | ndarray)
Insert StructureBase instances into the StructureBaseContainer
Parameters:
-
at
(int
) –The index to perform the insert at
-
new_structures
(list[_StructType] | ndarray
) –The Structure instances to insert
Source code in symdesign/structure/base.py
1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 |
|
set
set(new_structures: list[_StructType] | ndarray)
Set the StructureBaseContainer with new StructureBase instances
Parameters:
-
new_structures
(list[_StructType] | ndarray
) –The new instances which should make up the container
Source code in symdesign/structure/base.py
1664 1665 1666 1667 1668 1669 1670 1671 |
|
reset_state
reset_state()
Remove any attributes from the Structure instances that are part of the current state
This is useful for transfer of ownership, or changes in the state that need to be overwritten
Source code in symdesign/structure/base.py
1678 1679 1680 1681 1682 1683 1684 |
|
set_attributes
set_attributes(**kwargs)
Set Structure attributes passed by keyword to their corresponding value
Source code in symdesign/structure/base.py
1686 1687 1688 1689 1690 |
|
Atoms
Atoms(structs: Sequence[StructureBase] | ndarray = None)
Bases: StructureBaseContainer
Parameters:
-
structs
(Sequence[StructureBase] | ndarray
, default:None
) –The StructureBase instances to store. Should be a homogeneous Sequence
Source code in symdesign/structure/base.py
1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 |
|
reindex
reindex(start_at: int = 0)
Set each Atom instance index according to incremental Atoms/Coords index
Parameters:
-
start_at
(int
, default:0
) –The index to start reindexing at. Must be [0, 'inf']
Source code in symdesign/structure/base.py
1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 |
|
ContainsAtoms
Bases: StructureBase
, ABC
Parameters:
Source code in symdesign/structure/base.py
1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 |
|
atom_indices
property
atom_indices: list[int]
The Atoms/Coords indices which the StructureBase has access to
number_of_atoms
property
number_of_atoms: int
The number of atoms/coordinates in the StructureBase
backbone_and_cb_indices
abstractmethod
property
backbone_and_cb_indices: list[int]
The indices that index the StructureBase backbone and CB Atoms/Coords
backbone_indices
abstractmethod
property
backbone_indices: list[int]
The indices that index the StructureBase backbone and CB Atoms/Coords
ca_indices
abstractmethod
property
ca_indices: list[int]
The indices that index the StructureBase CA Atoms/Coords
cb_indices
abstractmethod
property
cb_indices: list[int]
The indices that index the StructureBase CB Atoms/Coords
heavy_indices
abstractmethod
property
heavy_indices: list[int]
The indices that index the StructureBase heavy (non-hydrogen) Atoms/Coords
side_chain_indices
abstractmethod
property
side_chain_indices: list[int]
The indices that index the StructureBase side-chain Atoms/Coords
backbone_atoms
property
backbone_atoms: list[Atom]
Returns backbone Atom instances from the StructureBase
backbone_and_cb_atoms
property
backbone_and_cb_atoms: list[Atom]
Returns backbone and CB Atom instances from the StructureBase
side_chain_atoms
property
side_chain_atoms: list[Atom]
Returns side chain Atom instances from the StructureBase
center_of_mass
property
center_of_mass: ndarray
The center of mass for the Atom coordinates
radius
property
radius: float
The furthest point from the center of mass of the StructureBase
radius_of_gyration
property
radius_of_gyration: float
The measurement of the implied radius (Angstroms) affecting how the StructureBase diffuses through solution
Satisfies the equation
Rg = SQRT(SUM|i->N(Ri**2)/N)
Where: - Ri is the radius of the point i from the center of mass point - N is the total number of points
backbone_coords
property
backbone_coords: ndarray
Return a view of the Coords from the StructureBase with backbone atom coordinates
backbone_and_cb_coords
property
backbone_and_cb_coords: ndarray
Return a view of the Coords from the StructureBase with backbone and CB atom coordinates. Includes glycine CA
ca_coords
property
ca_coords: ndarray
Return a view of the Coords from the Structure with CA atom coordinates
cb_coords
property
cb_coords: ndarray
Return a view of the Coords from the Structure with CB atom coordinates
heavy_coords
property
heavy_coords: ndarray
Return a view of the Coords from the StructureBase with heavy atom coordinates
side_chain_coords
property
side_chain_coords: ndarray
Return a view of the Coords from the StructureBase with side chain atom coordinates
start_index
property
start_index: int
The first atomic index of the StructureBase
end_index
property
end_index: int
The last atomic index of the StructureBase
make_parent
make_parent()
Remove this instance from its parent, making it a parent in the process
Source code in symdesign/structure/base.py
1913 1914 1915 1916 1917 1918 |
|
get_base_containers
get_base_containers() -> dict[str, Any]
Access each of the constituent structure container attributes
Returns:
-
dict[str, Any]
–The instance structural containers as a dictionary with attribute as key and container as value
Source code in symdesign/structure/base.py
1920 1921 1922 1923 1924 1925 1926 |
|
neighboring_atom_indices
neighboring_atom_indices(distance: float = 8.0, **kwargs) -> list[int]
Returns the Atom instances in the Structure
Parameters:
-
distance
(float
, default:8.0
) –The distance to measure neighbors by
Returns:
-
list[int]
–The sorted atom_indices which are in contact with this instance, however, do not belong to the instance
Source code in symdesign/structure/base.py
2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 |
|
atom
atom(atom_number: int) -> Atom | None
Returns the Atom specified by atom number if a matching Atom is found, otherwise None
Source code in symdesign/structure/base.py
2142 2143 2144 2145 2146 2147 |
|
renumber_atoms
renumber_atoms(at: int = 1)
Renumber all Atom objects sequentially starting with 1
Parameters:
-
at
(int
, default:1
) –The number to start renumbering at
Source code in symdesign/structure/base.py
2207 2208 2209 2210 2211 2212 2213 2214 |
|
reset_indices
reset_indices()
Reset the indices attached to the instance
Source code in symdesign/structure/base.py
2226 2227 2228 2229 2230 2231 2232 |
|
format_header
format_header(**kwargs) -> str
Returns the base .pdb formatted header
Returns:
-
str
–The .pdb file header string
Source code in symdesign/structure/base.py
2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 |
|
get_atom_record
abstractmethod
get_atom_record(**kwargs) -> str
Provide the Structure Atom instances as a .pdb file string
Other Parameters:
-
chain_id
–str = None - The chain ID to use
-
atom_offset
–int = 0 - How much to offset the atom number by. Default returns one-indexed
Returns:
-
str
–The archived .pdb formatted ATOM records for the Structure
Source code in symdesign/structure/base.py
2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 |
|
write
write(out_path: bytes | str = os.getcwd(), file_handle: IO = None, header: str = None, **kwargs) -> AnyStr | None
Write Atom instances to a file specified by out_path or with a passed file_handle
If a file_handle is passed, no header information will be written. Arguments are mutually exclusive
Parameters:
-
out_path
(bytes | str
, default:getcwd()
) –The location where the Structure object should be written to disk
-
file_handle
(IO
, default:None
) –Used to write Structure details to an open FileObject
-
header
(str
, default:None
) –A string that is desired at the top of the file
Keyword Args chain_id: str = None - The chain ID to use atom_offset: int = 0 - How much to offset the atom index by. Default uses one-indexed atom numbers
Returns:
-
AnyStr | None
–The name of the written file if out_path is used
Source code in symdesign/structure/base.py
2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 |
|
get_atoms
get_atoms(numbers: Container = None, **kwargs) -> list[Atom]
Retrieves Atom instances. Returns all by default unless a list of numbers is specified
Parameters:
-
numbers
(Container
, default:None
) –The Atom numbers of interest
Returns:
-
list[Atom]
–The requested Atom objects
Source code in symdesign/structure/base.py
2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 |
|
set_atoms_attributes
set_atoms_attributes(**kwargs)
Set attributes specified by key, value pairs for Atoms in the Structure
Other Parameters:
-
numbers
–Container[int] = None - The Atom numbers of interest
-
pdb
–bool = False - Whether to search for numbers as they were parsed (if True)
Source code in symdesign/structure/base.py
2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 |
|
Residue
Residue(**kwargs)
Bases: ContainsAtoms
, ResidueFragment
Parameters:
-
**kwargs
–
Source code in symdesign/structure/base.py
2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 |
|
index
property
index
The Residue index in a Residues container
range
property
range: list[int]
The range of indices corresponding to the Residue atoms
type1
property
type1: str
Access the one character representation of the amino acid type
backbone_indices
property
writable
backbone_indices: list[int]
The indices that index the Residue backbone Atoms/Coords
backbone_and_cb_indices
property
writable
backbone_and_cb_indices: list[int]
The indices that index the Residue backbone and CB Atoms/Coords
ca_indices
property
ca_indices: list[int]
Return the index of the CA Atom as a list in the Residue Atoms/Coords
cb_indices
property
cb_indices: list[int]
Return the index of the CB Atom as a list in the Residue Atoms/Coords. Will return CA index if Glycine
side_chain_indices
property
writable
side_chain_indices: list[int]
The indices that index the Residue side chain Atoms/Coords
heavy_indices
property
writable
heavy_indices: list[int]
The indices that index the Residue heavy (non-hydrogen) Atoms/Coords
n_coords
property
n_coords: ndarray | None
Return the amide N Atom coordinate
n_atom_index
property
n_atom_index: int | None
Return the index of the amide N Atom in the Structure Atoms/Coords
n_index
property
n_index: int | None
Return the index of the amide N Atom in the Residue Atoms/Coords
h_coords
property
h_coords: ndarray | None
Return the amide H Atom coordinate
h_atom_index
property
h_atom_index: int | None
Return the index of the amide H Atom in the Structure Atoms/Coords
h_index
property
h_index: int | None
Return the index of the amide H Atom in the Residue Atoms/Coords
ca_coords
property
ca_coords: ndarray | None
Return the CA Atom coordinate
ca_atom_index
property
ca_atom_index: int | None
Return the index of the CA Atom in the Structure Atoms/Coords
ca_index
property
ca_index: int | None
Return the index of the CA Atom in the Residue Atoms/Coords
cb_coords
property
cb_coords: ndarray | None
Return the CB Atom coordinate
cb_atom_index
property
cb_atom_index: int | None
Return the index of the CB Atom in the Structure Atoms/Coords
cb_index
property
cb_index: int | None
Return the index of the CB Atom in the Residue Atoms/Coords
c_coords
property
c_coords: ndarray | None
Return the carbonyl C Atom coordinate
c_atom_index
property
c_atom_index: int | None
Return the index of the carbonyl C Atom in the Structure Atoms/Coords
c_index
property
c_index: int | None
Return the index of the carbonyl C Atom in the Residue Atoms/Coords
o_coords
property
o_coords: ndarray | None
Return the carbonyl O Atom coords
o_atom_index
property
o_atom_index: int | None
Return the index of the carbonyl C Atom in the Structure Atoms/Coords
o_index
property
o_index: int | None
Return the index of the carbonyl O Atom in the Residue Atoms/Coords
prev_residue
property
prev_residue: Residue | None
The previous Residue in the Structure if this Residue is part of a polymer
next_residue
property
next_residue: Residue | None
The next Residue in the Structure if this Residue is part of a polymer
local_density
property
writable
local_density: float
Describes how many heavy Atoms are within a distance (default = 12 Angstroms) of Residue heavy Atoms
secondary_structure
property
writable
secondary_structure: str
Return the secondary structure designation as defined by a secondary structure calculation
sasa
property
writable
sasa: float
Return the solvent accessible surface area as calculated by a solvent accessible surface area calculator
sasa_apolar
property
writable
sasa_apolar: float
Return apolar solvent accessible surface area as calculated by a solvent accessible surface area calculator
sasa_polar
property
writable
sasa_polar: float
Return polar solvent accessible surface area as calculated by a solvent accessible surface area calculator
relative_sasa
property
relative_sasa: float
The solvent accessible surface area relative to the standard surface accessibility of the Residue type
spatial_aggregation_propensity
property
writable
spatial_aggregation_propensity: float
The Residue contact order, which describes how far away each Residue makes contacts in the polymer chain
contact_order
property
writable
contact_order: float
The Residue contact order, which describes how far away each Residue makes contacts in the polymer chain
start_index
start_index(index: int)
Set Residue atom_indices starting with atom_indices[0] as start_index. Creates remainder incrementally and updates individual Atom instance .index accordingly
Source code in symdesign/structure/base.py
2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 |
|
delegate_atoms
delegate_atoms()
Set the Residue atoms from a parent StructureBase
Source code in symdesign/structure/base.py
2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 |
|
contains_hydrogen
contains_hydrogen() -> bool
Returns whether the Residue contains hydrogen atoms
Source code in symdesign/structure/base.py
2626 2627 2628 |
|
is_n_termini
is_n_termini() -> bool
Returns whether the Residue is the n-termini of the parent Structure
Source code in symdesign/structure/base.py
2863 2864 2865 |
|
is_c_termini
is_c_termini() -> bool
Returns whether the Residue is the c-termini of the parent Structure
Source code in symdesign/structure/base.py
2875 2876 2877 |
|
get_upstream
get_upstream(number: int = None) -> list[Residue]
Get the Residues upstream of (n-terminal to) the current Residue
Parameters:
-
number
(int
, default:None
) –The number of residues to retrieve. If not provided gets all
Returns:
-
list[Residue]
–The Residue instances in n- to c-terminal order
Source code in symdesign/structure/base.py
2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 |
|
get_downstream
get_downstream(number: int = None) -> list[Residue]
Get the Residues downstream of (c-terminal to) the current Residue
Parameters:
-
number
(int
, default:None
) –The number of residues to retrieve. If not provided gets all
Returns:
-
list[Residue]
–The Residue instances in n- to c-terminal order
Source code in symdesign/structure/base.py
2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 |
|
get_neighbors
get_neighbors(distance: float = 8.0, **kwargs) -> list[Residue]
If this Residue instance is part of a polymer, find neighboring Residue instances defined by a distance
Parameters:
-
distance
(float
, default:8.0
) –The distance to measure neighbors by
Returns:
-
list[Residue]
–The Residue instances that are within the distance to this Residue
Source code in symdesign/structure/base.py
2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 |
|
mutation_possibilities_from_directive
mutation_possibilities_from_directive(directive: directives = None, background: set[str] = None, special: bool = False, **kwargs) -> set[protein_letters3_alph1_literal] | set
Select mutational possibilities for each Residue based on the Residue and a directive
Parameters:
-
directive
(directives
, default:None
) –Where the choice is one of 'special', 'same', 'different', 'charged', 'polar', 'apolar', 'hydrophobic', 'aromatic', 'hbonding', 'branched'
-
background
(set[str]
, default:None
) –The background amino acids to compare possibilities against
-
special
(bool
, default:False
) –Whether to include special residues
Returns:
-
set[protein_letters3_alph1_literal] | set
–The possible amino acid types available given the mutational directive
Source code in symdesign/structure/base.py
3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 |
|
distance
distance(other: Residue, dtype: str = 'ca') -> float
Return the distance from this Residue to another specified by atom type "dtype"
Parameters:
-
other
(Residue
) –The other Residue to measure against
-
dtype
(str
, default:'ca'
) –The Atom type to perform the measurement with
Returns:
-
float
–The Euclidean distance between the specified Atom type
Source code in symdesign/structure/base.py
3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 |
|
get_atom_record
get_atom_record(chain_id: str = None, atom_offset: int = 0, **kwargs) -> str
Provide the Structure Atoms as a PDB file string
Parameters:
-
chain_id
(str
, default:None
) –The chain ID to use
-
atom_offset
(int
, default:0
) –How much to offset the atom number by. Default returns one-indexed
Returns:
-
str
–The archived .pdb formatted ATOM records for the Structure
Source code in symdesign/structure/base.py
3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 |
|
__str__
__str__(chain_id: str = None, atom_offset: int = 0, **kwargs) -> str
Format the Residue into the contained Atoms. The Atom number is truncated at 5 digits for PDB compliant formatting
Parameters:
-
chain_id
(str
, default:None
) –The chain ID to use
-
atom_offset
(int
, default:0
) –How much to offset the atom number by. Default returns one-indexed
Returns:
-
str
–The archived .pdb formatted ATOM records for the Residue
Source code in symdesign/structure/base.py
3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 |
|
Residues
Residues(structs: Sequence[StructureBase] | ndarray = None)
Bases: StructureBaseContainer
Parameters:
-
structs
(Sequence[StructureBase] | ndarray
, default:None
) –The StructureBase instances to store. Should be a homogeneous Sequence
Source code in symdesign/structure/base.py
1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 |
|
reindex
reindex(start_at: int = 0)
Index the Residue instances and their corresponding Atom/Coords indices according to their position
Parameters:
-
start_at
(int
, default:0
) –The index to start reindexing at. Must be [0, 'inf']
Source code in symdesign/structure/base.py
3287 3288 3289 3290 3291 3292 3293 3294 |
|
set_index
set_index(start_at: int = 0)
Index the Residue instances according to their position in the Residues container
Parameters:
-
start_at
(int
, default:0
) –The Residue index to start reindexing at
Source code in symdesign/structure/base.py
3296 3297 3298 3299 3300 3301 3302 3303 |
|
reindex_atoms
reindex_atoms(start_at: int = 0)
Index the Residue instances Atoms/Coords indices according to incremental Atoms/Coords index. Responsible for updating member Atom.index attributes as well
Parameters:
-
start_at
(int
, default:0
) –The index to start reindexing at. Must be [0, 'inf']
Source code in symdesign/structure/base.py
3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 |
|
StructureIndexMixin
Bases: ABC
is_parent
abstractmethod
is_parent() -> bool
Source code in symdesign/structure/base.py
3355 3356 3357 |
|
ContainsResidues
ContainsResidues(structure: ContainsResidues = None, residues: list[Residue] | Residues = None, residue_indices: list[int] = None, pose_format: bool = False, fragment_db: FragmentDatabase = None, **kwargs)
Bases: ContainsAtoms
, StructureIndexMixin
Structure object handles Atom/Residue/Coords manipulation of all Structure containers. Must pass parent and residue_indices, atoms and coords, or residues to initialize
Polymer/Chain designation. This designation essentially means it contains Residue instances in a Residues object
Parameters:
-
structure
(ContainsResidues
, default:None
) –Create the instance based on an existing Structure instance
-
residues
(list[Residue] | Residues
, default:None
) –The Residue instances which should constitute a new Structure instance
-
residue_indices
(list[int]
, default:None
) –The indices which specify the particular Residue instances to make this Structure instance. Used with a parent to specify a subdivision of a larger Structure
-
pose_format
(bool
, default:False
) –Whether to initialize with continuous Residue numbering from 1 to N
Other Parameters:
-
atoms
–list[Atom] | Atoms = None - The Atom instances which should constitute a new Structure instance
-
parent
–StructureBase = None - If another Structure object created this Structure instance, pass the 'parent' instance. Will take ownership over Structure containers (coords, atoms, residues) for dependent Structures
-
log
–Log | Logger | bool = True - The Log or Logger instance, or the name for the logger to handle parent Structure logging. None or False prevents logging while any True assignment enables it
-
coords
–Coords | np.ndarray | list[list[float]] = None - When setting up a parent Structure instance, the coordinates of that Structure
-
name
–str = None - The identifier for the Structure instance
Source code in symdesign/structure/base.py
3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 |
|
ss_sequence_indices
instance-attribute
ss_sequence_indices: list[int] = []
Index which indicates the Residue membership to the secondary structure type element sequence
ss_type_sequence
instance-attribute
ss_type_sequence: list[str] = []
The ordered secondary structure type sequence which contains one character/secondary structure element
fragment_db
property
writable
fragment_db: FragmentDatabase
The FragmentDatabase used to create Fragment instances
sequence
property
writable
sequence: str
Holds the Structure amino acid sequence
residue_indices
property
residue_indices: list[int] | None
Return the residue indices which belong to the Structure
alphafold_atom_mask
property
alphafold_atom_mask: ndarray
Return an Alphafold mask describing which Atom positions have Coord data
alphafold_coords
property
alphafold_coords: ndarray
Return a view of the Coords from the StructureBase in Alphafold coordinate format
coords_indexed_residues
property
coords_indexed_residues: list[Residue]
Returns the Residue associated with each Coord in the Structure
Returns:
-
list[Residue]
–Each Residue which owns the corresponding index in the .atoms/.coords attribute
backbone_coords_indexed_residues
property
backbone_coords_indexed_residues: list[Residue]
Returns the Residue associated with each backbone Atom/Coord in the Structure
Returns:
-
list[Residue]
–Each Residue which owns the corresponding index in the .atoms/.coords attribute
backbone_and_cb_coords_indexed_residues
property
backbone_and_cb_coords_indexed_residues: list[Residue]
Returns the Residue associated with each backbone and CB Atom/Coord in the Structure
Returns:
-
list[Residue]
–Each Residue which owns the corresponding index in the .atoms/.coords attribute
heavy_coords_indexed_residues
property
heavy_coords_indexed_residues: list[Residue]
Returns the Residue associated with each heavy Atom/Coord in the Structure
Returns:
-
list[Residue]
–Each Residue which owns the corresponding index in the .atoms/.coords attribute
side_chain_coords_indexed_residues
property
side_chain_coords_indexed_residues: list[Residue]
Returns the Residue associated with each side chain Atom/Coord in the Structure
Returns:
-
list[Residue]
–Each Residue which owns the corresponding index in the .atoms/.coords attribute
number_of_residues
property
number_of_residues: int
Access the number of Residues in the Structure
backbone_indices
property
backbone_indices: list[int]
The indices that index the Structure backbone Atoms/Coords
backbone_and_cb_indices
property
backbone_and_cb_indices: list[int]
The indices that index the Structure backbone and CB Atoms. Inherently gets CA of Residue instances missing CB
cb_indices
property
cb_indices: list[int]
The indices that index the Structure CB Atoms. Inherently gets CA of Residue instances missing CB
ca_indices
property
ca_indices: list[int]
The indices that index the Structure CA Atoms/Coords
heavy_indices
property
heavy_indices: list[int]
The indices that index the Structure heavy Atoms/Coords
side_chain_indices
property
side_chain_indices: list[int]
The indices that index the Structure side chain Atoms/Coords
helix_cb_indices
property
helix_cb_indices: list[int]
The indices that index the Structure helical CB Atoms/Coords
relative_sasa
property
relative_sasa: list[float]
Return a per-residue array of the relative solvent accessible area for the Structure
sasa_apolar
property
sasa_apolar: list[float]
Return a per-residue array of the polar (hydrophilic) solvent accessible area for the Structure
sasa_polar
property
sasa_polar: list[float]
Return a per-residue array of the apolar (hydrophobic) solvent accessible area for the Structure
surface_residues
property
surface_residues: list[Residue]
Get the Residue instances that reside on the surface of the molecule
Parameters:
-
relative_sasa_thresh
–The relative area threshold that the Residue should have before it is considered 'surface'. Default cutoff is based on Levy, E. 2010
Other Parameters:
-
atom
–bool = True - Whether the output should be generated for each atom. If False, will be generated for each Residue
-
probe_radius
–float = 1.4 - The radius which surface area should be generated
Returns:
-
list[Residue]
–The surface Residue instances
interior_residues
property
interior_residues: list[Residue]
Get the Residue instances that reside in the interior of the molecule
Parameters:
-
relative_sasa_thresh
–The relative area threshold that the Residue should fall below before it is considered 'interior'. Default cutoff is based on Levy, E. 2010
Other Parameters:
-
atom
–bool = True - Whether the output should be generated for each atom. If False, will be generated for each Residue
-
probe_radius
–float = 1.4 - The radius which surface area should be generated
Returns:
-
list[Residue]
–The interior Residue instances
secondary_structure
property
writable
secondary_structure: str
The Structure secondary structure assignment as provided by the DEFAULT_SS_PROGRAM
spatial_aggregation_propensity
property
spatial_aggregation_propensity: ndarray
Return the spatial aggregation propensity on a per-residue basis
Returns:
-
ndarray
–The array of floats representing the spatial aggregation propensity for each Residue in the Structure
contact_order
property
writable
contact_order: ndarray
Return the contact order on a per-Residue basis
Returns:
-
ndarray
–The array of floats representing the contact order for each Residue in the Structure
from_residues
classmethod
Initialize from existing Residue instances
Source code in symdesign/structure/base.py
3493 3494 3495 3496 |
|
from_structure
classmethod
from_structure(structure: ContainsResidues, **kwargs)
Initialize from an existing Structure
Source code in symdesign/structure/base.py
3498 3499 3500 3501 |
|
assign_residues_from_structures
assign_residues_from_structures(structures: Iterable[ContainsResidues])
Initialize the instance from existing structure instance attributes, .coords, and .atoms, and .residues
Source code in symdesign/structure/base.py
3579 3580 3581 3582 3583 3584 3585 3586 3587 |
|
make_parent
make_parent()
Remove this instance from its parent, making it a parent in the process
Source code in symdesign/structure/base.py
3596 3597 3598 3599 3600 3601 |
|
get_base_containers
get_base_containers() -> dict[str, Any]
Returns the instance structural containers as a dictionary with attribute as key and container as value
Source code in symdesign/structure/base.py
3603 3604 3605 |
|
contains_hydrogen
contains_hydrogen() -> bool
Returns whether the Structure contains hydrogen atoms
Source code in symdesign/structure/base.py
3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 |
|
get_coords_subset
get_coords_subset(residue_numbers: Container[int] = None, indices: Iterable[int] = None, start: int = None, end: int = None, dtype: coords_type_literal = 'ca') -> ndarray
Return a view of a subset of the Coords from the Structure specified by a range of Residue numbers
Parameters:
-
residue_numbers
(Container[int]
, default:None
) –The Residue numbers to return
-
indices
(Iterable[int]
, default:None
) –Residue indices of interest
-
start
(int
, default:None
) –The Residue number to start at. Inclusive
-
end
(int
, default:None
) –The Residue number to end at. Inclusive
-
dtype
(coords_type_literal
, default:'ca'
) –The type of coordinates to get
Returns:
-
ndarray
–The specific coordinates from the Residue instances with the specified dtype
Source code in symdesign/structure/base.py
3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 |
|
set_residues_attributes
set_residues_attributes(**kwargs)
Set attributes specified by key, value pairs for Residues in the Structure
Other Parameters:
-
numbers
–Container[int] = None - The Atom numbers of interest
-
pdb
–bool = False - Whether to search for numbers as they were parsed (if True)
Source code in symdesign/structure/base.py
3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 |
|
get_residue_atom_indices
get_residue_atom_indices(**kwargs) -> list[int]
Returns Atom indices for Residue instances. Returns all by default unless numbers are specified, returns only those Residue instance selected by number.
Other Parameters:
-
numbers
–Container[int] = None - The Residue numbers of interest
Source code in symdesign/structure/base.py
3912 3913 3914 3915 3916 3917 3918 3919 3920 3921 3922 |
|
get_residues_by_atom_indices
get_residues_by_atom_indices(atom_indices: ArrayIndexer) -> list[Residue]
Retrieve Residues in the Structure specified by Atom indices
Parameters:
-
atom_indices
(ArrayIndexer
) –The atom indices to retrieve Residue objects by
Returns:
-
list[Residue]
–The sorted, unique Residue instances corresponding to the provided atom_indices
Source code in symdesign/structure/base.py
3924 3925 3926 3927 3928 3929 3930 3931 3932 3933 3934 3935 3936 3937 3938 3939 |
|
renumber
renumber()
Change the Atom and Residue numbering. Access the readtime Residue number in Residue.pdb_number attribute
Source code in symdesign/structure/base.py
4019 4020 4021 4022 |
|
pose_numbering
pose_numbering()
Change the Residue numbering to start at 1. Access the readtime Residue number in .pdb_number attribute
Source code in symdesign/structure/base.py
4024 4025 4026 4027 4028 |
|
renumber_residues
renumber_residues(index: int = 0, at: int = 1)
Renumber Residue objects sequentially starting with "at"
Parameters:
-
index
(int
, default:0
) –The index to start the renumbering process
-
at
(int
, default:1
) –The number to start renumbering at
Source code in symdesign/structure/base.py
4030 4031 4032 4033 4034 4035 4036 4037 4038 |
|
get_residues
get_residues(numbers: Container[int] = None, indices: Iterable[int] = None, **kwargs) -> list[Residue]
Returns Residue instances as specified. Returns all by default
Parameters:
-
numbers
(Container[int]
, default:None
) –Residue numbers of interest
-
indices
(Iterable[int]
, default:None
) –Residue indices of interest for the Structure
Returns:
-
list[Residue]
–The requested Residue instances, sorted in the order they appear in the Structure
Source code in symdesign/structure/base.py
4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 |
|
residue
residue(residue_number: int) -> Residue | None
Retrieve the specified Residue
Parameters:
-
residue_number
(int
) –The number of the Residue to search for
Source code in symdesign/structure/base.py
4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 |
|
add_ideal_helix
add_ideal_helix(termini: termini_literal = 'n', length: int = 5, alignment_length: int = 5)
Add an ideal helix to a termini given by a certain length
Parameters:
-
termini
(termini_literal
, default:'n'
) –The termini to add the ideal helix to
-
length
(int
, default:5
) –The length of the addition, where viable values are [1-10] residues additions
-
alignment_length
(int
, default:5
) –The number of residues used to calculation overlap of the target to the ideal helix
Source code in symdesign/structure/base.py
4198 4199 4200 4201 4202 4203 4204 4205 4206 4207 4208 4209 4210 4211 4212 4213 4214 4215 4216 4217 4218 4219 4220 4221 4222 4223 4224 4225 4226 4227 4228 4229 4230 4231 4232 4233 4234 4235 4236 4237 4238 4239 4240 4241 4242 4243 4244 4245 4246 4247 4248 4249 4250 4251 4252 4253 4254 4255 4256 4257 4258 4259 4260 4261 4262 4263 4264 |
|
get_residue_atoms
get_residue_atoms(**kwargs) -> list[Atom]
Return the Atoms contained in the Residue objects matching a set of residue numbers
Other Parameters:
-
numbers
–Container[int] = None – Residue numbers of interest
-
indices
–Iterable[int] = None – Residue indices of interest for the Structure
Returns:
-
list[Atom]
–The Atom instances belonging to the Residue instances
Source code in symdesign/structure/base.py
4266 4267 4268 4269 4270 4271 4272 4273 4274 4275 4276 4277 4278 4279 |
|
mutate_residue
mutate_residue(residue: Residue = None, index: int = None, number: int = None, to: str = 'A', **kwargs) -> list[int] | list
Mutate a specific Residue to a new residue type. Type can be 1 or 3 letter format
Parameters:
-
residue
(Residue
, default:None
) –A Residue instance to mutate
-
index
(int
, default:None
) –A Residue index to select the Residue instance of interest
-
number
(int
, default:None
) –A Residue number to select the Residue instance of interest
-
to
(str
, default:'A'
) –The type of amino acid to mutate to
Returns:
-
list[int] | list
–The indices of the Atoms being removed from the Structure
Source code in symdesign/structure/base.py
4281 4282 4283 4284 4285 4286 4287 4288 4289 4290 4291 4292 4293 4294 4295 4296 4297 4298 4299 4300 4301 4302 4303 4304 4305 4306 4307 4308 4309 4310 4311 4312 4313 4314 4315 4316 4317 4318 4319 4320 4321 4322 4323 4324 4325 4326 4327 4328 4329 4330 4331 4332 4333 4334 4335 4336 4337 4338 4339 4340 4341 4342 4343 4344 4345 4346 4347 4348 4349 4350 4351 4352 4353 4354 4355 4356 4357 |
|
delete_residues
delete_residues(residues: Iterable[Residue] = None, indices: Iterable[int] = None, numbers: Container[int] = None, **kwargs) -> list[Residue] | list
Deletes Residue instances from the Structure
Parameters:
-
residues
(Iterable[Residue]
, default:None
) –Residue instances to delete
-
indices
(Iterable[int]
, default:None
) –Residue indices to select the Residue instances of interest
-
numbers
(Container[int]
, default:None
) –Residue numbers to select the Residue instances of interest
Returns:
-
list[Residue] | list
–Each deleted Residue
Source code in symdesign/structure/base.py
4359 4360 4361 4362 4363 4364 4365 4366 4367 4368 4369 4370 4371 4372 4373 4374 4375 4376 4377 4378 4379 4380 4381 4382 4383 4384 4385 4386 4387 4388 4389 4390 4391 4392 4393 4394 4395 4396 4397 4398 4399 4400 4401 4402 4403 4404 4405 4406 4407 4408 4409 4410 4411 4412 4413 4414 4415 4416 4417 |
|
insert_residue_type
insert_residue_type(index: int, residue_type: str, chain_id: str = None) -> Residue
Insert a standard Residue type into the Structure at the origin. No structural alignment is performed!
Parameters:
-
index
(int
) –The residue index where a new Residue should be inserted into the Structure
-
residue_type
(str
) –Either the 1 or 3 letter amino acid code for the residue in question
-
chain_id
(str
, default:None
) –The chain identifier to associate the new Residue with
Returns:
-
Residue
–The newly inserted Residue object
Source code in symdesign/structure/base.py
4419 4420 4421 4422 4423 4424 4425 4426 4427 4428 4429 4430 4431 4432 4433 4434 4435 4436 4437 4438 4439 4440 4441 4442 4443 4444 4445 4446 4447 4448 4449 4450 4451 4452 4453 4454 4455 4456 4457 4458 4459 4460 4461 4462 4463 4464 4465 4466 4467 4468 4469 4470 4471 4472 4473 4474 4475 4476 4477 4478 4479 4480 4481 4482 4483 4484 4485 4486 4487 4488 4489 4490 4491 4492 4493 4494 4495 4496 4497 4498 4499 4500 4501 4502 4503 4504 4505 4506 4507 4508 4509 4510 4511 4512 4513 4514 4515 4516 4517 4518 4519 4520 4521 4522 4523 4524 4525 4526 4527 4528 4529 4530 4531 4532 4533 4534 4535 4536 4537 4538 4539 4540 4541 4542 4543 4544 |
|
insert_residues
Insert Residue instances into the Structure at the origin. No structural alignment is performed!
Parameters:
-
index
(int
) –The index to perform the insertion at
-
new_residues
(Iterable[Residue]
) –The Residue instances to insert
-
chain_id
(str
, default:None
) –The chain identifier to associate the new Residue instances with
Returns:
-
list[Residue]
–The inserted Residue instances
Source code in symdesign/structure/base.py
4546 4547 4548 4549 4550 4551 4552 4553 4554 4555 4556 4557 4558 4559 4560 4561 4562 4563 4564 4565 4566 4567 4568 4569 4570 4571 4572 4573 4574 4575 4576 4577 4578 4579 4580 4581 4582 4583 4584 4585 4586 4587 4588 4589 4590 4591 4592 4593 4594 4595 4596 4597 4598 4599 4600 4601 4602 4603 4604 4605 4606 4607 4608 4609 4610 4611 4612 4613 4614 4615 4616 4617 4618 4619 4620 4621 4622 4623 4624 4625 4626 4627 4628 4629 4630 4631 4632 4633 4634 4635 4636 4637 4638 4639 4640 4641 4642 4643 4644 4645 4646 4647 4648 4649 4650 4651 4652 4653 4654 4655 4656 4657 4658 4659 4660 4661 4662 4663 4664 4665 4666 |
|
delete_termini
delete_termini(how: str = 'unstructured', termini: termini_literal = None)
Remove Residue instances from the Structure termini that are not helices
Uses the default secondary structure prediction program's SS_HELIX_IDENTIFIERS (typically 'H') to search for non-conforming secondary structure
Parameters:
-
how
(str
, default:'unstructured'
) –How should termini be trimmed? Either 'unstructured' (default) or 'to_helices' can be used. If 'unstructured', will use 'SS_DISORDER_IDENTIFIERS' (typically coil) to detect disorder. Function will then remove any disordered segments, as well as turns ('T') that exist between disordered segments If 'to_helices', will use 'SS_HELIX_IDENTIFIERS' (typically 'H') to remove any non-conforming secondary structure elements until a helix is reached
-
termini
(termini_literal
, default:None
) –If a specific termini should be targeted, which one?
Source code in symdesign/structure/base.py
4668 4669 4670 4671 4672 4673 4674 4675 4676 4677 4678 4679 4680 4681 4682 4683 4684 4685 4686 4687 4688 4689 4690 4691 4692 4693 4694 4695 4696 4697 4698 4699 4700 4701 4702 4703 4704 4705 4706 4707 4708 4709 4710 4711 4712 4713 4714 4715 4716 4717 4718 4719 4720 4721 4722 4723 4724 4725 4726 4727 4728 4729 4730 4731 4732 4733 4734 4735 4736 4737 4738 4739 4740 4741 4742 4743 4744 4745 4746 4747 4748 4749 4750 4751 4752 |
|
local_density
local_density(residues: list[Residue] = None, residue_numbers: list[int] = None, distance: float = 12.0) -> list[float]
Return the number of Atoms within 'distance' Angstroms of each Atom in the requested Residues
Parameters:
-
residues
(list[Residue]
, default:None
) –The Residues to include in the calculation
-
residue_numbers
(list[int]
, default:None
) –The numbers of the Residues to include in the calculation
-
distance
(float
, default:12.0
) –The cutoff distance with which Atoms should be included in local density
Returns:
-
list[float]
–An array like containing the local density around each requested Residue
Source code in symdesign/structure/base.py
4754 4755 4756 4757 4758 4759 4760 4761 4762 4763 4764 4765 4766 4767 4768 4769 4770 4771 4772 4773 4774 4775 4776 4777 4778 4779 4780 4781 4782 4783 4784 4785 4786 4787 4788 4789 4790 4791 4792 4793 4794 4795 4796 4797 4798 4799 4800 4801 |
|
is_clash
is_clash(measure: coords_type_literal = stutils.default_clash_criteria, distance: float = stutils.default_clash_distance, warn: bool = False, silence_exceptions: bool = False, report_hydrogen: bool = False) -> bool
Check if the Structure contains any self clashes. If clashes occur with the Backbone, return True. Reports the Residue where the clash occurred and the clashing Atoms
Parameters:
-
measure
(coords_type_literal
, default:default_clash_criteria
) –The atom type to measure clashing by
-
distance
(float
, default:default_clash_distance
) –The distance which clashes should be checked
-
warn
(bool
, default:False
) –Whether to emit warnings about identified clashes. Output grouped into measure vs non-measure
-
silence_exceptions
(bool
, default:False
) –Whether to silence the raised ClashError and Return True instead
-
report_hydrogen
(bool
, default:False
) –Whether to report clashing hydrogen atoms
Returns:
-
bool
–True if the Structure clashes, False if not
Source code in symdesign/structure/base.py
4803 4804 4805 4806 4807 4808 4809 4810 4811 4812 4813 4814 4815 4816 4817 4818 4819 4820 4821 4822 4823 4824 4825 4826 4827 4828 4829 4830 4831 4832 4833 4834 4835 4836 4837 4838 4839 4840 4841 4842 4843 4844 4845 4846 4847 4848 4849 4850 4851 4852 4853 4854 4855 4856 4857 4858 4859 4860 4861 4862 4863 4864 4865 4866 4867 4868 4869 4870 4871 4872 4873 4874 4875 4876 4877 4878 4879 4880 4881 4882 4883 4884 4885 4886 4887 4888 4889 4890 4891 4892 4893 4894 4895 4896 4897 4898 4899 4900 4901 4902 4903 4904 4905 4906 4907 4908 4909 4910 4911 4912 4913 4914 4915 4916 4917 4918 4919 4920 4921 4922 4923 4924 4925 4926 4927 4928 4929 4930 4931 4932 4933 4934 4935 4936 4937 4938 4939 4940 4941 4942 4943 4944 |
|
get_sasa
get_sasa(probe_radius: float = 1.4, atom: bool = True, **kwargs)
Use FreeSASA to calculate the surface area of residues in the Structure object.
Parameters:
-
probe_radius
(float
, default:1.4
) –The radius which surface area should be generated
-
atom
(bool
, default:True
) –Whether the output should be generated for each atom. If False, will be generated for each Residue
Sets
self.sasa, self.residue(s).sasa
Source code in symdesign/structure/base.py
4946 4947 4948 4949 4950 4951 4952 4953 4954 4955 4956 4957 4958 4959 4960 4961 4962 4963 4964 4965 4966 4967 4968 4969 4970 4971 4972 4973 4974 4975 4976 4977 4978 4979 4980 4981 4982 4983 4984 4985 4986 4987 4988 4989 4990 4991 4992 4993 4994 4995 4996 4997 4998 4999 5000 5001 5002 5003 5004 5005 5006 5007 5008 5009 5010 5011 5012 5013 5014 5015 5016 5017 5018 5019 5020 5021 5022 5023 5024 5025 5026 5027 5028 5029 5030 5031 5032 5033 |
|
get_surface_area_residues
get_surface_area_residues(residues: list[Residue] = None, dtype: sasa_types_literal = 'polar', **kwargs) -> float
Get the surface area for specified residues
Parameters:
-
residues
(list[Residue]
, default:None
) –The Residues to sum. If not provided, will be retrieved by
.get_residues()
-
dtype
(sasa_types_literal
, default:'polar'
) –The type of area classification to query.
Other Parameters:
-
atom
–bool = True - Whether the output should be generated for each atom. If False, will be generated for each Residue
-
probe_radius
–float = 1.4 - The radius which surface area should be generated
-
numbers
–Container[int] = None – Residue numbers of interest
-
indices
–Iterable[int] = None – Residue indices of interest for the Structure
Returns:
-
float
–Angstrom^2 of surface area
Source code in symdesign/structure/base.py
5092 5093 5094 5095 5096 5097 5098 5099 5100 5101 5102 5103 5104 5105 5106 5107 5108 5109 5110 5111 5112 5113 5114 5115 5116 5117 5118 5119 5120 5121 5122 5123 |
|
errat
errat(out_path: AnyStr = os.getcwd()) -> tuple[float, ndarray]
Find the overall and per residue Errat accuracy for the given Structure
Parameters:
-
out_path
(AnyStr
, default:getcwd()
) –The path where Errat files should be written
Returns:
-
tuple[float, ndarray]
–Overall Errat score, Errat value/residue array
Source code in symdesign/structure/base.py
5125 5126 5127 5128 5129 5130 5131 5132 5133 5134 5135 5136 5137 5138 5139 5140 5141 5142 5143 5144 5145 5146 5147 5148 5149 5150 5151 5152 5153 5154 5155 5156 5157 5158 5159 5160 5161 5162 5163 5164 5165 5166 5167 5168 5169 5170 5171 5172 5173 5174 5175 |
|
stride
stride(to_file: AnyStr = None, **kwargs)
Calculates the secondary structure using the program Stride
Args to_file: The location of a file to save the Stride output
Sets
Each contained Residue instance .secondary_structure
attribute
Source code in symdesign/structure/base.py
5177 5178 5179 5180 5181 5182 5183 5184 5185 5186 5187 5188 5189 5190 5191 5192 5193 5194 5195 5196 5197 5198 5199 5200 5201 5202 5203 5204 5205 5206 5207 5208 5209 5210 5211 5212 5213 5214 5215 5216 5217 5218 5219 5220 5221 5222 5223 5224 5225 5226 5227 5228 5229 5230 5231 5232 5233 5234 5235 5236 5237 5238 5239 5240 5241 5242 5243 5244 5245 5246 5247 5248 5249 5250 5251 5252 5253 5254 |
|
is_termini_helical
is_termini_helical(termini: termini_literal = 'n', window: int = 5) -> bool
Using assigned secondary structure, probe for helical termini using a segment of 'window' residues. Will remove any disordered residues from the specified termini before checking, with the assumption that the disordered terminal residues are not integral to the structure
Parameters:
-
termini
(termini_literal
, default:'n'
) –Either 'n' or 'c' should be specified
-
window
(int
, default:5
) –The segment size to search
Returns:
-
bool
–True if the specified terminus has a stretch of helical residues the length of the window
Source code in symdesign/structure/base.py
5256 5257 5258 5259 5260 5261 5262 5263 5264 5265 5266 5267 5268 5269 5270 5271 5272 5273 5274 5275 5276 5277 5278 5279 5280 5281 |
|
calculate_secondary_structure
calculate_secondary_structure(**kwargs)
Perform the secondary structure calculation for the Structure using the DEFAULT_SS_PROGRAM
Other Parameters:
-
to_file
–AnyStr = None - The location of a file to save secondary structure calculations
Source code in symdesign/structure/base.py
5283 5284 5285 5286 5287 5288 5289 |
|
termini_proximity_from_reference
termini_proximity_from_reference(termini: termini_literal = 'n', reference: ndarray = utils.symmetry.origin, **kwargs) -> float
Finds the orientation of the termini from the origin (default) or from a reference point
Parameters:
-
termini
(termini_literal
, default:'n'
) –Either 'n' or 'c' should be specified
-
reference
(ndarray
, default:origin
) –The reference where the point should be measured from
Returns:
-
float
–When compared to the reference, 1 if the termini is more than halfway from the center of the Structure and -1 if the termini is less than halfway from the center of the Structure
Source code in symdesign/structure/base.py
5315 5316 5317 5318 5319 5320 5321 5322 5323 5324 5325 5326 5327 5328 5329 5330 5331 5332 5333 5334 5335 5336 5337 5338 5339 5340 5341 5342 5343 5344 |
|
get_atom_record
get_atom_record(**kwargs) -> str
Provides the Structure as a 'PDB' formatted string of Atom records
Other Parameters:
-
chain_id
–str = None - The chain ID to use
-
atom_offset
–int = 0 - How much to offset the atom number by. Default returns one-indexed
Returns:
-
str
–The archived .pdb formatted ATOM records for the Structure
Source code in symdesign/structure/base.py
5346 5347 5348 5349 5350 5351 5352 5353 5354 5355 5356 |
|
get_fragments
get_fragments(residues: list[Residue] = None, residue_numbers: list[int] = None, fragment_db: FragmentDatabase = None, **kwargs) -> list[MonoFragment]
From the Structure, find Residues with a matching fragment type as identified in a fragment library
Parameters:
-
residues
(list[Residue]
, default:None
) –The specific Residues to search for
-
residue_numbers
(list[int]
, default:None
) –The specific residue numbers to search for
-
fragment_db
(FragmentDatabase
, default:None
) –The FragmentDatabase with representative fragment types to query against
Returns:
-
list[MonoFragment]
–The MonoFragments found on the Structure
Source code in symdesign/structure/base.py
5358 5359 5360 5361 5362 5363 5364 5365 5366 5367 5368 5369 5370 5371 5372 5373 5374 5375 5376 5377 5378 5379 5380 5381 5382 5383 5384 5385 5386 5387 5388 5389 5390 5391 5392 5393 5394 5395 5396 5397 |
|
get_fragment_residues
get_fragment_residues(residues: list[Residue] = None, residue_numbers: list[int] = None, fragment_db: FragmentDatabase = None, rmsd_thresh: float = fragment.Fragment.rmsd_thresh, **kwargs) -> list | list[Residue]
Assigns a Fragment type to Residue instances identified from a FragmentDatabase, and returns them
Parameters:
-
residues
(list[Residue]
, default:None
) –The specific Residues to search for
-
residue_numbers
(list[int]
, default:None
) –The specific residue numbers to search for
-
fragment_db
(FragmentDatabase
, default:None
) –The FragmentDatabase with representative fragment types to query the Residue against
-
rmsd_thresh
(float
, default:rmsd_thresh
) –The threshold for which a rmsd should fail to produce a fragment match
Sets
Each Fragment Residue instance self.guide_coords, self.i_type
Returns:
-
list | list[Residue]
–The Residue instances that match Fragment representatives from the Structure
Source code in symdesign/structure/base.py
5400 5401 5402 5403 5404 5405 5406 5407 5408 5409 5410 5411 5412 5413 5414 5415 5416 5417 5418 5419 5420 5421 5422 5423 5424 5425 5426 5427 5428 5429 5430 5431 5432 5433 5434 5435 5436 5437 5438 5439 5440 5441 5442 5443 5444 5445 5446 5447 5448 5449 5450 5451 5452 5453 5454 5455 5456 5457 5458 5459 5460 5461 5462 5463 5464 5465 5466 5467 5468 |
|
find_fragments
find_fragments(fragment_db: FragmentDatabase = None, **kwargs) -> list[tuple[GhostFragment, Fragment, float]]
Search Residue instances to find Fragment instances that are neighbors, returning all Fragment pairs. By default, returns all Residue instances neighboring FragmentResidue instances
Parameters:
-
fragment_db
(FragmentDatabase
, default:None
) –The FragmentDatabase with representative fragment types to query the Residue against
Other Parameters:
-
residues
–list[Residue] = None - The specific Residues to search for
-
residue_numbers
–list[int] = None - The specific residue numbers to search for
-
rmsd_thresh
–float = fragment.Fragment.rmsd_thresh - The threshold for which a rmsd should fail to produce a fragment match
-
distance
–float = 8.0 - The distance to query for neighboring fragments
-
min_match_value
–float = 2 - The minimum value which constitutes an acceptable fragment z_score
-
clash_coords
–np.ndarray = None – The coordinates to use for checking for GhostFragment clashes
Returns:
-
list[tuple[GhostFragment, Fragment, float]]
–The GhostFragment, Fragment pairs, along with their match score
Source code in symdesign/structure/base.py
5470 5471 5472 5473 5474 5475 5476 5477 5478 5479 5480 5481 5482 5483 5484 5485 5486 5487 5488 5489 5490 5491 5492 5493 5494 5495 5496 5497 5498 5499 5500 5501 5502 5503 5504 5505 5506 5507 5508 5509 5510 5511 5512 5513 5514 5515 |
|
spatial_aggregation_propensity_per_residue
spatial_aggregation_propensity_per_residue(distance: float = 5.0, **kwargs) -> list[float]
Calculate the spatial aggregation propensity on a per-residue basis using calculated heavy atom contacts to define which Residue instances are in contact.
Caution: Contrasts with published method due to use of relative sasa for each Residue instance instead of relative sasa for each Atom instance
Parameters:
-
distance
(float
, default:5.0
) –The distance in angstroms to measure Atom instances in contact
Other Parameters:
-
probe_radius
–float = 1.4 - The radius which surface area should be generated
Returns:
-
list[float]
–The floats representing the spatial aggregation propensity for each Residue in the Structure
Source code in symdesign/structure/base.py
5530 5531 5532 5533 5534 5535 5536 5537 5538 5539 5540 5541 5542 5543 5544 5545 5546 5547 5548 5549 5550 5551 5552 5553 5554 5555 5556 5557 5558 5559 5560 5561 5562 5563 5564 5565 5566 5567 5568 5569 5570 5571 5572 5573 5574 5575 |
|
contact_order_per_residue
contact_order_per_residue(sequence_distance_cutoff: int = 2, distance: float = 6.0) -> list[float]
Calculate the contact order on a per-residue basis using calculated heavy atom contacts
Parameters:
-
sequence_distance_cutoff
(int
, default:2
) –The residue spacing required to count a contact as a true contact
-
distance
(float
, default:6.0
) –The distance in angstroms to measure Atom instances in contact
Returns:
-
list[float]
–The floats representing the contact order for each Residue in the Structure
Source code in symdesign/structure/base.py
5609 5610 5611 5612 5613 5614 5615 5616 5617 5618 5619 5620 5621 5622 5623 5624 5625 5626 5627 5628 5629 5630 5631 5632 5633 5634 5635 5636 5637 5638 5639 5640 5641 5642 5643 5644 5645 |
|
format_resfile_from_directives
format_resfile_from_directives(residue_directives: dict[int | Residue, str], include: dict[int | Residue, set[str]] = None, background: dict[int | Residue, set[str]] = None, **kwargs) -> list[str]
Format Residue mutational potentials given Residues/residue numbers and corresponding mutation directive. Optionally, include specific amino acids and limit to a specific background. Both dictionaries accessed by same keys as residue_directives
Parameters:
-
residue_directives
(dict[int | Residue, str]
) –{Residue object: 'mutational_directive', ...}
-
include
(dict[int | Residue, set[str]]
, default:None
) –Include a set of specific amino acids for each residue
-
background
(dict[int | Residue, set[str]]
, default:None
) –The background amino acids to compare possibilities against
Other Parameters:
-
special
–bool = False - Whether to include special residues
Returns:
-
list[str]
–For each Residue, returns the string formatted for a resfile with a 'PIKAA' and amino acid type string
Source code in symdesign/structure/base.py
5686 5687 5688 5689 5690 5691 5692 5693 5694 5695 5696 5697 5698 5699 5700 5701 5702 5703 5704 5705 5706 5707 5708 5709 5710 5711 5712 5713 5714 5715 5716 5717 5718 5719 5720 5721 5722 5723 5724 |
|
make_resfile
make_resfile(residue_directives: dict[Residue | int, str], out_path: AnyStr = os.getcwd(), header: list[str] = None, **kwargs) -> AnyStr
Format a resfile for the Rosetta Packer from Residue mutational directives
Parameters:
-
residue_directives
(dict[Residue | int, str]
) –{Residue/int: 'mutational_directive', ...}
-
out_path
(AnyStr
, default:getcwd()
) –Directory to write the file
-
header
(list[str]
, default:None
) –A header to constrain all Residues for packing
Other Parameters:
-
include
–dict[Residue | int, set[str]] = None - Include a set of specific amino acids for each residue
-
background
–dict[Residue | int, set[str]] = None - The background amino acids to compare possibilities
-
special
–bool = False - Whether to include special residues
Returns:
-
AnyStr
–The path to the resfile
Source code in symdesign/structure/base.py
5726 5727 5728 5729 5730 5731 5732 5733 5734 5735 5736 5737 5738 5739 5740 5741 5742 5743 5744 5745 5746 5747 5748 5749 5750 5751 |
|
set_b_factor_by_attribute
set_b_factor_by_attribute(dtype: residue_attributes_literal)
Set the b-factor entry for every Residue to a Residue attribute
Parameters:
-
dtype
(residue_attributes_literal
) –The attribute of interest
Source code in symdesign/structure/base.py
5753 5754 5755 5756 5757 5758 5759 5760 5761 5762 5763 5764 5765 5766 |
|
set_b_factor_data
set_b_factor_data(values: Iterable[float])
Set the b-factor entry for every Residue to a value from an array-like
Parameters:
-
values
(Iterable[float]
) –Array-like of integer types to set each Residue instance 'b_factor' attribute to
Source code in symdesign/structure/base.py
5768 5769 5770 5771 5772 5773 5774 5775 5776 5777 5778 5779 5780 5781 5782 5783 5784 5785 |
|
Structures
Structures(structures: Iterable[ContainsResidues], dtype: str = None, **kwargs)
Bases: ContainsResidues
, UserList
A view of a set of Structure instances. This isn't used at the moment
Parameters:
-
structures
(Iterable[ContainsResidues]
) –The Iterable of Structure to set the Structures with
-
dtype
(str
, default:None
) –If an empty Structures, the specific subclass of Structure that Structures contains
Source code in symdesign/structure/base.py
5808 5809 5810 5811 5812 5813 5814 5815 5816 5817 5818 5819 5820 5821 5822 5823 5824 5825 5826 5827 5828 5829 5830 5831 5832 5833 5834 5835 5836 5837 5838 5839 5840 |
|
dtype
instance-attribute
dtype: str
The type of Structure in instance
parse_seqres
parse_seqres(seqres_lines: list[str]) -> dict[str, str]
Convert SEQRES information to single amino acid dictionary format
Parameters:
-
seqres_lines
(list[str]
) –The list of lines containing SEQRES information
Returns:
-
dict[str, str]
–The mapping of each chain to its reference sequence
Source code in symdesign/structure/base.py
238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 |
|
read_pdb_file
read_pdb_file(file: AnyStr = None, pdb_lines: Iterable[str] = None, separate_coords: bool = True, **kwargs) -> dict[str, Any]
Reads .pdb file and returns structural information pertaining to parsed file
By default, returns the coordinates as a separate numpy.ndarray which is parsed directly by StructureBase. This will be associated with each Atom however, separate parsing is done for efficiency. To include coordinate info with the individual Atom instances, pass separate_coords=False. (Not recommended)
Parameters:
-
file
(AnyStr
, default:None
) –The path to the file to parse
-
pdb_lines
(Iterable[str]
, default:None
) –If lines are already read, provide the lines instead
-
separate_coords
(bool
, default:True
) –Whether to separate parsed coordinates from Atom instances. Will be returned as two separate entries in the parsed dictionary, otherwise returned with coords=None
Returns:
-
dict[str, Any]
–The dictionary containing all the parsed structural information
Source code in symdesign/structure/base.py
284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 |
|
read_mmcif_file
read_mmcif_file(file: AnyStr = None, **kwargs) -> dict[str, Any]
Reads .cif file and returns structural information pertaining to parsed file
By default, returns the coordinates as a separate numpy.ndarray which is parsed directly by StructureBase. This will be associated with each Atom however, separate parsing is done for efficiency. To include coordinate info with the individual Atom instances, pass separate_coords=False. (Not recommended)
Parameters:
-
file
(AnyStr
, default:None
) –The path to the file to parse
Returns:
-
dict[str, Any]
–The dictionary containing all the parsed structural information
Source code in symdesign/structure/base.py
495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 |
|