gnina / libmolgrid

Comprehensive library for fast, GPU accelerated molecular gridding for deep learning workflows
https://gnina.github.io/libmolgrid/
Apache License 2.0
137 stars 45 forks source link

MolDataset -> MolMapDataset and MolIterDataset #122

Closed drewnutt closed 2 months ago

drewnutt commented 2 months ago

Created a MolIterDataset which uses the ExampleProvider to provide a dataset with all the ExampleProviderSettings.

MolIterDataset is designed to be used with torch.utils.data.Dataloader(batch_size=None) since the ExampleProvider already provides a batch. Similarly to MolMapDataset, it returns a tuple of: lengths, centers, coords, atom_types, radii, and labels. These can be passed directly to gridmaker.forward to voxelize the batch. Translation and rotation of the examples is handled by the Dataset.