picogl.tests.test_molecular_mesh ================================ .. py:module:: picogl.tests.test_molecular_mesh .. autoapi-nested-parse:: Tests for molecular mesh data builders. Classes ------- .. autoapisummary:: picogl.tests.test_molecular_mesh._Atom picogl.tests.test_molecular_mesh._AtomCoords Functions --------- .. autoapisummary:: picogl.tests.test_molecular_mesh.test_atom_xyz_prefers_coords_over_xyz picogl.tests.test_molecular_mesh.test_atom_radius_uses_atom3d_field_or_fallback picogl.tests.test_molecular_mesh.test_atoms_mesh_single_atom_counts picogl.tests.test_molecular_mesh.test_atoms_mesh_accepts_coords_attribute picogl.tests.test_molecular_mesh.test_atoms_mesh_color_fn_receives_atom picogl.tests.test_molecular_mesh.test_atoms_mesh_two_atoms_vectorized_expand picogl.tests.test_molecular_mesh.test_atoms_mesh_per_atom_radii_override_uniform_radius picogl.tests.test_molecular_mesh.test_atoms_mesh_default_color_fn_uses_chain_palette picogl.tests.test_molecular_mesh.test_bonds_mesh_single_bond picogl.tests.test_molecular_mesh.test_bonds_mesh_cylinder_normals_perpendicular_to_axis picogl.tests.test_molecular_mesh.test_bonds_mesh_custom_radius_and_color_fn picogl.tests.test_molecular_mesh.test_atoms_mesh_custom_geometry picogl.tests.test_molecular_mesh.test_bonds_mesh_custom_geometry picogl.tests.test_molecular_mesh.test_bonds_mesh_two_bonds_vectorized_expand picogl.tests.test_molecular_mesh.test_bonds_mesh_skips_zero_length_without_repeating_color picogl.tests.test_molecular_mesh.test_bonds_mesh_item_keys_match_surviving_pairs picogl.tests.test_molecular_mesh.test_bonds_mesh_empty_has_empty_pair_metadata picogl.tests.test_molecular_mesh.test_bonds_mesh_color_bonds_false_broadcasts_bond_color picogl.tests.test_molecular_mesh.test_atoms_mesh_empty_uses_geometry_draw_info picogl.tests.test_molecular_mesh.test_to_legacy_glmesh_without_upload picogl.tests.test_molecular_mesh.test_to_glmesh_without_upload picogl.tests.test_molecular_mesh.test_atom_point_geometry_is_one_origin_vertex picogl.tests.test_molecular_mesh.test_atom_points_mesh_two_atoms_unindexed picogl.tests.test_molecular_mesh.test_atom_points_mesh_color_fn_called_once_per_atom picogl.tests.test_molecular_mesh.test_atom_points_mesh_empty_is_unindexed_points picogl.tests.test_molecular_mesh.test_bond_lines_mesh_two_atoms_one_pair picogl.tests.test_molecular_mesh.test_bond_lines_mesh_color_bonds_false_broadcasts_bond_color picogl.tests.test_molecular_mesh.test_bond_lines_mesh_color_fn_called_once_per_atom picogl.tests.test_molecular_mesh.test_bond_lines_mesh_empty_is_indexed_lines Module Contents --------------- .. py:class:: _Atom .. py:attribute:: x :type: float .. py:attribute:: y :type: float .. py:attribute:: z :type: float .. py:attribute:: chain_id :type: str .. py:function:: test_atom_xyz_prefers_coords_over_xyz() -> None atom_xyz lives on entities.coords, not the sphere mesh module. .. py:function:: test_atom_radius_uses_atom3d_field_or_fallback() -> None .. py:function:: test_atoms_mesh_single_atom_counts() -> None .. py:class:: _AtomCoords .. py:attribute:: coords :type: tuple[float, float, float] .. py:attribute:: chain_id :type: str .. py:function:: test_atoms_mesh_accepts_coords_attribute() -> None MoLib Atom3D-style objects expose coords, not x/y/z. .. py:function:: test_atoms_mesh_color_fn_receives_atom() -> None .. py:function:: test_atoms_mesh_two_atoms_vectorized_expand() -> None Two atoms expand one template: tiled normals, repeated colors, offset EBO. .. py:function:: test_atoms_mesh_per_atom_radii_override_uniform_radius() -> None Per-atom radii scale the template independently of geometry.radius. .. py:function:: test_atoms_mesh_default_color_fn_uses_chain_palette() -> None Omitting color_fn must not crash; colors follow make_chain_color_fn. .. py:function:: test_bonds_mesh_single_bond() -> None .. py:function:: test_bonds_mesh_cylinder_normals_perpendicular_to_axis() -> None .. py:function:: test_bonds_mesh_custom_radius_and_color_fn() -> None .. py:function:: test_atoms_mesh_custom_geometry() -> None .. py:function:: test_bonds_mesh_custom_geometry() -> None .. py:function:: test_bonds_mesh_two_bonds_vectorized_expand() -> None Two shafts: doubled vertex count, per-shaft colors, offset EBO. .. py:function:: test_bonds_mesh_skips_zero_length_without_repeating_color() -> None A collapsed pair adds neither vertices nor a color block. .. py:function:: test_bonds_mesh_item_keys_match_surviving_pairs() -> None Pair metadata omits collapsed shafts and gathers from atom A. .. py:function:: test_bonds_mesh_empty_has_empty_pair_metadata() -> None .. py:function:: test_bonds_mesh_color_bonds_false_broadcasts_bond_color() -> None .. py:function:: test_atoms_mesh_empty_uses_geometry_draw_info() -> None .. py:function:: test_to_legacy_glmesh_without_upload() -> None .. py:function:: test_to_glmesh_without_upload() -> None .. py:function:: test_atom_point_geometry_is_one_origin_vertex() -> None .. py:function:: test_atom_points_mesh_two_atoms_unindexed() -> None Two atoms: one vertex each, colors not repeated, no EBO. .. py:function:: test_atom_points_mesh_color_fn_called_once_per_atom() -> None .. py:function:: test_atom_points_mesh_empty_is_unindexed_points() -> None .. py:function:: test_bond_lines_mesh_two_atoms_one_pair() -> None Two atoms and one pair: one vertex each, LINES indices [0, 1]. .. py:function:: test_bond_lines_mesh_color_bonds_false_broadcasts_bond_color() -> None .. py:function:: test_bond_lines_mesh_color_fn_called_once_per_atom() -> None .. py:function:: test_bond_lines_mesh_empty_is_indexed_lines() -> None