model
MetricsMixin
Bases: ABC
Perform Metric evaluation for derived classes
Subclasses of Metrics must implement _metrics_table property and calculate_metrics() method
metrics
property
metrics: _metrics_table
Metrics as sqlalchemy Mapped class. init: Retrieves all metrics, loads sqlalchemy Mapped class
df
property
df: Series
Metrics as a Series. init: Retrieves all metrics, loads pd.Series
calculate_metrics
abstractmethod
calculate_metrics(**kwargs) -> dict[str, Any]
Perform Metric calculation for the Entity in question
Source code in symdesign/structure/model.py
131 132 133 |
|
clear_metrics
clear_metrics() -> None
Clear all Metrics.state_attributes for the Entity in question
Source code in symdesign/structure/model.py
167 168 169 170 171 172 173 |
|
ParseStructureMixin
Bases: ABC
from_file
classmethod
from_file(file: AnyStr, **kwargs)
Create a new Structure from a file with Atom records
Source code in symdesign/structure/model.py
178 179 180 181 182 183 184 185 186 187 188 189 |
|
from_pdb
classmethod
from_pdb(file: AnyStr, **kwargs)
Create a new Structure from a .pdb formatted file
Source code in symdesign/structure/model.py
191 192 193 194 195 |
|
from_pdb_lines
classmethod
from_pdb_lines(pdb_lines: Iterable[str], **kwargs)
Create a new Structure from already parsed .pdb file lines
Source code in symdesign/structure/model.py
197 198 199 200 201 |
|
from_mmcif
classmethod
from_mmcif(file: AnyStr, **kwargs)
Create a new Structure from a .cif formatted file
Source code in symdesign/structure/model.py
203 204 205 206 207 |
|
StructuredGeneEntity
StructuredGeneEntity(metadata: ProteinMetadata = None, uniprot_ids: tuple[str, ...] = None, thermophilicity: bool = None, reference_sequence: str = None, **kwargs)
Bases: ContainsResidues
, GeneEntity
Implements methods to map a Structure to a GeneEntity
Parameters:
-
metadata
(ProteinMetadata
, default:None
) –Unique database references
-
uniprot_ids
(tuple[str, ...]
, default:None
) –The UniProtID(s) that describe this protein sequence
-
thermophilicity
(bool
, default:None
) –The extent to which the sequence is deemed thermophilic
-
reference_sequence
(str
, default:None
) –The reference sequence (according to expression sequence or reference database)
Source code in symdesign/structure/model.py
233 234 235 236 237 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 |
|
fragment_map
instance-attribute
fragment_map: list[dict[int, set[FragmentObservation]]] | None = None
{1: {-2: {FragObservation(), ...}, -1: {}, ...}, 2: {}, ...} Where the outer list indices match Residue.index, and each dictionary holds the various fragment indices (with fragment_length length) for that residue, where each index in the inner set can have multiple observations
uniprot_ids
property
writable
uniprot_ids: tuple[str | None, ...]
The UniProtID(s) used for accessing external protein level features
reference_sequence
property
reference_sequence: str
Return the entire sequence, constituting all described residues, not just structurally modeled ones
Returns:
-
str
–The sequence according to the Entity reference, or the Structure sequence if no reference available
offset_index
property
offset_index: int
The starting Residue index for the instance. Zero-indexed
disorder
property
disorder: dict[int, dict[str, str]]
Return the Residue number keys where disordered residues are found by comparison of the reference sequence with the structure sequence
Returns:
-
dict[int, dict[str, str]]
–Mutation index to mutations in the format of {1: {'from': 'A', 'to': 'K'}, ...}
clear_api_data
clear_api_data()
Removes any state information from the PDB API
Source code in symdesign/structure/model.py
266 267 268 269 270 |
|
retrieve_api_metadata
retrieve_api_metadata()
Try to set attributes from PDB API
Sets
self._api_data: dict[str, Any] {'chains': [], 'dbref': {'accession': ('Q96DC8',), 'db': 'UniProt'}, 'reference_sequence': 'MSLEHHHHHH...', 'thermophilicity': True self._uniprot_id: str | None self._reference_sequence: str self.thermophilicity: bool
Source code in symdesign/structure/model.py
272 273 274 275 276 277 278 279 280 281 282 283 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 |
|
add_fragments_to_profile
add_fragments_to_profile(fragments: Iterable[FragmentInfo], alignment_type: alignment_types_literal, **kwargs)
Distribute fragment information to self.fragment_map. Zero-indexed residue array
Parameters:
-
fragments
(Iterable[FragmentInfo]
) –The fragment list to assign to the sequence profile with format [{'mapped': residue_index1 (int), 'paired': residue_index2 (int), 'cluster': tuple(int, int, int), 'match': match_score (float)}]
-
alignment_type
(alignment_types_literal
) –Either 'mapped' or 'paired' indicating how the fragment observation was generated relative to this GeneEntity. Are the fragments mapped to the ContainsResidues or was it paired to it?
Sets
self.fragment_map (list[list[dict[str, str | float]]]): [{-2: {FragObservation(), ...}, -1: {}, ...}, {}, ...] Where the outer list indices match Residue.index, and each dictionary holds the various fragment indices (with fragment_length length) for that residue, where each index in the inner set can have multiple observations
Source code in symdesign/structure/model.py
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 |
|
simplify_fragment_profile
simplify_fragment_profile(evo_fill: bool = False, **kwargs)
Take a multi-indexed, a multi-observation fragment_profile and flatten to single frequency for each residue.
Weight the frequency of each observation by the fragment indexed, average observation weight, proportionally scaled by the match score between the fragment database and the observed fragment overlap
From the self.fragment_map data, create a fragment profile and add to the GeneEntity
Parameters:
-
evo_fill
(bool
, default:False
) –Whether to fill missing positions with evolutionary profile values
Other Parameters:
-
alpha
–float = 0.5 - The maximum contribution of the fragment profile to use, bounded between (0, 1]. 0 means no use of fragments in the .profile, while 1 means only use fragments
Sets
self.fragment_profile (Profile) [{'A': 0.23, 'C': 0.01, ..., stats': (1, 0.37)}, {...}, ...] list of profile_entry that combines all fragment information at a single residue using a weighted average. 'count' is number of fragment observations at each residue, and 'weight' is the total fragment weight over the entire residue
Source code in symdesign/structure/model.py
475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 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 |
|
calculate_profile
calculate_profile(favor_fragments: bool = False, boltzmann: bool = True, **kwargs)
Combine weights for profile PSSM and fragment SSM using fragment significance value to determine overlap
Using self.evolutionary_profile (ProfileDict): HHblits - {1: {'A': 0.04, 'C': 0.12, ..., 'lod': {'A': -5, 'C': -9, ...}, 'type': 'W', 'info': 0.00, 'weight': 0.00}, {...}} PSIBLAST - {1: {'A': 0.13, 'R': 0.12, ..., 'lod': {'A': -5, 'R': 2, ...}, 'type': 'W', 'info': 3.20, 'weight': 0.73}, {...}} self.fragment_profile (dict[int, dict[str, float | list[float]]]): {48: {'A': 0.167, 'D': 0.028, 'E': 0.056, ..., 'count': 4, 'weight': 0.274}, 50: {...}, ...} self.alpha (list[float]): [0., 0., 0., 0.5, 0.321, ...]
Parameters:
-
favor_fragments
(bool
, default:False
) –Whether to favor fragment profile in the lod score of the resulting profile Currently this routine is only used for Rosetta designs where the fragments should be favored by a particular weighting scheme. By default, the boltzmann weighting scheme is applied
-
boltzmann
(bool
, default:True
) –Whether to weight the fragment profile by a Boltzmann probability scaling using the formula lods = exp(lods[i]/kT)/Z, where Z = sum(exp(lods[i]/kT)), and kT is 1 by default. If False, residues are weighted by the residue local maximum lod score in a linear fashion All lods are scaled to a maximum provided in the Rosetta REF2015 per residue reference weight.
Sets
self.profile: (ProfileDict) {1: {'A': 0.04, 'C': 0.12, ..., 'lod': {'A': -5, 'C': -9, ...}, 'type': 'W', 'info': 0.00, 'weight': 0.00}, ...}, ...}
Source code in symdesign/structure/model.py
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 756 757 758 759 760 761 762 |
|
format_missing_loops_for_design
format_missing_loops_for_design(max_loop_length: int = 12, exclude_n_term: bool = True, ignore_termini: bool = False, **kwargs) -> tuple[list[tuple], dict[int, int], int]
Process missing residue information to prepare for loop modeling files. Assumes residues in pose numbering!
Parameters:
-
max_loop_length
(int
, default:12
) –The max length for loop modeling. 12 is the max for accurate KIC as of benchmarks from T. Kortemme, 2014
-
exclude_n_term
(bool
, default:True
) –Whether to exclude the N-termini from modeling due to Remodel Bug
-
ignore_termini
(bool
, default:False
) –Whether to ignore terminal loops in the loop file
Returns:
-
tuple[list[tuple], dict[int, int], int]
–Pairs of indices where each loop starts and ends, adjacent indices (not all indices are disordered) mapped to their disordered residue indices, and the n-terminal residue index
Source code in symdesign/structure/model.py
779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 |
|
make_loop_file
make_loop_file(out_path: AnyStr = os.getcwd(), **kwargs) -> AnyStr | None
Format a loops file according to Rosetta specifications. Assumes residues in pose numbering!
The loop file format consists of one line for each specified loop with the format:
LOOP 779 784 0 0 1
Where LOOP specifies a loop line, start idx, end idx, cut site (0 lets Rosetta choose), skip rate, and extended
All indices should refer to existing locations in the structure file so if a loop should be inserted into missing density, the density needs to be modeled first before the loop file would work to be modeled. You can't therefore specify that a loop should be between 779 and 780 if the loop is 12 residues long since there is no specification about how to insert those residues. This type of task requires a blueprint file.
Parameters:
-
out_path
(AnyStr
, default:getcwd()
) –The location the file should be written
Other Parameters:
-
max_loop_length=12
(int
) –The max length for loop modeling. 12 is the max for accurate KIC as of benchmarks from T. Kortemme, 2014
-
exclude_n_term=True
(bool
) –Whether to exclude the N-termini from modeling due to Remodel Bug
-
ignore_termini=False
(bool
) –Whether to ignore terminal loops in the loop file
Returns:
-
AnyStr | None
–The path of the file if one was written
Source code in symdesign/structure/model.py
851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 |
|
make_blueprint_file
make_blueprint_file(out_path: AnyStr = os.getcwd(), **kwargs) -> AnyStr | None
Format a blueprint file according to Rosetta specifications. Assumes residues in pose numbering!
The blueprint file format is described nicely here
https://www.rosettacommons.org/docs/latest/application_documentation/design/rosettaremodel
In a gist, a blueprint file consists of entries describing the type of design available at each position.
Ex
1 x L PIKAA M <- Extension
1 x L PIKAA V <- Extension
1 V L PIKAA V <- Attachment point
2 D .
3 K .
4 I .
5 L N PIKAA N <- Attachment point
0 x I NATAA <- Insertion
0 x I NATAA <- Insertion
6 N A PIKAA A <- Attachment point
7 G .
0 X L PIKAA Y <- Extension
0 X L PIKAA P <- Extension
All structural indices must be specified in "pose numbering", i.e. starting with 1 ending with the last residue. If you have missing density in the middle, you should not specify those residues that are missing, but keep continuous numbering. You can specify an inclusion by specifying the entry index as 0 followed by the blueprint directive. For missing density at the n- or c-termini, the file should still start 1, however, the n-termini should be extended by prepending extra entries to the structurally defined n-termini entry 1. These blueprint entries should also have 1 as the residue index. For c-termini, extra entries should be appended with the indices as 0 like in insertions. For all unmodeled entries for which design should be performed, there should be flanking attachment points that are also capable of design. Designable entries are seen above with the PIKAA directive. Other directives are available. The only location this isn't required is at the c-terminal attachment point
Parameters:
-
out_path
(AnyStr
, default:getcwd()
) –The location the file should be written
Other Parameters:
-
max_loop_length=12
(int
) –The max length for loop modeling. 12 is the max for accurate KIC as of benchmarks from T. Kortemme, 2014
-
exclude_n_term=True
(bool
) –Whether to exclude the N-termini from modeling due to Remodel Bug
-
ignore_termini=False
(bool
) –Whether to ignore terminal loops in the loop file
Returns:
-
AnyStr | None
–The path of the file if one was written
Source code in symdesign/structure/model.py
887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 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 |
|
Structure
Structure(metadata: ProteinMetadata = None, uniprot_ids: tuple[str, ...] = None, thermophilicity: bool = None, reference_sequence: str = None, **kwargs)
Bases: StructuredGeneEntity
, ParseStructureMixin
The base class to handle structural manipulation of groups of Residue instances
Parameters:
-
metadata
(ProteinMetadata
, default:None
) –Unique database references
-
uniprot_ids
(tuple[str, ...]
, default:None
) –The UniProtID(s) that describe this protein sequence
-
thermophilicity
(bool
, default:None
) –The extent to which the sequence is deemed thermophilic
-
reference_sequence
(str
, default:None
) –The reference sequence (according to expression sequence or reference database)
Source code in symdesign/structure/model.py
233 234 235 236 237 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 |
|
ContainsStructures
ContainsStructures(**kwargs)
Bases: Structure
Implements methods to interact with a Structure which contains other Structure instances
Parameters:
-
**kwargs
–
Source code in symdesign/structure/model.py
1001 1002 1003 1004 1005 1006 1007 1008 |
|
biological_assembly
property
biological_assembly: str | None
The integer which maps the structure to an assembly state from the PDB
file_path
property
file_path: str | None
The integer which maps the structure to an assembly state from the PDB
resolution
property
resolution: float | None
The integer which maps the structure to an assembly state from the PDB
reset_and_reindex_structures
staticmethod
reset_and_reindex_structures(structs: Sequence[ContainsResidues] | Structures)
Given ContainsResidues instances, reset the states and renumber indices in the order passed
Source code in symdesign/structure/model.py
1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 |
|
fragment_db
fragment_db(fragment_db: FragmentDatabase)
Set the Structure FragmentDatabase to assist with Fragment creation, manipulation, and profiles. Sets .fragment_db for each dependent Structure in 'structure_containers'
Source code in symdesign/structure/model.py
1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 |
|
format_header
format_header(**kwargs) -> str
Returns any super().format_header() along with the SEQRES records
Returns:
-
str
–The .pdb file header string
Source code in symdesign/structure/model.py
1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 |
|
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/model.py
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 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 |
|
delete_residues
delete_residues(residues: Iterable[Residue] | None = None, indices: Iterable[int] | None = None, numbers: Container[int] | None = None, **kwargs) -> list[Residue] | list
Deletes Residue instances from the Structure
Parameters:
-
residues
(Iterable[Residue] | None
, default:None
) –Residue instances to delete
-
indices
(Iterable[int] | None
, default:None
) –Residue indices to select the Residue instances of interest
-
numbers
(Container[int] | None
, default:None
) –Residue numbers to select the Residue instances of interest
Returns:
-
list[Residue] | list
–Each deleted Residue
Source code in symdesign/structure/model.py
1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 |
|
insert_residue_type
insert_residue_type(index: int, residue_type: str, chain_id: str = None) -> Residue
Insert a standard Residue type into the Structure based on Pose numbering (1 to N) at the origin. No structural alignment is performed.
Parameters:
-
index
(int
) –The pose numbered location which 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
Source code in symdesign/structure/model.py
1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 |
|
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 newly inserted Residue instances
Source code in symdesign/structure/model.py
1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 |
|
ContainsChains
ContainsChains(chains: bool | Sequence[Chain] = True, chain_ids: Iterable[str] = None, rename_chains: bool = False, as_mates: bool = False, **kwargs)
Bases: ContainsStructures
Implements methods to interact with a Structure which contains Chain instances
Parameters:
-
chain_ids
(Iterable[str]
, default:None
) –A list of identifiers to assign to each Chain instance
-
chains
(bool | Sequence[Chain]
, default:True
) –Whether to create Chain instances from passed Structure container instances, or existing Chain instances to create the Model with
-
rename_chains
(bool
, default:False
) –Whether to name each chain an incrementally new Alphabetical character
-
as_mates
(bool
, default:False
) –Whether Chain instances should be controlled by a captain (True), or be dependents
Source code in symdesign/structure/model.py
1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 |
|
number_of_chains
property
number_of_chains: int
Return the number of Chain instances in the Structure
chain_breaks
property
chain_breaks: list[int]
Return the index where each of the Chain instances ends, i.e. at the c-terminal Residue
from_chains
classmethod
from_chains(chains: Sequence[Chain], **kwargs)
Create an instance from a Sequence of Chain objects. Automatically renames all chains
Source code in symdesign/structure/model.py
1342 1343 1344 1345 |
|
has_dependent_chains
has_dependent_chains() -> bool
Returns True if the .chains are dependents, otherwise Returns False if .chains are symmetry mates
Source code in symdesign/structure/model.py
1410 1411 1412 |
|
is_parsed_multimodel
is_parsed_multimodel() -> bool
Returns True if parsing located multiple MODEL records, aka a 'multimodel' or multistate Structure
Source code in symdesign/structure/model.py
1414 1415 1416 |
|
are_chain_ids_pdb_compatible
are_chain_ids_pdb_compatible() -> bool
Returns True if the chain_ids are compatible with legacy PDB format
Source code in symdesign/structure/model.py
1486 1487 1488 1489 1490 1491 1492 |
|
rename_chains
rename_chains(exclude_chains: Sequence = None)
Renames each chain an incrementally new Alphabetical character using Structure.available_letters
Parameters:
-
exclude_chains
(Sequence
, default:None
) –The chains which shouldn't be modified
Sets
self.chain_ids (list[str])
Source code in symdesign/structure/model.py
1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 |
|
renumber_residues_by_chain
renumber_residues_by_chain()
For each Chain instance, renumber Residue objects sequentially starting with 1
Source code in symdesign/structure/model.py
1516 1517 1518 1519 |
|
get_chain
get_chain(chain_id: str) -> Chain | None
Return the Chain object specified by the passed ChainID from the Structure
Parameters:
-
chain_id
(str
) –The name of the Chain to query
Returns:
-
Chain | None
–The Chain if one was found
Source code in symdesign/structure/model.py
1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 |
|
set_reference_sequence_from_seqres
set_reference_sequence_from_seqres(reference_sequence: dict[str, str])
If SEQRES was parsed, set the reference_sequence attribute from each parsed chain_id. Ensure that this is called after self._create_chains()
Source code in symdesign/structure/model.py
1540 1541 1542 1543 1544 1545 1546 1547 1548 |
|
chain_id_generator
staticmethod
chain_id_generator() -> Generator[str, None, None]
Provide a generator which produces all combinations of chain ID strings
Returns The generator producing a maximum 2 character string where single characters are exhausted, first in uppercase, then in lowercase
Source code in symdesign/structure/model.py
1558 1559 1560 1561 1562 1563 1564 1565 1566 |
|
orient
orient(symmetry: str = None)
Orient a symmetric Structure at the origin with symmetry axis set on canonical axes defined by symmetry file
Sets the Structure with coordinates as described by a canonical orientation
Parameters:
-
symmetry
(str
, default:None
) –The symmetry of the Structure
Raises: SymmetryError: When the specified symmetry is incompatible with the Structure StructureException: When the orient program fails
Source code in symdesign/structure/model.py
1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 |
|
ContainsEntities
ContainsEntities(entities: bool | Sequence[Entity] = True, entity_info: dict[str, dict[dict | list | str]] = None, **kwargs)
Bases: ContainsChains
Implements methods to interact with a Structure which contains Entity instances
Parameters:
-
entities
(bool | Sequence[Entity]
, default:True
) –Existing Entity instances used to construct the Structure, or evaluates False to skip creating Entity instances from the existing '.chains' Chain instances
-
entity_info
(dict[str, dict[dict | list | str]]
, default:None
) –Metadata describing the Entity instances
-
**kwargs
–
Source code in symdesign/structure/model.py
1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 |
|
entity_info
instance-attribute
property
writable
entity_info: dict[str, dict[dict | list | str]] | dict = {} if entity_info is None else entity_info
Mapping of the Entity name to Metadata describing the Entity instance
number_of_entities
property
number_of_entities: int
Return the number of Entity instances in the Structure
entity_breaks
property
entity_breaks: list[int]
Return the index where each of the Entity instances ends, i.e. at the c-terminal Residue
sequence
property
sequence: str
Return the sequence of structurally modeled residues for every Entity instance
Returns:
-
str
–The concatenated sequence for all Entity instances combined
reference_sequence
property
reference_sequence: str
Return the sequence for every Entity instance, constituting all Residues, not just structurally modeled ones
Returns:
-
str
–The concatenated reference sequences for all Entity instances combined
atom_indices_per_entity
property
atom_indices_per_entity: list[list[int]]
Return the atom indices for each Entity
from_entities
classmethod
from_entities(entities: list[Entity] | Structures, rename_chains: bool = True, **kwargs)
Construct a Structure instance from a container of Entity objects
Source code in symdesign/structure/model.py
1693 1694 1695 1696 1697 1698 1699 1700 1701 |
|
format_header
format_header(**kwargs) -> str
Return any super().format_header()
Other Parameters:
-
assembly
–bool = False - Whether to write header details for the assembly
Returns:
-
str
–The .pdb file header string
Source code in symdesign/structure/model.py
1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 |
|
retrieve_metadata_from_pdb
retrieve_metadata_from_pdb(biological_assembly: int = None) -> dict[str, Any] | dict
Query the PDB API for information on the PDB code found at the Model.name attribute
For each new instance, makes one call to the PDB API, plus an additional call for each Entity, and one more if biological_assembly is passed. If this has been loaded before, it uses the persistent wrapapi.APIDatabase
Parameters:
-
biological_assembly
(int
, default:None
) –The number of the biological assembly that is associated with this structural state
Sets
self.api_entry (dict[str, dict[Any] | float] | dict): {'assembly': [['A', 'B'], ...], 'entity': {'EntityID': {'chains': ['A', 'B', ...], 'dbref': {'accession': ('Q96DC8',), 'db': 'UniProt'} 'reference_sequence': 'MSLEHHHHHH...', 'thermophilicity': 1.0}, ...}, 'res': resolution, 'struct': {'space': space_group, 'a_b_c': (a, b, c), 'ang_a_b_c': (ang_a, ang_b, ang_c)} }
Source code in symdesign/structure/model.py
1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 |
|
get_entity
get_entity(entity_id: str) -> Entity | None
Retrieve an Entity by name
Parameters:
-
entity_id
(str
) –The name of the Entity to query
Returns:
-
Entity | None
–The Entity if one was found
Source code in symdesign/structure/model.py
2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 |
|
entity_from_chain
entity_from_chain(chain_id: str) -> Entity | None
Returns the entity associated with a particular chain id
Source code in symdesign/structure/model.py
2310 2311 2312 2313 2314 2315 |
|
match_entity_by_seq
match_entity_by_seq(other_seq: str = None, force_closest: bool = True, tolerance: float = 0.7) -> Entity | None
From another sequence, returns the first matching chain from the corresponding Entity
Uses a local alignment to produce the match score
Parameters:
-
other_seq
(str
, default:None
) –The sequence to query
-
force_closest
(bool
, default:True
) –Whether to force the search if a perfect match isn't identified
-
tolerance
(float
, default:0.7
) –The acceptable difference between sequences to consider them the same Entity. Tuning this parameter is necessary if you have sequences which should be considered different entities, but are fairly similar
Returns:
-
Entity | None
–The matching Entity if one was found
Source code in symdesign/structure/model.py
2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 |
|
SymmetryOpsMixin
SymmetryOpsMixin(sym_entry: SymEntry | int = None, symmetry: str = None, transformations: list[TransformationMapping] = None, uc_dimensions: list[float] = None, symmetry_operators: ndarray | list = None, rotation_matrices: ndarray | list = None, translation_matrices: ndarray | list = None, surrounding_uc: bool = True, **kwargs)
Bases: ABC
Implements methods to interact with symmetric Structure instances
Parameters:
-
sym_entry
(SymEntry | int
, default:None
) –The SymEntry which specifies all symmetry parameters
-
symmetry
(str
, default:None
) –The name of a symmetry to be searched against compatible symmetries
-
transformations
(list[TransformationMapping]
, default:None
) –Transformation operations that reproduce the oligomeric/assembly for each Entity
-
rotation_matrices
(ndarray | list
, default:None
) –Rotation operations that create the symmetric state
-
translation_matrices
(ndarray | list
, default:None
) –Translation operations that create the symmetric state
-
uc_dimensions
(list[float]
, default:None
) –The unit cell dimensions for the crystalline symmetry
-
symmetry_operators
(ndarray | list
, default:None
) –A set of custom expansion matrices
-
surrounding_uc
(bool
, default:True
) –Whether the 3x3 layer group, or 3x3x3 space group should be generated
Source code in symdesign/structure/model.py
2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 |
|
sym_entry
property
writable
sym_entry: SymEntry | None
The SymEntry specifies the symmetric parameters for the utilized symmetry
point_group_symmetry
property
point_group_symmetry: str | None
The point group underlying the resulting SymEntry
dimension
property
dimension: int | None
The dimension of the symmetry from None, 0, 2, or 3
uc_dimensions
property
uc_dimensions: tuple[float, float, float, float, float, float] | None
The unit cell dimensions for the lattice specified by lengths a, b, c and angles alpha, beta, gamma
Returns:
-
tuple[float, float, float, float, float, float] | None
–length a, length b, length c, angle alpha, angle beta, angle gamma
cryst_record
property
writable
cryst_record: str | None
Return the symmetry parameters as a CRYST1 entry
expand_matrices
property
expand_matrices: ndarray
The symmetry rotations to generate each of the symmetry mates
expand_translations
property
expand_translations: ndarray
The symmetry translations to generate each of the symmetry mates
chain_transforms
property
chain_transforms: list[TransformationMapping]
Returns the transformation operations for each of the symmetry mates (excluding the ASU)
number_of_symmetric_residues
property
number_of_symmetric_residues: int
Describes the number of Residues when accounting for symmetry mates
number_of_symmetry_mates
property
number_of_symmetry_mates: int
Describes the number of symmetric copies present in the coordinates
number_of_uc_symmetry_mates
property
number_of_uc_symmetry_mates: int
Describes the number of symmetry mates present in the unit cell
asu_model_index
property
asu_model_index: int
The asu equivalent model in the SymmetricModel. Zero-indexed
asu_indices
property
asu_indices: slice
Return the ASU indices
symmetric_coords
property
symmetric_coords: ndarray | None
Return a view of the symmetric Coords
symmetric_coords_split
property
symmetric_coords_split: list[ndarray]
A view of the symmetric coords split at different symmetric models
center_of_mass_symmetric
property
center_of_mass_symmetric: ndarray
The center of mass for the symmetric system with shape (3,)
center_of_mass_symmetric_models
property
center_of_mass_symmetric_models: ndarray
The center of mass points for each symmetry mate in the symmetric system with shape (number_of_symmetry_mates, 3)
format_biomt
format_biomt(**kwargs) -> str
Return the SymmetricModel expand_matrices as a BIOMT record
Returns:
-
str
–The BIOMT REMARK 350 with PDB file formatting
Source code in symdesign/structure/model.py
2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 |
|
format_header
format_header(**kwargs) -> str
Returns any super().format_header() along with the BIOMT record
Returns:
-
str
–The .pdb file header string
Source code in symdesign/structure/model.py
2443 2444 2445 2446 2447 2448 2449 |
|
set_symmetry
set_symmetry(sym_entry: SymEntry | int = None, symmetry: str = None, crystal: bool = False, cryst_record: str = None, uc_dimensions: list[float] = None, **kwargs)
Set the model symmetry using the CRYST1 record, or the unit cell dimensions and the Hermann-Mauguin symmetry notation (in CRYST1 format, ex P432) for the Model assembly. If the assembly is a point group, only the symmetry notation is required
Parameters:
-
sym_entry
(SymEntry | int
, default:None
) –The SymEntry which specifies all symmetry parameters
-
symmetry
(str
, default:None
) –The name of a symmetry to be searched against compatible symmetries
-
crystal
(bool
, default:False
) –Whether crystalline symmetry should be used
-
cryst_record
(str
, default:None
) –If a CRYST1 record is known and should be used
-
uc_dimensions
(list[float]
, default:None
) –The unit cell dimensions for the crystalline symmetry
Source code in symdesign/structure/model.py
2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 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 |
|
reset_mates
reset_mates()
Remove oligomeric chains. They should be generated fresh
Source code in symdesign/structure/model.py
2547 2548 2549 |
|
is_surrounding_uc
is_surrounding_uc() -> bool
Returns True if the current coordinates contains symmetry mates from the surrounding unit cells
Source code in symdesign/structure/model.py
2655 2656 2657 2658 2659 2660 2661 |
|
make_indices_symmetric
make_indices_symmetric(indices: Iterable[int], dtype: atom_or_residue_literal = 'atom') -> list[int]
Extend asymmetric indices using the symmetry state across atom or residue indices
Parameters:
-
indices
(Iterable[int]
) –The asymmetric indices to symmetrize
-
dtype
(atom_or_residue_literal
, default:'atom'
) –The type of indices to perform symmetrization with
Returns:
-
list[int]
–The symmetric indices of the asymmetric input
Source code in symdesign/structure/model.py
2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 |
|
return_symmetric_copies
return_symmetric_copies(structure: StructureBase, **kwargs) -> list[StructureBase]
Expand the provided Structure using self.symmetry for the symmetry specification
Parameters:
-
structure
(StructureBase
) –A StructureBase instance containing .coords method/attribute
Returns:
-
list[StructureBase]
–The symmetric copies of the input structure
Source code in symdesign/structure/model.py
2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 |
|
generate_symmetric_coords
generate_symmetric_coords(surrounding_uc: bool = True)
Expand the asu using self.symmetry for the symmetry specification, and optional unit cell dimensions if self.dimension > 0. Expands assembly to complete point group, unit cell, or surrounding unit cells
Parameters:
-
surrounding_uc
(bool
, default:True
) –Whether the 3x3 layer group, or 3x3x3 space group should be generated
Source code in symdesign/structure/model.py
2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 |
|
cart_to_frac
cart_to_frac(cart_coords: ndarray | Iterable | int | float) -> ndarray
Return fractional coordinates from cartesian coordinates From http://www.ruppweb.org/Xray/tutorial/Coordinate%20system%20transformation.htm
Parameters:
-
cart_coords
(ndarray | Iterable | int | float
) –The cartesian coordinates of a unit cell
Returns:
-
ndarray
–The fractional coordinates of a unit cell
Source code in symdesign/structure/model.py
2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 |
|
frac_to_cart
frac_to_cart(frac_coords: ndarray | Iterable | int | float) -> ndarray
Return cartesian coordinates from fractional coordinates From http://www.ruppweb.org/Xray/tutorial/Coordinate%20system%20transformation.htm
Parameters:
-
frac_coords
(ndarray | Iterable | int | float
) –The fractional coordinates of a unit cell
Returns:
-
ndarray
–The cartesian coordinates of a unit cell
Source code in symdesign/structure/model.py
2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 |
|
return_symmetric_coords
return_symmetric_coords(coords: list | ndarray) -> ndarray
Provided an input set of coordinates, return the symmetrized coordinates corresponding to the SymmetricModel
Parameters:
-
coords
(list | ndarray
) –The coordinates to symmetrize
Returns:
-
ndarray
–The symmetrized coordinates
Source code in symdesign/structure/model.py
2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 |
|
return_unit_cell_coords
return_unit_cell_coords(coords: ndarray, fractional: bool = False) -> ndarray
Return the unit cell coordinates from a set of coordinates for the specified SymmetricModel
Parameters:
-
coords
(ndarray
) –The cartesian coordinates to expand to the unit cell
-
fractional
(bool
, default:False
) –Whether to return coordinates in fractional or cartesian (False) unit cell frame
Returns:
-
ndarray
–All unit cell coordinates
Source code in symdesign/structure/model.py
2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 |
|
find_contacting_asu
find_contacting_asu(distance: float = 8.0, **kwargs) -> list[Entity]
Find the maximally contacting symmetry mate for each Entity and return the corresponding Entity instances
Parameters:
-
distance
(float
, default:8.0
) –The distance to check for contacts
Returns:
-
list[Entity]
–The minimal set of Entities containing the maximally touching configuration
Source code in symdesign/structure/model.py
2874 2875 2876 2877 2878 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 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 |
|
get_contacting_asu
get_contacting_asu(distance: float = 8.0, **kwargs) -> SymmetricModel
Find the maximally contacting symmetry mate for each Entity and return the corresponding Entity instances as a new Pose
If the chain IDs of the asu are the same, then chain IDs will automatically be renamed
Parameters:
-
distance
(float
, default:8.0
) –The distance to check for contacts
Returns:
-
SymmetricModel
–A new Model with the minimal set of Entity instances. Will also be symmetric
Source code in symdesign/structure/model.py
2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 |
|
set_contacting_asu
set_contacting_asu(from_assembly: bool = False, **kwargs)
Find the maximally contacting symmetry mate for each Entity, then set the Pose with this info
Parameters:
-
from_assembly
(bool
, default:False
) –Whether the ASU should be set fresh from the entire assembly instances
Other Parameters:
-
distance
–float = 8.0 - The distance to check for contacts
Sets
self: To a SymmetricModel with the minimal set of Entities containing the maximally touching configuration
Source code in symdesign/structure/model.py
2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 |
|
Chain
Chain(chain_id: str = None, name: str = None, **kwargs)
Bases: Structure
, MetricsMixin
A grouping of Atom, Coordinates, and Residue instances, typically from a connected polymer
Parameters:
-
chain_id
(str
, default:None
) –The name of the Chain identifier to use for this instance
-
name
(str
, default:None
) –The name of the Chain identifier to use for this instance. Typically used by Entity subclasses.
Source code in symdesign/structure/model.py
3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 |
|
chain_id
property
writable
chain_id: str
The Chain ID for the instance
entity_id
property
entity_id: str
The Entity ID associated with the instance
reference_sequence
property
reference_sequence: str
Return the entire sequence, constituting all described residues, not just structurally modeled ones
Returns:
-
str
–The sequence according to the Entity reference, or the Structure sequence if no reference available
calculate_metrics
calculate_metrics(**kwargs) -> dict[str, Any]
Source code in symdesign/structure/model.py
3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 |
|
Entity
Entity(operators: tuple[ndarray | list[list[float]], ndarray | list[float]] | ndarray = None, rotations: ndarray | list[list[float]] = None, translations: ndarray | list[float] = None, **kwargs)
Bases: SymmetryOpsMixin
, ContainsChains
, Chain
Maps a biological instance of a Structure which ContainsChains(1-N) and is a Complex, to a single GeneProduct
Parameters:
-
operators
(tuple[ndarray | list[list[float]], ndarray | list[float]] | ndarray
, default:None
) –A set of symmetry operations to designate how to apply symmetry
-
rotations
(ndarray | list[list[float]]
, default:None
) –A set of rotation matrices used to recapitulate the SymmetricModel from the asymmetric unit
-
translations
(ndarray | list[float]
, default:None
) –A set of translation vectors used to recapitulate the SymmetricModel from the asymmetric unit
Source code in symdesign/structure/model.py
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 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 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 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 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 3335 3336 3337 3338 |
|
mate_rotation_axes
instance-attribute
mate_rotation_axes: list[dict[str, int | ndarray]] | list = []
Maps mate entities to their rotation matrix
entity_id
property
writable
entity_id: str
The Entity ID associated with the instance
number_of_entities
property
number_of_entities: int
Return the number of distinct entities (Gene/Protein products) found in the PoseMetadata
chains
property
chains: list[Entity]
The mate Chain instances of the instance. If not created, returns transformed copies of the instance
assembly
property
assembly: Model
Access the oligomeric Structure which is a copy of the Entity plus any additional symmetric mate chains
Returns:
-
Model
–Structures object with the underlying chains in the oligomer
max_symmetry_chain_idx
property
max_symmetry_chain_idx: int
The maximum symmetry order present
max_symmetry
property
max_symmetry: int
The maximum symmetry order present
from_chains
classmethod
from_chains(chains: list[Chain] | Structures, residue_indices: list[int] = None, **kwargs)
Initialize an Entity from Chain instances
Parameters:
-
chains
(list[Chain] | Structures
) –A list of Chain instances that match the Entity
-
residue_indices
(list[int]
, default:None
) –The indices which the new Entity should contain
Source code in symdesign/structure/model.py
3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 |
|
coords
coords(coords: ndarray | list[list[float]])
Set the Coords object while propagating changes to symmetric "mate" chains
Source code in symdesign/structure/model.py
3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 |
|
is_captain
is_captain() -> bool
Is the Entity instance the captain?
Source code in symdesign/structure/model.py
3536 3537 3538 |
|
is_mate
is_mate() -> bool
Is the Entity instance a mate?
Source code in symdesign/structure/model.py
3540 3541 3542 |
|
has_mates
has_mates() -> bool
Returns True if this Entity is a captain and has mates
Source code in symdesign/structure/model.py
3554 3555 3556 |
|
remove_mate_chains
remove_mate_chains()
Clear the Entity of all Chain and Oligomer information
Source code in symdesign/structure/model.py
3591 3592 3593 3594 3595 3596 |
|
make_oligomer
make_oligomer(symmetry: str = None, rotation: list[list[float]] | ndarray = None, translation: list[float] | ndarray = None, rotation2: list[list[float]] | ndarray = None, translation2: list[float] | ndarray = None, **kwargs)
Given a symmetry and transformational mapping, generate oligomeric copies of the Entity
Assumes that the symmetric system treats the canonical symmetric axis as the Z-axis, and if the Entity is not at the origin, that a transformation describing its current position relative to the origin is passed so that it can be moved to the origin. At the origin, makes the required oligomeric rotations, to generate an oligomer where symmetric copies are stored in the .chains attribute then reverses the operations back to original reference frame if any was provided
Parameters:
-
symmetry
(str
, default:None
) –The symmetry to set the Entity to
-
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,)
Sets
self.symmetry (str) self.sym_entry (SymEntry) self.number_of_symmetry_mates (int) self._expand_matrices self._expand_translations
Source code in symdesign/structure/model.py
3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 |
|
get_transformed_mate
get_transformed_mate(rotation: list[list[float]] | ndarray = None, translation: list[float] | ndarray = None, rotation2: list[list[float]] | ndarray = None, translation2: list[float] | ndarray = None) -> Entity
Make a semi-deep copy of the Entity, stripping any captain attributes, transforming the coordinates
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:
-
Entity
–A transformed copy of the original object
Source code in symdesign/structure/model.py
3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 |
|
write
write(out_path: bytes | str = os.getcwd(), file_handle: IO = None, header: str = None, assembly: bool = False, **kwargs) -> AnyStr | None
Write Entity Structure to a file specified by out_path or with a passed file_handle
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
-
assembly
(bool
, default:False
) –Whether to write the oligomeric form of the Entity
Other Parameters:
-
increment_chains
–bool = False - Whether to write each Structure with a new chain name, otherwise write as a new Model
-
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. Not used if assembly=True
Returns:
-
AnyStr | None
–The name of the written file if out_path is used
Source code in symdesign/structure/model.py
3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 |
|
calculate_metrics
calculate_metrics(**kwargs) -> dict[str, Any]
Source code in symdesign/structure/model.py
3829 3830 3831 3832 |
|
calculate_spatial_orientation_metrics
calculate_spatial_orientation_metrics(reference: ndarray = utils.symmetry.origin) -> dict[str, Any]
Calculate metrics for the instance
Parameters:
-
reference
(ndarray
, default:origin
) –The reference where the point should be measured from
Returns:
-
dict[str, Any]
–{'radius' 'min_radius' 'max_radius' 'n_terminal_orientation' 'c_terminal_orientation'
-
dict[str, Any]
–}
Source code in symdesign/structure/model.py
3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854 |
|
get_alphafold_features
get_alphafold_features(symmetric: bool = False, heteromer: bool = False, msas: Sequence = tuple(), no_msa: bool = False, templates: bool = False, **kwargs) -> FeatureDict
Retrieve the required feature dictionary for this instance to use in Alphafold inference
Parameters:
-
symmetric
(bool
, default:False
) –Whether the symmetric Entity should be used for feature production. If True, this function will fully process the FeatureDict in the symmetric form compatible with Alphafold multimer
-
heteromer
(bool
, default:False
) –Whether Alphafold should be run as a heteromer. Features directly used in Alphafold from this instance should never be used with heteromer=True
-
msas
(Sequence
, default:tuple()
) –A sequence of multiple sequence alignments if they should be included in the features
-
no_msa
(bool
, default:False
) –Whether multiple sequence alignments should be included in the features
-
templates
(bool
, default:False
) –Whether the Entity should be returned with it's template features
Returns:
-
FeatureDict
–The Alphafold FeatureDict which is essentially a dictionary with dict[str, np.ndarray]
Source code in symdesign/structure/model.py
3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 3915 3916 3917 3918 3919 3920 3921 3922 3923 3924 3925 3926 3927 3928 3929 3930 3931 3932 3933 3934 3935 3936 3937 3938 3939 3940 3941 3942 3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 |
|
find_chain_symmetry
find_chain_symmetry()
Search for the chain symmetry by using quaternion geometry to solve the symmetric order of the rotations which superimpose chains on the Entity. Translates the Entity to the origin using center of mass, then the axis of rotation only needs to be translated to the center of mass to recapitulate the specific symmetry operation
Requirements - all chains are the same length
Sets
self.mate_rotation_axes (list[dict[str, int | np.ndarray]]) self._max_symmetry (int) self.max_symmetry_chain_idx (int)
Returns:
-
–
The name of the file written for symmetry definition file creation
Source code in symdesign/structure/model.py
4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 |
|
is_cyclic
is_cyclic() -> bool
Report whether the symmetry is cyclic
Returns:
-
bool
–True if the Structure is cyclic, False if not
Source code in symdesign/structure/model.py
4154 4155 4156 4157 4158 4159 4160 |
|
is_dihedral
is_dihedral() -> bool
Report whether the symmetry is dihedral
Returns:
-
bool
–True if the Structure is dihedral, False if not
Source code in symdesign/structure/model.py
4162 4163 4164 4165 4166 4167 4168 |
|
find_dihedral_chain
find_dihedral_chain() -> Entity | None
From the symmetric system, find a dihedral chain and return the instance
Returns:
-
Entity | None
–The dihedral mate Chain
Source code in symdesign/structure/model.py
4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 |
|
make_sdf
make_sdf(struct_file: AnyStr = None, out_path: AnyStr = os.getcwd(), **kwargs) -> AnyStr
Use the make_symmdef_file.pl script from Rosetta to make a symmetry definition file on the Structure
perl $ROSETTA/source/src/apps/public/symmetry/make_symmdef_file.pl -p filepath/to/pdb.pdb -i B -q
Parameters:
-
struct_file
(AnyStr
, default:None
) –The location of the input .pdb file
-
out_path
(AnyStr
, default:getcwd()
) –The location the symmetry definition file should be written
Other Parameters:
-
modify_sym_energy_for_cryst
–bool = False - Whether the symmetric energy in the file should be modified
-
energy
–int = 2 - Scalar to modify the Rosetta energy by
Returns:
-
AnyStr
–Symmetry definition filename
Source code in symdesign/structure/model.py
4194 4195 4196 4197 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 |
|
format_sdf
format_sdf(lines: list, to_file: AnyStr = None, out_path: AnyStr = os.getcwd(), modify_sym_energy_for_cryst: bool = False, energy: int = None) -> AnyStr
Ensure proper sdf formatting before proceeding
Parameters:
-
lines
(list
) –The symmetry definition file lines
-
to_file
(AnyStr
, default:None
) –The name of the symmetry definition file
-
out_path
(AnyStr
, default:getcwd()
) –The location the symmetry definition file should be written
-
modify_sym_energy_for_cryst
(bool
, default:False
) –Whether the symmetric energy should match crystallographic systems
-
energy
(int
, default:None
) –Scalar to modify the Rosetta energy by
Returns:
-
AnyStr
–The location the symmetry definition file was written
Source code in symdesign/structure/model.py
4252 4253 4254 4255 4256 4257 4258 4259 4260 4261 4262 4263 4264 4265 4266 4267 4268 4269 4270 4271 4272 4273 4274 4275 4276 4277 4278 4279 4280 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 |
|
reset_mates
reset_mates()
Remove oligomeric chains. They should be generated fresh
Source code in symdesign/structure/model.py
4338 4339 4340 4341 |
|
fragment_db
fragment_db(fragment_db: FragmentDatabase)
Set the Structure FragmentDatabase to assist with Fragment creation, manipulation, and profiles. Sets .fragment_db for each dependent Structure in 'structure_containers'
Entity specific implementation to prevent recursion with [1:]
Source code in symdesign/structure/model.py
4343 4344 4345 4346 4347 4348 4349 4350 4351 4352 4353 4354 4355 4356 4357 4358 |
|
Model
Model(chains: bool | Sequence[Chain] = True, chain_ids: Iterable[str] = None, rename_chains: bool = False, as_mates: bool = False, **kwargs)
Bases: ContainsChains
The main class for simple Structure manipulation, particularly containing multiple Chain instances
Can initialize by passing a file, or passing Atom/Residue/Chain instances. If your Structure is symmetric, a SymmetricModel should be used instead. If you have multiple Model instances, use the MultiModel class.
Parameters:
-
chain_ids
(Iterable[str]
, default:None
) –A list of identifiers to assign to each Chain instance
-
chains
(bool | Sequence[Chain]
, default:True
) –Whether to create Chain instances from passed Structure container instances, or existing Chain instances to create the Model with
-
rename_chains
(bool
, default:False
) –Whether to name each chain an incrementally new Alphabetical character
-
as_mates
(bool
, default:False
) –Whether Chain instances should be controlled by a captain (True), or be dependents
Source code in symdesign/structure/model.py
1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 |
|
Models
Models(models: Iterable[ContainsEntities | Entity], name: str = None, **kwargs)
Bases: UserList
Container for Model instances. Primarily used for writing [symmetric] multimodel-like Structure instances
Source code in symdesign/structure/model.py
4462 4463 4464 4465 4466 4467 4468 4469 4470 4471 |
|
number_of_models
property
number_of_models: int
The number of unique models that are found in the Models object
from_models
classmethod
from_models(models: Iterable[Model], **kwargs)
Initialize from an iterable of Model instances
Source code in symdesign/structure/model.py
4457 4458 4459 4460 |
|
write
write(out_path: bytes | str = os.getcwd(), file_handle: IO = None, header: str = None, multimodel: bool = False, increment_chains: bool = False, **kwargs) -> AnyStr | None
Write Model Atoms to a file specified by out_path or with a passed file_handle
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
-
multimodel
(bool
, default:False
) –Whether MODEL and ENDMDL records should be added at the end of each Model
-
increment_chains
(bool
, default:False
) –Whether to write each Chain with an incrementing chain ID, otherwise use the chain IDs present, repeating for each Model
Keyword Args assembly: bool = False - Whether to write an assembly representation of each Model instance
Returns:
-
AnyStr | None
–The name of the written file if out_path is used
Source code in symdesign/structure/model.py
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 4545 4546 4547 4548 4549 4550 4551 4552 4553 4554 4555 4556 4557 4558 4559 4560 4561 4562 4563 4564 4565 4566 4567 |
|
SymmetricModel
SymmetricModel(sym_entry: SymEntry | int = None, symmetry: str = None, transformations: list[TransformationMapping] = None, uc_dimensions: list[float] = None, symmetry_operators: ndarray | list = None, rotation_matrices: ndarray | list = None, translation_matrices: ndarray | list = None, surrounding_uc: bool = True, **kwargs)
Bases: SymmetryOpsMixin
, ContainsEntities
Parameters:
-
sym_entry
(SymEntry | int
, default:None
) –The SymEntry which specifies all symmetry parameters
-
symmetry
(str
, default:None
) –The name of a symmetry to be searched against compatible symmetries
-
transformations
(list[TransformationMapping]
, default:None
) –Transformation operations that reproduce the oligomeric/assembly for each Entity
-
rotation_matrices
(ndarray | list
, default:None
) –Rotation operations that create the symmetric state
-
translation_matrices
(ndarray | list
, default:None
) –Translation operations that create the symmetric state
-
uc_dimensions
(list[float]
, default:None
) –The unit cell dimensions for the crystalline symmetry
-
symmetry_operators
(ndarray | list
, default:None
) –A set of custom expansion matrices
-
surrounding_uc
(bool
, default:True
) –Whether the 3x3 layer group, or 3x3x3 space group should be generated
Source code in symdesign/structure/model.py
2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 |
|
symmetric_coords_split_by_entity
property
symmetric_coords_split_by_entity: list[list[ndarray]]
A view of the symmetric coords split for each symmetric model by the Pose Entity indices
symmetric_coords_by_entity
property
symmetric_coords_by_entity: list[ndarray]
A view of the symmetric coords for each Entity in order of the Pose Entity indices
center_of_mass_symmetric_entities
property
center_of_mass_symmetric_entities: list[list[ndarray]]
The center of mass position for each Entity instance in the symmetric system for each symmetry mate with shape [(number_of_symmetry_mates, 3), ... number_of_entities]
assembly
property
assembly: Model
Provides the Structure object containing all symmetric chains in the assembly unless the design is 2- or 3-D then the assembly only contains the contacting models
assembly_minimally_contacting
property
assembly_minimally_contacting: Model
Provides the Structure object only containing the SymmetricModel instances contacting the ASU
entity_transformations
property
entity_transformations: list[TransformationMapping] | list
The transformation parameters for each Entity in the SymmetricModel. Each entry has the TransformationMapping type
assembly_tree
property
assembly_tree: BinaryTreeType
Holds the tree structure of the backbone and cb symmetric_coords not including the asu coords
from_assembly
classmethod
from_assembly(assembly: Model, sym_entry: SymEntry | int = None, symmetry: str = None, **kwargs)
Initialize from a symmetric assembly
Source code in symdesign/structure/model.py
4591 4592 4593 4594 4595 4596 4597 4598 4599 |
|
set_symmetry
set_symmetry(sym_entry: SymEntry | int = None, symmetry: str = None, crystal: bool = False, cryst_record: str = None, uc_dimensions: list[float] = None, operators: tuple[ndarray | list[list[float]], ndarray | list[float]] | ndarray = None, rotations: ndarray | list[list[float]] = None, translations: ndarray | list[float] = None, transformations: list[TransformationMapping] = None, surrounding_uc: bool = True, **kwargs)
Set the model symmetry using the CRYST1 record, or the unit cell dimensions and the Hermann-Mauguin symmetry notation (in CRYST1 format, ex P432) for the Model assembly. If the assembly is a point group, only the symmetry notation is required
Parameters:
-
sym_entry
(SymEntry | int
, default:None
) –The SymEntry which specifies all symmetry parameters
-
symmetry
(str
, default:None
) –The name of a symmetry to be searched against compatible symmetries
-
crystal
(bool
, default:False
) –Whether crystalline symmetry should be used
-
cryst_record
(str
, default:None
) –If a CRYST1 record is known and should be used
-
uc_dimensions
(list[float]
, default:None
) –The unit cell dimensions for the crystalline symmetry
-
operators
(tuple[ndarray | list[list[float]], ndarray | list[float]] | ndarray
, default:None
) –A set of custom expansion matrices
-
rotations
(ndarray | list[list[float]]
, default:None
) –A set of rotation matrices used to recapitulate the SymmetricModel from the asymmetric unit
-
translations
(ndarray | list[float]
, default:None
) –A set of translation vectors used to recapitulate the SymmetricModel from the asymmetric unit
-
transformations
(list[TransformationMapping]
, default:None
) –Transformation operations that reproduce the oligomeric state for each Entity
-
surrounding_uc
(bool
, default:True
) –Whether the 3x3 layer group, or 3x3x3 space group should be generated
-
crystal
(bool
, default:False
) –Whether crystalline symmetry should be used
-
cryst_record
(str
, default:None
) –If a CRYST1 record is known and should be used
Source code in symdesign/structure/model.py
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 4667 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 4753 4754 4755 4756 4757 4758 4759 4760 4761 4762 4763 4764 4765 4766 4767 4768 4769 4770 4771 4772 4773 |
|
get_asu_interaction_model_indices
get_asu_interaction_model_indices(calculate_contacts: bool = True, distance: float = 8.0, **kwargs) -> list[int]
From an ASU, find the symmetric models that immediately surround the ASU
Parameters:
-
calculate_contacts
(bool
, default:True
) –Whether to calculate interacting models by atomic contacts
-
distance
(float
, default:8.0
) –When calculate_contacts is True, the CB distance which nearby symmetric models should be found When calculate_contacts is False, uses the ASU radius plus the maximum Entity radius
Returns:
-
list[int]
–The indices of the models that contact the asu
Source code in symdesign/structure/model.py
5087 5088 5089 5090 5091 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 |
|
get_asu_atom_indices
get_asu_atom_indices(as_slice: bool = False) -> list[int] | slice
Find the coordinate indices of the asu equivalent model in the SymmetricModel. Zero-indexed
Returns:
-
list[int] | slice
–The indices in the SymmetricModel where the ASU is also located
Source code in symdesign/structure/model.py
5124 5125 5126 5127 5128 5129 5130 5131 5132 5133 5134 5135 5136 5137 5138 |
|
get_oligomeric_atom_indices
get_oligomeric_atom_indices(entity: Entity) -> list[int]
Find the coordinate indices of the intra-oligomeric equivalent models in the SymmetricModel. Zero-indexed
Parameters:
-
entity
(Entity
) –The Entity with oligomeric chains to query for corresponding symmetry mates
Returns:
-
list[int]
–The indices in the SymmetricModel where the intra-oligomeric contacts are located
Source code in symdesign/structure/model.py
5140 5141 5142 5143 5144 5145 5146 5147 5148 5149 5150 5151 5152 5153 5154 |
|
get_asu_interaction_indices
get_asu_interaction_indices(**kwargs) -> list[int]
Find the coordinate indices for the models in the SymmetricModel interacting with the asu. Zero-indexed
Other Parameters:
-
calculate_contacts
–bool = True - Whether to calculate interacting models by atomic contacts
-
distance
–float = 8.0 - When calculate_contacts is True, the CB distance which nearby symmetric models should be found. When calculate_contacts is False, uses the ASU radius plus the maximum Entity radius
Returns:
-
list[int]
–The indices in the SymmetricModel where the asu contacts other models
Source code in symdesign/structure/model.py
5156 5157 5158 5159 5160 5161 5162 5163 5164 5165 5166 5167 5168 5169 5170 5171 5172 5173 |
|
make_oligomers
make_oligomers(transformations: list[TransformationMapping] = None)
Generate oligomers for each Entity in the SymmetricModel
Parameters:
-
transformations
(list[TransformationMapping]
, default:None
) –The entity_transformations operations that reproduce the individual oligomers
Source code in symdesign/structure/model.py
5539 5540 5541 5542 5543 5544 5545 5546 5547 5548 5549 5550 5551 5552 5553 5554 5555 5556 |
|
symmetric_assembly_is_clash
symmetric_assembly_is_clash(measure: coords_type_literal = default_clash_criteria, distance: float = default_clash_distance, warn: bool = False) -> bool
Returns True if the SymmetricModel presents any clashes at the specified distance
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
Returns:
-
bool
–True if the symmetric assembly clashes with the asu, False otherwise
Source code in symdesign/structure/model.py
5558 5559 5560 5561 5562 5563 5564 5565 5566 5567 5568 5569 5570 5571 5572 5573 5574 5575 5576 5577 5578 5579 5580 5581 |
|
write
write(out_path: bytes | str = os.getcwd(), file_handle: IO = None, header: str = None, assembly: bool = False, **kwargs) -> AnyStr | None
Write SymmetricModel Atoms to a file specified by out_path or with a passed file_handle
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
-
assembly
(bool
, default:False
) –Whether to write the full assembly. Default writes only the ASU
Other Parameters:
-
increment_chains
–bool = False - Whether to write each Structure with a new chain name, otherwise write as a new Model
-
surrounding_uc
–bool = False - Whether the 3x3 layer group, or 3x3x3 space group should be written when assembly is True and self.dimension > 1
Returns:
-
AnyStr | None
–The name of the written file if out_path is used
Source code in symdesign/structure/model.py
5606 5607 5608 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 5646 5647 5648 5649 5650 5651 5652 5653 |
|
Pose
Pose(**kwargs)
Bases: SymmetricModel
, MetricsMixin
A Pose is made of single or multiple Structure objects such as Entities, Chains, or other structures. All objects share a common feature such as the same symmetric system or the same general atom configuration in separate models across the Structure or sequence.
Parameters:
-
**kwargs
–
Source code in symdesign/structure/model.py
5732 5733 5734 5735 5736 5737 5738 5739 5740 5741 5742 5743 5744 5745 5746 5747 5748 |
|
split_interface_ss_elements
instance-attribute
split_interface_ss_elements: dict[int, list[int]] = {}
Stores the interface number mapped to an index corresponding to the secondary structure type Ex: {1: [0, 0, 1, 2, ...] , 2: [9, 9, 9, 13, ...]]}
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
active_entities
property
active_entities: list[Entity]
The Entity instances that are available for design calculations given a design selector
interface_residues
property
interface_residues: list[Residue]
The Residue instances identified in interfaces in the Pose sorted based on index. Residue instances may be completely buried depending on interface distance
interface_residues_by_entity_pair
property
The Residue instances identified between pairs of Entity instances
interface_neighbor_residues
property
interface_neighbor_residues: list[Residue]
The Residue instances identified as neighbors to interfaces in the Pose. Assumes default distance of 8 A
design_residues
property
writable
design_residues: list[Residue]
The Residue instances identified for design in the Pose. Includes interface_residues
required_residues
property
required_residues: list[Residue]
Returns the Residue instances that are required according to DesignSelector
core_residues
property
core_residues: list[Residue]
Get the Residue instances that reside in the core of the interfaces
Parameters:
-
relative_sasa_thresh
–The relative area threshold that the Residue should fall below before it is considered 'core'. Default cutoff percent 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 core Residue instances
rim_residues
property
rim_residues: list[Residue]
Get the Residue instances that reside in the rim of the interface
Parameters:
-
relative_sasa_thresh
–The relative area threshold that the Residue should fall below before it is considered 'rim'. Default cutoff percent 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 rim Residue instances
support_residues
property
support_residues: list[Residue]
Get the Residue instances that support the interface
Parameters:
-
relative_sasa_thresh
–The relative area threshold that the Residue should fall below before it is considered 'support'. Default cutoff percent 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 support Residue instances
fragment_info_by_entity_pair
property
Returns the FragmentInfo present as the result of structural overlap between pairs of Entity instances
interface_fragment_residue_indices
property
writable
interface_fragment_residue_indices: list[int]
The Residue indices where Fragment occurrences are observed
interface_residues_by_interface_unique
property
interface_residues_by_interface_unique: dict[int, list[Residue]]
Keeps the Residue instances grouped by membership to each side of the interface. Residues are unique to one side of the interface Ex: {1: [Residue, ...], 2: [Residue, ...]}
interface_residues_by_interface
property
interface_residues_by_interface: dict[int, list[Residue]]
Keeps the Residue instances grouped by membership to each side of the interface. Residues can be duplicated on each side when interface contains a 2-fold axis of symmetry Ex: {1: [Residue, ...], 2: [Residue, ...]}
fragment_metrics_by_entity_pair
property
Returns the metrics from structural overlapping Fragment observations between pairs of Entity instances
calculate_metrics
calculate_metrics(**kwargs) -> dict[str, Any]
Calculate metrics for the instance
Returns:
-
dict[str, Any]
–{ 'entity_max_radius_average_deviation', 'entity_min_radius_average_deviation', 'entity_radius_average_deviation', 'interface_b_factor', 'interface1_secondary_structure_fragment_topology', 'interface1_secondary_structure_fragment_count', 'interface1_secondary_structure_topology', 'interface1_secondary_structure_count', 'interface2_secondary_structure_fragment_topology', 'interface2_secondary_structure_fragment_count', 'interface2_secondary_structure_topology', 'interface2_secondary_structure_count', 'maximum_radius', 'minimum_radius', 'multiple_fragment_ratio', 'nanohedra_score_normalized', 'nanohedra_score_center_normalized', 'nanohedra_score', 'nanohedra_score_center', 'number_residues_interface_fragment_total', 'number_residues_interface_fragment_center', 'number_fragments_interface', 'number_residues_interface', 'number_residues_interface_non_fragment', 'percent_fragment_helix', 'percent_fragment_strand', 'percent_fragment_coil', 'percent_residues_fragment_interface_total', 'percent_residues_fragment_interface_center', 'percent_residues_non_fragment_interface', 'pose_length', 'symmetric_interface'
-
dict[str, Any]
–}
Source code in symdesign/structure/model.py
5750 5751 5752 5753 5754 5755 5756 5757 5758 5759 5760 5761 5762 5763 5764 5765 5766 5767 5768 5769 5770 5771 5772 5773 5774 5775 5776 5777 5778 5779 5780 5781 5782 5783 5784 5785 5786 5787 5788 5789 5790 5791 5792 5793 5794 5795 5796 5797 5798 5799 5800 5801 5802 5803 5804 5805 5806 5807 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 5841 5842 5843 |
|
apply_design_selector
apply_design_selector(selection: StructureSpecification = None, mask: StructureSpecification = None, required: StructureSpecification = None)
Set up a design selector for the Pose including selections, masks, and required Entities and Atoms
Sets
self._design_selection_entity_names set[str] self._design_selector_atom_indices set[int] self._required_atom_indices Sequence[int]
Source code in symdesign/structure/model.py
5934 5935 5936 5937 5938 5939 5940 5941 5942 5943 5944 5945 5946 5947 5948 5949 5950 5951 5952 5953 5954 5955 5956 5957 5958 5959 5960 5961 5962 5963 5964 5965 5966 5967 5968 5969 5970 5971 5972 5973 5974 5975 5976 5977 5978 5979 5980 5981 5982 5983 5984 5985 5986 5987 5988 5989 5990 5991 5992 5993 5994 5995 5996 5997 5998 5999 6000 6001 6002 6003 6004 6005 6006 6007 6008 6009 6010 6011 6012 6013 6014 6015 6016 6017 6018 6019 6020 6021 6022 6023 6024 6025 6026 6027 6028 6029 |
|
get_alphafold_features
get_alphafold_features(symmetric: bool = False, multimer: bool = False, **kwargs) -> FeatureDict
Retrieve the required feature dictionary for this instance to use in Alphafold inference
Parameters:
-
symmetric
(bool
, default:False
) –Whether the symmetric version of the Pose should be used for feature production
-
multimer
(bool
, default:False
) –Whether to run as a multimer. If multimer is True while symmetric is False, the Pose will be processed according to the ASU
Other Parameters:
-
msas
–Sequence - A sequence of multiple sequence alignments if they should be included in the features
-
no_msa
–bool = False - Whether multiple sequence alignments should be included in the features
Returns:
-
FeatureDict
–The alphafold FeatureDict which is essentially a dictionary with dict[str, np.ndarray]
Source code in symdesign/structure/model.py
6036 6037 6038 6039 6040 6041 6042 6043 6044 6045 6046 6047 6048 6049 6050 6051 6052 6053 6054 6055 6056 6057 6058 6059 6060 6061 6062 6063 6064 6065 6066 6067 6068 6069 6070 6071 6072 6073 6074 6075 6076 6077 6078 6079 6080 6081 6082 6083 6084 6085 6086 6087 6088 6089 6090 6091 6092 6093 6094 6095 6096 6097 6098 6099 6100 6101 6102 6103 6104 6105 6106 6107 6108 6109 6110 6111 6112 6113 6114 6115 6116 6117 6118 6119 6120 6121 6122 6123 6124 6125 6126 6127 6128 6129 6130 6131 6132 6133 6134 6135 6136 6137 |
|
get_proteinmpnn_params
get_proteinmpnn_params(ca_only: bool = False, pssm_bias_flag: bool = False, pssm_multi: float = 0.0, bias_pssm_by_probabilities: bool = False, pssm_log_odds_flag: bool = False, interface: bool = False, neighbors: bool = False, **kwargs) -> dict[str, ndarray]
Parameters:
-
ca_only
(bool
, default:False
) –Whether a minimal CA variant of the protein should be used for design calculations
-
pssm_bias_flag
(bool
, default:False
) –Whether to use bias to modulate the residue probabilities designed
-
pssm_multi
(float
, default:0.0
) –How much to skew the design probabilities towards the sequence profile. Bounded between [0, 1] where 0 is no sequence profile probability. Only used with pssm_bias_flag and modifies each coefficient in pssm_coef by the fractional amount
-
bias_pssm_by_probabilities
(bool
, default:False
) –Whether to produce bias by profile probabilities as opposed to lods
-
pssm_log_odds_flag
(bool
, default:False
) –Whether to use log_odds threshold (>0) to limit amino acid types of designed residues Creates pssm_log_odds_mask based on the threshold
-
interface
(bool
, default:False
) –Whether to design the interface
-
neighbors
(bool
, default:False
) –Whether to design interface neighbors
Other Parameters:
-
distance
–float = 8. - The distance to measure Residues across an interface
Returns:
-
dict[str, ndarray]
–A mapping of the ProteinMPNN parameter names to their data, typically arrays
Source code in symdesign/structure/model.py
6139 6140 6141 6142 6143 6144 6145 6146 6147 6148 6149 6150 6151 6152 6153 6154 6155 6156 6157 6158 6159 6160 6161 6162 6163 6164 6165 6166 6167 6168 6169 6170 6171 6172 6173 6174 6175 6176 6177 6178 6179 6180 6181 6182 6183 6184 6185 6186 6187 6188 6189 6190 6191 6192 6193 6194 6195 6196 6197 6198 6199 6200 6201 6202 6203 6204 6205 6206 6207 6208 6209 6210 6211 6212 6213 6214 6215 6216 6217 6218 6219 6220 6221 6222 6223 6224 6225 6226 6227 6228 6229 6230 6231 6232 6233 6234 6235 6236 6237 6238 6239 6240 6241 6242 6243 6244 6245 6246 6247 6248 6249 6250 6251 6252 6253 6254 6255 6256 6257 6258 6259 6260 6261 6262 6263 6264 6265 6266 6267 6268 6269 6270 6271 6272 6273 6274 6275 6276 6277 6278 6279 6280 6281 6282 6283 6284 6285 6286 6287 6288 6289 6290 6291 6292 6293 6294 6295 6296 6297 6298 6299 6300 6301 6302 6303 6304 6305 6306 6307 |
|
generate_proteinmpnn_decode_order
generate_proteinmpnn_decode_order(to_device: str = None, core_first: bool = False, **kwargs) -> Tensor | ndarray
Return the decoding order for ProteinMPNN. Currently just returns an array of random floats
For original ProteinMPNN GitHub release, the decoding order is only dependent on first entry in batch for model.tied_sample() while it is dependent on the entire batch for model.sample()
Parameters:
-
to_device
(str
, default:None
) –Whether the decoding order should be transferred to the device that a ProteinMPNN model is on
-
core_first
(bool
, default:False
) –Whether the core residues (identified as fragment pairs) should be decoded first
Returns:
-
Tensor | ndarray
–The decoding order to be used in ProteinMPNN graph decoding
Source code in symdesign/structure/model.py
6309 6310 6311 6312 6313 6314 6315 6316 6317 6318 6319 6320 6321 6322 6323 6324 6325 6326 6327 6328 6329 6330 6331 6332 6333 6334 6335 |
|
get_proteinmpnn_unbound_coords
get_proteinmpnn_unbound_coords(ca_only: bool = False) -> ndarray
Translate the coordinates along z in increments of 1000 to separate coordinates
Parameters:
-
ca_only
(bool
, default:False
) –Whether a minimal CA variant of the protein should be used for design calculations
Returns:
-
ndarray
–The Pose coords where each Entity has been translated away from other entities
Source code in symdesign/structure/model.py
6337 6338 6339 6340 6341 6342 6343 6344 6345 6346 6347 6348 6349 6350 6351 6352 6353 6354 6355 6356 6357 6358 6359 6360 6361 6362 6363 6364 6365 6366 6367 |
|
score_sequences
score_sequences(sequences: Sequence[str] | Sequence[Sequence[str]] | array, method: design_programs_literal = putils.proteinmpnn, measure_unbound: bool = True, ca_only: bool = False, **kwargs) -> dict[str, ndarray]
Analyze the output of sequence design
Parameters:
-
sequences
(Sequence[str] | Sequence[Sequence[str]] | array
) –The sequences to score
-
method
(design_programs_literal
, default:proteinmpnn
) –Whether to score using ProteinMPNN or Rosetta
-
measure_unbound
(bool
, default:True
) –Whether the protein should be scored in the unbound state
-
ca_only
(bool
, default:False
) –Whether a minimal CA variant of the protein should be used for design calculations
Other Parameters:
-
model_name
–The name of the model to use from ProteinMPNN taking the format v_X_Y, where X is neighbor distance and Y is noise
-
backbone_noise
–float = 0.0 - The amount of backbone noise to add to the pose during design
-
pssm_multi
–float = 0.0 - How much to skew the design probabilities towards the sequence profile. Bounded between [0, 1] where 0 is no sequence profile probability. Only used with pssm_bias_flag
-
pssm_log_odds_flag
–bool = False - Whether to use log_odds mask to limit the residues designed
-
pssm_bias_flag
–bool = False - Whether to use bias to modulate the residue probabilites designed
-
bias_pssm_by_probabilities
–Whether to produce bias by profile probabilities as opposed to profile lods
-
#
(interface
) –Whether to design the interface
-
#
(neighbors
) –Whether to design interface neighbors
-
decode_core_first
–bool = False - Whether to decode identified fragments (constituting the protein core) first
Returns:
-
dict[str, ndarray]
–A mapping of the design score type name to the per-residue output data which is a ndarray with shape
-
dict[str, ndarray]
–(number of sequences, pose_length).
-
dict[str, ndarray]
–For proteinmpnn,
-
dict[str, ndarray]
–these are the outputs: 'sequences', 'numeric_sequences', 'proteinmpnn_loss_complex', and
-
dict[str, ndarray]
–'proteinmpnn_loss_unbound' mapped to their corresponding arrays with data types as np.ndarray
-
dict[str, ndarray]
–For rosetta, this function isn't implemented
Source code in symdesign/structure/model.py
6369 6370 6371 6372 6373 6374 6375 6376 6377 6378 6379 6380 6381 6382 6383 6384 6385 6386 6387 6388 6389 6390 6391 6392 6393 6394 6395 6396 6397 6398 6399 6400 6401 6402 6403 6404 6405 6406 6407 6408 6409 6410 6411 6412 6413 6414 6415 6416 6417 6418 6419 6420 6421 6422 6423 6424 6425 6426 6427 6428 6429 6430 6431 6432 6433 6434 6435 6436 6437 6438 6439 6440 6441 6442 6443 6444 6445 6446 6447 6448 6449 6450 6451 6452 6453 6454 6455 6456 6457 6458 6459 6460 6461 6462 6463 6464 6465 6466 6467 6468 6469 6470 6471 6472 6473 6474 6475 6476 6477 6478 6479 6480 6481 6482 6483 6484 6485 6486 6487 6488 6489 6490 6491 6492 6493 6494 6495 6496 6497 6498 6499 6500 6501 6502 6503 6504 6505 6506 6507 6508 6509 6510 6511 6512 6513 6514 6515 6516 6517 6518 6519 6520 6521 6522 |
|
design_sequences
design_sequences(method: design_programs_literal = putils.proteinmpnn, number: int = 10, temperatures: Sequence[float] = (0.1), interface: bool = False, neighbors: bool = False, measure_unbound: bool = True, ca_only: bool = False, **kwargs) -> dict[str, ndarray]
Perform sequence design on the Pose
Parameters:
-
method
(design_programs_literal
, default:proteinmpnn
) –Whether to design using ProteinMPNN or Rosetta
-
number
(int
, default:10
) –The number of sequences to design
-
temperatures
(Sequence[float]
, default:(0.1)
) –The temperatures to perform design at
-
interface
(bool
, default:False
) –Whether to design the interface
-
neighbors
(bool
, default:False
) –Whether to design interface neighbors
-
measure_unbound
(bool
, default:True
) –Whether the protein should be designed with concern for the unbound state
-
ca_only
(bool
, default:False
) –Whether a minimal CA variant of the protein should be used for design calculations
Other Parameters:
-
neighbors
(bool
) –bool = False - Whether to design interface neighbors
-
model_name
–The name of the model to use from ProteinMPNN taking the format v_X_Y, where X is neighbor distance and Y is noise
-
backbone_noise
–float = 0.0 - The amount of backbone noise to add to the pose during design
-
pssm_multi
–float = 0.0 - How much to skew the design probabilities towards the sequence profile. Bounded between [0, 1] where 0 is no sequence profile probability. Only used with pssm_bias_flag
-
pssm_log_odds_flag
–bool = False - Whether to use log_odds mask to limit the residues designed
-
pssm_bias_flag
–bool = False - Whether to use bias to modulate the residue probabilites designed
-
bias_pssm_by_probabilities
–Whether to produce bias by profile probabilities as opposed to profile lods
-
decode_core_first
–bool = False - Whether to decode identified fragments (constituting the protein core) first
Returns:
-
dict[str, ndarray]
–A mapping of the design score type to the per-residue output data which is a ndarray with shape
-
dict[str, ndarray]
–(number*temperatures, pose_length).
-
dict[str, ndarray]
–For proteinmpnn,
-
dict[str, ndarray]
–these are the outputs 'sequences', 'numeric_sequences', 'design_indices', 'proteinmpnn_loss_complex', and
-
dict[str, ndarray]
–'proteinmpnn_loss_unbound' mapped to their corresponding score types. For each return array, the return
-
dict[str, ndarray]
–varies such as: [temp1/number1, temp1/number2, ...,
-
dict[str, ndarray]
–tempN/number1, ...] where designs are sorted by temperature
-
dict[str, ndarray]
–For rosetta, this function isn't implemented
Source code in symdesign/structure/model.py
6524 6525 6526 6527 6528 6529 6530 6531 6532 6533 6534 6535 6536 6537 6538 6539 6540 6541 6542 6543 6544 6545 6546 6547 6548 6549 6550 6551 6552 6553 6554 6555 6556 6557 6558 6559 6560 6561 6562 6563 6564 6565 6566 6567 6568 6569 6570 6571 6572 6573 6574 6575 6576 6577 6578 6579 6580 6581 6582 6583 6584 6585 6586 6587 6588 6589 6590 6591 6592 6593 6594 6595 6596 6597 6598 6599 6600 6601 6602 6603 6604 6605 6606 6607 6608 6609 6610 6611 6612 6613 6614 6615 6616 6617 6618 6619 6620 6621 6622 6623 6624 6625 6626 6627 6628 6629 6630 6631 6632 6633 6634 6635 6636 6637 6638 6639 6640 6641 6642 6643 6644 6645 6646 |
|
get_termini_accessibility
get_termini_accessibility(entity: Entity = None, report_if_helix: bool = False) -> dict[str, bool]
Returns a dictionary indicating which termini are not buried. Coarsely locates termini which face outward
Parameters:
-
entity
(Entity
, default:None
) –The Structure to query which originates in the pose
-
report_if_helix
(bool
, default:False
) –Whether the query should additionally report on the helicity of the termini
Returns:
-
dict[str, bool]
–A dictionary with the mapping from termini to True if the termini is exposed Ex: {'n': True, 'c': False}
Source code in symdesign/structure/model.py
6648 6649 6650 6651 6652 6653 6654 6655 6656 6657 6658 6659 6660 6661 6662 6663 6664 6665 6666 6667 6668 6669 6670 6671 6672 6673 6674 6675 6676 6677 6678 6679 6680 6681 6682 6683 6684 6685 6686 6687 6688 6689 6690 6691 6692 6693 6694 6695 6696 6697 6698 6699 6700 6701 6702 6703 6704 6705 6706 6707 |
|
per_residue_contact_order
per_residue_contact_order(oligomeric_interfaces: bool = False, **kwargs) -> dict[str, ndarray]
Calculate the contact order separating calculation for chain breaks as would be expected for 3 state folding
Parameters:
-
oligomeric_interfaces
(bool
, default:False
) –Whether to query oligomeric interfaces
Returns:
-
dict[str, ndarray]
–The dictionary of {'contact_order': array of shape (number_of_residues,)}
Source code in symdesign/structure/model.py
6709 6710 6711 6712 6713 6714 6715 6716 6717 6718 6719 6720 6721 6722 6723 6724 6725 6726 |
|
get_folding_metrics
get_folding_metrics(profile_type: profile_types = 'evolutionary', **kwargs) -> tuple[ndarray, ndarray, ndarray]
Calculate metrics relating to the Pose folding, separating calculation for chain breaks. These include contact_order, hydrophobic_collapse, and hydrophobic_collapse_profile (each Entity MUST have a .*_profile attribute to return the hydrophobic collapse profile!)
Parameters:
-
profile_type
(profile_types
, default:'evolutionary'
) –The type of profile to use to calculate the hydrophobic collapse profile
Other Parameters:
-
hydrophobicity
–str = 'standard' – The hydrophobicity scale to consider. Either 'standard' (FILV), 'expanded' (FMILYVW), or provide one with 'custom' keyword argument
-
custom
–mapping[str, float | int] = None – A user defined mapping of amino acid type, hydrophobicity value pairs
-
alphabet_type
–alphabet_types = None – The amino acid alphabet if the sequence consists of integer characters
-
lower_window
–int = 3 – The smallest window used to measure
-
upper_window
–int = 9 – The largest window used to measure
Returns:
-
tuple[ndarray, ndarray, ndarray]
–The per-residue contact_order_z_score (number_of_residues), a per-residue hydrophobic_collapse (number_of_residues), and the hydrophobic_collapse profile (number_of_residues) based on Entity.evolutionary_profile instances
Source code in symdesign/structure/model.py
6728 6729 6730 6731 6732 6733 6734 6735 6736 6737 6738 6739 6740 6741 6742 6743 6744 6745 6746 6747 6748 6749 6750 6751 6752 6753 6754 6755 6756 6757 6758 6759 6760 6761 6762 6763 6764 6765 6766 6767 6768 6769 6770 6771 6772 6773 6774 6775 6776 6777 6778 6779 6780 6781 6782 6783 6784 6785 6786 6787 6788 6789 6790 6791 6792 6793 6794 6795 6796 6797 6798 6799 6800 6801 6802 6803 6804 6805 6806 6807 6808 6809 6810 6811 6812 6813 6814 6815 6816 6817 6818 6819 6820 |
|
interface_metrics
interface_metrics() -> dict[str, Any]
Gather all metrics relating to the Pose and the interfaces within the Pose
Calls self.get_fragment_metrics(), self.calculate_secondary_structure()
Returns:
-
dict[str, Any]
–Metrics measured as: { 'entity_max_radius_average_deviation', 'entity_min_radius_average_deviation', 'entity_radius_average_deviation', 'interface_b_factor', 'interface1_secondary_structure_fragment_topology', 'interface1_secondary_structure_fragment_count', 'interface1_secondary_structure_topology', 'interface1_secondary_structure_count', 'interface2_secondary_structure_fragment_topology', 'interface2_secondary_structure_fragment_count', 'interface2_secondary_structure_topology', 'interface2_secondary_structure_count', 'maximum_radius', 'minimum_radius', 'multiple_fragment_ratio', 'nanohedra_score_normalized', 'nanohedra_score_center_normalized', 'nanohedra_score', 'nanohedra_score_center', 'number_residues_interface_fragment_total', 'number_residues_interface_fragment_center', 'number_fragments_interface', 'number_residues_interface', 'number_residues_interface_non_fragment', 'percent_fragment_helix', 'percent_fragment_strand', 'percent_fragment_coil', 'percent_residues_fragment_interface_total', 'percent_residues_fragment_interface_center', 'percent_residues_non_fragment_interface', 'pose_length', 'symmetric_interface'
-
dict[str, Any]
–}
'entity_radius_ratio_#v#',
'entity_min_radius_ratio_#v#',
'entity_max_radius_ratio_#v#',
'entity_number_of_residues_ratio_#v#',
'entity_number_of_residues_average_deviation,
Source code in symdesign/structure/model.py
6822 6823 6824 6825 6826 6827 6828 6829 6830 6831 6832 6833 6834 6835 6836 6837 6838 6839 6840 6841 6842 6843 6844 6845 6846 6847 6848 6849 6850 6851 6852 6853 6854 6855 6856 6857 6858 6859 6860 6861 6862 6863 6864 6865 6866 6867 6868 6869 6870 6871 6872 6873 6874 6875 6876 6877 6878 6879 6880 6881 6882 6883 6884 6885 6886 6887 6888 6889 6890 6891 6892 6893 6894 6895 6896 6897 6898 6899 6900 6901 6902 6903 6904 6905 6906 6907 6908 6909 6910 6911 6912 6913 6914 6915 6916 6917 6918 6919 6920 6921 6922 6923 6924 6925 6926 6927 6928 6929 6930 6931 6932 6933 6934 6935 6936 6937 6938 6939 6940 6941 6942 6943 6944 6945 6946 6947 6948 6949 6950 6951 6952 6953 6954 6955 6956 6957 6958 6959 6960 |
|
per_residue_errat
per_residue_errat() -> dict[str, list[float]]
Return per-residue metrics for the interface surface area
Returns:
-
dict[str, list[float]]
–The dictionary of errat metrics {errat_deviation, } mapped to arrays of shape (number_of_residues,)
Source code in symdesign/structure/model.py
6962 6963 6964 6965 6966 6967 6968 6969 6970 6971 6972 6973 6974 6975 6976 6977 |
|
per_residue_interface_surface_area
per_residue_interface_surface_area() -> dict[str, list[float]]
Return per-residue metrics for the interface surface area
Returns:
-
dict[str, list[float]]
–The dictionary of metrics mapped to arrays of values with shape (number_of_residues,) Metrics include sasa_hydrophobic_complex, sasa_polar_complex, sasa_relative_complex, sasa_hydrophobic_bound, sasa_polar_bound, sasa_relative_bound
Source code in symdesign/structure/model.py
7080 7081 7082 7083 7084 7085 7086 7087 7088 7089 7090 7091 7092 7093 7094 7095 7096 7097 7098 7099 7100 7101 7102 7103 7104 7105 7106 7107 7108 7109 7110 7111 7112 |
|
per_residue_relative_surface_area
per_residue_relative_surface_area() -> dict[str, ndarray]
Returns the relative solvent accessible surface area (SASA), per residue type compared to ideal three residue peptides, in both the bound (but not repacked) and complex states of the constituent Entity instances
Returns:
-
dict[str, ndarray]
–Mapping of 'sasa_relative_complex' and 'sasa_relative_bound' to array with the per-residue relative SASA
Source code in symdesign/structure/model.py
7210 7211 7212 7213 7214 7215 7216 7217 7218 7219 7220 7221 7222 7223 7224 7225 7226 7227 7228 7229 7230 7231 7232 7233 7234 7235 |
|
per_residue_buried_surface_area
per_residue_buried_surface_area() -> ndarray
Returns the buried surface area (BSA) as a result of all interfaces between Entity instances
Returns:
-
ndarray
–An array with the per-residue unbound solvent accessible surface area (SASA) minus the SASA of the complex
Source code in symdesign/structure/model.py
7237 7238 7239 7240 7241 7242 7243 7244 7245 7246 7247 7248 7249 7250 7251 7252 7253 7254 7255 7256 7257 7258 7259 7260 |
|
per_residue_spatial_aggregation_propensity
per_residue_spatial_aggregation_propensity(distance: float = 5.0) -> dict[str, list[float]]
Return per-residue spatial_aggregation for the complexed and unbound states. Positive values are more aggregation prone, while negative values are less prone
Parameters:
-
distance
(float
, default:5.0
) –The distance in angstroms to measure Atom instances in contact
Returns:
-
dict[str, list[float]]
–The dictionary of metrics mapped to arrays of values with shape (number_of_residues,) Metrics include 'spatial_aggregation_propensity' and 'spatial_aggregation_propensity_unbound'
Source code in symdesign/structure/model.py
7262 7263 7264 7265 7266 7267 7268 7269 7270 7271 7272 7273 7274 7275 7276 7277 7278 7279 7280 7281 7282 7283 7284 7285 7286 7287 7288 7289 7290 7291 |
|
get_interface
get_interface(distance: float = 8.0) -> Model
Provide a view of the Pose interface by generating a Model containing only interface Residues
Parameters:
-
distance
(float
, default:8.0
) –The distance across the interface to query for Residue contacts
Returns:
-
Model
–The Structure containing only the Residues in the interface
Source code in symdesign/structure/model.py
7293 7294 7295 7296 7297 7298 7299 7300 7301 7302 7303 7304 7305 7306 7307 7308 7309 7310 7311 7312 7313 7314 7315 7316 7317 7318 7319 7320 7321 7322 7323 7324 7325 7326 7327 7328 7329 7330 7331 7332 7333 7334 7335 7336 7337 7338 7339 7340 7341 7342 7343 7344 7345 7346 7347 7348 7349 7350 7351 7352 7353 7354 7355 7356 7357 7358 7359 7360 7361 7362 7363 7364 7365 7366 7367 7368 7369 7370 7371 7372 7373 7374 7375 7376 7377 7378 7379 7380 7381 7382 7383 7384 7385 7386 7387 7388 7389 7390 7391 7392 7393 7394 7395 7396 7397 7398 7399 7400 7401 7402 7403 7404 7405 7406 7407 7408 7409 7410 7411 7412 7413 7414 7415 7416 7417 7418 7419 7420 7421 7422 7423 7424 7425 7426 7427 7428 7429 7430 7431 7432 7433 7434 7435 7436 7437 7438 7439 7440 7441 7442 7443 7444 7445 7446 7447 7448 |
|
get_interface_residues
get_interface_residues(entity1: Entity = None, entity2: Entity = None, **kwargs) -> tuple[list[Residue] | list, list[Residue] | list]
Get unique Residues across an interface between two Entities
If the interface occurs between the same Entity which is non-symmetrically defined, but happens to occur along a dimeric axis of symmetry (evaluates to True when the same Residue is found on each side of the interface), then the residues are returned belonging to only one side of the interface
Parameters:
-
entity1
(Entity
, default:None
) –First Entity to measure interface between
-
entity2
(Entity
, default:None
) –Second Entity to measure interface between
Other Parameters:
-
oligomeric_interfaces
–bool = False - Whether to query oligomeric interfaces
-
distance
–float = 8. - The distance to measure Residues across an interface
Returns:
-
tuple[list[Residue] | list, list[Residue] | list]
–The Entity1 and Entity2 interface Residue instances
Source code in symdesign/structure/model.py
7570 7571 7572 7573 7574 7575 7576 7577 7578 7579 7580 7581 7582 7583 7584 7585 7586 7587 7588 7589 7590 7591 7592 7593 7594 7595 7596 7597 7598 7599 7600 7601 7602 7603 7604 7605 7606 7607 7608 7609 |
|
local_density_interface
local_density_interface(distance: float = 12.0, atom_distance: float = None, **kwargs) -> float
Returns the density of heavy Atoms neighbors within 'distance' Angstroms to Atoms in the Pose interface
Parameters:
-
distance
(float
, default:12.0
) –The cutoff distance with which Atoms should be included in local density
-
atom_distance
(float
, default:None
) –The distance to measure contacts between atoms. By default, uses default_atom_count_distance
Other Parameters:
-
residue_distance
–float = 8. - The distance to residue contacts in the interface. Uses the default if None
-
oligomeric_interfaces
–bool = False - Whether to query oligomeric interfaces
Returns:
-
float
–The local atom density around the interface
Source code in symdesign/structure/model.py
7678 7679 7680 7681 7682 7683 7684 7685 7686 7687 7688 7689 7690 7691 7692 7693 7694 7695 7696 7697 7698 7699 7700 7701 7702 7703 7704 7705 7706 7707 7708 7709 7710 7711 7712 7713 7714 7715 |
|
query_entity_pair_for_fragments
query_entity_pair_for_fragments(entity1: Entity = None, entity2: Entity = None, oligomeric_interfaces: bool = False, **kwargs)
For all found interface residues in an Entity/Entity interface, search for corresponding fragment pairs
Parameters:
-
entity1
(Entity
, default:None
) –The first Entity to measure for interface fragments
-
entity2
(Entity
, default:None
) –The second Entity to measure for interface fragments
-
oligomeric_interfaces
(bool
, default:False
) –Whether to query oligomeric interfaces
Other Parameters:
-
by_distance
–bool = False - Whether interface Residue instances should be found by inter-residue Cb distance
-
distance
–float = 8. - The distance to measure Residues across an interface
Sets
self._fragment_info_by_entity_pair (dict[tuple[str, str], list[FragmentInfo]])
Source code in symdesign/structure/model.py
7728 7729 7730 7731 7732 7733 7734 7735 7736 7737 7738 7739 7740 7741 7742 7743 7744 7745 7746 7747 7748 7749 7750 7751 7752 7753 7754 7755 7756 7757 7758 7759 7760 7761 7762 7763 7764 7765 7766 7767 7768 7769 7770 7771 7772 7773 7774 7775 7776 7777 7778 7779 7780 7781 7782 7783 7784 7785 7786 7787 7788 7789 7790 7791 7792 7793 7794 7795 7796 7797 7798 7799 7800 7801 7802 7803 7804 7805 7806 7807 7808 7809 7810 7811 7812 7813 |
|
find_and_split_interface
find_and_split_interface(by_distance: bool = False, **kwargs)
Locate interfaces regions for the designable entities and split into two contiguous interface residues sets
Parameters:
-
by_distance
(bool
, default:False
) –Whether interface Residue instances should be found by inter-residue Cb distance
Other Parameters:
-
distance
–float = 8. - The distance to measure Residues across an interface
-
oligomeric_interfaces
–bool = False - Whether to query oligomeric interfaces
Sets
self._interface_residues_by_entity_pair (dict[tuple[str, str], tuple[list[int], list[int]]]): The Entity1/Entity2 interface mapped to the interface Residues self._interface_residues_by_interface (dict[int, list[int]]): Residue instances separated by interface topology self._interface_residues_by_interface_unique (dict[int, list[int]]): Residue instances separated by interface topology removing any dimeric duplicates
Source code in symdesign/structure/model.py
7833 7834 7835 7836 7837 7838 7839 7840 7841 7842 7843 7844 7845 7846 7847 7848 7849 7850 7851 7852 7853 7854 7855 7856 7857 7858 7859 7860 7861 7862 7863 7864 7865 7866 7867 7868 7869 7870 7871 7872 7873 7874 7875 7876 |
|
check_interface_topology
check_interface_topology()
From each pair of entities that share an interface, split the identified residues into two distinct groups. If an interface can't be composed into two distinct groups, raise DesignError
Sets
self._interface_residues_by_interface (dict[int, list[int]]): Residue instances separated by interface topology self._interface_residues_by_interface_unique (dict[int, list[int]]): Residue instances separated by interface topology removing any dimeric duplicates
Source code in symdesign/structure/model.py
7878 7879 7880 7881 7882 7883 7884 7885 7886 7887 7888 7889 7890 7891 7892 7893 7894 7895 7896 7897 7898 7899 7900 7901 7902 7903 7904 7905 7906 7907 7908 7909 7910 7911 7912 7913 7914 7915 7916 7917 7918 7919 7920 7921 7922 7923 7924 7925 7926 7927 7928 7929 7930 7931 7932 7933 7934 7935 7936 7937 7938 7939 7940 7941 7942 7943 7944 7945 7946 7947 7948 7949 7950 7951 7952 7953 7954 7955 7956 7957 7958 7959 7960 7961 7962 7963 7964 7965 7966 7967 7968 7969 7970 7971 7972 7973 7974 7975 7976 7977 7978 7979 7980 7981 7982 7983 7984 7985 7986 7987 7988 7989 7990 7991 7992 7993 7994 7995 7996 7997 7998 7999 8000 8001 8002 8003 8004 8005 8006 8007 8008 8009 8010 8011 8012 8013 8014 8015 8016 8017 8018 8019 8020 8021 8022 8023 8024 8025 8026 8027 8028 8029 8030 8031 |
|
calculate_secondary_structure
calculate_secondary_structure()
Curate the secondary structure topology for each Entity
Sets
self.ss_sequence_indices (list[int]): Index which indicates the Residue membership to the secondary structure type element sequence self.ss_type_sequence (list[str]): The ordered secondary structure type sequence which contains one character/secondary structure element self.split_interface_ss_elements (dict[int, list[int]]): Maps the interface number to a list of indices corresponding to the secondary structure type Ex: {1: [0, 0, 1, 2, ...] , 2: [9, 9, 9, 13, ...]]}
Source code in symdesign/structure/model.py
8066 8067 8068 8069 8070 8071 8072 8073 8074 8075 8076 8077 8078 8079 8080 8081 8082 8083 8084 8085 8086 8087 8088 8089 8090 8091 8092 8093 8094 8095 8096 8097 8098 8099 8100 8101 |
|
calculate_fragment_profile
calculate_fragment_profile(**kwargs)
Take the fragment_profile from each member Entity and combine
Other Parameters:
-
evo_fill
–bool = False - Whether to fill missing positions with evolutionary profile values
-
alpha
–float = 0.5 - The maximum contribution of the fragment profile to use, bounded between (0, 1]. 0 means no use of fragments in the .profile, while 1 means only use fragments
Source code in symdesign/structure/model.py
8103 8104 8105 8106 8107 8108 8109 8110 8111 8112 8113 8114 8115 8116 8117 8118 8119 8120 8121 8122 8123 8124 8125 8126 8127 8128 8129 8130 8131 8132 8133 8134 8135 8136 8137 8138 8139 8140 8141 8142 8143 8144 8145 8146 8147 8148 |
|
get_fragment_observations
get_fragment_observations(interface: bool = True) -> list[FragmentInfo] | list
Return the fragment observations identified on the Pose for various types of tertiary structure interactions
Parameters:
-
interface
(bool
, default:True
) –Whether to return fragment observations from only the Pose interface
Returns:
-
list[FragmentInfo] | list
–The fragment observations
Source code in symdesign/structure/model.py
8150 8151 8152 8153 8154 8155 8156 8157 8158 8159 8160 8161 8162 8163 8164 8165 8166 8167 8168 8169 8170 8171 8172 8173 8174 8175 |
|
get_fragment_metrics
get_fragment_metrics(fragments: list[FragmentInfo] = None, total_interface: bool = True, by_interface: bool = False, by_entity: bool = False, entity1: Entity = None, entity2: Entity = None, **kwargs) -> dict[str, Any]
Return fragment metrics from the Pose. Returns the entire Pose unless by_interface or by_entity is True
Uses data from self.fragment_queries unless fragments are passed
Parameters:
-
fragments
(list[FragmentInfo]
, default:None
) –A list of fragment observations
-
total_interface
(bool
, default:True
) –Return all fragment metrics for every interface found in the Pose
-
by_interface
(bool
, default:False
) –Return fragment metrics for each particular interface between Chain instances in the Pose
-
by_entity
(bool
, default:False
) –Return fragment metrics for each Entity found in the Pose
-
entity1
(Entity
, default:None
) –The first Entity object to identify the interface if per_interface=True
-
entity2
(Entity
, default:None
) –The second Entity object to identify the interface if per_interface=True
Other Parameters:
-
distance
–float = 8. - The distance to measure Residues across an interface
-
oligomeric_interfaces
–bool = False - Whether to query oligomeric interfaces
Returns:
-
dict[str, Any]
–A mapping of the following metrics for the requested structural region - {'center_indices', 'total_indices', 'nanohedra_score', 'nanohedra_score_center', 'nanohedra_score_normalized', 'nanohedra_score_center_normalized', 'number_residues_fragment_total', 'number_residues_fragment_center', 'multiple_fragment_ratio', 'number_fragments_interface' 'percent_fragment_helix' 'percent_fragment_strand' 'percent_fragment_coil' }
-
dict[str, Any]
–Will include a single mapping if total_interface, a mapping for each interface if by_interface, and a
-
dict[str, Any]
–mapping for each Entity if by_entity
Source code in symdesign/structure/model.py
8187 8188 8189 8190 8191 8192 8193 8194 8195 8196 8197 8198 8199 8200 8201 8202 8203 8204 8205 8206 8207 8208 8209 8210 8211 8212 8213 8214 8215 8216 8217 8218 8219 8220 8221 8222 8223 8224 8225 8226 8227 8228 8229 8230 8231 8232 8233 8234 8235 8236 8237 8238 8239 8240 8241 8242 8243 8244 8245 8246 8247 8248 8249 8250 8251 8252 8253 8254 8255 8256 8257 8258 8259 8260 8261 8262 8263 8264 8265 8266 8267 8268 8269 8270 8271 8272 8273 8274 8275 8276 8277 8278 8279 8280 8281 8282 8283 8284 8285 8286 8287 8288 8289 8290 8291 8292 8293 8294 8295 8296 8297 8298 8299 8300 8301 8302 8303 8304 8305 8306 8307 8308 8309 8310 8311 8312 8313 8314 8315 8316 8317 8318 8319 8320 8321 8322 8323 8324 8325 8326 |
|
residue_processing
residue_processing(design_scores: dict[str, dict[str, float | str]], columns: list[str]) -> dict[str, dict[int, dict[str, float | list]]]
Process Residue Metrics from Rosetta score dictionary (One-indexed residues)
Parameters:
-
design_scores
(dict[str, dict[str, float | str]]
) –{'001': {'buns': 2.0, 'res_energy_complex_15A': -2.71, ..., 'yhh_planarity':0.885, 'hbonds_res_selection_complex': '15A,21A,26A,35A,...'}, ...}
-
columns
(list[str]
) –['per_res_energy_complex_5', 'per_res_energy_1_unbound_5', ...]
Returns:
-
dict[str, dict[int, dict[str, float | list]]]
–{'001': {15: {'type': 'T', 'energy': {'complex': -2.71, 'unbound': [-1.9, 0]}, 'fsp': 0., 'cst': 0.}, ...}, ...}
Source code in symdesign/structure/model.py
8328 8329 8330 8331 8332 8333 8334 8335 8336 8337 8338 8339 8340 8341 8342 8343 8344 8345 8346 8347 8348 8349 8350 8351 8352 8353 8354 8355 8356 8357 8358 8359 8360 8361 8362 8363 8364 8365 8366 8367 8368 8369 8370 8371 8372 8373 8374 8375 8376 8377 8378 8379 8380 8381 8382 8383 8384 8385 8386 8387 8388 8389 8390 |
|
process_rosetta_residue_scores
process_rosetta_residue_scores(design_scores: dict[str, dict[str, float | str]]) -> dict[str, dict[int, dict[str, float | list]]]
Process Residue Metrics from Rosetta score dictionary (One-indexed residues) accounting for symmetric energy
Parameters:
-
design_scores
(dict[str, dict[str, float | str]]
) –{'001': {'buns': 2.0, 'res_energy_complex_15A': -2.71, ..., 'yhh_planarity':0.885, 'hbonds_res_selection_complex': '15A,21A,26A,35A,...'}, ...}
Returns:
-
dict[str, dict[int, dict[str, float | list]]]
–The parsed design information where the outer key is the design alias, and the next key is the Residue.index
-
dict[str, dict[int, dict[str, float | list]]]
–where the corresponding information belongs. Only returns Residue metrics for those positions where metrics
-
dict[str, dict[int, dict[str, float | list]]]
–were taken. Example: {'001': {15: {'complex': -2.71, 'bound': [-1.9, 0], 'unbound': [-1.9, 0], 'solv_complex': -2.71, 'solv_bound': [-1.9, 0], 'solv_unbound': [-1.9, 0], 'fsp': 0., 'cst': 0.}, ...}, ...}
Source code in symdesign/structure/model.py
8392 8393 8394 8395 8396 8397 8398 8399 8400 8401 8402 8403 8404 8405 8406 8407 8408 8409 8410 8411 8412 8413 8414 8415 8416 8417 8418 8419 8420 8421 8422 8423 8424 8425 8426 8427 8428 8429 8430 8431 8432 8433 8434 8435 8436 8437 8438 8439 8440 8441 8442 8443 8444 8445 8446 8447 8448 8449 8450 8451 8452 8453 8454 8455 8456 8457 8458 8459 8460 8461 |
|
rosetta_hbond_processing
rosetta_hbond_processing(design_scores: dict[str, dict]) -> dict[str, set[int]]
Process Hydrogen bond Metrics from Rosetta score dictionary
if rosetta_numbering="true" in .xml then use offset, otherwise, hbonds are PDB numbering
Parameters:
-
design_scores
(dict[str, dict]
) –{'001': {'buns': 2.0, 'per_res_energy_complex_15A': -2.71, ..., 'yhh_planarity':0.885, 'hbonds_res_selection_complex': '15A,21A,26A,35A,...', 'hbonds_res_selection_1_bound': '26A'}, ...}
Returns:
-
dict[str, set[int]]
–{'001': {34, 54, 67, 68, 106, 178}, ...}
Source code in symdesign/structure/model.py
8463 8464 8465 8466 8467 8468 8469 8470 8471 8472 8473 8474 8475 8476 8477 8478 8479 8480 8481 8482 8483 8484 8485 8486 8487 8488 8489 8490 8491 8492 8493 8494 8495 8496 8497 8498 8499 |
|
generate_interface_fragments
generate_interface_fragments(oligomeric_interfaces: bool = False, **kwargs)
Generate fragments between the Pose interface(s). Finds interface(s) if not already available
Parameters:
-
oligomeric_interfaces
(bool
, default:False
) –Whether to query oligomeric interfaces
Other Parameters:
-
by_distance
–bool = False - Whether interface Residue instances should be found by inter-residue Cb distance
-
distance
–float = 8. - The distance to measure Residues across an interface
Source code in symdesign/structure/model.py
8501 8502 8503 8504 8505 8506 8507 8508 8509 8510 8511 8512 8513 8514 8515 8516 8517 8518 8519 8520 8521 8522 8523 |
|
generate_fragments
generate_fragments(**kwargs)
Generate fragments pairs between every possible Residue instance in the Pose
Other Parameters:
-
distance
–float = 8. - The distance to query for neighboring fragments
Source code in symdesign/structure/model.py
8525 8526 8527 8528 8529 8530 8531 8532 8533 8534 8535 8536 8537 |
|
write_fragment_pairs
write_fragment_pairs(out_path: AnyStr = os.getcwd(), multimodel: bool = False) -> AnyStr | None
Write the fragments associated with the pose to disk
Parameters:
-
out_path
(AnyStr
, default:getcwd()
) –The path to the directory to output files to
-
multimodel
(bool
, default:False
) –Whether to write all fragments as a multimodel file. File written to "'out_path'/all_frags.pdb"
Returns:
-
AnyStr | None
–The path to the written file if one was written
Source code in symdesign/structure/model.py
8539 8540 8541 8542 8543 8544 8545 8546 8547 8548 8549 8550 8551 8552 8553 8554 8555 8556 8557 8558 8559 8560 8561 8562 8563 8564 8565 8566 8567 8568 8569 8570 8571 8572 8573 8574 8575 8576 8577 8578 8579 8580 8581 8582 |
|
debug_pose
debug_pose(out_dir: AnyStr = os.getcwd(), tag: str = None)
Write out all Structure objects for the Pose PDB
Source code in symdesign/structure/model.py
8584 8585 8586 8587 8588 8589 8590 8591 8592 8593 8594 8595 8596 8597 8598 8599 8600 8601 8602 8603 8604 |
|
softmax
softmax(x: ndarray) -> ndarray
Take the softmax operation from an input array
Parameters:
-
x
(ndarray
) –The array to calculate softmax on. Uses the axis=-1
Returns:
-
ndarray
–The array with a softmax performed
Source code in symdesign/structure/model.py
64 65 66 67 68 69 70 71 72 73 74 |
|
split_residue_pairs
split_residue_pairs(interface_pairs: list[tuple[Residue, Residue]]) -> tuple[list[Residue], list[Residue]]
Used to split Residue pairs, take the set, then sort by Residue.number, and return pairs separated by index
Source code in symdesign/structure/model.py
77 78 79 80 81 82 83 84 |
|
split_number_pairs_and_sort
split_number_pairs_and_sort(pairs: list[tuple[int, int]]) -> tuple[list, list]
Used to split integer pairs and sort, and return pairs separated by index
Source code in symdesign/structure/model.py
96 97 98 99 100 101 102 |
|
parse_cryst_record
parse_cryst_record(cryst_record: str) -> tuple[list[float], str]
Get the unit cell length, height, width, and angles alpha, beta, gamma and the space group
Parameters:
-
cryst_record
(str
) –The CRYST1 record as found in .pdb file format
Source code in symdesign/structure/model.py
105 106 107 108 109 110 111 112 113 114 115 116 117 |
|