aiqm / torchani

Accurate Neural Network Potential on PyTorch
https://aiqm.github.io/torchani/
MIT License
459 stars 127 forks source link

Use handwritten cosine similarity #520

Closed zasdfgbnm closed 3 years ago

zasdfgbnm commented 3 years ago

because it is faster.

Before:

torchani.aev.cutoff_cosine - 2.0s
torchani.aev.radial_terms - 0.7s
torchani.aev.angular_terms - 6.1s
torchani.aev.compute_shifts - 0.0s
torchani.aev.neighbor_pairs - 0.0s
torchani.aev.neighbor_pairs_nopbc - 1.9s
torchani.aev.triu_index - 0.0s
torchani.aev.cumsum_from_zero - 0.5s
torchani.aev.triple_by_molecule - 3.4s
torchani.aev.compute_aev - 15.8s
Total AEV - 15.8s
NN - 4.1s
Epoch time - 30.3s

After:

torchani.aev.cutoff_cosine - 1.6s
torchani.aev.radial_terms - 0.7s
torchani.aev.angular_terms - 5.6s
torchani.aev.compute_shifts - 0.0s
torchani.aev.neighbor_pairs - 0.0s
torchani.aev.neighbor_pairs_nopbc - 1.8s
torchani.aev.triu_index - 0.0s
torchani.aev.cumsum_from_zero - 0.5s
torchani.aev.triple_by_molecule - 3.3s
torchani.aev.compute_aev - 15.0s
Total AEV - 15.0s
NN - 3.9s
Epoch time - 29.4s