Kdidi/ligand clean #361
Kdidi/ligand clean #361
1424 passed, 8 failed and 54 skipped
| Report | Passed | Failed | Skipped | Time |
|---|---|---|---|---|
| testing.cpu.junit.xml | 865✅ | 4❌ | 49⚪ | 760s |
| testing.cuda.junit.xml | 559✅ | 4❌ | 5⚪ | 641s |
❌ testing.cpu.junit.xml
918 tests were completed in 760s with 865 passed, 4 failed and 49 skipped.
| Test suite | Passed | Failed | Skipped | Time |
|---|---|---|---|---|
| pytest | 865✅ | 4❌ | 49⚪ | 760s |
❌ pytest
tmol.extern.test_toposort.TestCase
✅ test_cycle
✅ test_empty
✅ test_input_not_modified
✅ test_input_not_modified_when_cycle_error
✅ test_no_dependencies
✅ test_objects
✅ test_simple
✅ test_strings
tmol.extern.test_toposort.TestCaseAll
✅ test_sort_flatten
tmol.extern.test_toposort.TestAll
✅ test_all
tmol.tests.chemical.test_patch
✅ test_patched_residue_construction_smoke
✅ test_patched_residue_icoor_mapping
✅ test_patched_residue_ideal_coords
✅ test_patched_pdb[cpu]
✅ test_uncommon_patching_options
✅ test_patch_error_checks
✅ test_patch_validation_missing_fields
✅ test_patch_validation_remove_atoms_reference
✅ test_patch_validation_modify_atoms_reference
✅ test_patch_validation_illegal_add_alias
✅ test_patch_validation_illegal_bond
✅ test_patch_validation_illegal_icoor
✅ test_res_error_checks
✅ test_validate_restype_bad_conns
✅ test_validate_restype_bad_icoor
tmol.tests.chemical.test_residue
✅ test_refined_residue_construction_smoke
✅ test_refined_residue_icoor_mapping
✅ test_refined_residue_ideal_coords
✅ test_refined_residue_ordered_torsions
✅ test_residue_type_set_construction
✅ test_residue_type_set_get_default
✅ test_build_ideal_coords_smoke
✅ test_all_bonds_construction
✅ test_mc_sc_torsion_properties
tmol.tests.database.scoring.test_dunbrack
✅ test_load_dunbrack_from_binary
tmol.tests.database.scoring.test_hbond
✅ test_hbond_defs
tmol.tests.database.scoring.test_ljlk
✅ test_ljlk_defs
tmol.tests.database.scoring.test_rama
✅ test_rama
tmol.tests.database.test_chemical
✅ test_residue_defs
tmol.tests.database.test_param_db
✅ test_get_default
✅ test_create_stable_subset
✅ test_create_stable_subset_error_handline
tmol.tests.io.details.test_build_missing_leaf_atoms
✅ test_build_missing_leaf_atoms[cpu]
✅ test_build_missing_leaf_atoms_error_handling[cpu]
✅ test_build_missing_leaf_atoms_backwards[cpu]
✅ test_coord_sum_gradcheck[cpu]
✅ test_build_missing_hydrogens_and_oxygens_gradcheck[cpu]
tmol.tests.io.details.test_canonical_packed_block_types
✅ test_default_packed_block_types[cpu]
✅ test_default_packed_block_types_memoization[cpu]
tmol.tests.io.details.test_find_disulfides
✅ test_find_disulfide_pairs
✅ test_find_disulf_in_pdb
✅ test_find_disulf_w_some_provided
✅ test_find_disulf_w_some_provided_but_rest_skipped
✅ test_find_disulf_w_all_provided
✅ test_find_disulf_w_no_cys
✅ test_find_disulf_w_no_cys_in_canonical_ordering[cpu]
tmol.tests.io.details.test_his_taut_resolution
✅ test_resolve_his_HD1_provided
✅ test_resolve_his_HE2_provided
✅ test_resolve_his_HD1_provided_as_HN
✅ test_resolve_his_HE2_provided_as_HN
✅ test_resolve_his_ND1_provided_as_NH
✅ test_resolve_his_NE2_provided_as_NH
✅ test_resolve_his_taut_no_his_in_canonical_ordering[cpu]
tmol.tests.io.details.test_left_justify_canonical_form
✅ test_assign_block_types_with_gaps[cpu]
✅ test_left_justify_can_form_with_gaps_in_dslf[cpu]
✅ test_assign_block_types_for_pert_and_antigen[cpu]
tmol.tests.io.details.test_select_from_canonical
✅ test_annotate_pbt_w_canonical_res_order[cpu]
✅ test_annotate_pbt_w_canonical_res_order_caching[cpu]
❌ test_assign_block_types[cpu]
torch_device = device(type='cpu')
❌ test_assign_block_types_w_exotic_termini_options[cpu]
default_database = ParameterDatabase(scoring=ScoringDatabase(cartbonded=CartBondedDatabase(residue_params={'ALA': CartRes(length_paramete....0943951023931953, theta=1.2304571226560024, d=1.0, parent='<N1>', grand_parent='<C1>', great_grand_parent='<C2>'))))))
✅ test_assign_block_types_jagged_poses[cpu]
✅ test_assign_block_types_with_gaps[cpu]
✅ test_assign_block_types_with_same_chain_cterm_vrt[cpu]
✅ test_assign_block_types_for_pert_and_antigen[cpu]
✅ test_take_block_type_atoms_from_canonical[cpu]
✅ test_select_best_block_type_candidate_choosing_default_term[cpu]
❌ test_select_best_block_type_candidate_w_mult_opts[cpu]
torch_device = device(type='cpu')
✅ test_select_best_block_type_candidate_error_impossible_combo[cpu]
tmol.tests.io.test_canonical_form
✅ test_create_canonical_ordering_smoke
✅ test_default_canonical_ordering
✅ test_default_packed_block_types[cpu]
✅ test_default_canonical_form_from_pdb[cpu]
✅ test_canonical_form_w_unk[cpu]
✅ test_create_src_2_tmol_mapping[cpu]
✅ test_concatenate_pdb_atom_records_dataframes
tmol.tests.io.test_chain_deduction
✅ test_deduce_chains_for_monomer[cpu]
✅ test_deduce_chains_two_monomers[cpu]
✅ test_deduce_chains_four_monomers[cpu]
✅ test_deduce_chains_dslf_dimer[cpu]
tmol.tests.io.test_pose_stack_construction
✅ test_build_pose_stack_from_canonical_form_ubq[cpu]
✅ test_build_pose_stack_from_canonical_form_pert[cpu]
✅ test_build_pose_stack_from_canonical_form_pert_w_dslf[cpu]
❌ test_build_pose_stack_from_canonical_form_1r21[cpu]
torch_device = device(type='cpu')
✅ test_build_pose_stack_w_disconn_segs[cpu]
✅ test_build_pose_stack_w_disconn_segs_and_insertions[cpu]
✅ test_build_pose_stack_from_canonical_form_ubq_w_atom_mapping[cpu]
✅ test_build_pose_stack_with_masked_residues[cpu]
tmol.tests.io.test_pose_stack_construction_benchmark
✅ test_build_pose_stack_from_canonical_form_ubq_benchmark[cpu]
✅ test_build_pose_stack_from_canonical_form_pert_benchmark[cpu]
✅ test_build_and_score_ubq_benchmark[cpu]
✅ test_build_pose_stack_from_canonical_form_pertuzumab_benchmark[cpu-01]
✅ test_build_pose_stack_from_canonical_form_pertuzumab_benchmark[cpu-03]
✅ test_build_pose_stack_from_canonical_form_pertuzumab_benchmark[cpu-10]
✅ test_build_and_score_pertuzumab_benchmark[cpu-01]
✅ test_build_and_score_pertuzumab_benchmark[cpu-03]
✅ test_build_and_score_pertuzumab_benchmark[cpu-10]
✅ test_build_and_score_pertuzumab_benchmark[cpu-30]
tmol.tests.io.test_pose_stack_deconstruction
✅ test_canonical_form_from_ubq_pose[cpu]
✅ test_canonical_form_from_jagged_ubq_pose[cpu]
✅ test_canonical_form_from_pertuzumab_pose[cpu]
✅ test_canonical_form_from_pertuzumab_and_antigen_pose[cpu]
✅ test_round_trip_deconstruction[cpu]
tmol.tests.io.test_pose_stack_from_biotite
✅ test_load_score_roundtrip_cif[1UBQ]
✅ test_load_score_roundtrip_cif[1R21]
✅ test_load_score_roundtrip_cif[1BL8]
✅ test_load_score_roundtrip_cif[6H9V]
✅ test_load_score_roundtrip_cif[3N0I]
✅ test_load_score_roundtrip_cif[6C4C]
✅ test_load_score_roundtrip_cif[3AA0]
✅ test_build_context_from_biotite_smoke[cpu]
✅ test_canonical_form_from_biotite_smoke[cpu]
✅ test_pose_stack_from_biotite_1ubq_smoke[cpu]
✅ test_pose_stack_from_biotite_1ubq_err_smoke[cpu]
✅ test_pose_stack_from_biotite_1ubq_cif_smoke[cpu]
✅ test_pose_stack_from_and_to_biotite_1ubq_smoke[cpu]
✅ test_pose_stack_from_and_to_biotite_multiple_poses_smoke[cpu]
✅ test_canonical_form_multipose_metadata_propagation[cpu]
✅ test_pose_stack_from_biotite_1ubq_slice_smoke[cpu]
✅ test_pose_stack_from_biotite_n_term_smoke[cpu]
✅ test_pose_stack_from_biotite_c_term_smoke[cpu]
✅ test_pose_stack_from_biotite_his_d_smoke[cpu]
✅ test_pose_stack_from_biotite_missing_sidechain_smoke[cpu]
✅ test_pose_stack_from_biotite_missing_single_sidechain_smoke[cpu]
tmol.tests.io.test_pose_stack_from_openfold
✅ test_create_pose_stack_from_openfold_result[cpu]
✅ test_create_canonical_form_from_openfold_stability[cpu]
✅ test_memoization_of_openfold_paramdb
✅ test_memoization_of_canonical_ordering
✅ test_memoization_of_packed_block_types_for_openfold[cpu]
✅ test_device_of_packed_block_types[cpu]
tmol.tests.io.test_pose_stack_from_rosettafold2
✅ test_load_rosettafold2_dictionary[cpu]
✅ test_load_rosettafold2_dictionary2[cpu]
✅ test_multi_chain_rosettafold2_pose_stack_construction[cpu]
✅ test_create_canonical_form_from_rosettafold2_ubq_stability[cpu]
✅ test_create_canonical_form_from_rosettafold2_sumo_stability[cpu]
✅ test_memoization_of_rosettafold2_paramdb
✅ test_memoization_of_canonical_ordering
✅ test_memoization_of_packed_block_types_for_rosettafold2[cpu]
✅ test_device_of_packed_block_types[cpu]
tmol.tests.io.test_write_pose_stack_pdb
✅ test_atom_records_from_pose_stack_1[cpu]
✅ test_atom_records_from_pose_stack_2[cpu]
✅ test_atom_records_for_multi_chain_pdb[cpu]
✅ test_write_pose_stack_pdb
tmol.tests.kinematics.segscan.test_segscan
⚪ test_segscan_inclusive
⚪ test_segscan_exclusive
⚪ test_segscan
⚪ test_segscan2
⚪ test_segscan_highly_segmented
⚪ test_segscan_highly_segmented2
⚪ test_segscan_highly_segmented3
⚪ test_segscan_cpu_bench
tmol.tests.kinematics.test_check_fold_forest
✅ test_mark_polymeric_bonds_in_foldforest_edges_1
✅ test_mark_polymeric_bonds_in_foldforest_edges_2
✅ test_mark_polymeric_bonds_in_foldforest_edges_3
✅ test_bfs_proper_forest_1
✅ test_bfs_proper_forest_2
✅ test_validate_fold_forest_1
✅ test_validate_fold_forest_2
✅ test_validate_fold_forest_2b
✅ test_validate_fold_forest_2c
✅ test_validate_fold_forest_3
✅ test_validate_fold_forest_4
✅ test_validate_fold_forest_5
✅ test_validate_fold_forest_6
✅ test_validate_fold_forest_7
✅ test_validate_fold_forest_7b
tmol.tests.kinematics.test_create_scan_orering_from_block_types
✅ test_gen_seg_scan_paths_block_type_annotation_smoke
✅ test_calculate_ff_edge_delays_for_two_res_ubq[cpu]
✅ test_calculate_ff_edge_delays_for_6_res_ubq
✅ test_calculate_ff_edge_delays_for_two_copies_of_6_res_ubq_H[cpu]
✅ test_calculate_ff_edge_delays_for_two_copies_of_6_res_ubq_U[cpu]
✅ test_calculate_ff_edge_delays_for_two_copies_of_6_res_ubq_K[cpu]
✅ test_calculate_parent_block_conn_in_and_out_for_two_copies_of_6_res_ubq[cpu]
✅ test_get_kfo_indices_for_atoms
✅ test_get_scans_for_two_copies_of_6_res_ubq_H[cpu]
✅ test_get_scans_for_two_copies_of_6_res_ubq_U[cpu]
✅ test_get_scans_for_two_copies_of_6_res_ubq_K[cpu]
✅ test_kinmodule_construction_for_jagged_stack_H[cpu]
✅ test_kinmodule_construction_for_jagged_stack_star[cpu]
tmol.tests.kinematics.test_fold_forest
✅ test_reasonable_fold_forest_smoke
✅ test_jagged_reasonable_fold_forest[cpu]
tmol.tests.kinematics.test_move_map
✅ test_movemap_construction_from_init[cpu]
✅ test_movemap_construction_from_helper[cpu]
✅ test_set_move_all_doftypes_for_block_by_integer[cpu-mc]
✅ test_set_move_all_doftypes_for_block_by_integer[cpu-sc]
✅ test_set_move_all_doftypes_for_block_by_integer[cpu-named_torsion]
✅ test_set_move_all_doftypes_for_block_by_boolean_mask[cpu-mc]
✅ test_set_move_all_doftypes_for_block_by_boolean_mask[cpu-sc]
✅ test_set_move_all_doftypes_for_block_by_boolean_mask[cpu-named_torsion]
✅ test_set_move_all_doftypes_for_block_by_boolean_mask2[cpu-mc]
✅ test_set_move_all_doftypes_for_block_by_boolean_mask2[cpu-sc]
✅ test_set_move_all_doftypes_for_block_by_boolean_mask2[cpu-named_torsion]
✅ test_set_move_all_doftypes_for_block_by_boolean_masks[cpu-mc]
✅ test_set_move_all_doftypes_for_block_by_boolean_masks[cpu-sc]
✅ test_set_move_all_doftypes_for_block_by_boolean_masks[cpu-named_torsion]
✅ test_set_move_all_doftypes_for_block_by_index_tensors[cpu-mc]
✅ test_set_move_all_doftypes_for_block_by_index_tensors[cpu-sc]
✅ test_set_move_all_doftypes_for_block_by_index_tensors[cpu-named_torsion]
✅ test_set_move_all_jump_dofs_for_jump_by_index[cpu]
✅ test_set_move_all_jump_dofs_for_root_jump_by_index[cpu]
✅ test_set_move_particular_doftypes_for_block_by_integer[cpu-mc]
✅ test_set_move_particular_doftypes_for_block_by_integer[cpu-sc]
✅ test_set_move_particular_doftypes_for_block_by_integer[cpu-named_torsion]
✅ test_set_move_particular_doftypes_for_block_by_integer_jagged[cpu-mc]
✅ test_set_move_particular_doftypes_for_block_by_integer_jagged[cpu-sc]
✅ test_set_move_particular_doftypes_for_block_by_integer_jagged[cpu-named_torsion]
✅ test_set_move_particular_doftypes_for_block_by_boolean_mask[cpu-mc]
✅ test_set_move_particular_doftypes_for_block_by_boolean_mask[cpu-sc]
✅ test_set_move_particular_doftypes_for_block_by_boolean_mask[cpu-named_torsion]
✅ test_set_move_particular_doftypes_for_block_by_boolean_mask_jagged[cpu-mc]
✅ test_set_move_particular_doftypes_for_block_by_boolean_mask_jagged[cpu-sc]
✅ test_set_move_particular_doftypes_for_block_by_boolean_mask_jagged[cpu-named_torsion]
✅ test_set_move_particular_doftypes_for_block_by_boolean_mask2[cpu-mc]
✅ test_set_move_particular_doftypes_for_block_by_boolean_mask2[cpu-sc]
✅ test_set_move_particular_doftypes_for_block_by_boolean_mask2[cpu-named_torsion]
✅ test_set_move_particular_doftypes_for_block_by_index_tensors[cpu-mc]
✅ test_set_move_particular_doftypes_for_block_by_index_tensors[cpu-sc]
✅ test_set_move_particular_doftypes_for_block_by_index_tensors[cpu-named_torsion]
✅ test_set_move_particular_jump_dofs_for_jump_by_index[cpu]
✅ test_set_move_particular_jump_dofs_for_root_jump_by_index[cpu]
✅ test_set_move_particular_atom_dofs[cpu]
✅ test_set_move_particular_atom_dofs2[cpu]
✅ test_minimizermap_construction_2_sixres_ubq_just_sc[cpu]
✅ test_minimizermap_construction_2_sixres_ubq_just_bb[cpu]
✅ test_minimizermap_construction_2_sixres_ubq[cpu]
✅ test_minimizermap_construction_2_sixres_ubq_root_jump_min[cpu]
✅ test_minimizermap_construction_jagged_465_ubq[cpu]
✅ test_minimizermap_construction_jagged_465_ubq_just_sc[cpu]
✅ test_minimizermap_construction_jagged_465_ubq_just_mc[cpu]
✅ test_minimizermap_construction_jagged_465_ubq_named_dofs[cpu]
tmol.tests.kinematics.test_scan_ordering
✅ test_get_scans_simple_path
✅ test_get_scans_two_simple_paths
✅ test_get_scans_three_simple_paths
✅ test_get_scans_three_simple_branches
tmol.tests.kinematics.test_script_modules
✅ test_pose_stack_kinematics_module_smoke[cpu]
✅ test_pose_stack_kinematic_torch_op_gradcheck_perturbed[cpu]
✅ test_pose_stack_kinematic_torch_op_gradcheck[cpu]
⚪ test_pose_stack_kinematics_op_device[cpu]
tmol.tests.ligand.test_chemistry_tables
✅ test_hbond_properties_derived_from_chemical_db
✅ test_polar_and_sp2_classes_come_from_db_tables
tmol.tests.ligand.test_ligand_pipeline.TestDetectFromCIF
✅ test_no_ligands_in_ubq
✅ test_detects_i4b_in_184l
✅ test_detects_hem_in_155c
✅ test_detects_pse_with_partial_occupancy
tmol.tests.ligand.test_ligand_pipeline.TestFullPipeline
✅ test_i4b_small_drug
✅ test_hem_large_ligand
✅ test_pse_partial_occupancy
✅ test_caching_prevents_duplicate_work
✅ test_cache_key_includes_ph
✅ test_cache_accessors_return_defensive_copies
✅ test_register_ligand_returns_inserted_status
✅ test_ubq_passes_through_unchanged
tmol.tests.ligand.test_ligand_pipeline.TestLigandScoringData
✅ test_elec_charges_populated
✅ test_cartbonded_params_populated
✅ test_hbond_atom_types_annotated
✅ test_ljlk_halogen_params_exist
✅ test_remove_residue_scoring_params
✅ test_i4b_aliphatic_carbons_not_sp2_typed
✅ test_i4b_impropers_exclude_aliphatic_substituent
tmol.tests.ligand.test_ligand_pipeline.TestPoseStackWithLigand
⚪ test_i4b_posestack_scores[cpu]
⚪ test_hem_posestack_builds[cpu]
⚪ test_pse_posestack_scores[cpu]
⚪ test_atp_posestack_scores[cpu]
⚪ test_i4b_minimize_and_cif_roundtrip[cpu]
tmol.tests.ligand.test_ligand_pipeline.TestParamsRoundtrip
✅ test_i4b_params_roundtrip
✅ test_params_roundtrip_preserves_bond_types
tmol.tests.ligand.test_ligand_pipeline
✅ test_collect_new_atom_types_strict_mode_errors
✅ test_protonate_mol_variants_produces_valid_mol
✅ test_prepare_single_ligand_uses_index_mapping_before_graph
tmol.tests.ligand.test_ligand_pipeline.TestGroundTruthRegression
✅ test_protonation_matches[ref1]
✅ test_protonation_matches[ref2]
✅ test_atom_count_matches[ref1]
✅ test_atom_count_matches[ref2]
✅ test_atom_types_match[ref1]
✅ test_atom_types_match[ref2]
✅ test_charges_match[ref1]
✅ test_charges_match[ref2]
✅ test_bond_topology_matches[ref1]
✅ test_bond_topology_matches[ref2]
✅ test_bond_count_matches[ref1]
✅ test_bond_count_matches[ref2]
✅ test_icoor_completeness[ref1]
✅ test_icoor_completeness[ref2]
tmol.tests.numeric.interpolation.test_cubic_hermite_polynomial
✅ test_unit_interpolate
✅ test_unit_interpolate_to_zero
✅ test_interpolate
✅ test_interpolate_to_zero
tmol.tests.numeric.test_bspline
✅ test_2d_bspline[input0]
✅ test_2d_bspline[input1]
✅ test_2d_bspline_off_grid[input0--0.406765]
✅ test_2d_bspline_off_grid[input1--0.414712]
✅ test_2d_bspline_off_grid_at_edges[input0--0.004631]
✅ test_2d_bspline_off_grid_at_edges[input1--0.004126]
✅ test_2d_bspline_off_grid_at_edges[input2--0.019515]
✅ test_2d_bspline_off_grid_at_edges[input3--0.000967]
✅ test_2d_bspline_not_square[input0]
✅ test_2d_bspline_not_square[input1]
✅ test_3d_bspline[input0]
✅ test_3d_bspline[input1]
✅ test_3d_bspline_not_square[input0]
✅ test_3d_bspline_not_square[input1]
✅ test_4d_bspline[input0]
✅ test_4d_bspline[input1]
tmol.tests.numeric.test_dihedrals
✅ test_coord_dihedrals
tmol.tests.optimization.test_lbfgs_armijo
✅ test_lbfgs_armijo
⚪ test_lbfgs_armijo_sparse
✅ test_lbfgs_armijo_short_history
tmol.tests.optimization.test_minimizers
✅ test_build_kinforest_sfxn_network_smoke[cpu]
✅ test_run_kin_min_smoke[cpu]
✅ test_run_cart_min_smoke[cpu]
✅ test_run_kin_min_torch_lbfgs[cpu]
tmol.tests.optimization.test_scorefunction_minimization
✅ test_cart_minimize_w_pose_and_sfxn_smoke[cpu]
✅ test_kin_minimize_w_pose_and_sfxn_smoke[cpu]
✅ test_minimize_w_pose_and_sfxn_benchmark[cpu-1]
✅ test_minimize_w_pose_and_sfxn_benchmark[cpu-3]
✅ test_minimize_w_pose_and_sfxn_benchmark[cpu-10]
✅ test_minimize_w_pose_and_sfxn_benchmark[cpu-30]
✅ test_minimizer[cpu]
✅ test_profile_minimizer[cpu]
✅ test_profile_minimizer2[cpu]
tmol.tests.pack.rotamer.dunbrack.test_dunbrack_chi_sampler
✅ test_annotate_residue_type
✅ test_annotate_packed_block_types[cpu]
✅ test_determine_n_possible_rots[cpu]
✅ test_fill_in_brt_for_possrots[cpu]
✅ test_interpolate_probabilities_for_possible_rotamers[cpu]
✅ test_determine_n_base_rotamers_to_build_1[cpu]
✅ test_determine_n_base_rotamers_to_build_2[cpu]
✅ test_count_expanded_rotamers[cpu]
✅ test_map_from_rotamer_index_to_brt[cpu]
✅ test_sample_chi_for_rotamers[cpu]
✅ test_package_samples_for_output[cpu]
✅ test_chi_sampler_smoke
✅ test_chi_sampler_build_lots_of_rotamers[cpu]
tmol.tests.pack.rotamer.test_bfs_sidechain
✅ test_identify_sidechain_atoms_from_roots
tmol.tests.pack.rotamer.test_build_rotamers
✅ test_annotate_restypes[cpu]
✅ test_build_rotamers_smoke[cpu]
✅ test_construct_scans_for_rotamers[cpu]
✅ test_construct_scans_for_rotamers2[cpu]
✅ test_measure_pose_dofs[cpu]
✅ test_inv_kin_rotamers[cpu]
✅ test_construct_kinforest_for_rotamers[cpu]
✅ test_construct_kinforest_for_rotamers2[cpu]
✅ test_measure_original_dofs[cpu]
✅ test_measure_original_dofs2[cpu]
✅ test_create_dof_inds_to_copy_from_orig_to_rotamers[cpu]
✅ test_create_dof_inds_to_copy_from_orig_to_rotamers2[cpu]
✅ test_build_some_rotamers[cpu]
✅ test_build_lots_of_rotamers[cpu]
✅ test_score_lots_of_rotamers[cpu]
✅ test_create_dofs_for_many_rotamers[cpu]
✅ test_new_rotamer_building_logic1[cpu]
✅ test_new_rotamer_building_logic2[cpu]
✅ test_new_rotamer_building_logic3[cpu]
tmol.tests.pack.rotamer.test_fixed_aa_chi_sampler
✅ test_annotate_residue_type_smoke
✅ test_annotate_packed_block_types_smoke[cpu]
✅ test_chi_sampler_smoke[cpu]
tmol.tests.pack.rotamer.test_include_current_sampler
✅ test_annotate_residue_type_smoke
✅ test_annotate_packed_block_types_smoke[cpu]
✅ test_include_current_sampler_smoke[cpu]
tmol.tests.pack.rotamer.test_mainchain_fingerprint
✅ test_create_non_sidechain_fingerprint
✅ test_create_non_sc_fingerprint_smoke
✅ test_annotate_rt_w_mainchain_fingerprint
✅ test_merge_fingerprints
tmol.tests.pack.rotamer.test_single_residue_kintree
✅ test_annotate_restypes
tmol.tests.pack.test_load_ig
✅ test_load_ig
✅ test_construct_rotamer_set_and_sparse_energies_table_from_ig[cpu]
✅ test_build_interaction_graph[cpu]
✅ test_build_multi_pose_interaction_graph[cpu]
✅ test_run_single_pose_simA[cpu]
✅ test_run_two_poses_simA[cpu]
tmol.tests.pack.test_pack_rotamers
✅ test_pack_rotamers[cpu]
✅ test_pack_rotamers_w_cst[cpu]
✅ test_pack_rotamers_w_empty_interaction_graph[cpu]
✅ test_pack_rotamers_w_dslf[cpu]
✅ test_pack_rotamers2[cpu]
✅ test_pack_rotamers_irregular_sized_poses[cpu]
tmol.tests.pack.test_packer_task
✅ test_packer_palette_smoke
✅ test_packer_palette_design_to_canonical_aas
✅ test_packer_palette_design_to_canonical_aas2
✅ test_packer_task_smoke[cpu]
✅ test_residue_level_task_his_restrict_to_repacking[cpu]
✅ test_packer_task_ctor[cpu]
tmol.tests.pose.compiled.test_all_pairs_shortest_paths
✅ test_all_pairs_shortest_paths_simple_path_graph1[cpu]
✅ test_all_pairs_shortest_paths_simple_path_graph1_w_cutoff
✅ test_all_pairs_shortest_paths_simple_path_graph2[cpu]
✅ test_all_pairs_shortest_paths_big_simple_path_graph[cpu]
⚪ test_all_pairs_shortest_paths_w_off_diagonal_bonds
⚪ test_all_pairs_shortest_paths_w_off_diagonal_bonds_and_threshold
✅ test_all_pairs_shortest_paths_benchmark[cpu-01-030]
✅ test_all_pairs_shortest_paths_benchmark[cpu-01-100]
✅ test_all_pairs_shortest_paths_benchmark[cpu-01-300]
✅ test_all_pairs_shortest_paths_benchmark[cpu-03-030]
✅ test_all_pairs_shortest_paths_benchmark[cpu-03-100]
✅ test_all_pairs_shortest_paths_benchmark[cpu-03-300]
✅ test_all_pairs_shortest_paths_benchmark[cpu-10-030]
✅ test_all_pairs_shortest_paths_benchmark[cpu-10-100]
✅ test_all_pairs_shortest_paths_benchmark[cpu-10-300]
✅ test_all_pairs_shortest_paths_benchmark[cpu-30-030]
✅ test_all_pairs_shortest_paths_benchmark[cpu-30-100]
✅ test_all_pairs_shortest_paths_benchmark[cpu-30-300]
tmol.tests.pose.test_constraint_set
✅ test_constraint_set_empty_initialization[cpu]
✅ test_constraint_set_add_constraints[cpu]
✅ test_constraint_set_concatenate_constraints[cpu]
✅ test_constraint_set_concatenate_constraints_2[cpu]
tmol.tests.pose.test_packed_block_types
✅ test_load_packed_residue_types[cpu]
✅ test_determine_real_atoms[cpu]
✅ test_packed_residue_type_atoms_downstream_of_conn[cpu]
✅ test_packed_block_types_ordered_torsions[cpu]
✅ test_packed_block_types_device[cpu]
tmol.tests.pose.test_pose_stack
✅ test_n_poses[cpu]
✅ test_max_n_blocks[cpu]
✅ test_max_n_atoms[cpu]
✅ test_max_n_block_atoms[cpu]
✅ test_max_n_pose_atoms[cpu]
✅ test_n_ats_per_pose_block[cpu]
✅ test_real_atoms[cpu]
✅ test_expand_coords[cpu]
tmol.tests.pose.test_pose_stack_construction
✅ test_concatenate_pose_stacks_ctor[cpu]
✅ test_create_pose_from_sequence[cpu]
✅ test_pose_stack_builder_find_inter_block_sep_for_polymeric_monomers_lcaa[cpu]
✅ test_pose_stack_builder_inter_block_sep_mix_alpha_and_beta[cpu]
✅ test_take_real_conn_conn_intrablock_pairs_heavy[cpu]
✅ test_find_connection_pairs_for_residue_subset[cpu]
✅ test_find_connection_pairs_for_residue_subset2[cpu]
✅ test_find_connections_in_sequences[cpu]
✅ test_find_connection_pairs_for_residue_subset_w_errors1[cpu]
✅ test_find_connection_pairs_for_residue_subset_w_errors2[cpu]
✅ test_calculate_interblock_bondsep_from_connectivity_graph_heavy[cpu]
✅ test_incorporate_extra_connections_into_inter_res_conn_set[cpu]
✅ test_incorporate_extra_connections_into_inter_res_conn_set2[cpu]
✅ test_incorporate_inter_residue_connections_into_connectivity_graph[cpu]
✅ test_construct_pose_stack_containing_disulfides_smoke[cpu]
✅ test_pose_stack_from_sequences_smoke[cpu]
tmol.tests.pose.test_pose_stack_construction_benchmark
✅ test_pose_construction_from_sequence[cpu-001]
✅ test_pose_construction_from_sequence[cpu-003]
✅ test_pose_construction_from_sequence[cpu-010]
✅ test_pose_construction_from_sequence[cpu-030]
✅ test_pose_construction_from_sequence[cpu-100]
tmol.tests.relax.test_fast_relax
✅ test_fast_relax_ubq[cpu-1]
⚪ test_cart_relax_ubq[cpu-1]
⚪ test_fast_relax_pertuz[cpu-1]
⚪ test_fast_relax_for_different_shapes[cpu]
tmol.tests.score.backbone_torsion.test_backbone_torsion_term
✅ test_smoke[cpu]
✅ test_annotate_restypes[cpu]
✅ test_whole_pose_scoring_module_smoke[cpu]
tmol.tests.score.backbone_torsion.test_backbone_torsion_term.TestBackboneTorsionEnergyTerm
✅ test_whole_pose_scoring_10[cpu]
✅ test_whole_pose_scoring_jagged[cpu]
✅ test_whole_pose_scoring_gradcheck[cpu]
✅ test_block_scoring_matches_whole_pose_scoring[cpu]
✅ test_block_scoring[cpu]
✅ test_block_scoring_reweighted_gradcheck[cpu]
tmol.tests.score.bonded_atom.test_bonded_atom
✅ test_bonded_atom_two_iterations[cpu]
tmol.tests.score.cartbonded.test_cartbonded_energy_term
✅ test_smoke[cpu]
✅ test_annotate_twice[cpu]
✅ test_annotate_restypes[cpu]
tmol.tests.score.cartbonded.test_cartbonded_energy_term.TestCartBondedEnergyTerm
✅ test_whole_pose_scoring_10[cpu]
✅ test_whole_pose_scoring_jagged[cpu]
✅ test_whole_pose_scoring_gradcheck[cpu]
✅ test_block_scoring_matches_whole_pose_scoring[cpu]
✅ test_block_scoring[cpu]
✅ test_block_scoring_reweighted_gradcheck[cpu]
tmol.tests.score.common.dispatch.test_dispatch
✅ test_complex_dispatch
tmol.tests.score.common.geom.test_geom
✅ test_distance_values
✅ test_distance_gradcheck
✅ test_interior_angle_values
✅ test_interior_angle_gradcheck
✅ test_cos_interior_angle_values
✅ test_cos_interior_angle_gradcheck
✅ test_dihedral_angle_values
✅ test_dihedral_angle_values_gradcheck
✅ test_coord_dihedrals
✅ test_coord_dihedral_angle_gradcheck
tmol.tests.score.common.polynomial.test_polynomial
✅ test_polynomial_gradcheck
tmol.tests.score.common.test_cubic_hermite_polynomial
✅ test_unit_interpolate
✅ test_unit_interpolate_to_zero
✅ test_interpolate
✅ test_interpolate_to_zero
tmol.tests.score.common.test_energy_term
✅ test_energy_term_base_write_baseline_smoke[cpu]
✅ test_energy_term_fail[cpu]
tmol.tests.score.common.test_stack_condense
✅ test_condense_numpy_inds
✅ test_condense_torch_inds[cpu]
✅ test_take_values_w_sentineled_index1[cpu]
✅ test_take_values_w_sentineled_index_and_dest[cpu]
✅ test_condense_subset[cpu]
✅ test_condense_numpy_inds_from_doc_string
✅ test_condense_torch_inds_from_doc_string
✅ test_take_values_w_sentineled_index_from_doc_string
✅ test_take_values_w_sentineled_index_and_dest_from_doc_string
✅ test_take_values_w_sentineled_dest_from_doc_string
✅ test_condense_subset_from_doc_string
✅ test_take_condensed_3d_subset_from_doc_string
✅ test_tile_subset_indices_torch[cpu-torch_dtype0]
✅ test_tile_subset_indices_torch[cpu-torch_dtype1]
✅ test_tile_subset_indices_torch2[cpu-torch_dtype0]
✅ test_tile_subset_indices_torch2[cpu-torch_dtype1]
✅ test_tile_subset_indices_numpy[int32]
✅ test_tile_subset_indices_numpy[int64]
✅ test_tile_subset_indices_numpy2[int32]
✅ test_tile_subset_indices_numpy2[int64]
✅ test_arg_tile_subset_indices_torch[cpu-torch_dtype0]
✅ test_arg_tile_subset_indices_torch[cpu-torch_dtype1]
✅ test_arg_tile_subset_indices_torch2[cpu-torch_dtype0]
✅ test_arg_tile_subset_indices_torch2[cpu-torch_dtype1]
✅ test_arg_tile_subset_indices_torch_w_max_n_entries[cpu-torch_dtype0]
✅ test_arg_tile_subset_indices_torch_w_max_n_entries[cpu-torch_dtype1]
✅ test_arg_tile_subset_indices_numpy[int32]
✅ test_arg_tile_subset_indices_numpy[int64]
✅ test_arg_tile_subset_indices_numpy2[int32]
✅ test_arg_tile_subset_indices_numpy2[int64]
✅ test_arg_tile_subset_indices_numpy_w_max_n_entries[int32]
✅ test_arg_tile_subset_indices_numpy_w_max_n_entries[int64]
tmol.tests.score.common.test_uaid_util
✅ test_resolve_uaids_smoke
✅ test_resolve_uaids_intra_res
✅ test_resolve_uaids_inter_res
✅ test_resolve_uaids_inter_res2
✅ test_resolve_uaids_unresolved_connection
✅ test_resolve_unspecified_uaids
tmol.tests.score.common.test_warp_segreduce
⚪ test_warp_segreduce_1
⚪ test_warp_segreduce_vec3
⚪ test_warp_segreduce_vec3_benchmark[100-0]
⚪ test_warp_segreduce_vec3_benchmark[100-1]
⚪ test_warp_segreduce_vec3_benchmark[100-3]
⚪ test_warp_segreduce_vec3_benchmark[100-10]
⚪ test_warp_segreduce_vec3_benchmark[500-0]
⚪ test_warp_segreduce_vec3_benchmark[500-1]
⚪ test_warp_segreduce_vec3_benchmark[500-3]
⚪ test_warp_segreduce_vec3_benchmark[500-10]
⚪ test_warp_segreduce_vec3_benchmark[1000-0]
⚪ test_warp_segreduce_vec3_benchmark[1000-1]
⚪ test_warp_segreduce_vec3_benchmark[1000-3]
⚪ test_warp_segreduce_vec3_benchmark[1000-10]
⚪ test_warp_segreduce_w_partial_warp
tmol.tests.score.common.test_warp_stride_reduce
⚪ test_warp_stride_reduce_full
⚪ test_warp_stride_reduce_full_vec3
⚪ test_warp_stride_reduce_w_partial_warp
tmol.tests.score.constraint.test_constraint_energy_term
✅ test_get_torsion_angle[cpu]
tmol.tests.score.constraint.test_constraint_energy_term.TestConstraintEnergyTerm
✅ test_constraint_distance_range_score[cpu]
✅ test_ensure_fail_add_cross_pose_constraint[cpu]
✅ test_whole_pose_scoring_10[cpu]
✅ test_whole_pose_scoring_jagged[cpu]
✅ test_whole_pose_scoring_gradcheck[cpu]
✅ test_block_scoring_matches_whole_pose_scoring[cpu]
✅ test_block_scoring[cpu]
✅ test_block_scoring_reweighted_gradcheck[cpu]
tmol.tests.score.constraint.test_constraint_utilities
✅ test_create_mainchain_coordinate_constraints[cpu]
tmol.tests.score.disulfide.test_disulfide_energy_term
✅ test_smoke[cpu]
✅ test_annotate_disulfide_conns[cpu]
tmol.tests.score.disulfide.test_disulfide_energy_term.TestDisulfideEnergyTerm
✅ test_whole_pose_scoring_10[cpu]
✅ test_whole_pose_scoring_jagged[cpu]
✅ test_whole_pose_scoring_gradcheck[cpu]
✅ test_block_scoring_matches_whole_pose_scoring[cpu]
✅ test_block_scoring[cpu]
✅ test_block_scoring_reweighted_gradcheck[cpu]
tmol.tests.score.dunbrack.test_dunbrack_energy_term
✅ test_smoke[cpu]
✅ test_annotate_block_types[cpu]
tmol.tests.score.dunbrack.test_dunbrack_energy_term.TestDunbrackEnergyTerm
✅ test_whole_pose_scoring_10[cpu]
✅ test_whole_pose_scoring_jagged[cpu]
✅ test_whole_pose_scoring_gradcheck[cpu]
✅ test_block_scoring_matches_whole_pose_scoring[cpu]
✅ test_block_scoring[cpu]
✅ test_block_scoring_reweighted_gradcheck[cpu]
tmol.tests.score.elec.test_elec_energy_term
✅ test_smoke[cpu]
✅ test_annotate_restypes[cpu]
✅ test_whole_pose_scoring_module_smoke[cpu]
tmol.tests.score.elec.test_elec_energy_term.TestElecEnergyTerm
✅ test_whole_pose_scoring_10[cpu]
✅ test_whole_pose_scoring_jagged[cpu]
✅ test_whole_pose_scoring_gradcheck[cpu]
✅ test_block_scoring_matches_whole_pose_scoring[cpu]
✅ test_block_scoring[cpu]
✅ test_block_scoring_reweighted_gradcheck[cpu]
tmol.tests.score.elec.test_elec_params
✅ test_construct_elec_param_resolver_smoke[cpu]
✅ test_elec_param_resolver_w_missing_cp_rep_exception_handling[cpu]
✅ test_elec_param_resolver_w_bad_cp_rep_exception_handling[cpu]
✅ test_elec_param_resolver_w_missing_partial_charge_exception_handling[cpu]
tmol.tests.score.hbond.potentials.test_potentials
⚪ test_hbond_point_scores
⚪ test_hbond_point_scores_gradcheck
✅ test_AH_dist_gradcheck
✅ test_AHD_angle_gradcheck
✅ test_BAH_angle_gradcheck
✅ test_sp2_chi_energy_gradcheck
tmol.tests.score.hbond.test_hbond_dependent_term
✅ test_hbond_dep_term_annotate_block_types_smoke[cpu]
✅ test_hbond_dep_term_annotate_packed_block_types_smoke[cpu]
✅ test_hbond_dep_term_setup_packed_block_types[cpu]
✅ test_hbond_dep_term_setup_ser_block_type[cpu]
tmol.tests.score.hbond.test_hbond_energy_term
✅ test_smoke[cpu]
✅ test_hbond_in_sfxn[cpu]
✅ test_annotate_restypes[cpu]
✅ test_whole_pose_scoring_module_smoke[cpu]
tmol.tests.score.hbond.test_hbond_energy_term.TestHBondEnergyTerm
✅ test_whole_pose_scoring_10[cpu]
✅ test_whole_pose_scoring_jagged[cpu]
✅ test_whole_pose_scoring_gradcheck[cpu]
✅ test_block_scoring_matches_whole_pose_scoring[cpu]
✅ test_block_scoring[cpu]
✅ test_block_scoring_reweighted_gradcheck[cpu]
tmol.tests.score.ljlk.potentials.test_compiled_lj_potential
✅ test_lj_gradcheck[CNH2-COO-2]
✅ test_lj_gradcheck[CNH2-COO-4]
✅ test_lj_gradcheck[CNH2-COO-5]
✅ test_lj_gradcheck[Ntrp-OOC-2]
✅ test_lj_gradcheck[Ntrp-OOC-4]
✅ test_lj_gradcheck[Ntrp-OOC-5]
✅ test_lj_spotcheck[CNH2-COO]
✅ test_lj_spotcheck[Ntrp-OOC]
tmol.tests.score.ljlk.potentials.test_compiled_lk_isotropic_potential
✅ test_lk_isotropic_gradcheck[CNH2-COO-2]
✅ test_lk_isotropic_gradcheck[CNH2-COO-4]
✅ test_lk_isotropic_gradcheck[CNH2-COO-5]
✅ test_lk_isotropic_gradcheck[Ntrp-OOC-2]
✅ test_lk_isotropic_gradcheck[Ntrp-OOC-4]
✅ test_lk_isotropic_gradcheck[Ntrp-OOC-5]
✅ test_lk_spotcheck[CNH2-COO]
✅ test_lk_spotcheck[Ntrp-OOC]
tmol.tests.score.ljlk.test_ljlk_energy_term
✅ test_smoke[cpu]
✅ test_annotate_heavy_ats_in_tile[cpu]
tmol.tests.score.ljlk.test_ljlk_energy_term.TestLJLKEnergyTerm
✅ test_whole_pose_scoring_10[cpu]
✅ test_whole_pose_scoring_gradcheck[cpu]
✅ test_whole_pose_scoring_jagged[cpu]
✅ test_block_scoring_matches_whole_pose_scoring[cpu]
✅ test_block_scoring[cpu]
✅ test_block_scoring_reweighted_gradcheck[cpu]
tmol.tests.score.lk_ball.potentials.test_compiled_lk_ball
✅ test_build_acc_waters
✅ test_build_don_water
✅ test_lk_fraction
✅ test_lk_bridge_fraction
✅ test_lk_ball_donor_donor_spotcheck
✅ test_lk_ball_sp2_nonpolar_spotcheck
✅ test_lk_ball_sp3_ring_spotcheck
tmol.tests.score.lk_ball.test_lk_ball_energy_term
✅ test_smoke[cpu]
✅ test_annotate_restypes[cpu]
✅ test_whole_pose_scoring_module_smoke[cpu]
tmol.tests.score.lk_ball.test_lk_ball_energy_term.TestLKBallEnergyTerm
✅ test_whole_pose_scoring_10[cpu]
✅ test_whole_pose_scoring_gradcheck[cpu]
✅ test_whole_pose_scoring_jagged[cpu]
✅ test_block_scoring_matches_whole_pose_scoring[cpu]
✅ test_block_scoring[cpu]
✅ test_block_scoring_reweighted_gradcheck[cpu]
tmol.tests.score.ref.test_ref_energy_term
✅ test_smoke[cpu]
✅ test_annotate_block_types[cpu]
tmol.tests.score.ref.test_ref_energy_term.TestRefEnergyTerm
✅ test_whole_pose_scoring_10[cpu]
✅ test_whole_pose_scoring_jagged[cpu]
✅ test_whole_pose_scoring_gradcheck[cpu]
✅ test_block_scoring_matches_whole_pose_scoring[cpu]
✅ test_block_scoring[cpu]
✅ test_block_scoring_reweighted_gradcheck[cpu]
tmol.tests.score.terms.test_score_term_factory
✅ test_score_term_factory_smoke[cpu]
tmol.tests.score.test_atom_type_dependent_term
✅ test_setup_block_type[cpu]
✅ test_store_atom_types_in_packed_residue_types[cpu]
✅ test_take_heavyatom_inds_in_range
tmol.tests.score.test_bond_dependent_term
✅ test_create_pose_bond_separation_two_ubq[cpu]
tmol.tests.score.test_score_function
✅ test_pose_score_smoke[cpu]
✅ test_virtual_residue_scoring[cpu]
✅ test_score_function_all_score_types
✅ test_score_function_one_body_terms_getter
✅ test_score_function_two_body_terms_getter
✅ test_score_function_all_terms_getter
tmol.tests.score.test_score_function_benchmarks
✅ test_res_centric_score_benchmark[cpu-cartbonded-forward-001]
✅ test_res_centric_score_benchmark[cpu-cartbonded-forward-003]
✅ test_res_centric_score_benchmark[cpu-cartbonded-forward-010]
✅ test_res_centric_score_benchmark[cpu-cartbonded-forward-030]
✅ test_res_centric_score_benchmark[cpu-cartbonded-forward-100]
✅ test_res_centric_score_benchmark[cpu-cartbonded-full-001]
✅ test_res_centric_score_benchmark[cpu-cartbonded-full-003]
✅ test_res_centric_score_benchmark[cpu-cartbonded-full-010]
✅ test_res_centric_score_benchmark[cpu-cartbonded-full-030]
✅ test_res_centric_score_benchmark[cpu-cartbonded-full-100]
✅ test_res_centric_score_benchmark[cpu-cartbonded-backward-001]
✅ test_res_centric_score_benchmark[cpu-cartbonded-backward-003]
✅ test_res_centric_score_benchmark[cpu-cartbonded-backward-010]
✅ test_res_centric_score_benchmark[cpu-cartbonded-backward-030]
✅ test_res_centric_score_benchmark[cpu-cartbonded-backward-100]
✅ test_res_centric_score_benchmark[cpu-disulfide-forward-001]
✅ test_res_centric_score_benchmark[cpu-disulfide-forward-003]
✅ test_res_centric_score_benchmark[cpu-disulfide-forward-010]
✅ test_res_centric_score_benchmark[cpu-disulfide-forward-030]
✅ test_res_centric_score_benchmark[cpu-disulfide-forward-100]
✅ test_res_centric_score_benchmark[cpu-disulfide-full-001]
✅ test_res_centric_score_benchmark[cpu-disulfide-full-003]
✅ test_res_centric_score_benchmark[cpu-disulfide-full-010]
✅ test_res_centric_score_benchmark[cpu-disulfide-full-030]
✅ test_res_centric_score_benchmark[cpu-disulfide-full-100]
✅ test_res_centric_score_benchmark[cpu-disulfide-backward-001]
✅ test_res_centric_score_benchmark[cpu-disulfide-backward-003]
✅ test_res_centric_score_benchmark[cpu-disulfide-backward-010]
✅ test_res_centric_score_benchmark[cpu-disulfide-backward-030]
✅ test_res_centric_score_benchmark[cpu-disulfide-backward-100]
✅ test_res_centric_score_benchmark[cpu-dunbrack-forward-001]
✅ test_res_centric_score_benchmark[cpu-dunbrack-forward-003]
✅ test_res_centric_score_benchmark[cpu-dunbrack-forward-010]
✅ test_res_centric_score_benchmark[cpu-dunbrack-forward-030]
✅ test_res_centric_score_benchmark[cpu-dunbrack-forward-100]
✅ test_res_centric_score_benchmark[cpu-dunbrack-full-001]
✅ test_res_centric_score_benchmark[cpu-dunbrack-full-003]
✅ test_res_centric_score_benchmark[cpu-dunbrack-full-010]
✅ test_res_centric_score_benchmark[cpu-dunbrack-full-030]
✅ test_res_centric_score_benchmark[cpu-dunbrack-full-100]
✅ test_res_centric_score_benchmark[cpu-dunbrack-backward-001]
✅ test_res_centric_score_benchmark[cpu-dunbrack-backward-003]
✅ test_res_centric_score_benchmark[cpu-dunbrack-backward-010]
✅ test_res_centric_score_benchmark[cpu-dunbrack-backward-030]
✅ test_res_centric_score_benchmark[cpu-dunbrack-backward-100]
✅ test_res_centric_score_benchmark[cpu-elec-forward-001]
✅ test_res_centric_score_benchmark[cpu-elec-forward-003]
✅ test_res_centric_score_benchmark[cpu-elec-forward-010]
✅ test_res_centric_score_benchmark[cpu-elec-forward-030]
✅ test_res_centric_score_benchmark[cpu-elec-forward-100]
✅ test_res_centric_score_benchmark[cpu-elec-full-001]
✅ test_res_centric_score_benchmark[cpu-elec-full-003]
✅ test_res_centric_score_benchmark[cpu-elec-full-010]
✅ test_res_centric_score_benchmark[cpu-elec-full-030]
✅ test_res_centric_score_benchmark[cpu-elec-full-100]
✅ test_res_centric_score_benchmark[cpu-elec-backward-001]
✅ test_res_centric_score_benchmark[cpu-elec-backward-003]
✅ test_res_centric_score_benchmark[cpu-elec-backward-010]
✅ test_res_centric_score_benchmark[cpu-elec-backward-030]
✅ test_res_centric_score_benchmark[cpu-elec-backward-100]
✅ test_res_centric_score_benchmark[cpu-hbond-forward-001]
✅ test_res_centric_score_benchmark[cpu-hbond-forward-003]
✅ test_res_centric_score_benchmark[cpu-hbond-forward-010]
✅ test_res_centric_score_benchmark[cpu-hbond-forward-030]
✅ test_res_centric_score_benchmark[cpu-hbond-forward-100]
✅ test_res_centric_score_benchmark[cpu-hbond-full-001]
✅ test_res_centric_score_benchmark[cpu-hbond-full-003]
✅ test_res_centric_score_benchmark[cpu-hbond-full-010]
✅ test_res_centric_score_benchmark[cpu-hbond-full-030]
✅ test_res_centric_score_benchmark[cpu-hbond-full-100]
✅ test_res_centric_score_benchmark[cpu-hbond-backward-001]
✅ test_res_centric_score_benchmark[cpu-hbond-backward-003]
✅ test_res_centric_score_benchmark[cpu-hbond-backward-010]
✅ test_res_centric_score_benchmark[cpu-hbond-backward-030]
✅ test_res_centric_score_benchmark[cpu-hbond-backward-100]
✅ test_res_centric_score_benchmark[cpu-ljlk-forward-001]
✅ test_res_centric_score_benchmark[cpu-ljlk-forward-003]
✅ test_res_centric_score_benchmark[cpu-ljlk-forward-010]
✅ test_res_centric_score_benchmark[cpu-ljlk-forward-030]
✅ test_res_centric_score_benchmark[cpu-ljlk-forward-100]
✅ test_res_centric_score_benchmark[cpu-ljlk-full-001]
✅ test_res_centric_score_benchmark[cpu-ljlk-full-003]
✅ test_res_centric_score_benchmark[cpu-ljlk-full-010]
✅ test_res_centric_score_benchmark[cpu-ljlk-full-030]
✅ test_res_centric_score_benchmark[cpu-ljlk-full-100]
✅ test_res_centric_score_benchmark[cpu-ljlk-backward-001]
✅ test_res_centric_score_benchmark[cpu-ljlk-backward-003]
✅ test_res_centric_score_benchmark[cpu-ljlk-backward-010]
✅ test_res_centric_score_benchmark[cpu-ljlk-backward-030]
✅ test_res_centric_score_benchmark[cpu-ljlk-backward-100]
✅ test_res_centric_score_benchmark[cpu-lk_ball-forward-001]
✅ test_res_centric_score_benchmark[cpu-lk_ball-forward-003]
✅ test_res_centric_score_benchmark[cpu-lk_ball-forward-010]
✅ test_res_centric_score_benchmark[cpu-lk_ball-forward-030]
✅ test_res_centric_score_benchmark[cpu-lk_ball-forward-100]
✅ test_res_centric_score_benchmark[cpu-lk_ball-full-001]
✅ test_res_centric_score_benchmark[cpu-lk_ball-full-003]
✅ test_res_centric_score_benchmark[cpu-lk_ball-full-010]
✅ test_res_centric_score_benchmark[cpu-lk_ball-full-030]
✅ test_res_centric_score_benchmark[cpu-lk_ball-full-100]
✅ test_res_centric_score_benchmark[cpu-lk_ball-backward-001]
✅ test_res_centric_score_benchmark[cpu-lk_ball-backward-003]
✅ test_res_centric_score_benchmark[cpu-lk_ball-backward-010]
✅ test_res_centric_score_benchmark[cpu-lk_ball-backward-030]
✅ test_res_centric_score_benchmark[cpu-lk_ball-backward-100]
✅ test_res_centric_score_benchmark[cpu-backbone_torsion-forward-001]
✅ test_res_centric_score_benchmark[cpu-backbone_torsion-forward-003]
✅ test_res_centric_score_benchmark[cpu-backbone_torsion-forward-010]
✅ test_res_centric_score_benchmark[cpu-backbone_torsion-forward-030]
✅ test_res_centric_score_benchmark[cpu-backbone_torsion-forward-100]
✅ test_res_centric_score_benchmark[cpu-backbone_torsion-full-001]
✅ test_res_centric_score_benchmark[cpu-backbone_torsion-full-003]
✅ test_res_centric_score_benchmark[cpu-backbone_torsion-full-010]
✅ test_res_centric_score_benchmark[cpu-backbone_torsion-full-030]
✅ test_res_centric_score_benchmark[cpu-backbone_torsion-full-100]
✅ test_res_centric_score_benchmark[cpu-backbone_torsion-backward-001]
✅ test_res_centric_score_benchmark[cpu-backbone_torsion-backward-003]
✅ test_res_centric_score_benchmark[cpu-backbone_torsion-backward-010]
✅ test_res_centric_score_benchmark[cpu-backbone_torsion-backward-030]
✅ test_res_centric_score_benchmark[cpu-backbone_torsion-backward-100]
✅ test_res_centric_score_benchmark[cpu-ref-forward-001]
✅ test_res_centric_score_benchmark[cpu-ref-forward-003]
✅ test_res_centric_score_benchmark[cpu-ref-forward-010]
✅ test_res_centric_score_benchmark[cpu-ref-forward-030]
✅ test_res_centric_score_benchmark[cpu-ref-forward-100]
✅ test_res_centric_score_benchmark[cpu-ref-full-001]
✅ test_res_centric_score_benchmark[cpu-ref-full-003]
✅ test_res_centric_score_benchmark[cpu-ref-full-010]
✅ test_res_centric_score_benchmark[cpu-ref-full-030]
✅ test_res_centric_score_benchmark[cpu-ref-full-100]
✅ test_res_centric_score_benchmark[cpu-ref-backward-001]
✅ test_res_centric_score_benchmark[cpu-ref-backward-003]
✅ test_res_centric_score_benchmark[cpu-ref-backward-010]
✅ test_res_centric_score_benchmark[cpu-ref-backward-030]
✅ test_res_centric_score_benchmark[cpu-ref-backward-100]
✅ test_combined_res_centric_score_benchmark[cpu-cartbonded_disulfide_dunbrack_elec_hbond_ljlk_lkb_bbtorsion_ref-forward-001]
✅ test_combined_res_centric_score_benchmark[cpu-cartbonded_disulfide_dunbrack_elec_hbond_ljlk_lkb_bbtorsion_ref-forward-003]
✅ test_combined_res_centric_score_benchmark[cpu-cartbonded_disulfide_dunbrack_elec_hbond_ljlk_lkb_bbtorsion_ref-forward-010]
✅ test_combined_res_centric_score_benchmark[cpu-cartbonded_disulfide_dunbrack_elec_hbond_ljlk_lkb_bbtorsion_ref-forward-030]
✅ test_combined_res_centric_score_benchmark[cpu-cartbonded_disulfide_dunbrack_elec_hbond_ljlk_lkb_bbtorsion_ref-forward-100]
✅ test_combined_res_centric_score_benchmark[cpu-cartbonded_disulfide_dunbrack_elec_hbond_ljlk_lkb_bbtorsion_ref-full-001]
✅ test_combined_res_centric_score_benchmark[cpu-cartbonded_disulfide_dunbrack_elec_hbond_ljlk_lkb_bbtorsion_ref-full-003]
✅ test_combined_res_centric_score_benchmark[cpu-cartbonded_disulfide_dunbrack_elec_hbond_ljlk_lkb_bbtorsion_ref-full-010]
✅ test_combined_res_centric_score_benchmark[cpu-cartbonded_disulfide_dunbrack_elec_hbond_ljlk_lkb_bbtorsion_ref-full-030]
✅ test_combined_res_centric_score_benchmark[cpu-cartbonded_disulfide_dunbrack_elec_hbond_ljlk_lkb_bbtorsion_ref-full-100]
✅ test_combined_res_centric_score_benchmark[cpu-cartbonded_disulfide_dunbrack_elec_hbond_ljlk_lkb_bbtorsion_ref-backward-001]
✅ test_combined_res_centric_score_benchmark[cpu-cartbonded_disulfide_dunbrack_elec_hbond_ljlk_lkb_bbtorsion_ref-backward-003]
✅ test_combined_res_centric_score_benchmark[cpu-cartbonded_disulfide_dunbrack_elec_hbond_ljlk_lkb_bbtorsion_ref-backward-010]
✅ test_combined_res_centric_score_benchmark[cpu-cartbonded_disulfide_dunbrack_elec_hbond_ljlk_lkb_bbtorsion_ref-backward-030]
✅ test_combined_res_centric_score_benchmark[cpu-cartbonded_disulfide_dunbrack_elec_hbond_ljlk_lkb_bbtorsion_ref-backward-100]
✅ test_build_posestack[cpu-40]
✅ test_build_posestack[cpu-75]
✅ test_build_posestack[cpu-150]
✅ test_build_posestack[cpu-300]
✅ test_build_posestack[cpu-600]
✅ test_render_module[cpu-40]
✅ test_render_module[cpu-75]
✅ test_render_module[cpu-150]
✅ test_render_module[cpu-300]
✅ test_render_module[cpu-600]
✅ test_full[cpu-40]
✅ test_full[cpu-75]
✅ test_full[cpu-150]
✅ test_full[cpu-300]
✅ test_full[cpu-600]
tmol.tests.support.test_database_converters
⚪ test_hbond_param_import
⚪ test_rama_table_read
⚪ test_bbdep_omega_table_read
⚪ test_dunbrack_table_read
tmol.tests.support.test_pyrosetta_import
⚪ test_fixture
tmol.tests.test_benchmark
✅ test_str_join_method
⚪ test_str_join_invalid
tmol.tests.types.test_array
✅ test_array_validation[example0]
✅ test_array_validation[example1]
✅ test_array_conversion[example0]
✅ test_array_conversion[example1]
✅ test_array_conversion[example2]
tmol.tests.types.test_attrs
✅ test_validate_attrs[example0]
⚪ test_set_post_init
✅ test_convert_attrs[example0]
tmol.tests.types.test_attrs_nn_module
✅ test_buffers
tmol.tests.types.test_functional
✅ test_func_validation[example0]
✅ test_func_validation[example1]
✅ test_func_validation[example2]
✅ test_func_validation[example3]
✅ test_func_validation[example4]
✅ test_func_validation[example5]
✅ test_func_validation[example6]
✅ test_func_validation[example7]
✅ test_func_validation[example8]
✅ test_func_validation[example9]
✅ test_func_validation[example10]
✅ test_func_validation[example11]
✅ test_func_validation[example12]
✅ test_func_conversion[example0]
✅ test_func_conversion[example1]
✅ test_func_conversion[example2]
✅ test_func_conversion[example3]
✅ test_func_conversion[example4]
✅ test_return_annotation
tmol.tests.types.test_shape.testShape
✅ test
tmol.tests.types.test_tensor
✅ test_attr_checking
✅ test_nested_group
✅ test_tensor_group_reshape
✅ test_tensor_group_invalid_reshape
✅ test_tensorgroup_smoke
✅ test_tensorgroup_cat
✅ test_tensorgroup_to_dtypes
⚪ test_tensorgroup_to_device
tmol.tests.types.test_torch
✅ test_array_validation[example0]
✅ test_array_validation[example1]
✅ test_array_validation[example2]
✅ test_array_validation[example3]
✅ test_invalid_dtype[invalid_dtype0]
✅ test_invalid_dtype[complex]
✅ test_invalid_dtype[c8]
✅ test_array_conversion[example0]
✅ test_array_conversion[example1]
✅ test_array_conversion[example2]
✅ test_array_conversion[example3]
tmol.tests.utility.datastructures.test_in_place_heap
✅ test_heap_construction_1
✅ test_heap_construction_2
✅ test_heap_clear_and_reconstruction
✅ test_heap_clear_and_reconstruction_smaller_subset
✅ test_heap_with_gaps
✅ test_heap_with_gaps2
✅ test_heap_pop
✅ test_heap_pop2
tmol.tests.utility.ndarray.test_common_operations
✅ test_invert_mapping
✅ test_exclusive_cumsum1d
✅ test_exclusive_cumsum2d
tmol.tests.utility.tensor.test_common_operations
✅ test_stretch_i32[cpu]
✅ test_stretch2_i32[cpu]
✅ test_exclusive_cumsum
✅ test_nplus1d_tensor_from_list
✅ test_cat_diff_sized_tensors_w_same_sizes
✅ test_cat_diff_sized_tensors_w_diff_sizes
✅ test_join_tensors_and_report_real_entries[cpu]
✅ test_invert_mapping[cpu]
tmol.tests.utility.tensor.test_tensor_accessor
✅ test_tensor_vector_accessors
✅ test_tensor_matrix_accessors
⚪ test_tensor_accessor_device_conversion
✅ test_tensor_pack_eigen_matrix
✅ test_tensor_pack_constructors
✅ test_tview_slice
tmol.tests.utility.tensor.test_tensor_collection
✅ test_tensor_collection
tmol.tests.utility.tensor.test_tensor_struct
✅ test_tensor_struct
✅ test_tensor_view
tmol.tests.utility.test_attr
✅ test_attr_mapping
tmol.tests.utility.test_categorical
✅ test_categorical_conversion
✅ test_flag_enum
tmol.tests.utility.test_dicttoolz
✅ test_flatten
tmol.tests.utility.test_mixins
✅ test_cooperative_factory_function_update
✅ test_cooperative_factory_kwargs
✅ test_cooperative_factory_dispatch
tmol.tests.utility.test_units
✅ test_angle_parsing
❌ testing.cuda.junit.xml
568 tests were completed in 641s with 559 passed, 4 failed and 5 skipped.
| Test suite | Passed | Failed | Skipped | Time |
|---|---|---|---|---|
| pytest | 559✅ | 4❌ | 5⚪ | 641s |
❌ pytest
tmol.tests.chemical.test_patch
✅ test_patched_pdb[cuda]
tmol.tests.io.details.test_build_missing_leaf_atoms
✅ test_build_missing_leaf_atoms[cuda]
✅ test_build_missing_leaf_atoms_error_handling[cuda]
✅ test_build_missing_leaf_atoms_backwards[cuda]
✅ test_coord_sum_gradcheck[cuda]
✅ test_build_missing_hydrogens_and_oxygens_gradcheck[cuda]
tmol.tests.io.details.test_canonical_packed_block_types
✅ test_default_packed_block_types[cuda]
✅ test_default_packed_block_types_memoization[cuda]
tmol.tests.io.details.test_find_disulfides
✅ test_find_disulf_w_no_cys_in_canonical_ordering[cuda]
tmol.tests.io.details.test_his_taut_resolution
✅ test_resolve_his_taut_no_his_in_canonical_ordering[cuda]
tmol.tests.io.details.test_left_justify_canonical_form
✅ test_assign_block_types_with_gaps[cuda]
✅ test_left_justify_can_form_with_gaps_in_dslf[cuda]
✅ test_assign_block_types_for_pert_and_antigen[cuda]
tmol.tests.io.details.test_select_from_canonical
✅ test_annotate_pbt_w_canonical_res_order[cuda]
✅ test_annotate_pbt_w_canonical_res_order_caching[cuda]
❌ test_assign_block_types[cuda]
torch_device = device(type='cuda', index=0)
❌ test_assign_block_types_w_exotic_termini_options[cuda]
default_database = ParameterDatabase(scoring=ScoringDatabase(cartbonded=CartBondedDatabase(residue_params={'ALA': CartRes(length_paramete....0943951023931953, theta=1.2304571226560024, d=1.0, parent='<N1>', grand_parent='<C1>', great_grand_parent='<C2>'))))))
✅ test_assign_block_types_jagged_poses[cuda]
✅ test_assign_block_types_with_gaps[cuda]
✅ test_assign_block_types_with_same_chain_cterm_vrt[cuda]
✅ test_assign_block_types_for_pert_and_antigen[cuda]
✅ test_take_block_type_atoms_from_canonical[cuda]
✅ test_select_best_block_type_candidate_choosing_default_term[cuda]
❌ test_select_best_block_type_candidate_w_mult_opts[cuda]
torch_device = device(type='cuda', index=0)
✅ test_select_best_block_type_candidate_error_impossible_combo[cuda]
tmol.tests.io.test_canonical_form
✅ test_default_packed_block_types[cuda]
✅ test_default_canonical_form_from_pdb[cuda]
✅ test_canonical_form_w_unk[cuda]
✅ test_create_src_2_tmol_mapping[cuda]
tmol.tests.io.test_chain_deduction
✅ test_deduce_chains_for_monomer[cuda]
✅ test_deduce_chains_two_monomers[cuda]
✅ test_deduce_chains_four_monomers[cuda]
✅ test_deduce_chains_dslf_dimer[cuda]
tmol.tests.io.test_pose_stack_construction
✅ test_build_pose_stack_from_canonical_form_ubq[cuda]
✅ test_build_pose_stack_from_canonical_form_pert[cuda]
✅ test_build_pose_stack_from_canonical_form_pert_w_dslf[cuda]
❌ test_build_pose_stack_from_canonical_form_1r21[cuda]
torch_device = device(type='cuda', index=0)
✅ test_build_pose_stack_w_disconn_segs[cuda]
✅ test_build_pose_stack_w_disconn_segs_and_insertions[cuda]
✅ test_build_pose_stack_from_canonical_form_ubq_w_atom_mapping[cuda]
✅ test_build_pose_stack_with_masked_residues[cuda]
tmol.tests.io.test_pose_stack_construction_benchmark
✅ test_build_pose_stack_from_canonical_form_ubq_benchmark[cuda]
✅ test_build_pose_stack_from_canonical_form_pert_benchmark[cuda]
✅ test_build_and_score_ubq_benchmark[cuda]
✅ test_build_pose_stack_from_canonical_form_pertuzumab_benchmark[cuda-01]
✅ test_build_pose_stack_from_canonical_form_pertuzumab_benchmark[cuda-03]
✅ test_build_pose_stack_from_canonical_form_pertuzumab_benchmark[cuda-10]
✅ test_build_and_score_pertuzumab_benchmark[cuda-01]
✅ test_build_and_score_pertuzumab_benchmark[cuda-03]
✅ test_build_and_score_pertuzumab_benchmark[cuda-10]
✅ test_build_and_score_pertuzumab_benchmark[cuda-30]
tmol.tests.io.test_pose_stack_deconstruction
✅ test_canonical_form_from_ubq_pose[cuda]
✅ test_canonical_form_from_jagged_ubq_pose[cuda]
✅ test_canonical_form_from_pertuzumab_pose[cuda]
✅ test_canonical_form_from_pertuzumab_and_antigen_pose[cuda]
✅ test_round_trip_deconstruction[cuda]
tmol.tests.io.test_pose_stack_from_biotite
✅ test_build_context_from_biotite_smoke[cuda]
✅ test_canonical_form_from_biotite_smoke[cuda]
✅ test_pose_stack_from_biotite_1ubq_smoke[cuda]
✅ test_pose_stack_from_biotite_1ubq_err_smoke[cuda]
✅ test_pose_stack_from_biotite_1ubq_cif_smoke[cuda]
✅ test_pose_stack_from_and_to_biotite_1ubq_smoke[cuda]
✅ test_pose_stack_from_and_to_biotite_multiple_poses_smoke[cuda]
✅ test_canonical_form_multipose_metadata_propagation[cuda]
✅ test_pose_stack_from_biotite_1ubq_slice_smoke[cuda]
✅ test_pose_stack_from_biotite_n_term_smoke[cuda]
✅ test_pose_stack_from_biotite_c_term_smoke[cuda]
✅ test_pose_stack_from_biotite_his_d_smoke[cuda]
✅ test_pose_stack_from_biotite_missing_sidechain_smoke[cuda]
✅ test_pose_stack_from_biotite_missing_single_sidechain_smoke[cuda]
tmol.tests.io.test_pose_stack_from_openfold
✅ test_create_pose_stack_from_openfold_result[cuda]
✅ test_create_canonical_form_from_openfold_stability[cuda]
✅ test_memoization_of_packed_block_types_for_openfold[cuda]
✅ test_device_of_packed_block_types[cuda]
tmol.tests.io.test_pose_stack_from_rosettafold2
✅ test_load_rosettafold2_dictionary[cuda]
✅ test_load_rosettafold2_dictionary2[cuda]
✅ test_multi_chain_rosettafold2_pose_stack_construction[cuda]
✅ test_create_canonical_form_from_rosettafold2_ubq_stability[cuda]
✅ test_create_canonical_form_from_rosettafold2_sumo_stability[cuda]
✅ test_memoization_of_packed_block_types_for_rosettafold2[cuda]
✅ test_device_of_packed_block_types[cuda]
tmol.tests.io.test_write_pose_stack_pdb
✅ test_atom_records_from_pose_stack_1[cuda]
✅ test_atom_records_from_pose_stack_2[cuda]
✅ test_atom_records_for_multi_chain_pdb[cuda]
tmol.tests.kinematics.segscan.test_segscan
✅ test_segscan_excl_cuda_bench
✅ test_segscan_incl_cuda_bench
tmol.tests.kinematics.test_create_scan_orering_from_block_types
✅ test_calculate_ff_edge_delays_for_two_res_ubq[cuda]
✅ test_calculate_ff_edge_delays_for_two_copies_of_6_res_ubq_H[cuda]
✅ test_calculate_ff_edge_delays_for_two_copies_of_6_res_ubq_U[cuda]
✅ test_calculate_ff_edge_delays_for_two_copies_of_6_res_ubq_K[cuda]
✅ test_calculate_parent_block_conn_in_and_out_for_two_copies_of_6_res_ubq[cuda]
✅ test_get_scans_for_two_copies_of_6_res_ubq_H[cuda]
✅ test_get_scans_for_two_copies_of_6_res_ubq_U[cuda]
✅ test_get_scans_for_two_copies_of_6_res_ubq_K[cuda]
✅ test_kinmodule_construction_for_jagged_stack_H[cuda]
✅ test_kinmodule_construction_for_jagged_stack_star[cuda]
tmol.tests.kinematics.test_fold_forest
✅ test_jagged_reasonable_fold_forest[cuda]
tmol.tests.kinematics.test_move_map
✅ test_movemap_construction_from_init[cuda]
✅ test_movemap_construction_from_helper[cuda]
✅ test_set_move_all_doftypes_for_block_by_integer[cuda-mc]
✅ test_set_move_all_doftypes_for_block_by_integer[cuda-sc]
✅ test_set_move_all_doftypes_for_block_by_integer[cuda-named_torsion]
✅ test_set_move_all_doftypes_for_block_by_boolean_mask[cuda-mc]
✅ test_set_move_all_doftypes_for_block_by_boolean_mask[cuda-sc]
✅ test_set_move_all_doftypes_for_block_by_boolean_mask[cuda-named_torsion]
✅ test_set_move_all_doftypes_for_block_by_boolean_mask2[cuda-mc]
✅ test_set_move_all_doftypes_for_block_by_boolean_mask2[cuda-sc]
✅ test_set_move_all_doftypes_for_block_by_boolean_mask2[cuda-named_torsion]
✅ test_set_move_all_doftypes_for_block_by_boolean_masks[cuda-mc]
✅ test_set_move_all_doftypes_for_block_by_boolean_masks[cuda-sc]
✅ test_set_move_all_doftypes_for_block_by_boolean_masks[cuda-named_torsion]
✅ test_set_move_all_doftypes_for_block_by_index_tensors[cuda-mc]
✅ test_set_move_all_doftypes_for_block_by_index_tensors[cuda-sc]
✅ test_set_move_all_doftypes_for_block_by_index_tensors[cuda-named_torsion]
✅ test_set_move_all_jump_dofs_for_jump_by_index[cuda]
✅ test_set_move_all_jump_dofs_for_root_jump_by_index[cuda]
✅ test_set_move_particular_doftypes_for_block_by_integer[cuda-mc]
✅ test_set_move_particular_doftypes_for_block_by_integer[cuda-sc]
✅ test_set_move_particular_doftypes_for_block_by_integer[cuda-named_torsion]
✅ test_set_move_particular_doftypes_for_block_by_integer_jagged[cuda-mc]
✅ test_set_move_particular_doftypes_for_block_by_integer_jagged[cuda-sc]
✅ test_set_move_particular_doftypes_for_block_by_integer_jagged[cuda-named_torsion]
✅ test_set_move_particular_doftypes_for_block_by_boolean_mask[cuda-mc]
✅ test_set_move_particular_doftypes_for_block_by_boolean_mask[cuda-sc]
✅ test_set_move_particular_doftypes_for_block_by_boolean_mask[cuda-named_torsion]
✅ test_set_move_particular_doftypes_for_block_by_boolean_mask_jagged[cuda-mc]
✅ test_set_move_particular_doftypes_for_block_by_boolean_mask_jagged[cuda-sc]
✅ test_set_move_particular_doftypes_for_block_by_boolean_mask_jagged[cuda-named_torsion]
✅ test_set_move_particular_doftypes_for_block_by_boolean_mask2[cuda-mc]
✅ test_set_move_particular_doftypes_for_block_by_boolean_mask2[cuda-sc]
✅ test_set_move_particular_doftypes_for_block_by_boolean_mask2[cuda-named_torsion]
✅ test_set_move_particular_doftypes_for_block_by_index_tensors[cuda-mc]
✅ test_set_move_particular_doftypes_for_block_by_index_tensors[cuda-sc]
✅ test_set_move_particular_doftypes_for_block_by_index_tensors[cuda-named_torsion]
✅ test_set_move_particular_jump_dofs_for_jump_by_index[cuda]
✅ test_set_move_particular_jump_dofs_for_root_jump_by_index[cuda]
✅ test_set_move_particular_atom_dofs[cuda]
✅ test_set_move_particular_atom_dofs2[cuda]
✅ test_minimizermap_construction_2_sixres_ubq_just_sc[cuda]
✅ test_minimizermap_construction_2_sixres_ubq_just_bb[cuda]
✅ test_minimizermap_construction_2_sixres_ubq[cuda]
✅ test_minimizermap_construction_2_sixres_ubq_root_jump_min[cuda]
✅ test_minimizermap_construction_jagged_465_ubq[cuda]
✅ test_minimizermap_construction_jagged_465_ubq_just_sc[cuda]
✅ test_minimizermap_construction_jagged_465_ubq_just_mc[cuda]
✅ test_minimizermap_construction_jagged_465_ubq_named_dofs[cuda]
tmol.tests.kinematics.test_script_modules
✅ test_pose_stack_kinematics_module_smoke[cuda]
✅ test_pose_stack_kinematic_torch_op_gradcheck_perturbed[cuda]
✅ test_pose_stack_kinematic_torch_op_gradcheck[cuda]
✅ test_pose_stack_kinematics_op_device[cuda]
tmol.tests.ligand.test_ligand_pipeline.TestPoseStackWithLigand
⚪ test_i4b_posestack_scores[cuda]
⚪ test_hem_posestack_builds[cuda]
⚪ test_pse_posestack_scores[cuda]
⚪ test_atp_posestack_scores[cuda]
⚪ test_i4b_minimize_and_cif_roundtrip[cuda]
tmol.tests.optimization.test_minimizers
✅ test_build_kinforest_sfxn_network_smoke[cuda]
✅ test_run_kin_min_smoke[cuda]
✅ test_run_cart_min_smoke[cuda]
✅ test_run_kin_min_torch_lbfgs[cuda]
tmol.tests.optimization.test_scorefunction_minimization
✅ test_cart_minimize_w_pose_and_sfxn_smoke[cuda]
✅ test_kin_minimize_w_pose_and_sfxn_smoke[cuda]
✅ test_minimize_w_pose_and_sfxn_benchmark[cuda-1]
✅ test_minimize_w_pose_and_sfxn_benchmark[cuda-3]
✅ test_minimize_w_pose_and_sfxn_benchmark[cuda-10]
✅ test_minimize_w_pose_and_sfxn_benchmark[cuda-30]
✅ test_minimizer[cuda]
✅ test_profile_minimizer[cuda]
✅ test_profile_minimizer2[cuda]
tmol.tests.pack.rotamer.dunbrack.test_dunbrack_chi_sampler
✅ test_annotate_packed_block_types[cuda]
✅ test_determine_n_possible_rots[cuda]
✅ test_fill_in_brt_for_possrots[cuda]
✅ test_interpolate_probabilities_for_possible_rotamers[cuda]
✅ test_determine_n_base_rotamers_to_build_1[cuda]
✅ test_determine_n_base_rotamers_to_build_2[cuda]
✅ test_count_expanded_rotamers[cuda]
✅ test_map_from_rotamer_index_to_brt[cuda]
✅ test_sample_chi_for_rotamers[cuda]
✅ test_package_samples_for_output[cuda]
✅ test_chi_sampler_build_lots_of_rotamers[cuda]
tmol.tests.pack.rotamer.test_build_rotamers
✅ test_annotate_restypes[cuda]
✅ test_build_rotamers_smoke[cuda]
✅ test_construct_scans_for_rotamers[cuda]
✅ test_construct_scans_for_rotamers2[cuda]
✅ test_measure_pose_dofs[cuda]
✅ test_inv_kin_rotamers[cuda]
✅ test_construct_kinforest_for_rotamers[cuda]
✅ test_construct_kinforest_for_rotamers2[cuda]
✅ test_measure_original_dofs[cuda]
✅ test_measure_original_dofs2[cuda]
✅ test_create_dof_inds_to_copy_from_orig_to_rotamers[cuda]
✅ test_create_dof_inds_to_copy_from_orig_to_rotamers2[cuda]
✅ test_build_some_rotamers[cuda]
✅ test_build_lots_of_rotamers[cuda]
✅ test_score_lots_of_rotamers[cuda]
✅ test_create_dofs_for_many_rotamers[cuda]
✅ test_new_rotamer_building_logic1[cuda]
✅ test_new_rotamer_building_logic2[cuda]
✅ test_new_rotamer_building_logic3[cuda]
tmol.tests.pack.rotamer.test_fixed_aa_chi_sampler
✅ test_annotate_packed_block_types_smoke[cuda]
✅ test_chi_sampler_smoke[cuda]
tmol.tests.pack.rotamer.test_include_current_sampler
✅ test_annotate_packed_block_types_smoke[cuda]
Report exceeded GitHub limit of 65535 bytes and has been trimmed
Annotations
Check failure on line 0 in testing.cpu.junit.xml
github-actions / Test Results
pytest ► tmol.tests.io.details.test_select_from_canonical ► test_assign_block_types[cpu]
Failed test found in:
testing.cpu.junit.xml
Error:
torch_device = device(type='cpu')
Raw output
torch_device = device(type='cpu')
ubq_pdb = 'ATOM 1 N MET A 1 27.340 24.430 2.614 1.00 9.67 N \nATOM 2 CA MET A 1 26....33.322 1.00 43.43 H \nTER \n\n'
def test_assign_block_types(torch_device, ubq_pdb):
co = default_canonical_ordering()
pbt = default_packed_block_types(torch_device)
PoseStackBuilder._annotate_pbt_w_canonical_aa1lc_lookup(pbt)
cf = canonical_form_from_pdb(co, ubq_pdb, torch_device)
ch_id, can_rts, coords, ch_lab = (
cf.chain_id,
cf.res_types,
cf.coords,
cf.chain_labels,
)
at_is_pres = not_any_nancoord(coords)
(
ch_id,
can_rts,
coords,
at_is_pres,
found_disulfides,
res_type_variants,
his_taut,
resolved_coords,
resolved_atom_is_present,
ch_lab,
) = dslf_and_his_resolved_pose_stack_from_canonical_form(
co, pbt, ch_id, can_rts, coords, at_is_pres, ch_lab
)
# now we'll invoke assign_block_types
(
block_types,
inter_residue_connections64,
inter_block_bondsep64,
) = assign_block_types(
co, pbt, at_is_pres, ch_id, can_rts, res_type_variants, found_disulfides
)
# ubq seq
ubq_1lc = [
x
for x in "MQIFVKTLTGKTITLEVEPSDTIENVKAKIQDKEGIPPDQQRLIFAGKQLEDGRTLSDYNIQKESTLHLVLRLRGG"
]
ubq_df_inds = pbt.bt_mapping_w_lcaa_1lc_ind.get_indexer(ubq_1lc)
ubq_bt_inds = numpy.expand_dims(
pbt.bt_mapping_w_lcaa_1lc.iloc[ubq_df_inds]["bt_ind"].values, axis=0
)
> ubq_bt_inds[0, 0] = next(
i for i, bt in enumerate(pbt.active_block_types) if bt.name == "MET:nterm"
)
E ValueError: assignment destination is read-only
tmol/tests/io/details/test_select_from_canonical.py:156: ValueError
Check failure on line 0 in testing.cpu.junit.xml
github-actions / Test Results
pytest ► tmol.tests.io.details.test_select_from_canonical ► test_assign_block_types_w_exotic_termini_options[cpu]
Failed test found in:
testing.cpu.junit.xml
Error:
default_database = ParameterDatabase(scoring=ScoringDatabase(cartbonded=CartBondedDatabase(residue_params={'ALA': CartRes(length_paramete....0943951023931953, theta=1.2304571226560024, d=1.0, parent='<N1>', grand_parent='<C1>', great_grand_parent='<C2>'))))))
Raw output
default_database = ParameterDatabase(scoring=ScoringDatabase(cartbonded=CartBondedDatabase(residue_params={'ALA': CartRes(length_paramete....0943951023931953, theta=1.2304571226560024, d=1.0, parent='<N1>', grand_parent='<C1>', great_grand_parent='<C2>'))))))
ubq_pdb = 'ATOM 1 N MET A 1 27.340 24.430 2.614 1.00 9.67 N \nATOM 2 CA MET A 1 26....33.322 1.00 43.43 H \nTER \n\n'
torch_device = device(type='cpu')
def test_assign_block_types_w_exotic_termini_options(
default_database, ubq_pdb, torch_device
):
floro_nterm_patch = """
- name: AminoFloroTerminus
display_name: floro_nterm
pattern: '[*][*][NH][{down}]'
remove_atoms:
- <{down}>
- <H1>
add_atoms:
- { name: F1 , atom_type: S }
- { name: F2 , atom_type: S }
- { name: F3 , atom_type: S }
add_atom_aliases:
- { name: F1 , alt_name: 1F }
- { name: F2 , alt_name: 2F }
- { name: F3 , alt_name: 3F }
modify_atoms:
- { name: <N1> , atom_type: Nlys }
add_connections: []
add_bonds:
- [ <N1>, F1 ]
- [ <N1>, F2 ]
- [ <N1>, F3 ]
icoors:
- { name: F1, source: <H1>, phi: 180.0 deg, theta: 70.5 deg, d: 1.35, parent: <N1>, grand_parent: <*2>, great_grand_parent: <*1> }
- { name: F2, source: <H1>, phi: 120.0 deg, theta: 70.5 deg, d: 1.35, parent: <N1>, grand_parent: <*2>, great_grand_parent: F1 }
- { name: F3, source: <H1>, phi: 120.0 deg, theta: 70.5 deg, d: 1.35, parent: <N1>, grand_parent: <*2>, great_grand_parent: F2 }
"""
def variant_from_yaml(yml_string):
raw = yaml.safe_load(yml_string)
raw = normalize_bond_tuples(raw)
return tuple(cattr.structure(x, VariantType) for x in raw)
floro_nterm_variant = variant_from_yaml(floro_nterm_patch)
chem_db = default_database.chemical
chem_elem_types = chem_db.element_types
chem_atom_types = chem_db.atom_types
unpatched_res = [res for res in chem_db.residues if res.name == res.base_name]
ext_chemical_db = ChemicalDatabase(
element_types=chem_elem_types,
atom_types=chem_atom_types,
residues=unpatched_res,
variants=(chem_db.variants + floro_nterm_variant),
)
patched_chem_db = PatchedChemicalDatabase.from_chem_db(ext_chemical_db)
co = CanonicalOrdering.from_chemdb(patched_chem_db)
restype_list = [
cattr.structure(
cattr.unstructure(r),
RefinedResidueType,
)
for r in patched_chem_db.residues
]
restype_map = groupby(lambda restype: restype.name3, restype_list)
restype_set = ResidueTypeSet(
residue_types=restype_list,
restype_map=restype_map,
chem_db=patched_chem_db,
)
pbt = PackedBlockTypes.from_restype_list(
patched_chem_db, restype_set, restype_list, torch_device
)
PoseStackBuilder._annotate_pbt_w_canonical_aa1lc_lookup(pbt)
cf = canonical_form_from_pdb(co, ubq_pdb, torch_device)
ch_id, can_rts, coords, ch_lab = (
cf.chain_id,
cf.res_types,
cf.coords,
cf.chain_labels,
)
at_is_pres = not_any_nancoord(coords)
(
ch_id,
can_rts,
coords,
at_is_pres,
found_disulfides,
res_type_variants,
his_taut,
resolved_coords,
resolved_atom_is_present,
ch_lab,
) = dslf_and_his_resolved_pose_stack_from_canonical_form(
co, pbt, ch_id, can_rts, coords, at_is_pres, ch_lab
)
# now we'll invoke assign_block_types
(
block_types,
inter_residue_connections64,
inter_block_bondsep64,
) = assign_block_types(
co, pbt, at_is_pres, ch_id, can_rts, res_type_variants, found_disulfides
)
# ubq seq
ubq_1lc = [
x
for x in "MQIFVKTLTGKTITLEVEPSDTIENVKAKIQDKEGIPPDQQRLIFAGKQLEDGRTLSDYNIQKESTLHLVLRLRGG"
]
ubq_df_inds = pbt.bt_mapping_w_lcaa_1lc_ind.get_indexer(ubq_1lc)
ubq_bt_inds = numpy.expand_dims(
pbt.bt_mapping_w_lcaa_1lc.iloc[ubq_df_inds]["bt_ind"].values, axis=0
)
> ubq_bt_inds[0, 0] = next(
i for i, bt in enumerate(pbt.active_block_types) if bt.name == "MET:nterm"
)
E ValueError: assignment destination is read-only
tmol/tests/io/details/test_select_from_canonical.py:285: ValueError
Check failure on line 0 in testing.cpu.junit.xml
github-actions / Test Results
pytest ► tmol.tests.io.details.test_select_from_canonical ► test_select_best_block_type_candidate_w_mult_opts[cpu]
Failed test found in:
testing.cpu.junit.xml
Error:
torch_device = device(type='cpu')
Raw output
torch_device = device(type='cpu')
ubq_pdb = 'ATOM 1 N MET A 1 27.340 24.430 2.614 1.00 9.67 N \nATOM 2 CA MET A 1 26....33.322 1.00 43.43 H \nTER \n\n'
default_unpatched_chemical_database = ChemicalDatabase(element_types=(Element(name='H', atomic_number=1), Element(name='C', atomic_number=6), Element(name='...2.0943951023931953, theta=1.2304571226560024, d=1.0, parent='<N1>', grand_parent='<C1>', great_grand_parent='<C2>')))))
def test_select_best_block_type_candidate_w_mult_opts(
torch_device, ubq_pdb, default_unpatched_chemical_database
):
ducd = default_unpatched_chemical_database
# two patches that do the job of adding atoms to the SER/THR
# hydroxyls but that do not do the job of defining good
# chemistry or geometry; that's not their jobs
patch = pser_and_mser_patches()
co, pbt, new_pucd = co_and_pbt_from_new_variants(ducd, patch, torch_device)
PoseStackBuilder._annotate_pbt_w_canonical_aa1lc_lookup(pbt)
co_ser_atom_ind_map = co.restypes_atom_index_mapping["SER"]
co_ser_HG_ind = co_ser_atom_ind_map["HG"]
co_mser_M_ind = co_ser_atom_ind_map["M"]
varnames = [var.display_name for var in new_pucd.variants]
bt_names = [bt.name for bt in new_pucd.residues]
assert "phospho" in varnames
assert "mospho" in varnames
assert "SER:phospho" in bt_names
assert "SER:mospho" in bt_names
assert "THR:phospho" in bt_names
assert "THR:mospho" in bt_names
cf = canonical_form_from_pdb(co, ubq_pdb, torch_device)
ch_id, can_rts, coords, ch_lab = (
cf.chain_id,
cf.res_types,
cf.coords,
cf.chain_labels,
)
at_is_pres = not_any_nancoord(coords)
at_is_pres[0, 19, co_mser_M_ind] = True
at_is_pres[0, 19, co_ser_HG_ind] = False
coords[0, 19, co_mser_M_ind] = 0
(
ch_id,
can_rts,
coords,
at_is_pres,
found_disulfides,
res_type_variants,
his_taut,
resolved_coords,
resolved_atom_is_present,
ch_lab,
) = dslf_and_his_resolved_pose_stack_from_canonical_form(
co, pbt, ch_id, can_rts, coords, at_is_pres, ch_lab
)
(
block_types,
inter_residue_connections64,
inter_block_bondsep64,
) = assign_block_types(
co, pbt, at_is_pres, ch_id, can_rts, res_type_variants, found_disulfides
)
# ubq seq
ubq_1lc = [
x
for x in "MQIFVKTLTGKTITLEVEPSDTIENVKAKIQDKEGIPPDQQRLIFAGKQLEDGRTLSDYNIQKESTLHLVLRLRGG"
]
ubq_df_inds = pbt.bt_mapping_w_lcaa_1lc_ind.get_indexer(ubq_1lc)
ubq_bt_inds = numpy.expand_dims(
pbt.bt_mapping_w_lcaa_1lc.iloc[ubq_df_inds]["bt_ind"].values, axis=0
)
> ubq_bt_inds[0, 0] = next(
i for i, bt in enumerate(pbt.active_block_types) if bt.name == "MET:nterm"
)
E ValueError: assignment destination is read-only
tmol/tests/io/details/test_select_from_canonical.py:1019: ValueError
Check failure on line 0 in testing.cpu.junit.xml
github-actions / Test Results
pytest ► tmol.tests.io.test_pose_stack_construction ► test_build_pose_stack_from_canonical_form_1r21[cpu]
Failed test found in:
testing.cpu.junit.xml
Error:
torch_device = device(type='cpu')
Raw output
torch_device = device(type='cpu')
pdb_1r21 = 'HEADER CELL CYCLE 25-SEP-03 1R21 \nTITLE SOLUTION STRUCTURE OF HUM... 6 802 1 0 10 \nEND \n'
def test_build_pose_stack_from_canonical_form_1r21(torch_device, pdb_1r21):
co = default_canonical_ordering()
pbt = default_packed_block_types(torch_device)
canonical_form = canonical_form_from_pdb(co, pdb_1r21, torch_device)
> pose_stack = pose_stack_from_canonical_form(co, pbt, *canonical_form)
tmol/tests/io/test_pose_stack_construction.py:115:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/ci-pip-pkgs/lib/python3.12/site-packages/decorator.py:235: in fun
return caller(func, *(extras + args), **kw)
tmol/types/functional.py:27: in validate_f
retval = f(*args, **kwargs)
tmol/io/pose_stack_construction.py:246: in pose_stack_from_canonical_form
) = assign_block_types(
/ci-pip-pkgs/lib/python3.12/site-packages/decorator.py:235: in fun
return caller(func, *(extras + args), **kw)
tmol/types/functional.py:27: in validate_f
retval = f(*args, **kwargs)
tmol/io/details/select_from_canonical.py:60: in assign_block_types
block_type_ind64 = select_best_block_type_candidate(
/ci-pip-pkgs/lib/python3.12/site-packages/decorator.py:235: in fun
return caller(func, *(extras + args), **kw)
tmol/types/functional.py:27: in validate_f
retval = f(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
canonical_ordering = CanonicalOrdering(max_n_canonical_atoms=28, restype_io_equiv_classes=['ALA', 'ARG', 'ASN', 'ASP', 'CYS', 'GLN', 'GLU',...o=21, his_HE2_in_co=16, his_HN_in_co=24, his_NH_in_co=23, his_NN_in_co=22, his_CG_in_co=5, _hash=-2941662933364491253))
pbt = PackedBlockTypes(chem_db=PatchedChemicalDatabase(element_types=(Element(name='H', atomic_number=1), Element(name='C', ..., 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0],
dtype=torch.int32), device=device(type='cpu'))
atom_is_present = tensor([[[[ True, True, True, ..., False, False, False]],
[[ True, True, True, ..., False, False, Fals... [[ True, True, True, ..., False, False, False]],
[[ True, True, True, ..., False, False, False]]]])
is_real_res = tensor([[True, True, True, True, True, True, True, True, True, True, True, True,
True, True, True, True, True...ue,
True, True, True, True, True, True, True, True, True, True, True, True,
True, True, True, True]])
nz_is_real_res = tensor([[ 0, 0],
[ 0, 1],
[ 0, 2],
[ 0, 3],
[ 0, 4],
[ 0, 5],
[ ... [ 0, 93],
[ 0, 94],
[ 0, 95],
[ 0, 96],
[ 0, 97],
[ 0, 98],
[ 0, 99]])
res_types64 = tensor([[12, 17, 14, 16, 1, 1, 10, 19, 16, 9, 11, 1, 15, 7, 19, 3, 7, 14,
8, 13, 14, 10, 15, 10, 15, ... 15, 19, 9, 3, 6, 14, 19, 1, 10, 11, 8, 7, 3, 19, 9, 16, 9,
9, 3, 1, 15, 13, 1, 18, 6, 2, 6]])
termini_variants = tensor([[0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1... 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 2]])
res_type_variants64 = tensor([[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0... 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0]])
@validate_args
def select_best_block_type_candidate(
canonical_ordering: CanonicalOrdering,
pbt: PackedBlockTypes,
atom_is_present: Tensor[torch.bool][:, :, :],
is_real_res: Tensor[torch.bool][:, :],
nz_is_real_res: Tensor[torch.int64][:, :],
res_types64: Tensor[torch.int64][:, :],
termini_variants: Tensor[torch.int64][:, :],
res_type_variants64: Tensor[torch.int64][:, :],
):
# what is the problem we are trying to solve?
# we have a number of "io_equiv_class"es that we want to map
# to particular block types
# where the user/the chain connectivity
# can specify things such as:
# "is it down-term?", "is it up-term?", "is it neither?,"
# "is it disulfide-bonded?", "is it a particular kind of HIS?"
# and the user has given us a list of atoms that are
# present or absent. These atoms will help us decide
# which block type the user is requesting, e.g.,
# phospho-serine by providing a P atom.
# The algorithm for deciding which block type
# from a set of candidates will be:
# from the set of bts with the "appropriate" termini,
# and given the list of provided atoms for a given residue,
# find the bt whose atom list has all of the provided atoms
# and is missing the fewest atoms that were not provided
# e.g. if atoms A, B and C were provided and
# BT #1 has atoms A and B
# BT #2 has atoms A B C and D, and
# BT #3 has atoms A B C D and E, and
# then the best match is not BT #1 because it does not have
# provided atom C,
# and BT #2 is preferred to BT #3 because BT #3 is missing
# more atoms.
# so if we have array
# p [1, 1, 1, 0, 0] representing provided atoms A, B, and C, and
# b1 [1, 1, 0, 0, 0] for BT #1, and
# b2 [1, 1, 1, 1, 0] for BT #2, and
# b3 [1, 1, 1, 1, 1] for BT #3,
# then
# sum((p - b1) == 1) = sum(p & ~b1) ==> 1
# sum((p - b2) == 1) = sum(p & ~b2) ==> 0
# sum((p - b3) == 1) = sum(p & ~b3) ==> 0
# so we would eliminate b1
# and then
# sum((b1 - p) == 1) = sum(b1 & ~p) ==> 0 but note this option will have been eliminated
# sum((b2 - p) == 1) = sum(b2 & ~p) ==> 1
# sum((b3 - p) == 1) = sum(b3 & ~p) ==> 2
# so if we take the minimum among the non-eliminated set of b2 and b3
# that would tell us to assign b2 to this residue.
# However, sometimes residues are given to us without the atoms that define
# the termini, and we are expected to build those atoms. We may not be able
# to tell the difference between termini-type X and termini-type Y in terms
# of how many atoms are missing, or rather, it might be some exotic termini
# type has fewer missing atoms than the generic run-of-the-mill termini
# type. So the user is allowed to (must) specify which termini patches
# are the default ones. We then want to select the default-termini-patched
# block type regardless of how many or few of the termini-placed atoms
# are missing, so long as we don't have any provided atom that tells us to
# choose something else.
# Therefore, we have to ignore the atoms added by termini patches when
# counting how many atoms in the provided set are missing from the bt's set
# so e.g. if
# bt1 has atoms [A B C Q R] after its term patch added atoms Q and R, and
# bt2 has atoms [A B C S ] after its term patch added atom S, and
# the present set has atoms [A B C], and
# bt1 has been declared the "default"
# then both bt1 and bt2 would have the same score of 0 and
# the tie would go to bt1.
# logically, this would happen with
# sum(p & ~b1) as before for looking to make sure all atoms in p are contained in b1
# but the second part would become
# sum(b1_sans_termini_additions & ~p) counting only non-termini-patch-added atoms
# of b1 that are absent from p against b1.
#
# how is that going to be encoded???
# bt2 since it is not the default atom can be given a small penalty so that
# it is worse than bt1 if they both have the same number of non-termini atoms
# present but will not be worse than if some non-termini atom is missing
# from bt1 but not from bt2.
# We can do that by setting the score as
# 2 * n-non-termini-atoms-missing + is-non-default-term
device = pbt.device
n_poses = atom_is_present.shape[0]
max_n_res = atom_is_present.shape[1]
can_ann = pbt.canonical_ordering_annotation
max_n_candidates = can_ann.max_n_candidates_for_var_combo
block_type_candidates = torch.full(
(n_poses, max_n_res, max_n_candidates),
-1,
dtype=torch.int64,
device=device,
)
is_real_candidate = torch.zeros(
(n_poses, max_n_res, max_n_candidates),
dtype=torch.bool,
device=device,
)
block_type_candidates[is_real_res] = can_ann.var_combo_candidate_bt_index[
res_types64[is_real_res],
termini_variants[is_real_res],
res_type_variants64[is_real_res],
]
real_res_res_types64 = res_types64[is_real_res]
real_res_termini_variants = termini_variants[is_real_res]
real_res_res_type_variants64 = res_type_variants64[is_real_res]
real_res_block_type_candidates = can_ann.var_combo_candidate_bt_index[
real_res_res_types64, real_res_termini_variants, real_res_res_type_variants64
]
is_real_candidate[is_real_res] = can_ann.var_combo_is_real_candidate[
res_types64[is_real_res],
termini_variants[is_real_res],
res_type_variants64[is_real_res],
]
is_real_cand_for_real_res = can_ann.var_combo_is_real_candidate[
real_res_res_types64, real_res_termini_variants, real_res_res_type_variants64
]
real_candidate_block_type = real_res_block_type_candidates[
is_real_cand_for_real_res
]
atom_is_present = atom_is_present.unsqueeze(2).expand(-1, -1, max_n_candidates, -1)
real_candidate_atom_is_absent = can_ann.bt_canonical_atom_is_absent[
real_candidate_block_type
]
real_candidate_provided_atoms_absent = torch.logical_and(
atom_is_present[is_real_candidate], real_candidate_atom_is_absent
)
# if there are any atoms that were provided for a given residue
# but that the variant does not contain, then that is not a match
real_candidate_should_be_excluded = torch.any(
real_candidate_provided_atoms_absent, dim=1
)
atom_is_absent = torch.logical_not(atom_is_present)
real_candidate_non_term_patch_atom_is_present = (
can_ann.bt_non_term_patch_added_canonical_atom_is_present[
real_candidate_block_type
]
)
real_candidate_canonical_atom_was_not_provided = torch.logical_and(
atom_is_absent[is_real_candidate], real_candidate_non_term_patch_atom_is_present
)
real_candidate_is_non_default_term = can_ann.bt_is_non_default_terminus[
real_candidate_block_type
].to(torch.int64)
real_candidate_n_canonical_atoms_not_provided = torch.sum(
real_candidate_canonical_atom_was_not_provided, dim=1
)
real_candidate_misalignment_score = (
2 * real_candidate_n_canonical_atoms_not_provided
+ real_candidate_is_non_default_term
)
failure_score = 2 * (canonical_ordering.max_n_canonical_atoms + 1)
real_candidate_misalignment_score[real_candidate_should_be_excluded] = failure_score
candidate_misalignment_score2 = torch.full(
(
n_poses,
max_n_res,
max_n_candidates,
),
failure_score,
dtype=torch.int64,
device=device,
)
candidate_misalignment_score2[is_real_candidate] = real_candidate_misalignment_score
best_candidate_ind2 = torch.argmin(candidate_misalignment_score2, dim=2)
# ok, we need to do some quality checks. If the best fit variant's score is
# 2 * (canonical_ordering.max_n_canonical_atoms + 1) or worse, then we have
# a problem. It's hard to know what to do at this point!
best_candidate_score = torch.zeros(
(n_poses, max_n_res), dtype=torch.int64, device=device
)
best_candidate_score[is_real_res] = candidate_misalignment_score2[
nz_is_real_res[:, 0],
nz_is_real_res[:, 1],
best_candidate_ind2[is_real_res],
]
if torch.any(best_candidate_score >= failure_score):
nz_is_real_candidate = torch.nonzero(is_real_candidate)
err_msg = []
for cand_ind in range(nz_is_real_candidate.shape[0]):
i = nz_is_real_candidate[cand_ind, 0]
j = nz_is_real_candidate[cand_ind, 1]
k = nz_is_real_candidate[cand_ind, 2]
if best_candidate_score[i, j] < failure_score:
continue
ij_equiv_class = canonical_ordering.restype_io_equiv_classes[
res_types64[i, j]
]
err_msg.append("Failed to resolve block type for")
err_msg.extend([str(x) for x in [i.item(), j.item()]])
err_msg.append(str(ij_equiv_class) + "\n")
which_bt = real_candidate_block_type[cand_ind]
cand_bt = pbt.active_block_types[which_bt]
err_msg.extend(
[
str(x)
for x in (
i.item(),
j.item(),
k.item(),
which_bt.item(),
cand_bt.name,
"restype",
)
]
)
err_msg.extend([str(x) for x in (res_types64[i, j].item(), "equiv class")])
err_msg.append(
canonical_ordering.restype_io_equiv_classes[res_types64[i, j]] + "\n"
)
if real_candidate_should_be_excluded[cand_ind]:
equiv_class = cand_bt.io_equiv_class
for l in range(
len(canonical_ordering.restypes_ordered_atom_names[equiv_class])
):
if real_candidate_provided_atoms_absent[cand_ind, l]:
err_msg.extend(
[
str(x)
for x in (
" atom",
canonical_ordering.restypes_ordered_atom_names[
equiv_class
][l],
"provided but absent from candidate",
cand_bt.name + "\n",
)
]
)
# should there be an `else:` here??
# No.
# If there is at least one canonical atom that does not
# belong to a given block type, then its score will be less than
# the failure-score cutoff. We would only arrive at this "else"
# condition if an block type had every single atom across all
# variants of that atom, and the largest number of atoms of all
# block types and it were not the default termini type and the
# user had provided not a single one of its atoms to us, but still
# claimed that there was a residue.
> raise RuntimeError(
" ".join(
[
"failed to resolve a block type from the candidates available\n",
*err_msg,
]
)
)
E RuntimeError: failed to resolve a block type from the candidates available
E Failed to resolve block type for 0 0 MET
E 0 0 0 62 MET:nterm restype 12 equiv class MET
E atom H provided but absent from candidate MET:nterm
tmol/io/details/select_from_canonical.py:609: RuntimeError
Check failure on line 0 in testing.cuda.junit.xml
github-actions / Test Results
pytest ► tmol.tests.io.details.test_select_from_canonical ► test_assign_block_types[cuda]
Failed test found in:
testing.cuda.junit.xml
Error:
torch_device = device(type='cuda', index=0)
Raw output
torch_device = device(type='cuda', index=0)
ubq_pdb = 'ATOM 1 N MET A 1 27.340 24.430 2.614 1.00 9.67 N \nATOM 2 CA MET A 1 26....33.322 1.00 43.43 H \nTER \n\n'
def test_assign_block_types(torch_device, ubq_pdb):
co = default_canonical_ordering()
pbt = default_packed_block_types(torch_device)
PoseStackBuilder._annotate_pbt_w_canonical_aa1lc_lookup(pbt)
cf = canonical_form_from_pdb(co, ubq_pdb, torch_device)
ch_id, can_rts, coords, ch_lab = (
cf.chain_id,
cf.res_types,
cf.coords,
cf.chain_labels,
)
at_is_pres = not_any_nancoord(coords)
(
ch_id,
can_rts,
coords,
at_is_pres,
found_disulfides,
res_type_variants,
his_taut,
resolved_coords,
resolved_atom_is_present,
ch_lab,
) = dslf_and_his_resolved_pose_stack_from_canonical_form(
co, pbt, ch_id, can_rts, coords, at_is_pres, ch_lab
)
# now we'll invoke assign_block_types
(
block_types,
inter_residue_connections64,
inter_block_bondsep64,
) = assign_block_types(
co, pbt, at_is_pres, ch_id, can_rts, res_type_variants, found_disulfides
)
# ubq seq
ubq_1lc = [
x
for x in "MQIFVKTLTGKTITLEVEPSDTIENVKAKIQDKEGIPPDQQRLIFAGKQLEDGRTLSDYNIQKESTLHLVLRLRGG"
]
ubq_df_inds = pbt.bt_mapping_w_lcaa_1lc_ind.get_indexer(ubq_1lc)
ubq_bt_inds = numpy.expand_dims(
pbt.bt_mapping_w_lcaa_1lc.iloc[ubq_df_inds]["bt_ind"].values, axis=0
)
> ubq_bt_inds[0, 0] = next(
i for i, bt in enumerate(pbt.active_block_types) if bt.name == "MET:nterm"
)
E ValueError: assignment destination is read-only
tmol/tests/io/details/test_select_from_canonical.py:156: ValueError
Check failure on line 0 in testing.cuda.junit.xml
github-actions / Test Results
pytest ► tmol.tests.io.details.test_select_from_canonical ► test_assign_block_types_w_exotic_termini_options[cuda]
Failed test found in:
testing.cuda.junit.xml
Error:
default_database = ParameterDatabase(scoring=ScoringDatabase(cartbonded=CartBondedDatabase(residue_params={'ALA': CartRes(length_paramete....0943951023931953, theta=1.2304571226560024, d=1.0, parent='<N1>', grand_parent='<C1>', great_grand_parent='<C2>'))))))
Raw output
default_database = ParameterDatabase(scoring=ScoringDatabase(cartbonded=CartBondedDatabase(residue_params={'ALA': CartRes(length_paramete....0943951023931953, theta=1.2304571226560024, d=1.0, parent='<N1>', grand_parent='<C1>', great_grand_parent='<C2>'))))))
ubq_pdb = 'ATOM 1 N MET A 1 27.340 24.430 2.614 1.00 9.67 N \nATOM 2 CA MET A 1 26....33.322 1.00 43.43 H \nTER \n\n'
torch_device = device(type='cuda', index=0)
def test_assign_block_types_w_exotic_termini_options(
default_database, ubq_pdb, torch_device
):
floro_nterm_patch = """
- name: AminoFloroTerminus
display_name: floro_nterm
pattern: '[*][*][NH][{down}]'
remove_atoms:
- <{down}>
- <H1>
add_atoms:
- { name: F1 , atom_type: S }
- { name: F2 , atom_type: S }
- { name: F3 , atom_type: S }
add_atom_aliases:
- { name: F1 , alt_name: 1F }
- { name: F2 , alt_name: 2F }
- { name: F3 , alt_name: 3F }
modify_atoms:
- { name: <N1> , atom_type: Nlys }
add_connections: []
add_bonds:
- [ <N1>, F1 ]
- [ <N1>, F2 ]
- [ <N1>, F3 ]
icoors:
- { name: F1, source: <H1>, phi: 180.0 deg, theta: 70.5 deg, d: 1.35, parent: <N1>, grand_parent: <*2>, great_grand_parent: <*1> }
- { name: F2, source: <H1>, phi: 120.0 deg, theta: 70.5 deg, d: 1.35, parent: <N1>, grand_parent: <*2>, great_grand_parent: F1 }
- { name: F3, source: <H1>, phi: 120.0 deg, theta: 70.5 deg, d: 1.35, parent: <N1>, grand_parent: <*2>, great_grand_parent: F2 }
"""
def variant_from_yaml(yml_string):
raw = yaml.safe_load(yml_string)
raw = normalize_bond_tuples(raw)
return tuple(cattr.structure(x, VariantType) for x in raw)
floro_nterm_variant = variant_from_yaml(floro_nterm_patch)
chem_db = default_database.chemical
chem_elem_types = chem_db.element_types
chem_atom_types = chem_db.atom_types
unpatched_res = [res for res in chem_db.residues if res.name == res.base_name]
ext_chemical_db = ChemicalDatabase(
element_types=chem_elem_types,
atom_types=chem_atom_types,
residues=unpatched_res,
variants=(chem_db.variants + floro_nterm_variant),
)
patched_chem_db = PatchedChemicalDatabase.from_chem_db(ext_chemical_db)
co = CanonicalOrdering.from_chemdb(patched_chem_db)
restype_list = [
cattr.structure(
cattr.unstructure(r),
RefinedResidueType,
)
for r in patched_chem_db.residues
]
restype_map = groupby(lambda restype: restype.name3, restype_list)
restype_set = ResidueTypeSet(
residue_types=restype_list,
restype_map=restype_map,
chem_db=patched_chem_db,
)
pbt = PackedBlockTypes.from_restype_list(
patched_chem_db, restype_set, restype_list, torch_device
)
PoseStackBuilder._annotate_pbt_w_canonical_aa1lc_lookup(pbt)
cf = canonical_form_from_pdb(co, ubq_pdb, torch_device)
ch_id, can_rts, coords, ch_lab = (
cf.chain_id,
cf.res_types,
cf.coords,
cf.chain_labels,
)
at_is_pres = not_any_nancoord(coords)
(
ch_id,
can_rts,
coords,
at_is_pres,
found_disulfides,
res_type_variants,
his_taut,
resolved_coords,
resolved_atom_is_present,
ch_lab,
) = dslf_and_his_resolved_pose_stack_from_canonical_form(
co, pbt, ch_id, can_rts, coords, at_is_pres, ch_lab
)
# now we'll invoke assign_block_types
(
block_types,
inter_residue_connections64,
inter_block_bondsep64,
) = assign_block_types(
co, pbt, at_is_pres, ch_id, can_rts, res_type_variants, found_disulfides
)
# ubq seq
ubq_1lc = [
x
for x in "MQIFVKTLTGKTITLEVEPSDTIENVKAKIQDKEGIPPDQQRLIFAGKQLEDGRTLSDYNIQKESTLHLVLRLRGG"
]
ubq_df_inds = pbt.bt_mapping_w_lcaa_1lc_ind.get_indexer(ubq_1lc)
ubq_bt_inds = numpy.expand_dims(
pbt.bt_mapping_w_lcaa_1lc.iloc[ubq_df_inds]["bt_ind"].values, axis=0
)
> ubq_bt_inds[0, 0] = next(
i for i, bt in enumerate(pbt.active_block_types) if bt.name == "MET:nterm"
)
E ValueError: assignment destination is read-only
tmol/tests/io/details/test_select_from_canonical.py:285: ValueError
Check failure on line 0 in testing.cuda.junit.xml
github-actions / Test Results
pytest ► tmol.tests.io.details.test_select_from_canonical ► test_select_best_block_type_candidate_w_mult_opts[cuda]
Failed test found in:
testing.cuda.junit.xml
Error:
torch_device = device(type='cuda', index=0)
Raw output
torch_device = device(type='cuda', index=0)
ubq_pdb = 'ATOM 1 N MET A 1 27.340 24.430 2.614 1.00 9.67 N \nATOM 2 CA MET A 1 26....33.322 1.00 43.43 H \nTER \n\n'
default_unpatched_chemical_database = ChemicalDatabase(element_types=(Element(name='H', atomic_number=1), Element(name='C', atomic_number=6), Element(name='...2.0943951023931953, theta=1.2304571226560024, d=1.0, parent='<N1>', grand_parent='<C1>', great_grand_parent='<C2>')))))
def test_select_best_block_type_candidate_w_mult_opts(
torch_device, ubq_pdb, default_unpatched_chemical_database
):
ducd = default_unpatched_chemical_database
# two patches that do the job of adding atoms to the SER/THR
# hydroxyls but that do not do the job of defining good
# chemistry or geometry; that's not their jobs
patch = pser_and_mser_patches()
co, pbt, new_pucd = co_and_pbt_from_new_variants(ducd, patch, torch_device)
PoseStackBuilder._annotate_pbt_w_canonical_aa1lc_lookup(pbt)
co_ser_atom_ind_map = co.restypes_atom_index_mapping["SER"]
co_ser_HG_ind = co_ser_atom_ind_map["HG"]
co_mser_M_ind = co_ser_atom_ind_map["M"]
varnames = [var.display_name for var in new_pucd.variants]
bt_names = [bt.name for bt in new_pucd.residues]
assert "phospho" in varnames
assert "mospho" in varnames
assert "SER:phospho" in bt_names
assert "SER:mospho" in bt_names
assert "THR:phospho" in bt_names
assert "THR:mospho" in bt_names
cf = canonical_form_from_pdb(co, ubq_pdb, torch_device)
ch_id, can_rts, coords, ch_lab = (
cf.chain_id,
cf.res_types,
cf.coords,
cf.chain_labels,
)
at_is_pres = not_any_nancoord(coords)
at_is_pres[0, 19, co_mser_M_ind] = True
at_is_pres[0, 19, co_ser_HG_ind] = False
coords[0, 19, co_mser_M_ind] = 0
(
ch_id,
can_rts,
coords,
at_is_pres,
found_disulfides,
res_type_variants,
his_taut,
resolved_coords,
resolved_atom_is_present,
ch_lab,
) = dslf_and_his_resolved_pose_stack_from_canonical_form(
co, pbt, ch_id, can_rts, coords, at_is_pres, ch_lab
)
(
block_types,
inter_residue_connections64,
inter_block_bondsep64,
) = assign_block_types(
co, pbt, at_is_pres, ch_id, can_rts, res_type_variants, found_disulfides
)
# ubq seq
ubq_1lc = [
x
for x in "MQIFVKTLTGKTITLEVEPSDTIENVKAKIQDKEGIPPDQQRLIFAGKQLEDGRTLSDYNIQKESTLHLVLRLRGG"
]
ubq_df_inds = pbt.bt_mapping_w_lcaa_1lc_ind.get_indexer(ubq_1lc)
ubq_bt_inds = numpy.expand_dims(
pbt.bt_mapping_w_lcaa_1lc.iloc[ubq_df_inds]["bt_ind"].values, axis=0
)
> ubq_bt_inds[0, 0] = next(
i for i, bt in enumerate(pbt.active_block_types) if bt.name == "MET:nterm"
)
E ValueError: assignment destination is read-only
tmol/tests/io/details/test_select_from_canonical.py:1019: ValueError
Check failure on line 0 in testing.cuda.junit.xml
github-actions / Test Results
pytest ► tmol.tests.io.test_pose_stack_construction ► test_build_pose_stack_from_canonical_form_1r21[cuda]
Failed test found in:
testing.cuda.junit.xml
Error:
torch_device = device(type='cuda', index=0)
Raw output
torch_device = device(type='cuda', index=0)
pdb_1r21 = 'HEADER CELL CYCLE 25-SEP-03 1R21 \nTITLE SOLUTION STRUCTURE OF HUM... 6 802 1 0 10 \nEND \n'
def test_build_pose_stack_from_canonical_form_1r21(torch_device, pdb_1r21):
co = default_canonical_ordering()
pbt = default_packed_block_types(torch_device)
canonical_form = canonical_form_from_pdb(co, pdb_1r21, torch_device)
> pose_stack = pose_stack_from_canonical_form(co, pbt, *canonical_form)
tmol/tests/io/test_pose_stack_construction.py:115:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/ci-pip-pkgs/lib/python3.12/site-packages/decorator.py:235: in fun
return caller(func, *(extras + args), **kw)
tmol/types/functional.py:27: in validate_f
retval = f(*args, **kwargs)
tmol/io/pose_stack_construction.py:246: in pose_stack_from_canonical_form
) = assign_block_types(
/ci-pip-pkgs/lib/python3.12/site-packages/decorator.py:235: in fun
return caller(func, *(extras + args), **kw)
tmol/types/functional.py:27: in validate_f
retval = f(*args, **kwargs)
tmol/io/details/select_from_canonical.py:60: in assign_block_types
block_type_ind64 = select_best_block_type_candidate(
/ci-pip-pkgs/lib/python3.12/site-packages/decorator.py:235: in fun
return caller(func, *(extras + args), **kw)
tmol/types/functional.py:27: in validate_f
retval = f(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
canonical_ordering = CanonicalOrdering(max_n_canonical_atoms=28, restype_io_equiv_classes=['ALA', 'ARG', 'ASN', 'ASP', 'CYS', 'GLN', 'GLU',...o=21, his_HE2_in_co=16, his_HN_in_co=24, his_NH_in_co=23, his_NN_in_co=22, his_CG_in_co=5, _hash=-2941662933364491253))
pbt = PackedBlockTypes(chem_db=PatchedChemicalDatabase(element_types=(Element(name='H', atomic_number=1), Element(name='C', ..., 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0],
device='cuda:0', dtype=torch.int32), device=device(type='cuda', index=0))
atom_is_present = tensor([[[[ True, True, True, ..., False, False, False]],
[[ True, True, True, ..., False, False, Fals...e, True, ..., False, False, False]],
[[ True, True, True, ..., False, False, False]]]], device='cuda:0')
is_real_res = tensor([[True, True, True, True, True, True, True, True, True, True, True, True,
True, True, True, True, True..., True, True, True, True, True, True, True, True, True, True, True,
True, True, True, True]], device='cuda:0')
nz_is_real_res = tensor([[ 0, 0],
[ 0, 1],
[ 0, 2],
[ 0, 3],
[ 0, 4],
[ 0, 5],
[ ... [ 0, 94],
[ 0, 95],
[ 0, 96],
[ 0, 97],
[ 0, 98],
[ 0, 99]], device='cuda:0')
res_types64 = tensor([[12, 17, 14, 16, 1, 1, 10, 19, 16, 9, 11, 1, 15, 7, 19, 3, 7, 14,
8, 13, 14, 10, 15, 10, 15, ... 6, 14, 19, 1, 10, 11, 8, 7, 3, 19, 9, 16, 9,
9, 3, 1, 15, 13, 1, 18, 6, 2, 6]], device='cuda:0')
termini_variants = tensor([[0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1... 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 2]], device='cuda:0')
res_type_variants64 = tensor([[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0... 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0]], device='cuda:0')
@validate_args
def select_best_block_type_candidate(
canonical_ordering: CanonicalOrdering,
pbt: PackedBlockTypes,
atom_is_present: Tensor[torch.bool][:, :, :],
is_real_res: Tensor[torch.bool][:, :],
nz_is_real_res: Tensor[torch.int64][:, :],
res_types64: Tensor[torch.int64][:, :],
termini_variants: Tensor[torch.int64][:, :],
res_type_variants64: Tensor[torch.int64][:, :],
):
# what is the problem we are trying to solve?
# we have a number of "io_equiv_class"es that we want to map
# to particular block types
# where the user/the chain connectivity
# can specify things such as:
# "is it down-term?", "is it up-term?", "is it neither?,"
# "is it disulfide-bonded?", "is it a particular kind of HIS?"
# and the user has given us a list of atoms that are
# present or absent. These atoms will help us decide
# which block type the user is requesting, e.g.,
# phospho-serine by providing a P atom.
# The algorithm for deciding which block type
# from a set of candidates will be:
# from the set of bts with the "appropriate" termini,
# and given the list of provided atoms for a given residue,
# find the bt whose atom list has all of the provided atoms
# and is missing the fewest atoms that were not provided
# e.g. if atoms A, B and C were provided and
# BT #1 has atoms A and B
# BT #2 has atoms A B C and D, and
# BT #3 has atoms A B C D and E, and
# then the best match is not BT #1 because it does not have
# provided atom C,
# and BT #2 is preferred to BT #3 because BT #3 is missing
# more atoms.
# so if we have array
# p [1, 1, 1, 0, 0] representing provided atoms A, B, and C, and
# b1 [1, 1, 0, 0, 0] for BT #1, and
# b2 [1, 1, 1, 1, 0] for BT #2, and
# b3 [1, 1, 1, 1, 1] for BT #3,
# then
# sum((p - b1) == 1) = sum(p & ~b1) ==> 1
# sum((p - b2) == 1) = sum(p & ~b2) ==> 0
# sum((p - b3) == 1) = sum(p & ~b3) ==> 0
# so we would eliminate b1
# and then
# sum((b1 - p) == 1) = sum(b1 & ~p) ==> 0 but note this option will have been eliminated
# sum((b2 - p) == 1) = sum(b2 & ~p) ==> 1
# sum((b3 - p) == 1) = sum(b3 & ~p) ==> 2
# so if we take the minimum among the non-eliminated set of b2 and b3
# that would tell us to assign b2 to this residue.
# However, sometimes residues are given to us without the atoms that define
# the termini, and we are expected to build those atoms. We may not be able
# to tell the difference between termini-type X and termini-type Y in terms
# of how many atoms are missing, or rather, it might be some exotic termini
# type has fewer missing atoms than the generic run-of-the-mill termini
# type. So the user is allowed to (must) specify which termini patches
# are the default ones. We then want to select the default-termini-patched
# block type regardless of how many or few of the termini-placed atoms
# are missing, so long as we don't have any provided atom that tells us to
# choose something else.
# Therefore, we have to ignore the atoms added by termini patches when
# counting how many atoms in the provided set are missing from the bt's set
# so e.g. if
# bt1 has atoms [A B C Q R] after its term patch added atoms Q and R, and
# bt2 has atoms [A B C S ] after its term patch added atom S, and
# the present set has atoms [A B C], and
# bt1 has been declared the "default"
# then both bt1 and bt2 would have the same score of 0 and
# the tie would go to bt1.
# logically, this would happen with
# sum(p & ~b1) as before for looking to make sure all atoms in p are contained in b1
# but the second part would become
# sum(b1_sans_termini_additions & ~p) counting only non-termini-patch-added atoms
# of b1 that are absent from p against b1.
#
# how is that going to be encoded???
# bt2 since it is not the default atom can be given a small penalty so that
# it is worse than bt1 if they both have the same number of non-termini atoms
# present but will not be worse than if some non-termini atom is missing
# from bt1 but not from bt2.
# We can do that by setting the score as
# 2 * n-non-termini-atoms-missing + is-non-default-term
device = pbt.device
n_poses = atom_is_present.shape[0]
max_n_res = atom_is_present.shape[1]
can_ann = pbt.canonical_ordering_annotation
max_n_candidates = can_ann.max_n_candidates_for_var_combo
block_type_candidates = torch.full(
(n_poses, max_n_res, max_n_candidates),
-1,
dtype=torch.int64,
device=device,
)
is_real_candidate = torch.zeros(
(n_poses, max_n_res, max_n_candidates),
dtype=torch.bool,
device=device,
)
block_type_candidates[is_real_res] = can_ann.var_combo_candidate_bt_index[
res_types64[is_real_res],
termini_variants[is_real_res],
res_type_variants64[is_real_res],
]
real_res_res_types64 = res_types64[is_real_res]
real_res_termini_variants = termini_variants[is_real_res]
real_res_res_type_variants64 = res_type_variants64[is_real_res]
real_res_block_type_candidates = can_ann.var_combo_candidate_bt_index[
real_res_res_types64, real_res_termini_variants, real_res_res_type_variants64
]
is_real_candidate[is_real_res] = can_ann.var_combo_is_real_candidate[
res_types64[is_real_res],
termini_variants[is_real_res],
res_type_variants64[is_real_res],
]
is_real_cand_for_real_res = can_ann.var_combo_is_real_candidate[
real_res_res_types64, real_res_termini_variants, real_res_res_type_variants64
]
real_candidate_block_type = real_res_block_type_candidates[
is_real_cand_for_real_res
]
atom_is_present = atom_is_present.unsqueeze(2).expand(-1, -1, max_n_candidates, -1)
real_candidate_atom_is_absent = can_ann.bt_canonical_atom_is_absent[
real_candidate_block_type
]
real_candidate_provided_atoms_absent = torch.logical_and(
atom_is_present[is_real_candidate], real_candidate_atom_is_absent
)
# if there are any atoms that were provided for a given residue
# but that the variant does not contain, then that is not a match
real_candidate_should_be_excluded = torch.any(
real_candidate_provided_atoms_absent, dim=1
)
atom_is_absent = torch.logical_not(atom_is_present)
real_candidate_non_term_patch_atom_is_present = (
can_ann.bt_non_term_patch_added_canonical_atom_is_present[
real_candidate_block_type
]
)
real_candidate_canonical_atom_was_not_provided = torch.logical_and(
atom_is_absent[is_real_candidate], real_candidate_non_term_patch_atom_is_present
)
real_candidate_is_non_default_term = can_ann.bt_is_non_default_terminus[
real_candidate_block_type
].to(torch.int64)
real_candidate_n_canonical_atoms_not_provided = torch.sum(
real_candidate_canonical_atom_was_not_provided, dim=1
)
real_candidate_misalignment_score = (
2 * real_candidate_n_canonical_atoms_not_provided
+ real_candidate_is_non_default_term
)
failure_score = 2 * (canonical_ordering.max_n_canonical_atoms + 1)
real_candidate_misalignment_score[real_candidate_should_be_excluded] = failure_score
candidate_misalignment_score2 = torch.full(
(
n_poses,
max_n_res,
max_n_candidates,
),
failure_score,
dtype=torch.int64,
device=device,
)
candidate_misalignment_score2[is_real_candidate] = real_candidate_misalignment_score
best_candidate_ind2 = torch.argmin(candidate_misalignment_score2, dim=2)
# ok, we need to do some quality checks. If the best fit variant's score is
# 2 * (canonical_ordering.max_n_canonical_atoms + 1) or worse, then we have
# a problem. It's hard to know what to do at this point!
best_candidate_score = torch.zeros(
(n_poses, max_n_res), dtype=torch.int64, device=device
)
best_candidate_score[is_real_res] = candidate_misalignment_score2[
nz_is_real_res[:, 0],
nz_is_real_res[:, 1],
best_candidate_ind2[is_real_res],
]
if torch.any(best_candidate_score >= failure_score):
nz_is_real_candidate = torch.nonzero(is_real_candidate)
err_msg = []
for cand_ind in range(nz_is_real_candidate.shape[0]):
i = nz_is_real_candidate[cand_ind, 0]
j = nz_is_real_candidate[cand_ind, 1]
k = nz_is_real_candidate[cand_ind, 2]
if best_candidate_score[i, j] < failure_score:
continue
ij_equiv_class = canonical_ordering.restype_io_equiv_classes[
res_types64[i, j]
]
err_msg.append("Failed to resolve block type for")
err_msg.extend([str(x) for x in [i.item(), j.item()]])
err_msg.append(str(ij_equiv_class) + "\n")
which_bt = real_candidate_block_type[cand_ind]
cand_bt = pbt.active_block_types[which_bt]
err_msg.extend(
[
str(x)
for x in (
i.item(),
j.item(),
k.item(),
which_bt.item(),
cand_bt.name,
"restype",
)
]
)
err_msg.extend([str(x) for x in (res_types64[i, j].item(), "equiv class")])
err_msg.append(
canonical_ordering.restype_io_equiv_classes[res_types64[i, j]] + "\n"
)
if real_candidate_should_be_excluded[cand_ind]:
equiv_class = cand_bt.io_equiv_class
for l in range(
len(canonical_ordering.restypes_ordered_atom_names[equiv_class])
):
if real_candidate_provided_atoms_absent[cand_ind, l]:
err_msg.extend(
[
str(x)
for x in (
" atom",
canonical_ordering.restypes_ordered_atom_names[
equiv_class
][l],
"provided but absent from candidate",
cand_bt.name + "\n",
)
]
)
# should there be an `else:` here??
# No.
# If there is at least one canonical atom that does not
# belong to a given block type, then its score will be less than
# the failure-score cutoff. We would only arrive at this "else"
# condition if an block type had every single atom across all
# variants of that atom, and the largest number of atoms of all
# block types and it were not the default termini type and the
# user had provided not a single one of its atoms to us, but still
# claimed that there was a residue.
> raise RuntimeError(
" ".join(
[
"failed to resolve a block type from the candidates available\n",
*err_msg,
]
)
)
E RuntimeError: failed to resolve a block type from the candidates available
E Failed to resolve block type for 0 0 MET
E 0 0 0 62 MET:nterm restype 12 equiv class MET
E atom H provided but absent from candidate MET:nterm
tmol/io/details/select_from_canonical.py:609: RuntimeError