PyMOL>from pymol2 import PyMOL
PyMOL>lst = []
PyMOL>for i in range(0,3): lst.append( PyMOL() )
PyMOL>for pi in lst: pi.start()
PyMOL>cmd.load("dat/1tii.pdb",quiet=0)
HEADER    ENTEROTOXIN                             20-MAR-96   1TII
TITLE     ESCHERICHIA COLI HEAT LABILE ENTEROTOXIN TYPE IIB
COMPND    MOL_ID: 1;
COMPND   2 MOLECULE: HEAT LABILE ENTEROTOXIN TYPE IIB;
COMPND   3 CHAIN: D, E, F, G, H, A, C;
COMPND   4 SYNONYM: LT-IIB;
COMPND   5 ENGINEERED: YES;
COMPND   6 OTHER_DETAILS: LATENT/INACTIVE FORM
 ObjectMolecule: Read secondary structure assignments.
 ObjectMolecule: Read crystal symmetry information.
 Symmetry: Found 6 symmetry operators.
 CmdLoad: "dat/1tii.pdb" loaded as "1tii".
PyMOL>lst[0].cmd.load("dat/pept.pdb",quiet=0)
 CmdLoad: "dat/pept.pdb" loaded as "pept".
PyMOL>lst[1].cmd.load("dat/3al1.pdb",quiet=0)
HEADER    STRUCTURAL PROTEIN                      26-OCT-98   3AL1
TITLE     DESIGNED PEPTIDE ALPHA-1, RACEMIC P1BAR FORM
COMPND    MOL_ID: 1;
COMPND   2 MOLECULE: D, L-ALPHA-1;
COMPND   3 CHAIN: A, B;
COMPND   4 ENGINEERED: YES;
COMPND   5 OTHER_DETAILS: N TERMINI ARE ACETYLATED
 ObjectMolecule: Read secondary structure assignments.
 ObjectMolecule: Read crystal symmetry information.
 Symmetry: Found 2 symmetry operators.
 CmdLoad: "dat/3al1.pdb" loaded as "3al1".
PyMOL>print cmd.count_atoms()
5684
PyMOL>for pi in lst: print pi.cmd.count_atoms()
107
679
0
PyMOL>cmd._dump_floats(lst[0].cmd.get_view())
  1.000   0.000   0.000   0.000   1.000   0.000   0.000   0.000   1.000
  0.000   0.000 -63.191   1.224 -10.279  20.545  49.820  76.561   0.000
PyMOL>lst[0].cmd.ray(renderer=2)
 RayRenderTest: obtained 166 graphics primitives.
PyMOL>lst[0].cmd.scene("F1","store")
 scene: scene stored as "F1".
PyMOL>lst[0].cmd.turn("x",45)
PyMOL>cmd._dump_floats(lst[0].cmd.get_view())
  1.000   0.000   0.000   0.000   0.707   0.707   0.000  -0.707   0.707
  0.000   0.000 -63.191   1.224 -10.279  20.545  49.820  76.561   0.000
PyMOL>lst[0].cmd.show_as("cartoon")
PyMOL>lst[0].cmd.ray(renderer=2)
 RayRenderTest: obtained 800 graphics primitives.
PyMOL>lst[0].cmd.scene("F2","store")
 scene: scene stored as "F2".
PyMOL>cmd._dump_floats(lst[1].cmd.get_view())
  1.000   0.000   0.000   0.000   1.000   0.000   0.000   0.000   1.000
  0.000   0.000 -100.481  -9.632   2.772  -6.069  79.220 121.742   0.000
PyMOL>lst[1].cmd.ray(renderer=2)
 RayRenderTest: obtained 1266 graphics primitives.
PyMOL>lst[1].cmd.scene("F1","store")
 scene: scene stored as "F1".
PyMOL>lst[1].cmd.turn("y",45)
PyMOL>cmd._dump_floats(lst[1].cmd.get_view())
  0.707   0.000  -0.707   0.000   1.000   0.000   0.707   0.000   0.707
  0.000   0.000 -100.481  -9.632   2.772  -6.069  79.220 121.742   0.000
PyMOL>lst[1].cmd.show_as("cartoon")
PyMOL>lst[1].cmd.ray(renderer=2)
 RayRenderTest: obtained 2832 graphics primitives.
PyMOL>lst[1].cmd.scene("F2","store")
 scene: scene stored as "F2".
PyMOL>cmd._dump_floats(cmd.get_view())
  1.000   0.000   0.000   0.000   1.000   0.000   0.000   0.000   1.000
  0.000   0.000 -227.278  51.665  11.519  10.196 179.188 275.368   0.000
PyMOL>for pi in lst: cmd._dump_floats(pi.cmd.get_view())
  1.000   0.000   0.000   0.000   0.707   0.707   0.000  -0.707   0.707
  0.000   0.000 -63.191   1.224 -10.279  20.545  49.820  76.561   0.000
  0.707   0.000  -0.707   0.000   1.000   0.000   0.707   0.000   0.707
  0.000   0.000 -100.481  -9.632   2.772  -6.069  79.220 121.742   0.000
  1.000   0.000   0.000   0.000   1.000   0.000   0.000   0.000   1.000
  0.000   0.000 -50.000   0.000   0.000   0.000  40.000 100.000   0.000
