ardigen / MAT

The official implementation of the Molecule Attention Transformer.
MIT License
239 stars 57 forks source link

Why not using the Rdkit function "AllChem.Get3DDistanceMatrix" for distance matrix calculation Method #4

Closed DovahCoding closed 4 years ago

DovahCoding commented 4 years ago

Thanks a lot for the code! And your idea is really impressive.

After the coordinates are embedded in the mol, the "pairwise_distances" function is used to calculate the distance matrix. But why not use the Rdkit function "AllChem.Get3DDistanceMatrix" for distance matrix calculation? I did the experiment in the both methods, it seems that the results are the same. Is there any concern to use "pairwise_distances" instead of "AllChem.Get3DDistanceMatrix"?

mokosaur commented 4 years ago

Thank you!

Calculating 3D positions and then using pairwise_distances seemed more elastic while conducting the experiments. This way, we can use different scripts for calculating conformations and change the distance metric.

In the current version of our code, the method you proposed is probably equivalent to what we do. For the sake of brevity, in the future updates I will use the RDKit function you suggested. Good catch!

DovahCoding commented 4 years ago

Thanks for your quick reply! I fully understand your concern. Thanks again for sharing such good code and innovative idea!