compute_row.py
def compute_ligand_similarity(smiles, pair):
    '''
    Input a list of smiles, and a pair to compute the similarity.
    Returns the indices of the pair and the similarity
    '''

    (a,b) = pair
    smi_a = smiles[a]
    mol_a = AllChem.MolFromSmiles(smi_a)
    if mol_a == None:
        mol_a = AllChem.MolFromSmiles(smi_a, sanitize=False)
    fp_a = FingerprintMols.FingerprintMol(mol_a)

    smi_b = smiles[b]
    mol_b = AllChem.MolFromSmiles(smi_b)
    if mol_b == None:
        mol_b = AllChem.MolFromSmiles(smi_b, sanitize=False)
    fp_b = FingerprintMols.FingerprintMol(mol_b)

    sim=fs(fp_a, fp_b)

    return a, b, sim

    Input a list of smiles, and a pair to compute the similarity.
    Returns the indices of the pair and the similarity
    
Input a list of smiles, and a pair to compute the similarity.
Returns the indices of the pair and the similarity
Input a list of smiles and a pair to compute the similarity . Returns the indices of the pair and the similarity
def compute_ligand_similarity(smiles, pair):
    (a,b) = pair
    smi_a = smiles[a]
    mol_a = AllChem.MolFromSmiles(smi_a)
    if mol_a == None:
        mol_a = AllChem.MolFromSmiles(smi_a, sanitize=False)
    fp_a = FingerprintMols.FingerprintMol(mol_a)
    smi_b = smiles[b]
    mol_b = AllChem.MolFromSmiles(smi_b)
    if mol_b == None:
        mol_b = AllChem.MolFromSmiles(smi_b, sanitize=False)
    fp_b = FingerprintMols.FingerprintMol(mol_b)
    sim=fs(fp_a, fp_b)
    return a, b, sim
def compute_ligand_similarity ( smiles , pair ) : ( a , b ) = pair smi_a = smiles [ a ] mol_a = AllChem . MolFromSmiles ( smi_a ) if mol_a == None : mol_a = AllChem . MolFromSmiles ( smi_a , sanitize = False ) fp_a = FingerprintMols . FingerprintMol ( mol_a ) smi_b = smiles [ b ] mol_b = AllChem . MolFromSmiles ( smi_b ) if mol_b == None : mol_b = AllChem . MolFromSmiles ( smi_b , sanitize = False ) fp_b = FingerprintMols . FingerprintMol ( mol_b ) sim = fs ( fp_a , fp_b ) return a , b , sim
Input a list of smiles, and a pair to compute the similarity.
Input a list of smiles and a pair to compute the similarity .
'''
    Input a list of smiles, and a pair to compute the similarity.
    Returns the indices of the pair and the similarity
    '''
smiles
pair