|
convert_fragment_to_graph(bonds,
atoms)
Convert a molecule to networkx graph bonds: all bonds in the molecule
atoms: list of fragment atoms retrun: nx graph |
|
|
|
select_bonds_to_delete(att_points,
g)
Select attachment points to delete so that the no two core attachment points
are connected
att_points: list of attachement points
g: networkx graph
return: dictionary of paths from anchor atom up to broken bond
keyed by broken bonds |
|
|
|
find_bonds_to_delete(frag_group,
wt_bonds,
mut_bonds)
Given a fragment group, find all the bonds that need to be deleted... |
|
|
|
|
|
get_conf_restraint(path_dict)
Get conformational restraints from path dictionary path_dict:
dictionary of path from anchor atom upto broken bonds return: list of
dihedral angles for conformation restraint |
|
|
|
match_pairs(wt_pairs,
mut_pairs,
wt_core_map,
mut_core_map)
Match pairs (bond, 14, exclusion) of wt and mut cts wt_pairs: set of
pairs in reactant mut_pairs: set of pairs in product wt_core_map: map
of core atoms in reactant to that product mut_core_map: map of core
atoms in product to that in reactant return: MatchedInteractions
object for pairs |
|
|
|
match_bonds(wt_bonds,
mut_bonds,
wt_bonds_delete,
mut_bonds_delete,
wt_core_map,
mut_core_map)
Match bonds of wt and mut cts wt_bonds: set of bonds in reactant
mut_bonds: set of bonds in product wt_bonds_delete: set of bonds to
be deleted in reactant dummy state mut_bonds_delete: set of bonds to
be deleted in product dummy state wt_core_map: map of core atoms in
reactant to that product mut_core_map: map of core atoms in product
to that in reactant return: MatchedInteractions object for bonds |
|
|
|
linear_bonds(atoms)
Given consective list of atom indices, generate set of bonds atoms:
list of n atoms return: set of bonds (frozenset((0, 1)) ,
frozenset((1, 2)), ..., frozenset((n-1, n))) |
|
|
|
find_angles_contain_bond(angles,
bond)
Find all angles that contain bond |
|
|
|
match_angles(wt_angles,
mut_angles,
wt_core_map,
mut_core_map,
wt_bonds_delete,
mut_bonds_delete)
Match bonds of wt and mut cts wt_angles: set of angles in reactant
mut_angles: set of angles in product wt_core_map: map of core atoms
in reactant to that product mut_core_map: map of core atoms in
product to that in reactant wt_bonds_delete: bonds involving dummpy
atoms in reactant to be delted mut_bonds_delete: bonds involving
dummpy atoms in product to be delted return: MatchedInteractions
object for angles |
|
|
|
find_dihedrals_contain_bond(dihedrals,
bond)
Find all dihedrals that contain bond dihedrals: list of dihedral
angles bond: tuple of atom indexes for bond |
|
|
|
match_dihedrals(wt_dihedrals,
mut_dihedrals,
wt_core_map,
mut_core_map,
wt_bonds_delete,
mut_bonds_delete)
Match bonds of wt and mut cts wt_dihedrals: set of dihedrals in
reactant mut_dihedrals: set of dihedrals in product wt_core_map: map
of core atoms in reactant to that product mut_core_map: map of core
atoms in product to that in reactant wt_bonds_delete: bonds
involving dummpy atoms in reactant to be delted mut_bonds_delete:
bonds involving dummpy atoms in product to be delted return:
MatchedInteractions object for dihedrals |
|
|
|
find_impropers_contain_bond(impropers,
bond)
Find all impropers that contain bond impropers: list of improper, (i,
j, k, l) k is connnect to all other three atoms bond: bond tuple |
|
|
|
match_impropers(wt_impropers,
mut_impropers,
wt_core_map,
mut_core_map,
wt_bonds_delete,
mut_bonds_delete,
wt_bonds,
mut_bonds)
Match bonds of wt and mut cts wt_impropers: set of impropers in
reactant mut_impropers: set of impropers in product wt_core_map: map
of core atoms in reactant to that product mut_core_map: map of core
atoms in product to that in reactant wt_bonds_delete: bonds
involving dummpy atoms in reactant to be delted mut_bonds_delete:
bonds involving dummpy atoms in product to be delted wt_bonds: all
bonds in wt mut_bonds: all bonds in mut return: MatchedInteractions
object for improper terms |
|
|
|
generate_core_maps(source_core_atoms,
dest_core_atoms)
return two dictionaries of forward and inverse core atom maps |
|
|
|
remove_deleted_att(att_dict,
bond_delete)
Find all attachment points that still exist after bond deletion
att_dict: dictionary keyed by attachment bond bond_delete: bonds to
be deleted return set of attachment points remains |
|
|
|
find_angle_for_att(unmatched_angles,
att_bonds,
core_atoms)
Find angle terms that contains attachment points and one core atom... |
|
|
|
find_dihedrals_for_att(unmatched_dihedrals,
att_dict,
core_atoms)
Find dihedrals containing attchment points and at least one core atom
unmatched_dihes: set of dihedrals involving at least one dummy atom
att_dict: dictionary keyed by attachment point core_atoms: core_atom
list return: attachment dictionary with dihedrals, remaing dihedrals
to be kept |
|
|
|
match_angle(core_map,
angle)
Given core map and angle, return matched angle in conanical form (i,
j, k) (i < k) core_map: mapping core atoms to those in the other
molecule angel: angle to be mapped return matched_angle or None if
there is no match |
|
|
|
find_dihe_contain_angle(dihes,
angle,
core_atoms)
Find dihedral angles containing the angle dihes: list of dihedrals
angle: imput angle in conanical form core_atoms: list of core atoms
return a dictionary keyed by number of core atoms consisting of the
dihedral |
|
|
|
find_atoms_to_restrain(ct,
att_dict,
core_map,
angles_param,
other_angles_param)
Find all the possible atoms for dihedral or improper restraint across attachment bonds
ct: the L{schrodinger.Structure} object of this molecule
att_dict: dictionary of interactions keyed by attachment bonds
core_map: map core atoms to the ones in the other molecule
angles_param: parameter dictionary for angles in this
other_angles_param: parameter dictionary of angles for the other
return: dictionary: key = attachment-bond, value = a list of tuples, where each tuple
is (angle, proper/None, improper/None). |
|
|
|
find_impropers_for_att(unmatched_impts,
att_dict,
core_atoms)
Find impropers contaning attachment points and at least one core atom
unmatched_impts: set of impropers involving at least one dummy atom
att_dict: dictionary keyed by attachment point core_atoms: core_atom
list return: attachment dictionary with impropers, remaing impropers
to be kept |
|
|
|
find_ring_containing_att(ct,
anchor,
bridge)
ct: schrodinger.Structure instance of this
molecule anchor: index of the anchor atom (at the core side) bridge:
index of the bridge atom (at the dummy side) return: a list of lists. |
|
|
|
|
|
|
|
prev_atom_in_ring(i,
ring)
Similar to next_atom_in_ring, but returns a 2-tuple for the
previous atom in the ring. |
|
|
|
|
|
|
|
add_dihedral_restraint_for_dummy(ct,
core_atoms,
dummy_atoms,
att_points,
dihedrals,
angles)
add one dihedral angle for dummy atoms directly attached to
attachment point ct: schrodinger.Structure
instance of this molecule core_atoms: list of core atoms dummy_atoms:
list of dummy atoms att_points: list of attachment point tuples
dihedrals: dihedral angles containing attachment point return: list
of additional dihedrals to be restrainted |
|
|
|
update_generic(interaction_dict,
im_matched,
wt_param,
mut_param,
wt_kept,
mut_kept,
include_param=True)
update interaction match dictionaries for generic interactions,
dihedrals and impropers |
|
|
|
update_pair(pair_dict,
pair_match,
wt_param,
mut_param,
include_param=True)
update 14 and exclusion interaction matches ignore del terms for
14pair and exclusion |
|
|
|
matched_w_diff_param(matched,
wt_param,
mut_param,
include_param=True)
Check if parameters are different for matched interaction pairs
matched: list of matched interactions wt_param: reactant parameter
dictionary for initial molecule mut_para: product parameter
dictionary for final molecule return: dictionary of parameters keyed
by the matched pair |
|
|
|
unmatched_param(wt_unmatched,
wt_param,
include_param=True)
Generate parameter dictionary for unmatched interaction term return:
dictionary of parameters |
|
|
|
get_restraint_angle_dihe_improper(rest_dict,
att_dict)
Find restraint/deletion of angle, dihedral and improper terms from
attachment point dictionary rest_dict: dictionary for restraint keyed
by attachment bond att_dict: dictionary for all interactions
involving attachemnt bonds keyed by attachment bond return:
(angle_kept, angle_delete, dihedral_restraint, improper_restraint) |
|
|
|
fake_param(keys)
Generate dummy parameters for 14pair and exclusion |
|
|
|
generate_alchemy(wt_ct,
wt_core,
mut_ct,
mut_core,
ff,
incl_param=False)
Compute alchemical interaction match for to molecules given matching
core atoms wt_ct: input structure for initial molecule wt_core: core
atom indices for initial molecule mut_ct: input structure for final
molecule mut_core: core atom indices for final molecule, must match
wt_core in order ff: instance of FFFLD class incl_param: include
force field parameters in the output or not return: instance of
AlchemicalInteractions class |
|
|