Skip to content

Commit

Permalink
revert BondEncoder neighbor calc
Browse files Browse the repository at this point in the history
  • Loading branch information
janosh committed Dec 11, 2023
1 parent 2fb533d commit ef23049
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion chgnet/model/encoders.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def forward(
bond_vectors (Tensor): normalized bond vectors, for tracking the bond
directions [n_bond, 3]
"""
neighbor += image @ lattice
neighbor = neighbor + image @ lattice
bond_vectors = center - neighbor
bond_lengths = torch.norm(bond_vectors, dim=1)
# Normalize the bond vectors
Expand Down

0 comments on commit ef23049

Please sign in to comment.