SMArt.alchemy package¶
Submodules¶
SMArt.alchemy.MCS module¶
-
class
SMArt.alchemy.MCS.
MCS
(*tops, flag_partial_ring=True, max_partial_ring_match=2, **kwargs)[source]¶ Bases:
SMArt.incl.DataDumping
-
calculate_estimate_atom_pair_in_sol_ring_ind
(sol, top_pair_ind, atom_i, atom_j, ind_ring_parts_in_sol, ind_ring_parts_avail)[source]¶
-
check_match_pair
(matched_pair, sol, **kwargs)[source]¶ - Parameters
matched_pair –
sol –
kwargs –
- Returns
-
create_estimate_top_pair_in_sol
(top_pair_ind, available_atoms_frozenset, in_solution_atoms_frozenset, in_solution_dummy_match_atoms_frozenset)[source]¶
-
enumerate_stepwise_call_partial_sol_invalid
(sol, top_pair, rows, independent_ring_parts, **kwargs)[source]¶
-
get_TGP_top_available_atoms
(top_i, available_atoms, in_solution_atoms, in_solution_dummy_match_atoms)[source]¶
-
SMArt.alchemy.incl module¶
-
class
SMArt.alchemy.incl.
AlchemicalSolution_base
(tops, sol, available_atoms, flag_top_not_in_sol, sol_atoms_map, tried_pairs=None)[source]¶ Bases:
object
-
class
SMArt.alchemy.incl.
Branch
(roots, parents, neigh_count, **kwargs)[source]¶ Bases:
object
-
static
combine_mutually_exclusive_neigh_count_list
(neigh_count_list)[source]¶ calculates combined neigh_count from a list of neigh_count, such that it takes max at each position :param neigh_count_list: :return:
-
static
-
class
SMArt.alchemy.incl.
TopGraphProperties
(g, available_Vs=None, non_available_Vs=None, in_solution_Vs=None, in_solution_dummy_match_Vs=None, remove_V_in_branch=False, **kwargs)[source]¶ Bases:
object
graph properties: rings, different branches, dummy-match estimates etc…
- attributes within g:
rings, rings_map within each ring:
breaks, breaks_map, break_parents, independent_parts, independent_parts_map, independent_parts_graph
- attributes within the instance:
g, available_Vs, non_available_Vs first_non_ring_neighbours branches, ring_branches - true branches combined_FromRing_branches - for each ring / atom in r, a combined branch to all parents that are not in r each of ring_branches
combined_linear_branch - max of neighbouring combined_FromRing_branches within the r fake_branches - it’s a full branch having a single parent within the r
break_branches - for each ring combined_FromRing_branches - branch that is a combination off branches going out of the r combined_branches, linear_combined_branches - for each atom, combination of all available branches
if v in ring, linear_combined_branches is a bit different as it only takes first neighbours within r
dummy_estimates
-
get_ring_ring_branch_from_generator_recursive
(roots, parents, r, V_in_branch, BFS_generator)[source]¶
SMArt.alchemy.top_matching_fnc module¶
-
SMArt.alchemy.top_matching_fnc.
add_state2EP_ND_states
(sol, sol_interaction, temp_state, top_idx)[source]¶
-
SMArt.alchemy.top_matching_fnc.
find_best_ptp_matches
(int_list0, int_list1, flag_improper, top_01, atoms_01_map, ptp_score_kwargs, **kwargs)[source]¶
-
SMArt.alchemy.top_matching_fnc.
find_interactions_ptp
(at0, at1, top_01, top_pair_ind, sol, done_interactions, **kwargs)[source]¶
-
SMArt.alchemy.top_matching_fnc.
gen_int_container_01_list
(at0, at1, top_01, top_pair_ind, sol, **kwargs)[source]¶ generator for interaction containers to be checked for matches
-
SMArt.alchemy.top_matching_fnc.
gen_int_container_01_list_new
(at0, at1, top_01, top_pair_ind, sol, **kwargs)[source]¶ generator for interaction containers to be checked for matches
-
SMArt.alchemy.top_matching_fnc.
generate_multi_state_top
(sol, top_state=0, **kwargs)[source]¶ generates multi state topology (and ptp topology) based on the solution :param sol: solution (from MCS) :param top_state: state to use to generate the topology (0 default) :kwargs
add_DUM_exclusions: adds exclusions betweeen dummies from different states (True by default) flag_EP2excl: generates exclusions and pairse from EP flag_bond_constraints: generates constraints to all bonds except the perturbed ones
- also to be passed on to the following functions:
generate_atom_states, generate_int_states, find_atom_order
-
SMArt.alchemy.top_matching_fnc.
generate_ptp_excl_pair_single_atom
(sol, row_idx, top_i, done_sol_atom_pairs=None, **kwargs)[source]¶
-
SMArt.alchemy.top_matching_fnc.
get_exclusion_pair_state_from_EP
(at1, at2, top, top_state=0)[source]¶
-
SMArt.alchemy.top_matching_fnc.
get_generator_ptp_excl_pair_single_atom
(sol, row_idx, top_i, done_sol_atom_pairs=None, **kwargs)[source]¶
-
SMArt.alchemy.top_matching_fnc.
update_ptp_excl_pair_atom_atom_pair
(sol, row_idx, top_atom_pair, **kwargs)[source]¶
-
SMArt.alchemy.top_matching_fnc.
update_ptp_excl_pair_row_atom_pair
(sol, top_atom, sol_atom, **kwargs)[source]¶
Module contents¶
-
SMArt.alchemy.
generate_2state_top
(mcs, solution=0, top_state=0, other_state=1, **kwargs)[source]¶ generates a pairwise topology based on a given MCS solution :param mcs: MCS instance used to enumerate possible solutions :param solution: index of the solution (from mcs.solutions list) :param top_state: topology state (0 by default) :param other_state: perturbation state (1 by default) :param kwargs: kwargs to pass onto SMArt.alchemy.top_matching_fnc.generate_multi_state_top function :return:
-
SMArt.alchemy.
generate_EDS_top
(mcs, solution=0, flag_EDS_mass=True, find_other_state='any', **kwargs)[source]¶
-
SMArt.alchemy.
get_EDS
(*tops, **kwargs)[source]¶ - Parameters
tops –
kwargs – flag_stepwise - add topologies stepwise (True) flag_prune_EDS_match_mass dihedral_match_v find_other_state
- Returns
MCS instance with solutions (run generate_EDS_top(mcs) to get the EDS topology)
-
SMArt.alchemy.
get_ptp_ligands
(top1, top2, **kwargs)[source]¶ - Parameters
top1 –
top2 –
kwargs – flag_get_res_common_atoms - common atoms for residues with same names and len(atoms) - False as default flag_top_update - use topology information (True as default) flag_top_prune - which prune function to use (None as default; alternative ‘bond’ - makes sure no bonds are perturbed)
- Returns
MCS instance with solutions (run generate_2state_top(mcs) to get the topology)
-
SMArt.alchemy.
point_mutation
(top1, top2, **kwargs)[source]¶ - Parameters
top1 –
top2 –
kwargs – flag_get_res_common_atoms - common atoms for residues with same names and len(atoms) - True as default flag_top_update - use topology information (True as default) flag_top_prune - which prune function to use (None as default; alternative ‘bond’ - makes sure no bonds are perturbed)
- Returns
MCS instance with solutions (run generate_2state_top(mcs) to get the topology)