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

what is the input format for ligand only #48

Closed yangxiufengsia closed 4 years ago

yangxiufengsia commented 4 years ago

Hi, I tried to use libmolgrid to make only ligands (ligonly.types in data folder) (no binding protein) into grid. But one error happened: File "test_torch_cnn.py", line 52, in test_train_torch_cnn e.populate(fname) ValueError: Example has no label at position 0. There are only 0 labels

Very appreciate if you could help provide some clues or some tutorials about the input format for ligand only. Thanks!

dkoes commented 4 years ago

That error occurs if you are trying to balance your dataset but don't have a label set. It is impossible to create batches with balanced distributions of labels if there is no label. Either provide a label or disable balancing.

yangxiufengsia commented 4 years ago

That error occurs if you are trying to balance your dataset but don't have a label set. It is impossible to create batches with balanced distributions of labels if there is no label. Either provide a label or disable balancing.

Thank you so much, Prof Koes. The problem was solved by setting balancing=False.