What Is State in PyMol

This section provides a quick introduction about 'state', which represents a particular arangement of molecule structure objects in PyMol.



What Is State in PyMol? A state is a concept used by PyMol to represent a particular arangement of molecule structure objects.

PyMol allows you to create multiple states, which can be used to build frames to create a movie.

When you start PyMol, it has no frames and no structure objects.

When you load the first molecule structure from a file using the "load file_name" command, PyMol creates the first state #1, and adds the structure as a new object to state #1. The new object is named with the file name.

If you load the second molecule structure from another file using the "load file_name" command, PyMol adds the second structure as a new object to state #1. The new object is named with the file name.

If you want to create state #2 and load the second structure to state #2, you need to specify the state # in the load command as:

load file_name, object_name, state

Here is a PyMol command script that creates 3 states with 3 objects from 3 files.

# Create-Multiple-States-from-Files.pml

# delete exsiting objects and frames
delete all

# create state 1 with methane molecule as the object
load Molecule-Methane.sdf, Methane, 1

# create state 2 with alcohol molecule as the object
load Molecule-Alcohol.sdf, Alcohol, 2

# create state 3 with benzene ring as the object
load Benzene-Ring.sdf, Benzene, 3



 

Table of Contents

 About This Book

 Introduction of Molecules

 SDF (Structure Data File)

 PyMol Installation

 PyMol GUI and CLI

 PyMol Selections

 PyMol Editing Functions

 PyMol Measurement Functions

 PyMol Movie Functions

 PyMol Python Integration

 PyMol Object Functions

 References

 Full Version in PDF/EPUB