Skip to content

Commit

Permalink
call to data transforms fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
allaffa committed Jul 11, 2023
1 parent b95f136 commit 11a48b5
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions hydragnn/utils/abstractrawdataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,12 @@ def __init__(self, config, dist=False, sampling=None):
"PointPairFeatures"
]

if self.spherical_coordinates:
self.spherical_coordinates_transform = Spherical(norm=False)

if self.point_pair_features:
self.point_pair_features_transform = PointPairFeatures()

self.subsample_percentage = None

self.__build_edge()
Expand Down Expand Up @@ -378,9 +384,9 @@ def __build_edge(self):
# Descriptors about topology of the local environment
for data in self.dataset:
if self.spherical_coordinates:
data = Spherical(data)
data = self.spherical_coordinates_transform(data)
if self.point_pair_features:
data = PointPairFeatures(data)
data = self.point_pair_features_transform(data)

# Move data to the device, if used. # FIXME: this does not respect the choice set by use_gpu
device = get_device(verbosity_level=self.verbosity)
Expand Down

0 comments on commit 11a48b5

Please sign in to comment.