Skip to content

IndexError: arrays used as indices must be of integer (or boolean) type #114

@mmucsf

Description

@mmucsf

Hello,
I am trying to use ModelAngelo from within the Relion 5.1-beta_cu12.2 GUI. I input a sharpened map from cryosparc and a fasta file downloaded from the PDB. I get the following error in the model_angelo.log. It seems that an array is non-integer, but I don't know how to fix this. Any advice would be very much appreciated. Thanks.

2024-11-19 at 11:45:53 | INFO | ModelAngelo with args: {'volume_path': 'J106_007_volume_map_sharp.mrc', 'protein_fasta': 'rcsb_pdb_4XHL.fasta', 'rna_fasta': None, 'dna_fasta': None, 'output_dir': 'ModelAngelo/job052', 'mask_path': None, 'device': '0', 'config_path': None, 'model_bundle_name': 'nucleotides', 'model_bundle_path': None, 'keep_intermediate_results': False, 'pipeline_control': 'ModelAngelo/job052/', 'func': <function main at 0x14ae5f54ab00>}
2024-11-19 at 11:45:54 | INFO | Initial C-alpha prediction with args: {'model_checkpoint': 'chkpt.torch', 'bfactor': 0, 'batch_size': 4, 'box_size': 64, 'stride': 16, 'dont_mask_input': True, 'threshold': 0.05, 'save_real_coordinates': False, 'save_cryo_em_grid': False, 'do_nucleotides': True, 'save_backbone_trace': False, 'save_output_grid': False, 'crop': 6, 'log_dir': '/programs/share/relion/hub/checkpoints/model_angelo_v1.0/nucleotides/c_alpha', 'map_path': 'J106_007_volume_map_sharp.mrc', 'output_path': 'ModelAngelo/job052/see_alpha_output', 'mask_path': None, 'device': '0', 'auto_mask': False}
2024-11-19 at 11:45:54 | INFO | Using model file /programs/share/relion/hub/checkpoints/model_angelo_v1.0/nucleotides/c_alpha/model.py
2024-11-19 at 11:45:54 | INFO | Using checkpoint file /programs/share/relion/hub/checkpoints/model_angelo_v1.0/nucleotides/c_alpha/chkpt.torch
2024-11-19 at 11:46:06 | INFO | Input structure has shape: (296, 296, 296)
2024-11-19 at 11:46:06 | INFO | Running with these arguments:
2024-11-19 at 11:46:06 | INFO | {'model_checkpoint': 'chkpt.torch', 'bfactor': 0, 'batch_size': 4, 'box_size': 64, 'stride': 16, 'dont_mask_input': True, 'threshold': 0.05, 'save_real_coordinates': False, 'save_cryo_em_grid': False, 'do_nucleotides': True, 'save_backbone_trace': False, 'save_output_grid': False, 'crop': 6, 'log_dir': '/programs/share/relion/hub/checkpoints/model_angelo_v1.0/nucleotides/c_alpha', 'map_path': 'J106_007_volume_map_sharp.mrc', 'output_path': 'ModelAngelo/job052/see_alpha_output', 'mask_path': None, 'device': '0', 'auto_mask': False}
2024-11-19 at 12:02:28 | INFO | Model prediction done, took 981.89 seconds for 3375 sliding windows
2024-11-19 at 12:02:28 | INFO | Average time is 290.931 ms
2024-11-19 at 12:02:28 | INFO | Starting Cα grid to points...
2024-11-19 at 12:02:28 | INFO | Have 3092 Cα points before pruning and 409 after pruning
2024-11-19 at 12:02:28 | INFO | Starting P grid to points...
2024-11-19 at 12:02:29 | INFO | Have 0 P points before pruning and 0 after pruning
2024-11-19 at 12:02:29 | INFO | Finished inference!
2024-11-19 at 12:02:29 | INFO | GNN model refinement round 1 with args: {'num_rounds': 3, 'crop_length': 200, 'repeat_per_residue': 1, 'esm_model': 'esm1b_t33_650M_UR50S', 'aggressive_pruning': True, 'seq_attention_batch_size': 200, 'fp16': False, 'batch_size': 1, 'voxel_size': 1.0, 'map': 'J106_007_volume_map_sharp.mrc', 'protein_fasta': 'rcsb_pdb_4XHL.fasta', 'rna_fasta': None, 'dna_fasta': None, 'struct': 'ModelAngelo/job052/see_alpha_output/see_alpha_merged_output.cif', 'output_dir': 'ModelAngelo/job052/gnn_output_round_1', 'model_dir': '/programs/share/relion/hub/checkpoints/model_angelo_v1.0/nucleotides/gnn', 'device': '0', 'write_hmm_profiles': False, 'refine': False}
2024-11-19 at 12:02:29 | INFO | Loaded module from step: 483863
2024-11-19 at 12:03:25 | ERROR | Error in ModelAngelo
Traceback (most recent call last):

