FreyrS / dMaSIF

Other
193 stars 45 forks source link

TypeError: argument of type 'method' is not iterable #53

Closed Lsz-20 closed 5 months ago

Lsz-20 commented 5 months ago

Hello, when I try to train the dMaSIF_search with benchmark_scripts/dMaSIF_search.sh, but it shows:

Preprocessing training dataset 0%| | 0/4615 [00:00<?, ?it/s] Traceback (most recent call last): File "main_training.py", line 55, in train_dataset = iterate_surface_precompute(train_loader, net, args) File "/home/zcma02/Protein_Design/dMaSIF/data_iteration.py", line 427, in iterate_surface_precompute P1, P2 = process(args, protein_pair, net) File "/home/zcma02/Protein_Design/dMaSIF/data_iteration.py", line 124, in process P1 = process_single(protein_pair, chain_idx=1) File "/home/zcma02/Protein_Design/dMaSIF/data_iteration.py", line 20, in process_single with_mesh = "face_p1" in protein_pair.keys TypeError: argument of type 'method' is not iterable I checked the inputs are:train_loader, net and args,are all seems right?

BJWiley233 commented 5 months ago

Newer python version require the () after a dictionary.keys so you need to make these lines:

with_mesh = "face_p1" in protein_pair.keys()
preprocessed = "gen_xyz_p1" in protein_pair.keys()

And basically anywhere else there is a dictionary and dMaSIF is trying to access keys you will need to update.

Lsz-20 commented 5 months ago

Thanks for your reply, it works well now!