SymEntry
SymEntry
SymEntry(entry: int, sym_map: list[str] = None, **kwargs)
Stores information for a particular symmetry definition which derives from a standard definition of a global symmetry type and provides access to operators and attributes which allow symmetric manipulation.
Parameters:
-
entry
(int
) –The entry integer which uniquely identifies this instance information
-
sym_map
(list[str]
, default:None
) –The mapping of individual groups to construct this instance
-
**kwargs
–
Source code in symdesign/utils/SymEntry.py
352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 |
|
number_of_operations
property
number_of_operations: int
The number of symmetric copies in the full symmetric system
group_subunit_numbers
property
group_subunit_numbers: list[int]
Returns the number of subunits for each symmetry group
specification
property
specification: str
Return the specification for the instance. Ex: RESULT:{SUBSYMMETRY1}{SUBSYMMETRY2}... -> (T:{C3}{C3})
simple_specification
property
simple_specification: str
Return the simple specification for the instance. Ex: 'RESULTSUBSYMMETRY1SUBSYMMETRY2... -> (T33)
uc_specification
property
uc_specification: tuple[tuple[str] | None, tuple[int] | None]
The external dof and angle parameters which constitute a viable lattice
uc_dimensions
property
writable
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
rotation_range1
property
rotation_range1: float
Return the rotation range according the first symmetry group operator
rotation_range2
property
rotation_range2: float
Return the rotation range according the second symmetry group operator
rotation_range3
property
rotation_range3: float
Return the rotation range according the third symmetry group operator
number_dof_rotation
property
number_dof_rotation: int
Return the number of internal rotational degrees of freedom
is_internal_rot1
property
is_internal_rot1: bool
Whether there are rotational degrees of freedom for group 1
is_internal_rot2
property
is_internal_rot2: bool
Whether there are rotational degrees of freedom for group 2
number_dof_translation
property
number_dof_translation: int
Return the number of internal translational degrees of freedom
is_internal_tx1
property
is_internal_tx1: bool
Whether there are internal translational degrees of freedom for group 1
is_internal_tx2
property
is_internal_tx2: bool
Whether there are internal translational degrees of freedom for group 2
number_dof_external
property
number_dof_external: int
Return the number of external degrees of freedom
external_dof
property
external_dof: ndarray
Return the total external degrees of freedom as a number DOF externalx3 array
external_dofs
property
external_dofs: list[ndarray]
Return the 3x3 external degrees of freedom for component1
external_dof1
property
external_dof1: ndarray
Return the 3x3 external degrees of freedom for component1
external_dof2
property
external_dof2: ndarray
Return the 3x3 external degrees of freedom for component2
degeneracy_matrices1
property
degeneracy_matrices1: ndarray
Returns the (number of degeneracies, 3, 3) degeneracy matrices for component1
degeneracy_matrices2
property
degeneracy_matrices2: ndarray
Returns the (number of degeneracies, 3, 3) degeneracy matrices for component2
cryst_record
property
writable
cryst_record: str | None
Get the CRYST1 record associated with this SymEntry
from_cryst
classmethod
from_cryst(space_group: str, **kwargs)
Create a SymEntry from a specified symmetry in Hermann-Mauguin notation and the unit-cell dimensions
Source code in symdesign/utils/SymEntry.py
347 348 349 350 |
|
append_group
append_group(group: str)
Add an additional symmetry group to the SymEntry
Source code in symdesign/utils/SymEntry.py
507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 |
|
is_token
is_token() -> bool
Is the SymEntry utilizing a provided CRYST1 record
Source code in symdesign/utils/SymEntry.py
843 844 845 |
|
needs_cryst_record
needs_cryst_record() -> bool
Is the SymEntry utilizing a provided CRYST1 record
Source code in symdesign/utils/SymEntry.py
847 848 849 850 |
|
get_uc_dimensions
get_uc_dimensions(optimal_shift_vec: ndarray) -> ndarray | None
Return an array with the three unit cell lengths and three angles [20, 20, 20, 90, 90, 90] by combining UC basis vectors with component translation degrees of freedom
Parameters:
-
optimal_shift_vec
(ndarray
) –An Nx3 array where N is the number of shift instances and 3 is number of possible external degrees of freedom (even if they are not utilized)
Returns: The unit cell dimensions for each optimal shift vector passed
Source code in symdesign/utils/SymEntry.py
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 |
|
get_optimal_shift_from_uc_dimensions
get_optimal_shift_from_uc_dimensions(a: float, b: float, c: float, *angles: list) -> ndarray | None
Return the optimal shifts provided unit cell dimensions and the external translation degrees of freedom
Parameters:
-
a
(float
) –The unit cell parameter for the lattice dimension 'a'
-
b
(float
) –The unit cell parameter for the lattice dimension 'b'
-
c
(float
) –The unit cell parameter for the lattice dimension 'c'
-
angles
(list
, default:()
) –The unit cell parameters for the lattice angles alpha, beta, gamma. Not utilized!
Returns: The optimal shifts in each direction a, b, and c if they are allowed
Source code in symdesign/utils/SymEntry.py
969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 |
|
sdf_lookup
sdf_lookup() -> AnyStr
Locate the proper symmetry definition file depending on the specified symmetry
Returns:
-
AnyStr
–The location of the symmetry definition file on disk
Source code in symdesign/utils/SymEntry.py
1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 |
|
log_parameters
log_parameters()
Log the SymEntry Parameters
Source code in symdesign/utils/SymEntry.py
1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 |
|
SymEntryFactory
SymEntryFactory(**kwargs)
Return a SymEntry instance by calling the Factory instance with the SymEntry entry number and symmetry map (sym_map)
Handles creation and allotment to other processes by saving expensive memory load of multiple instances and allocating a shared pointer to the SymEntry
Source code in symdesign/utils/SymEntry.py
1104 1105 |
|
__call__
__call__(entry: int, sym_map: list[str] = None, **kwargs) -> SymEntry
Return the specified SymEntry object singleton
Parameters:
-
entry
(int
) –The entry number
-
sym_map
(list[str]
, default:None
) –The particular mapping of the symmetric groups
Returns: The instance of the specified SymEntry
Source code in symdesign/utils/SymEntry.py
1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 |
|
get
get(entry: int, sym_map: list[str] = None, **kwargs) -> SymEntry
Return the specified SymEntry object singleton
Parameters:
-
entry
(int
) –The entry number
-
sym_map
(list[str]
, default:None
) –The particular mapping of the symmetric groups
Returns: The instance of the specified SymEntry
Source code in symdesign/utils/SymEntry.py
1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 |
|
construct_uc_matrix
construct_uc_matrix(string_vector: Iterable[str]) -> ndarray
Calculate a matrix specifying the degrees of freedom in each dimension of the unit cell
Parameters:
-
string_vector
(Iterable[str]
) –The string vector as parsed from the symmetry combination table
Returns:
-
ndarray
–Float array with shape (3, 3) the values to specify unit cell dimensions from basis vector constraints
Source code in symdesign/utils/SymEntry.py
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 |
|
get_rot_matrices
get_rot_matrices(step_deg: int | float, axis: str = 'z', rot_range_deg: int | float = 360) -> ndarray | None
Return a group of rotation matrices to rotate coordinates about a specified axis in set step increments
Parameters:
-
step_deg
(int | float
) –The number of degrees for each rotation step
-
axis
(str
, default:'z'
) –The axis about which to rotate
-
rot_range_deg
(int | float
, default:360
) –The range with which rotation is possible
Returns: The rotation matrices with shape (rotations, 3, 3)
Source code in symdesign/utils/SymEntry.py
1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 |
|
make_rotations_degenerate
make_rotations_degenerate(rotations: ndarray | list[ndarray] | list[list[list[float]]] = None, degeneracies: ndarray | list[ndarray] | list[list[list[float]]] = None) -> ndarray
From a set of degeneracy matrices and a set of rotation matrices, produce the complete combination of the specified transformations
Parameters:
-
rotations
(ndarray | list[ndarray] | list[list[list[float]]]
, default:None
) –A group of rotations with shape (rotations, 3, 3)
-
degeneracies
(ndarray | list[ndarray] | list[list[list[float]]]
, default:None
) –A group of degeneracies with shape (degeneracies, 3, 3)
Returns: The matrices resulting from the multiplication of each rotation by each degeneracy. Product has length = (rotations x degeneracies, 3, 3) where the first 3x3 array on axis 0 is the identity
Source code in symdesign/utils/SymEntry.py
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 |
|
parse_symmetry_specification
parse_symmetry_specification(specification: str) -> list[str]
Parse the typical symmetry specification string with format RESULT:{SUBSYMMETRY1}{SUBSYMMETRY2}... to a list
Parameters:
-
specification
(str
) –The specification string
Returns: The parsed string with each member split into a list - ['RESULT', 'SUBSYMMETRY1', 'SUBSYMMETRY2', ...]
Source code in symdesign/utils/SymEntry.py
1339 1340 1341 1342 1343 1344 1345 1346 1347 |
|
parse_symmetry_to_sym_entry
parse_symmetry_to_sym_entry(sym_entry_number: int = None, symmetry: str = None, sym_map: list[str] = None) -> SymEntry | None
Take a symmetry specified in a number of ways and return the symmetry parameters in a SymEntry instance
Parameters:
-
sym_entry_number
(int
, default:None
) –The integer corresponding to the desired SymEntry
-
symmetry
(str
, default:None
) –The symmetry specified by a string
-
sym_map
(list[str]
, default:None
) –A symmetry map where each successive entry is the corresponding symmetry group number for the structure
Returns: The SymEntry instance or None if parsing failed
Source code in symdesign/utils/SymEntry.py
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 |
|
sdf_lookup
sdf_lookup(symmetry: str = None) -> AnyStr
From the set of possible point groups, locate the proper symmetry definition file depending on the specified symmetry. If none is specified, a C1 symmetry will be returned (this doesn't make sense but is completely viable)
Parameters:
-
symmetry
(str
, default:None
) –Can be a valid_point_group, or None
Returns: The location of the symmetry definition file on disk
Source code in symdesign/utils/SymEntry.py
1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 |
|
symmetry_groups_are_allowed_in_entry
symmetry_groups_are_allowed_in_entry(symmetry_operators: Iterable[str], *groups: Iterable[str], result: str = None, entry_number: int = None) -> bool
Check if the provided symmetry operators are allowed in a SymEntry
Parameters:
-
symmetry_operators
(Iterable[str]
) –The symmetry operators of interest
-
groups
(Iterable[str]
, default:()
) –The groups provided in the symmetry
-
result
(str
, default:None
) –The resulting symmetry
-
entry_number
(int
, default:None
) –The SymEntry number of interest
Returns: True if the symmetry operators are valid, False otherwise
Source code in symdesign/utils/SymEntry.py
1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 |
|
get_int_dof
get_int_dof(*groups: Iterable[str]) -> list[tuple[int, int], ...]
Usage int_dof1, int_dof2, *_ = get_int_dof(int_dof_group1, int_dof_group2)
Source code in symdesign/utils/SymEntry.py
1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 |
|
lookup_sym_entry_by_symmetry_combination
lookup_sym_entry_by_symmetry_combination(result: str, *symmetry_operators: str) -> int
Given the resulting symmetry and the symmetry operators for each Entity, solve for the SymEntry
Parameters:
-
result
(str
) –The global symmetry
-
symmetry_operators
(str
, default:()
) –Additional operators which specify sub-symmetric systems in the larger result
Returns: The entry number of the SymEntry
Source code in symdesign/utils/SymEntry.py
1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 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 |
|
print_matching_entries
print_matching_entries(match_string, matching_entries: Iterable[int])
Report the relevant information from passed SymEntry entry numbers
Parameters:
-
match_string
–The string inserted into "All entries found matching {match_string}:"
-
matching_entries
(Iterable[int]
) –The matching entry numbers
Returns: None
Source code in symdesign/utils/SymEntry.py
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 |
|
query
query(mode: query_modes_literal, *additional_mode_args, nanohedra: bool = True)
Perform a query of the symmetry combinations
Parameters:
-
mode
(query_modes_literal
) –The type of query to perform. Viable options are: 'all-entries', 'combination', 'counterpart', 'dimension', and 'result'
-
*additional_mode_args
–Additional query args required
-
nanohedra
(bool
, default:True
) –True if only Nanohedra docking symmetries should be queried
Returns: None
Source code in symdesign/utils/SymEntry.py
1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 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 |
|