luwei0917/TankBind

Strange Molecular's pose output

Opened this issue · 2 comments

I tried to use Tankbind to dock the H1 histamine receptor (https://www.rcsb.org/structure/3RZE) with a few molecular below:
Like diphenhydramine: H1 binders:
Doxepin: https://pubchem.ncbi.nlm.nih.gov/compound/Doxepin
Cyproheptadine: https://pubchem.ncbi.nlm.nih.gov/compound/2913
Loratidine: https://pubchem.ncbi.nlm.nih.gov/compound/3957

But the result return molecule very strange pose, like this, this almost cannot happen in reality, the twisted molecule is completely deformed.
Screen Shot 2022-10-03 at 16 19 3
@luwei0917 Do you have any ideas to solve this problem?

gtp

I tried to dock GTP to a KRAS structure and got a very strange geometry for the base.
@luwei0917 any ideas what might be causing this?

@PhungVanDuy have you managed to figure this out?

I had a similar issue, this is what my output pose looks like:

image

Chimera:
image

This is the code I used to generate my output

idx = 0
line = info.iloc[idx]
one_data = dataset[idx]
data_with_batch_info = next(iter(DataLoader(dataset[idx:idx+1], batch_size=1, 
                             follow_batch=['x', 'y', 'compound_pair'], shuffle=False, num_workers=1)))
y_pred, affinity_pred = model(data_with_batch_info)

coords = one_data.coords.to(device)
protein_nodes_xyz = one_data.node_xyz.to(device)
n_compound = coords.shape[0]
n_protein = protein_nodes_xyz.shape[0]
y_pred = y_pred.reshape(n_protein, n_compound).to(device).detach()
y = one_data.dis_map.reshape(n_protein, n_compound).to(device)
compound_pair_dis_constraint = torch.cdist(coords, coords)

smiles = line['smiles']
mol = Chem.MolFromSmiles(smiles)
mol.Compute2DCoords()
LAS_distance_constraint_mask = get_LAS_distance_constraint_mask(mol).bool()
info = get_info_pred_distance(coords, y_pred, protein_nodes_xyz, compound_pair_dis_constraint, 
                                  LAS_distance_constraint_mask=LAS_distance_constraint_mask,
                                  n_repeat=1, show_progress=False)
toFile = 'test.sdf'
new_coords = info.sort_values("loss")['coords'].iloc[0].astype(np.double)
write_with_new_coords(mol, new_coords, toFile)

Is there any mistake in the code?