LPDI-EPFL / masif

MaSIF- Molecular surface interaction fingerprints. Geometric deep learning to decipher patterns in molecular surfaces.
Apache License 2.0
571 stars 151 forks source link

Descriptor NaN #59

Open mikewzp opened 1 year ago

mikewzp commented 1 year ago

Hi, I'm getting trouble with computing descriptors.

[MaSIF-search]

./compute_descriptors.sh 1AKJ_AB_DE Traceback (most recent call last): File "/media/ps/3632610B3260D203/DeepLearning/masif/source/masif_ppi_search/masif_ppi_search_comp_desc.py", line 233, in roc_auc = 1.0 - compute_roc_auc(pos_dists, neg_dists) File "/media/ps/3632610B3260D203/DeepLearning/masif/source/masif_ppi_search/masif_ppi_search_comp_desc.py", line 21, in compute_roc_auc return metrics.roc_auc_score(labels, dist_pairs) File "/home/ps/.conda/envs/masif/lib/python3.6/site-packages/sklearn/utils/validation.py", line 63, in inner_f return f(*args, *kwargs) File "/home/ps/.conda/envs/masif/lib/python3.6/site-packages/sklearn/metrics/_ranking.py", line 524, in roc_auc_score y_score = check_array(y_score, ensure_2d=False) File "/home/ps/.conda/envs/masif/lib/python3.6/site-packages/sklearn/utils/validation.py", line 63, in inner_f return f(args, kwargs) File "/home/ps/.conda/envs/masif/lib/python3.6/site-packages/sklearn/utils/validation.py", line 721, in check_array allow_nan=force_all_finite == 'allow-nan') File "/home/ps/.conda/envs/masif/lib/python3.6/site-packages/sklearn/utils/validation.py", line 106, in _assert_all_finite msg_dtype if msg_dtype is not None else X.dtype) ValueError: Input contains NaN**, infinity or a value too large for dtype('float32').

According to the traceback, find that: during compute_roc_auc(_posdists, _negdists) these two descriptor files exist but values are NAN. # Save descriptors np.save(os.path.join(out_desc_dir, "p1_desc_straight.npy"), desc1_str) np.save(os.path.join(out_desc_dir, "p1_desc_flipped.npy"), desc1_flip) # Compute pos_dists pos_dists = np.sqrt(np.sum(np.square(desc1_str[k1] - desc2_flip[k2]), axis=1)) neg_dists = np.sqrt( np.sum(np.square(desc1_str[kneg1] - desc2_flip[kneg2]), axis=1) )

1AKJ_NaN

[MaSIF-Site]

Does anyone experience similar problems? What the standard output should be? Any comment or ideas would be appreciated!