Hello to PyMOL mailing list.

I'm writing a python script using PyMOL as module.

I want to set "cartoon_side_chain_helpe = on" globally and, only for residues inside a list (chosen_residues_replacement_list), I want to set "cartoon_side_chain_helpe = off".

For this purpuse, I'm trying to use "unset" in this way:

## Choice:
chosen_residues = "316+317+319";

## Task:
chosen_residues_replacement = chosen_residues.replace("+", " ");
chosen_residues_replacement_list = chosen_residues_replacement.split();
if not chosen_residues_replacement_list:
    print("Empty list!");
    residues = "resi {}".format(chosen_residues);
    cmd.select("residues", residues, enable=1);
    cmd.select("everything_else","(not residues)", enable=1); # invert "residues" selection
    cmd.set("cartoon_side_chain_helper", "on");

but in this way I can't see "cartoon_side_chain_helper = off" for residues in "chosen_residues".

Thanks a lot,
Riccardo Volpe

 ChemBioScripting | X3D PyMOL Molecule Viewer | Gioacchino Riccardo Volpe