File "", line 1, in
File "/programs/x86_64-linux/relion/5.0-beta_cu12.2/relion_extlib/miniconda3-4.10.3-orl6/envs/relion-5.0/lib/python3.10/site-packages/model_angelo/main.py", line 58, in main
args.func(args)
│ │ └ Namespace(volume_path='J106_007_volume_map_sharp.mrc', protein_fasta='rcsb_pdb_4XHL.fasta', rna_fasta=None, dna_fasta=None, o...
│ └ <function main at 0x14ae5f54ab00>
└ Namespace(volume_path='J106_007_volume_map_sharp.mrc', protein_fasta='rcsb_pdb_4XHL.fasta', rna_fasta=None, dna_fasta=None, o...

File "/programs/x86_64-linux/relion/5.0-beta_cu12.2/relion_extlib/miniconda3-4.10.3-orl6/envs/relion-5.0/lib/python3.10/site-packages/model_angelo/apps/build.py", line 242, in main
gnn_output = gnn_infer(gnn_infer_args)
│ └ {'num_rounds': 3, 'crop_length': 200, 'repeat_per_residue': 1, 'esm_model': 'esm1b_t33_650M_UR50S', 'aggressive_pruning': Tru...
└ <function infer at 0x14ae5fbbd900>
File "/programs/x86_64-linux/relion/5.0-beta_cu12.2/relion_extlib/miniconda3-4.10.3-orl6/envs/relion-5.0/lib/python3.10/site-packages/model_angelo/gnn/inference.py", line 184, in infer
final_results_to_cif(
└ <function final_results_to_cif at 0x14ae5f54a3b0>
File "/programs/x86_64-linux/relion/5.0-beta_cu12.2/relion_extlib/miniconda3-4.10.3-orl6/envs/relion-5.0/lib/python3.10/site-packages/model_angelo/gnn/flood_fill.py", line 331, in final_results_to_cif
fix_chains_output = prune_and_connect_chains(
└ <function prune_and_connect_chains at 0x14ae5f549d80>
File "/programs/x86_64-linux/relion/5.0-beta_cu12.2/relion_extlib/miniconda3-4.10.3-orl6/envs/relion-5.0/lib/python3.10/site-packages/model_angelo/utils/hmm_sequence_align.py", line 552, in prune_and_connect_chains
chains, best_match_output = sort_chains(best_match_output, chains, ca_pos,)
│ │ │ │ └ array([[291.27365, 230.41208, 163.59029],
│ │ │ │ [292.82507, 227.35979, 165.11305],
│ │ │ │ [292.67972, 232.7009 , 165.25647],...
│ │ │ └ []
│ │ └ <model_angelo.utils.match_to_sequence.MatchToSequence object at 0x14ae5d2bcb80>
│ └ <function sort_chains at 0x14ae5f5497e0>
└ []
File "/programs/x86_64-linux/relion/5.0-beta_cu12.2/relion_extlib/miniconda3-4.10.3-orl6/envs/relion-5.0/lib/python3.10/site-packages/model_angelo/utils/hmm_sequence_align.py", line 371, in sort_chains
chain_start_pos = ca_positions[chain_starts]
│ └ array([], dtype=float64)
└ array([[291.27365, 230.41208, 163.59029],
[292.82507, 227.35979, 165.11305],
[292.67972, 232.7009 , 165.25647],...

IndexError: arrays used as indices must be of integer (or boolean) type

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions