From b94a7bcadfa065261f26adde49e247fb444bccb2 Mon Sep 17 00:00:00 2001 From: Alon Grinberg Dana Date: Sat, 26 Sep 2020 08:32:21 -0400 Subject: [PATCH] Use torch.linalg.norm instead of torch.norm torch.norm is deprecated and may be removed in a future PyTorch release. --- torchani/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/torchani/utils.py b/torchani/utils.py index 32cffaf55..f8a0aa089 100644 --- a/torchani/utils.py +++ b/torchani/utils.py @@ -338,7 +338,7 @@ def vibrational_analysis(masses, hessian, mode_type='MDU', unit='cm^-1'): # Note that the normal modes are the COLUMNS of the eigenvectors matrix mw_normalized = eigenvectors.t() md_unnormalized = mw_normalized * inv_sqrt_mass - norm_factors = 1 / torch.norm(md_unnormalized, dim=1) # units are sqrt(AMU) + norm_factors = 1 / torch.linalg.norm(md_unnormalized, dim=1) # units are sqrt(AMU) md_normalized = md_unnormalized * norm_factors.unsqueeze(1) rmasses = norm_factors**2 # units are AMU