Skip to content

Commit

Permalink
aimnet debug
Browse files Browse the repository at this point in the history
  • Loading branch information
wiederm committed Oct 31, 2024
1 parent 81d0756 commit 8ca7fe3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions modelforge/potential/aimnet2.py
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,8 @@ def calculate_contributions(

# Accumulate the vector contributions using index_add_
vector_contributions.index_add_(0, idx_j, vector_prot_step2)
if torch.isnan(vector_contributions).any():
raise ValueError("NaN values detected in vector_contributions.")

# Step 3: Compute the Euclidean Norm for each atom
vector_norms = torch.norm(
Expand Down

0 comments on commit 8ca7fe3

Please sign in to comment.