reference
#
Utilities for automatically selecting 'reference' atoms for alignment.
Functions:
-
queries_to_idxs
–Find the indices of those atoms matched by a set of AMBER style reference atom
-
select_ligand_idxs
–Returns the indices of the reference atoms that may be used to align ligands.
-
select_receptor_idxs
–Select possible protein atoms for Boresch-style restraints using the method
-
check_receptor_idxs
–Check if the specified receptor atoms meet the criteria for use in Boresch-style
-
select_protein_cavity_atoms
–Select the alpha carbon atoms that define the binding cavity of the protein based
queries_to_idxs
#
queries_to_idxs(
structure: Structure, queries: Iterable[str]
) -> tuple[int, ...]
Find the indices of those atoms matched by a set of AMBER style reference atom queries.
Parameters:
-
structure
(Structure
) –The ligand to query.
-
queries
(Iterable[str]
) –The amber style selection queries.
Returns:
-
tuple[int, ...]
–The indices of the matched atoms.
Source code in femto/fe/reference.py
select_ligand_idxs
#
select_ligand_idxs(
ligand_1: AmberParm,
ligand_2: AmberParm | None,
method: LigandReferenceMethod,
ligand_1_queries: tuple[str, str, str] | None = None,
ligand_2_queries: tuple[str, str, str] | None = None,
) -> tuple[
tuple[int, int, int], tuple[int, int, int] | None
]
Returns the indices of the reference atoms that may be used to align ligands.
Notes
- Some methods, e.g.
chen
, select reference atoms based on the two ligands meaning they can only be used in RBFE calculations, whereas others, e.g.baumann
, select reference atoms based on a single ligand.
Parameters:
-
ligand_1
(AmberParm
) –The first ligand.
-
ligand_2
(AmberParm | None
) –The second ligand.
-
method
(LigandReferenceMethod
) –The method to use to select the reference atoms if none are specified.
-
ligand_1_queries
(tuple[str, str, str] | None
, default:None
) –Three (optional) AMBER style queries to use to manually select atoms from the first ligand.
-
ligand_2_queries
(tuple[str, str, str] | None
, default:None
) –Three (optional) AMBER style queries to use to manually select atoms from the second ligand
Returns:
-
tuple[tuple[int, int, int], tuple[int, int, int] | None]
–The indices of the first and second ligand respectively. No offset is applied to the second ligand indices so a query of
"@1"
would yield0
rather thann_ligand_1_atoms
.
Source code in femto/fe/reference.py
select_receptor_idxs
#
select_receptor_idxs(
receptor: Structure | Trajectory,
ligand: Structure | Trajectory,
ligand_ref_idxs: tuple[int, int, int],
) -> tuple[int, int, int]
Select possible protein atoms for Boresch-style restraints using the method outlined by Baumann et al [1].
References
[1] Baumann, Hannah M., et al. "Broadening the scope of binding free energy calculations using a Separated Topologies approach." (2023).
Parameters:
-
receptor
(Structure | Trajectory
) –The receptor structure.
-
ligand
(Structure | Trajectory
) –The ligand structure.
-
ligand_ref_idxs
(tuple[int, int, int]
) –The indices of the three ligands atoms that will be restrained.
Returns:
-
tuple[int, int, int]
–The indices of the three atoms to use for the restraint
Source code in femto/fe/reference.py
614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 |
|
check_receptor_idxs
#
check_receptor_idxs(
receptor: Structure | Trajectory,
receptor_idxs: tuple[int, int, int],
ligand: Structure | Trajectory,
ligand_ref_idxs: tuple[int, int, int],
) -> bool
Check if the specified receptor atoms meet the criteria for use in Boresch-style restraints as defined by Baumann et al [1].
References
[1] Baumann, Hannah M., et al. "Broadening the scope of binding free energy calculations using a Separated Topologies approach." (2023).
Parameters:
-
receptor
(Structure | Trajectory
) –The receptor structure.
-
receptor_idxs
(tuple[int, int, int]
) –The indices of the three receptor atoms that will be restrained.
-
ligand
(Structure | Trajectory
) –The ligand structure.
-
ligand_ref_idxs
(tuple[int, int, int]
) –The indices of the three ligand atoms that will be restrained.
Returns:
-
bool
–True if the atoms meet the criteria, False otherwise.
Source code in femto/fe/reference.py
select_protein_cavity_atoms
#
select_protein_cavity_atoms(
protein: Structure,
ligands: list[Structure],
cutoff: Quantity,
) -> str
Select the alpha carbon atoms that define the binding cavity of the protein based on their distance to ligand atoms.
Parameters:
-
protein
(Structure
) –The protein.
-
ligands
(list[Structure]
) –The ligands to consider.
-
cutoff
(Quantity
) –Residues further than this distance from a ligand will be excluded.
Returns:
-
str
–The AMBER style query that will select the reference atoms of the protein.