gnina / libmolgrid

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

MolDataset fixes #54

Closed drewnutt closed 3 years ago

drewnutt commented 3 years ago

Output of MolDataset when accessing an item is now: center, coordinates, types, radii, and labels This allows the user to call gmaker.forward on the GPU.

Additionally MolDataset is now picklable. However, there is an error if someone tries to pickle a MolDataset that does not use the default Gnina typing. I'm not sure this error can be fixed unless the pickling of all of the Atom Typers is enabled.

drewnutt commented 3 years ago

I'm not sure if I should include it in MolDataset, but I made a function that can be passed to the collate_fn of a PyTorch DataLoader to handle the different sized tensors provided in a batch of MolDataset.__getitem__ calls