PyMOL>lst[0].cmd.hide("everything")
PyMOL>lst[1].cmd.hide("everything")
PyMOL>lst[0].cmd.save("tmp/M0052sess0.pse",quiet=0)
 Save: wrote "tmp/M0052sess0.pse".
PyMOL>lst[1].cmd.save("tmp/M0052sess1.pse",quiet=0)
 Save: wrote "tmp/M0052sess1.pse".
PyMOL>lst[0].cmd.load("tmp/M0052sess1.pse",quiet=0)
 Executive: Loading version 1.10 session...
PyMOL>lst[1].cmd.load("tmp/M0052sess0.pse",quiet=0)
 Executive: Loading version 1.10 session...
PyMOL>cmd.ray(renderer=2)
 RayRenderTest: obtained 9114 graphics primitives.
PyMOL>for pi in lst: pi.cmd.ray(renderer=2)
 RayRenderTest: obtained 0 graphics primitives.
 RayRenderTest: obtained 0 graphics primitives.
 RayRenderTest: obtained 0 graphics primitives.
PyMOL>print cmd.count_atoms()
5684
PyMOL>or pi in lst: print pi.cmd.count_atoms()
Error: ambiguous command: 
  order   orient  origin
PyMOL>cmd._dump_floats(cmd.get_view())
  1.000   0.000   0.000   0.000   1.000   0.000   0.000   0.000   1.000
  0.000   0.000 -227.278  51.665  11.519  10.196 179.188 275.368   0.000
PyMOL>for pi in lst: cmd._dump_floats(pi.cmd.get_view())
  0.707   0.000  -0.707   0.000   1.000   0.000   0.707   0.000   0.707
  0.000   0.000 -100.481  -9.632   2.772  -6.069  79.220 121.742   0.000
  1.000   0.000   0.000   0.000   0.707   0.707   0.000  -0.707   0.707
  0.000   0.000 -63.191   1.224 -10.279  20.545  49.820  76.561   0.000
  1.000   0.000   0.000   0.000   1.000   0.000   0.000   0.000   1.000
  0.000   0.000 -50.000   0.000   0.000   0.000  40.000 100.000   0.000
PyMOL>lst[0].cmd.scene("F1",animate=0)
PyMOL>lst[1].cmd.scene("F1",animate=0)
PyMOL>cmd._dump_floats(cmd.get_view())
  1.000   0.000   0.000   0.000   1.000   0.000   0.000   0.000   1.000
  0.000   0.000 -227.278  51.665  11.519  10.196 179.188 275.368   0.000
PyMOL>for pi in lst: cmd._dump_floats(pi.cmd.get_view())
  1.000   0.000   0.000   0.000   1.000   0.000   0.000   0.000   1.000
  0.000   0.000 -100.481  -9.632   2.772  -6.069  79.220 121.742   0.000
  1.000   0.000   0.000   0.000   1.000   0.000   0.000   0.000   1.000
  0.000   0.000 -63.191   1.224 -10.279  20.545  49.820  76.561   0.000
  1.000   0.000   0.000   0.000   1.000   0.000   0.000   0.000   1.000
  0.000   0.000 -50.000   0.000   0.000   0.000  40.000 100.000   0.000
PyMOL>cmd.ray(renderer=2)
 RayRenderTest: obtained 9114 graphics primitives.
PyMOL>for pi in lst: pi.cmd.ray(renderer=2)
 RayRenderTest: obtained 1266 graphics primitives.
 RayRenderTest: obtained 166 graphics primitives.
 RayRenderTest: obtained 0 graphics primitives.
PyMOL>lst[0].cmd.scene("F2",animate=0)
PyMOL>lst[1].cmd.scene("F2",animate=0)
PyMOL>cmd._dump_floats(cmd.get_view())
  1.000   0.000   0.000   0.000   1.000   0.000   0.000   0.000   1.000
  0.000   0.000 -227.278  51.665  11.519  10.196 179.188 275.368   0.000
PyMOL>for pi in lst: cmd._dump_floats(pi.cmd.get_view())
  0.707   0.000  -0.707   0.000   1.000   0.000   0.707   0.000   0.707
  0.000   0.000 -100.481  -9.632   2.772  -6.069  79.220 121.742   0.000
  1.000   0.000   0.000   0.000   0.707   0.707   0.000  -0.707   0.707
  0.000   0.000 -63.191   1.224 -10.279  20.545  49.820  76.561   0.000
  1.000   0.000   0.000   0.000   1.000   0.000   0.000   0.000   1.000
  0.000   0.000 -50.000   0.000   0.000   0.000  40.000 100.000   0.000
PyMOL>cmd.ray(renderer=2)
 RayRenderTest: obtained 9114 graphics primitives.
PyMOL>for pi in lst: pi.cmd.ray(renderer=2)
 RayRenderTest: obtained 2832 graphics primitives.
 RayRenderTest: obtained 800 graphics primitives.
 RayRenderTest: obtained 0 graphics primitives.
PyMOL>for pi in lst: pi.stop()
PyMOL>del lst
