from pymol import cmd from pymol.cgo import * import chempy def add_atom(model, name, vdw, x, y, z): a = chempy.Atom() a.name = name a.vdw = vdw a.coord = [x, y, z] model.atom.append(a) def channel1(): model = chempy.models.Indexed() add_atom(model, '0', 1.590, -7.568, -3.569, -5.216) add_atom(model, '1', 1.800, -7.037, -3.997, -5.948) add_atom(model, '2', 2.060, -6.198, -4.175, -6.242) add_atom(model, '3', 1.850, -5.618, -3.712, -6.767) add_atom(model, '4', 1.770, -5.147, -3.124, -7.424) add_atom(model, '5', 1.830, -4.481, -2.547, -7.433) add_atom(model, '6', 1.620, -3.582, -2.402, -7.846) add_atom(model, '7', 1.540, -2.825, -2.013, -8.286) add_atom(model, '8', 1.510, -2.088, -1.439, -8.618) add_atom(model, '9', 1.770, -1.275, -0.908, -8.858) add_atom(model, '10', 1.990, -0.609, -0.349, -8.832) add_atom(model, '11', 1.690, -0.011, 0.016, -8.140) add_atom(model, '12', 1.550, 0.724, 0.384, -7.571) add_atom(model, '13', 1.660, 1.471, 0.762, -7.089) add_atom(model, '14', 1.610, 2.391, 1.094, -7.299) add_atom(model, '15', 1.610, 3.153, 1.655, -7.461) add_atom(model, '16', 1.730, 3.786, 2.395, -7.660) add_atom(model, '17', 1.720, 4.280, 3.066, -7.166) add_atom(model, '18', 1.550, 5.152, 3.167, -6.870) for a in range(len(model.atom) - 1): b = chempy.Bond() b.index = [a, a + 1] model.bond.append(b) cmd.set('surface_mode', 1) cmd.set('sphere_mode', 9) cmd.set('mesh_mode', 1) cmd.load_model(model, 'channel1') cmd.hide('everything', 'channel1') cmd.set('sphere_color', 'red', 'channel1') cmd.show('spheres', 'channel1') channel1() cmd.group('Channels', [channel1], 'add') def channel2(): model = chempy.models.Indexed() add_atom(model, '0', 1.590, -7.568, -3.569, -5.216) add_atom(model, '1', 1.800, -7.037, -3.997, -5.948) add_atom(model, '2', 2.060, -6.198, -4.175, -6.242) add_atom(model, '3', 2.030, -5.431, -3.833, -5.849) add_atom(model, '4', 2.030, -4.657, -3.249, -5.603) add_atom(model, '5', 2.030, -4.481, -2.779, -4.941) add_atom(model, '6', 1.620, -4.699, -1.894, -4.529) add_atom(model, '7', 1.290, -4.292, -1.157, -3.994) add_atom(model, '8', 1.060, -4.131, -0.512, -3.334) add_atom(model, '9', 1.160, -3.473, -0.111, -2.809) add_atom(model, '10', 1.250, -2.798, 0.260, -2.306) add_atom(model, '11', 1.180, -1.854, -0.011, -2.187) add_atom(model, '12', 1.010, -1.135, -0.087, -1.699) add_atom(model, '13', 0.790, -0.869, -0.078, -0.735) add_atom(model, '14', 0.770, -0.979, -0.007, 0.118) add_atom(model, '15', 1.120, -0.276, 0.130, 0.713) for a in range(len(model.atom) - 1): b = chempy.Bond() b.index = [a, a + 1] model.bond.append(b) cmd.set('surface_mode', 1) cmd.set('sphere_mode', 9) cmd.set('mesh_mode', 1) cmd.load_model(model, 'channel2') cmd.hide('everything', 'channel2') cmd.set('sphere_color', 'green', 'channel2') cmd.show('spheres', 'channel2') channel2() cmd.group('Channels', [channel2], 'add') def channel3(): model = chempy.models.Indexed() add_atom(model, '0', 1.590, -7.568, -3.569, -5.216) add_atom(model, '1', 1.800, -7.037, -3.997, -5.948) add_atom(model, '2', 2.060, -6.198, -4.175, -6.242) add_atom(model, '3', 2.030, -5.431, -3.833, -5.849) add_atom(model, '4', 2.030, -4.657, -3.249, -5.603) add_atom(model, '5', 2.050, -4.371, -2.860, -4.953) add_atom(model, '6', 1.870, -3.407, -2.921, -4.787) add_atom(model, '7', 1.370, -2.625, -2.841, -4.279) add_atom(model, '8', 0.980, -1.893, -2.533, -3.670) add_atom(model, '9', 0.940, -1.162, -2.208, -3.070) add_atom(model, '10', 0.950, -0.669, -2.342, -2.415) add_atom(model, '11', 0.720, -0.764, -3.093, -1.822) add_atom(model, '12', 0.800, -1.023, -3.915, -1.316) add_atom(model, '13', 0.790, -1.373, -4.350, -0.649) add_atom(model, '14', 0.710, -1.872, -4.664, 0.051) add_atom(model, '15', 1.090, -2.523, -4.638, 0.755) add_atom(model, '16', 1.490, -3.199, -4.643, 1.390) add_atom(model, '17', 1.460, -3.630, -4.181, 2.146) add_atom(model, '18', 1.710, -4.054, -3.916, 2.980) for a in range(len(model.atom) - 1): b = chempy.Bond() b.index = [a, a + 1] model.bond.append(b) cmd.set('surface_mode', 1) cmd.set('sphere_mode', 9) cmd.set('mesh_mode', 1) cmd.load_model(model, 'channel3') cmd.hide('everything', 'channel3') cmd.set('sphere_color', 'blue', 'channel3') cmd.show('spheres', 'channel3') channel3() cmd.group('Channels', [channel3], 'add')