@@ -740,14 +740,18 @@ def test_write_pymol_session_skips_ligand_preset_without_organic_atoms(tmp_path,
740740 "remove_ligand" : "" ,
741741 "pymol_transparency" : 0.1 ,
742742 "pymol_gray" : 80 ,
743+ "pymol_surface_quality" : - 1 ,
743744 "mask_subunit" : False ,
744745 "session_file_path" : str (tmp_path / "out.pse" ),
745746 }
746747 parser_pymol .write_pymol_session (df = df , g = g )
747748 assert not any ("preset.ligand_sites_trans_hq" in cmd for cmd in commands )
748749 assert not any ("util.cbag organic" in cmd for cmd in commands )
750+ surface_quality_index = next (i for i , cmd in enumerate (commands ) if "set surface_quality" in cmd )
749751 set_index = next (i for i , cmd in enumerate (commands ) if "set transparency" in cmd )
750752 show_surface_index = next (i for i , cmd in enumerate (commands ) if cmd == "show surface" )
753+ assert "set surface_quality, -1" in commands [surface_quality_index ]
754+ assert surface_quality_index < show_surface_index
751755 assert set_index < show_surface_index
752756
753757
@@ -770,9 +774,11 @@ def test_write_pymol_session_keeps_ligand_preset_with_organic_atoms(tmp_path, mo
770774 "remove_ligand" : "" ,
771775 "pymol_transparency" : 0.1 ,
772776 "pymol_gray" : 80 ,
777+ "pymol_surface_quality" : 0 ,
773778 "mask_subunit" : False ,
774779 "session_file_path" : str (tmp_path / "out.pse" ),
775780 }
776781 parser_pymol .write_pymol_session (df = df , g = g )
777782 assert any ("preset.ligand_sites_trans_hq" in cmd for cmd in commands )
778783 assert any ("util.cbag organic" in cmd for cmd in commands )
784+ assert any ("set surface_quality, 0" in cmd for cmd in commands )
0 commit comments