Skip to content

Commit

Permalink
Fixed out_features with slicing option
Browse files Browse the repository at this point in the history
  • Loading branch information
EnricoTrizio committed May 8, 2024
1 parent 78ada65 commit 25b0ff8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion mlcolvar/core/transform/descriptors/pairwise_distances.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,10 @@ def __init__(self,
torch.Tensor
Non duplicated pairwise distances between all the atoms
"""
super().__init__(in_features=int(n_atoms*3), out_features=int(n_atoms*(n_atoms-1) / 2))
if slicing_pairs is None:
super().__init__(in_features=int(n_atoms*3), out_features=int(n_atoms*(n_atoms-1) / 2))
else:
super().__init__(in_features=int(n_atoms*3), out_features=len(slicing_pairs))

# parse args
self.n_atoms = n_atoms
Expand Down

0 comments on commit 25b0ff8

Please sign in to comment.