Unverified Commit ca6e325b authored by Alon Grinberg Dana's avatar Alon Grinberg Dana Committed by GitHub
Browse files

Use torch.linalg.norm instead of torch.norm (#515)

torch.norm is deprecated and may be removed in a future PyTorch release.
parent 31bf913d
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment